[gnome-shell/wip/fmuellner/remove-app-menu: 41/45] windowMenu: Remove fallback app menu support



commit 026bdf9dfdba1bca1e268fa5d124c3b5f6d5e9eb
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 4 17:14:00 2018 +0200

    windowMenu: Remove fallback app menu support
    
    With the app menu being phased out entirely, there's no good reason to
    keep support for the fallback app menu in decorations either - the number
    of applications that set an app menu and haven't embraced client-side
    decorations is extremely small, and they should already have alternative
    fallbacks for non-GNOME environment in place.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/624

 js/ui/windowMenu.js | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 11d4f17b6..6b04fbafe 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -4,12 +4,10 @@ const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
 const Meta = imports.gi.Meta;
 const St = imports.gi.St;
-const Shell = imports.gi.Shell;
 
 const BoxPointer = imports.ui.boxpointer;
 const Main = imports.ui.main;
 const PopupMenu = imports.ui.popupMenu;
-const RemoteMenu = imports.ui.remoteMenu;
 
 var WindowMenu = new Lang.Class({
     Name: 'WindowMenu',
@@ -179,25 +177,6 @@ var WindowMenu = new Lang.Class({
     }
 });
 
-var AppMenu = new Lang.Class({
-    Name: 'AppMenu',
-    Extends: RemoteMenu.RemoteMenu,
-
-    _init(window, sourceActor) {
-        let app = Shell.WindowTracker.get_default().get_window_app(window);
-
-        this.parent(sourceActor, app.menu, app.action_group);
-
-        this.actor.add_style_class_name('fallback-app-menu');
-        let variant = window.get_gtk_theme_variant();
-        if (variant)
-            this.actor.add_style_class_name(variant);
-
-        Main.layoutManager.uiGroup.add_actor(this.actor);
-        this.actor.hide();
-    }
-});
-
 var WindowMenuManager = new Lang.Class({
     Name: 'WindowMenuManager',
 
@@ -212,8 +191,9 @@ var WindowMenuManager = new Lang.Class({
     },
 
     showWindowMenuForWindow(window, type, rect) {
-        let menuType = (type == Meta.WindowMenuType.WM) ? WindowMenu : AppMenu;
-        let menu = new menuType(window, this._sourceActor);
+        if (type != Meta.WindowMenuType.WM)
+            throw new Error('Unsupported window menu type');
+        let menu = new WindowMenu(window, this._sourceActor);
 
         this._manager.addMenu(menu);
 


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