[gnome-shell-extensions] places-menu: recognize if apps-menu is present, and place to the right of it



commit 39c221775eae661c30bcd05e8fd3919b62daa955
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Sep 6 19:32:26 2012 +0200

    places-menu: recognize if apps-menu is present, and place to the right of it
    
    If apps-menu is enabled at the same time as places-menu, the right order
    is activities, apps-menu, places-menu, app-menu. Previously we used the
    extension activation order to obtain this, but it's not reliable enough,
    so make it explicit in code.

 extensions/places-menu/extension.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index 27a0d2f..2a7e179 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -106,7 +106,11 @@ let _indicator;
 
 function enable() {
     _indicator = new PlacesMenu;
-    Main.panel.addToStatusArea('places-menu', _indicator, 1, 'left');
+
+    let pos = 1;
+    if ('apps-menu' in Main.panel.statusArea)
+	pos = 2;
+    Main.panel.addToStatusArea('places-menu', _indicator, pos, 'left');
 }
 
 function disable() {



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