[gnome-shell/wip/fmuellner/remove-app-menu: 126/130] windowMenu: Remove fallback app menu support
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/remove-app-menu: 126/130] windowMenu: Remove fallback app menu support
- Date: Sat, 26 Jan 2019 13:36:45 +0000 (UTC)
commit 593f15ad63e0de62d32d346c9e5ab1f83259aa7f
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 | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 939ba15d2..ebcd29445 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -3,12 +3,10 @@
const Gtk = imports.gi.Gtk;
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 = class extends PopupMenu.PopupMenu {
constructor(window, sourceActor) {
@@ -175,22 +173,6 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
}
};
-var AppMenu = class extends RemoteMenu.RemoteMenu {
- constructor(window, sourceActor) {
- let app = Shell.WindowTracker.get_default().get_window_app(window);
-
- super(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 = class {
constructor() {
this._manager = new PopupMenu.PopupMenuManager({ actor: Main.layoutManager.dummyCursor });
@@ -203,8 +185,9 @@ var WindowMenuManager = 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]