[gnome-shell] userMenu: Move "Power off" item to the bottom



commit 698fb64be9f4abf5798ca4361a05831758ff5fb5
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Jun 28 12:22:17 2012 +0200

    userMenu: Move "Power off" item to the bottom
    
    The current position below "System Settings" is problematic - the
    items are unrelated, and misclicks will result in a scary system
    modal dialog that has to be cancelled.
    Move items around a bit to avoid this problem.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678887

 js/ui/userMenu.js |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index 41bf998..807e119 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -692,13 +692,6 @@ const UserMenuButton = new Lang.Class({
             this.menu.addMenuItem(item);
         }
 
-        item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
-                                                      _("Suspend"));
-        this.menu.addMenuItem(item);
-        item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
-        this._suspendOrPowerOffItem = item;
-        this._updateSuspendOrPowerOff();
-
         item = new PopupMenu.PopupSeparatorMenuItem();
         this.menu.addMenuItem(item);
 
@@ -712,13 +705,20 @@ const UserMenuButton = new Lang.Class({
         this.menu.addMenuItem(item);
         this._logoutItem = item;
 
-        item = new PopupMenu.PopupSeparatorMenuItem();
-        this.menu.addMenuItem(item);
-
         item = new PopupMenu.PopupMenuItem(_("Lock"));
         item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
         this.menu.addMenuItem(item);
         this._lockScreenItem = item;
+
+        item = new PopupMenu.PopupSeparatorMenuItem();
+        this.menu.addMenuItem(item);
+
+        item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
+                                                      _("Suspend"));
+        this.menu.addMenuItem(item);
+        item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
+        this._suspendOrPowerOffItem = item;
+        this._updateSuspendOrPowerOff();
     },
 
     _updatePresenceStatus: function(item, event) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]