[gnome-shell/wip/fmuellner/app-menu-refinement] appIconMenu: Sync windows section with app menu
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/app-menu-refinement] appIconMenu: Sync windows section with app menu
- Date: Tue, 12 Feb 2019 12:45:31 +0000 (UTC)
commit 7fbef9f1c261777fdc5ad7873b4cb064496cda8a
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 12 13:37:39 2019 +0100
appIconMenu: Sync windows section with app menu
Keep the app icon context menu consistent with the app menu, so stop
grouping windows by workspace and add a section heading.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/968
js/ui/appDisplay.js | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index adaefa7dd..bba9d153f 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1707,25 +1707,19 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
w => !w.skip_taskbar
);
- // Display the app windows menu items and the separator between windows
- // of the current desktop and other windows.
- let workspaceManager = global.workspace_manager;
- let activeWorkspace = workspaceManager.get_active_workspace();
- let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
-
- for (let i = 0; i < windows.length; i++) {
- let window = windows[i];
- if (!separatorShown && window.get_workspace() != activeWorkspace) {
- this._appendSeparator();
- separatorShown = true;
- }
+ if (windows.length > 0)
+ this.addMenuItem(
+ new PopupMenu.PopupSeparatorMenuItem(_("Open Windows"))
+ );
+
+ windows.forEach(window => {
let title = window.title ? window.title
: this._source.app.get_name();
let item = this._appendMenuItem(title);
item.connect('activate', () => {
this.emit('activate-window', window);
});
- }
+ });
if (!this._source.app.is_window_backed()) {
this._appendSeparator();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]