[gnome-shell-extensions/no-classic-overview: 6/10] places-menu: Don't hardcode position
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/no-classic-overview: 6/10] places-menu: Don't hardcode position
- Date: Fri, 28 Jun 2019 20:55:44 +0000 (UTC)
commit d1254d9b57c2521c5f68525b0b4d12a8060ce868
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 76be829..92c6d69 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]