Skip to content

Commit

Permalink
rename create functions to update
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 15, 2018
1 parent 4bc88ec commit a282f84
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions [email protected]/modules/activateWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ var ActivateWindow = new Lang.Class({

_toggle: function() {
this._enabled = this._settings.get_boolean('autofocus-windows');
this._enabled ? this._create() : this.destroy();
this._enabled ? this._activate() : this.destroy();
},

_create: function() {
_activate: function() {
this._connectSignals();
},

Expand Down
8 changes: 6 additions & 2 deletions [email protected]/modules/activitiesButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ var ActivitiesButton = new Lang.Class({
},

_toggle: function() {
this._hidden = this._settings.get_boolean('hide-activities-button');
this._toggleButton(this._hidden);
this._enabled = this._settings.get_boolean('hide-activities-button');
this._enabled ? this._activate() : this.destroy();
},

_activate: function() {
this._toggleButton(true);
},

destroy: function() {
Expand Down
4 changes: 2 additions & 2 deletions [email protected]/modules/extendLeftBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ var ExtendLeftBox = new Lang.Class({

_toggle: function() {
this._enabled = this._settings.get_boolean('extend-left-box');
this._enabled ? this._create() : this.destroy();
this._enabled ? this._activate() : this.destroy();
},

_create: function() {
_activate: function() {
this._connnectSignals();
Panel.actor.queue_relayout();
},
Expand Down
4 changes: 2 additions & 2 deletions [email protected]/modules/messageTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var MessageTray = new Lang.Class({
this._container = Main.messageTray._bannerBin;
this._settings = Convenience.getSettings();

this._create();
this._activate();
this._connectSettings();
},

Expand Down Expand Up @@ -50,7 +50,7 @@ var MessageTray = new Lang.Class({
this._container.set_x_align(alignments[this._position]);
},

_create: function () {
_activate: function () {
this._updatePosition();
this._updateWidth();
},
Expand Down
4 changes: 2 additions & 2 deletions [email protected]/modules/topIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ var TopIcons = new Lang.Class({

_toggle: function() {
this._enabled = this._settings.get_boolean('show-legacy-tray');
this._enabled ? this._create() : this.destroy();
this._enabled ? this._activate() : this.destroy();
},

_create: function() {
_activate: function() {
if (Main.legacyTray) {
Mainloop.idle_add(Lang.bind(this, this._moveToPanel));
this._tray.actor.hide();
Expand Down

0 comments on commit a282f84

Please sign in to comment.