From 698fb64be9f4abf5798ca4361a05831758ff5fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 28 Jun 2012 12:22:17 +0200 Subject: [PATCH] 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 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 41bf99889..807e1192f 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) {