diff --git a/IPython/html/static/notebook/js/kernelselector.js b/IPython/html/static/notebook/js/kernelselector.js index 46d4882..01f6d2a 100644 --- a/IPython/html/static/notebook/js/kernelselector.js +++ b/IPython/html/static/notebook/js/kernelselector.js @@ -85,6 +85,7 @@ define([ this.events.on('spec_changed.Kernel', function(event, data) { that.current_selection = data.name; that.element.find("#current_kernel_spec").find('.kernel_name').text(data.display_name); + that.element.find("#current_kernel_logo").attr("src", "/kernelspecs/"+data.name+"/logo-64x64.png"); }); this.events.on('kernel_created.Session', function(event, data) { @@ -96,6 +97,14 @@ define([ that.events.trigger('spec_changed.Kernel', ks); } }); + + var logo_img = this.element.find("#current_kernel_logo") + logo_img.on("load", function() { + logo_img.show(); + }); + logo_img.on("error", function() { + logo_img.hide(); + }); }; return {'KernelSelector': KernelSelector}; diff --git a/IPython/html/static/notebook/less/kernelselector.less b/IPython/html/static/notebook/less/kernelselector.less index e3be7d3..44159c6 100644 --- a/IPython/html/static/notebook/less/kernelselector.less +++ b/IPython/html/static/notebook/less/kernelselector.less @@ -9,4 +9,9 @@ margin-top:0px; } } + + & > img#current_kernel_logo { + width: 32px; + height: 32px; + } } diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 3b2b2af..4eebfbe 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -9685,6 +9685,10 @@ fieldset[disabled] #kernel_selector_widget > button.active { #kernel_selector_widget > button > span.caret { margin-top: 0px; } +#kernel_selector_widget > img#current_kernel_logo { + width: 32px; + height: 32px; +} #menubar { box-sizing: border-box; -moz-box-sizing: border-box; diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index ec1c1e2..9c7547e 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -42,6 +42,7 @@ class="notebook_app" +