gnome-shell-extensions/gnome-shell-favorites-menu-at-end.patch
Dominique Leuenberger 58a3b7dfc4 Accepting request 540129 from home:xiaoguang_wang:branches:GNOME:Factory
- Apply SLE-Classic session on Tumbleweed (bsc#1051772).
  + Rename sle-classic-favorites-menu-at-end.patch to
    gnome-shell-favorites-menu-at-end.patch

OBS-URL: https://build.opensuse.org/request/show/540129
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell-extensions?expand=0&rev=154
2017-11-10 14:47:02 +00:00

37 lines
1.5 KiB
Diff

Index: gnome-shell-extensions-3.26.1/extensions/apps-menu/extension.js
===================================================================
--- gnome-shell-extensions-3.26.1.orig/extensions/apps-menu/extension.js
+++ gnome-shell-extensions-3.26.1/extensions/apps-menu/extension.js
@@ -33,6 +33,10 @@ const HORIZ_FACTOR = 5;
const MENU_HEIGHT_OFFSET = 132;
const NAVIGATION_REGION_OVERSHOOT = 50;
+function isSLEClassicMode() {
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
+}
+
const ActivitiesMenuItem = new Lang.Class({
Name: 'ActivitiesMenuItem',
Extends: PopupMenu.PopupBaseMenuItem,
@@ -790,8 +794,6 @@ const ApplicationsButton = new Lang.Clas
let tree = new GMenu.Tree({ menu_basename: 'applications.menu' });
tree.load_sync();
let root = tree.get_root_directory();
- let categoryMenuItem = new CategoryMenuItem(this, null);
- this.categoriesBox.add_actor(categoryMenuItem.actor);
let iter = root.iter();
let nextType;
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
@@ -809,6 +811,10 @@ const ApplicationsButton = new Lang.Clas
}
}
+ let categoryMenuItem = new CategoryMenuItem(this, null);
+ this.categoriesBox.insert_child_at_index(categoryMenuItem.actor,
+ isSLEClassicMode() ? -1 : 0);
+
//Load applications
this._displayButtons(this._listApplications(null));