summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-03-23 13:18:35 +0100
committersegfault <segfault@riseup.net>2019-03-23 16:53:06 +0100
commit5b8d8974f21bcb58f54f39170c605773051a57e6 (patch)
tree06f9202d826b70fc07b3fdb2c0f557cefda58e39
parent16581fb1b7292993db43a2212bb2a97d8a4e86ed (diff)
status-menu-helper: Remove unnecessary code (refs: #14556)
* Remove unused imports * Remove bind to 'open-state-changed'. This code was from the original author of the suspend-button extension and makes the restart and poweroff buttons visible when the menu opens - but in fact the buttons are always visible, so this code has no effect.
-rw-r--r--config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js18
1 files changed, 0 insertions, 18 deletions
diff --git a/config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js b/config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js
index 973ff5d..e411835 100644
--- a/config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js
+++ b/config/chroot_local-includes/usr/share/gnome-shell/extensions/status-menu-helper@tails.boum.org/extension.js
@@ -21,14 +21,9 @@
Raphael Freudiger <laser_b@gmx.ch>.
**/
const Lang = imports.lang;
-const Mainloop = imports.mainloop;
const St = imports.gi.St;
-const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
-const StatusSystem = imports.ui.status.system;
-const PopupMenu = imports.ui.popupMenu;
-const ExtensionSystem = imports.ui.extensionSystem;
const BoxPointer = imports.ui.boxpointer;
const Gettext = imports.gettext.domain('tails');
@@ -49,24 +44,11 @@ const Extension = new Lang.Class({
this._removeAltSwitcher();
this._addSeparateButtons();
- this._menuOpenStateChangedId = this.statusMenu.menu.connect('open-state-changed', Lang.bind(this,
- function(menu, open) {
- if (!open)
- return;
- this._restartButton.visible = true;
- this._poweroffButton.visible = true;
- }));
-
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._sessionUpdated();
},
disable: function() {
- if (this._menuOpenStateChangedId) {
- this.statusMenu.menu.disconnect(this._menuOpenStateChangedId);
- this._menuOpenStateChangedId = 0;
- }
-
this._destroyActions();
this._restoreAltSwitcher();
},