From 4dec1bc846fc9fc1106083a4986595cc581a4694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 18 Feb 2011 02:34:45 +0100 Subject: [PATCH] panel: Move statusmenu initialization in the constructor While related to the status area, the user status button is clearly not a status icon, and it does not make too much sense in startStatusArea(), which is about filling the status area with icons. Also, the status icon container is added to the panel in the constructor, in fact, the user status button is the only "toplevel" panel element which is initialized elsewhere. Not a crucial change, but makes for a nice read anyway. https://bugzilla.gnome.org/show_bug.cgi?id=642697 --- js/ui/panel.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index f1a5e9097..550ec2e87 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -703,6 +703,10 @@ Panel.prototype = { this._rightBox.add(this._trayBox); this._rightBox.add(this._statusBox); + this._statusmenu = new StatusMenu.StatusMenuButton(); + this._menus.addMenu(this._statusmenu.menu); + this._rightBox.add(this._statusmenu.actor); + Main.statusIconDispatcher.connect('status-icon-added', Lang.bind(this, this._onTrayIconAdded)); Main.statusIconDispatcher.connect('status-icon-removed', Lang.bind(this, this._onTrayIconRemoved)); @@ -762,10 +766,6 @@ Panel.prototype = { this._statusBox.add(indicator.actor); this._menus.addMenu(indicator.menu); } - - this._statusmenu = new StatusMenu.StatusMenuButton(); - this._menus.addMenu(this._statusmenu.menu); - this._rightBox.add(this._statusmenu.actor); }, startupAnimation: function() {