[gnome-shell-extensions/no-classic-overview: 1/5] places-menu: Don't hardcode position



commit 32cb68a64e93739896bf744f67da1a2eeb2a1e05
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed May 29 10:17:20 2019 +0000

    places-menu: Don't hardcode position
    
    The extension currently assumes that we have the "Activities" button
    at the left of the top bar. This is currently true, not only in the
    regular session, but also in GNOME classic where the button is hidden
    (but still present).
    
    However this is about to change: We will stop taking over the button
    from the apps-menu extension, and instead disable "Activities" from
    the session mode definition.
    
    Prepare for this by adding the places menu before the application menu
    instead of assuming a hardcoded position.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/69

 extensions/places-menu/extension.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index 00aa04d..58ef6b0 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -136,9 +136,9 @@ let _indicator;
 function enable() {
     _indicator = new PlacesMenu;
 
-    let pos = 1;
+    let pos = Main.sessionMode.panel.left.indexOf('appMenu');
     if ('apps-menu' in Main.panel.statusArea)
-        pos = 2;
+        pos++;
     Main.panel.addToStatusArea('places-menu', _indicator, pos, 'left');
 }
 


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