Skip to content

Commit

Permalink
Merge pull request #15 from one-thing-gnome/right-box-actor-added-signal
Browse files Browse the repository at this point in the history
add function for right-box-actor-added-signal
  • Loading branch information
PRATAP-KUMAR authored Oct 28, 2023
2 parents 374b778 + 6ca5838 commit 18dc87e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ export default class OneThingGnome extends Extension {
});
});

this._insertChildToPanel();
}

_checkIfRightBoxIsSelected() {
let isRightBoxChosen = this._settings.get_int('location-in-status-bar') === 2;
if (isRightBoxChosen) {
this._actorAddedSignal = Main.panel._rightBox.connect('actor-added', () => {
this._insertChildToPanel();
});
}

this._insertChildToPanel();
}

_insertChildToPanel() {
Expand All @@ -54,6 +56,8 @@ export default class OneThingGnome extends Extension {

widget = new Widget(this._settings, this._dir);
Main.panel.addToStatusArea('one-thing', widget, index, location);

this._checkIfRightBoxIsSelected();
}

_destroyWidgetFromPanel() {
Expand Down

0 comments on commit 18dc87e

Please sign in to comment.