File gnome-shell-favorites-menu-at-end.patch of Package gnome-shell-extensions.openSUSE_Leap_15.0_Update

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));
 
openSUSE Build Service is sponsored by