[gnome-shell-extensions] systemMonitor: update for gnome-shell master



commit d060657bf46685814f6ab0c3d6e82b5c2d0a8d5b
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Tue Sep 17 10:51:34 2013 +0200

    systemMonitor: update for gnome-shell master
    
    Reparent the message tray menu button so that the indicators
    don't cover it.

 extensions/systemMonitor/extension.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js
index 068c111..58a2f57 100644
--- a/extensions/systemMonitor/extension.js
+++ b/extensions/systemMonitor/extension.js
@@ -317,12 +317,27 @@ const Extension = new Lang.Class({
            this._indicators.push(indicator);
        }
 
-       Main.messageTray.actor.add_actor(this._box);
+       this._boxHolder = new St.BoxLayout({ x_expand: true,
+                                            y_expand: true,
+                                            x_align: Clutter.ActorAlign.START,
+                                          });
+       let menuButton = Main.messageTray._messageTrayMenuButton.actor;
+       Main.messageTray.actor.remove_child(menuButton);
+       Main.messageTray.actor.add_child(this._boxHolder);
+
+       this._boxHolder.add_child(this._box);
+       this._boxHolder.add_child(menuButton);
     },
 
     disable: function() {
        this._indicators.forEach(function(i) { i.destroy(); });
+
+       let menuButton = Main.messageTray._messageTrayMenuButton.actor;
+       this._boxHolder.remove_child(menuButton);
+       Main.messageTray.actor.add_child(menuButton);
+
        this._box.destroy();
+       this._boxHolder.destroy();
     },
 
     _onHover: function (item) {


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