[gnome-shell] panel: Move statusmenu initialization in the constructor



commit 4dec1bc846fc9fc1106083a4986595cc581a4694
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 18 02:34:45 2011 +0100

    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 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index f1a5e90..550ec2e 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() {



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