Skip to content

Commit

Permalink
Applets: Fixed enabling/disabling applets
Browse files Browse the repository at this point in the history
  • Loading branch information
clefebvre committed Sep 2, 2015
1 parent 34c1486 commit 387bf5c
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions js/ui/applet.js
Expand Up @@ -271,13 +271,7 @@ Applet.prototype = {
set_applet_enabled: function (enabled) {
if (enabled != this._applet_enabled) {
this._applet_enabled = enabled;
if (enabled) {
this.actor.set_style_class_name('applet-box');
}
else {
this.set_applet_tooltip('');
this.actor.set_style("padding:0px;");
}
this.actor.visible = enabled;
}
},

Expand Down Expand Up @@ -693,21 +687,9 @@ TextIconApplet.prototype = {
set_applet_enabled: function (enabled) {
if (enabled != this._applet_enabled) {
this._applet_enabled = enabled;
if (enabled) {
this.actor.set_style_class_name('applet-box');
if (this._applet_icon) {
this._applet_icon.show();
}
}
else {
if (this._applet_icon) {
this._applet_icon.hide();
this._applet_icon.set_style("padding:0px;padding-left:0px;padding-right:0px;");
}
this.set_applet_tooltip("");
this.set_applet_label("");
this.actor.set_style("padding:0px;padding-left:0px;padding-right:0px;");
global.log(this.actor.get_style());
this.actor.visible = enabled;
if (this._applet_icon) {
this._applet_icon.visible = enabled;
}
}
},
Expand Down

0 comments on commit 387bf5c

Please sign in to comment.