From 644de41a79addff26f22e3f1381f1a4e87625df3 Mon Sep 17 00:00:00 2001 From: Yevhen Popok Date: Sun, 23 Feb 2025 15:46:29 +0200 Subject: [PATCH] Fix "App Details" context menu hiding Upstream changed label in GNOME 44. [appmenu: Change "Show Details" entry label to "App Details"](https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2585) --- Let's use the appmenu property directly instead of finding it using the label, so that would work for every language. We keep the same schema setting name, so users don't loose their configuration. --- ...shell.extensions.dash-to-panel.gschema.xml | 2 +- src/appIcons.js | 20 +++++-------------- ui/BoxSecondaryMenuOptions.ui | 4 ++-- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml index 2ea92c1..fc3243a 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml @@ -861,7 +861,7 @@ false - Display Show Details to open Gnome Software from right click menu + Display App Details to open Gnome Software from right click menu "<Super>q" diff --git a/src/appIcons.js b/src/appIcons.js index ada4a51..b6d82a6 100644 --- a/src/appIcons.js +++ b/src/appIcons.js @@ -1888,7 +1888,7 @@ export function getIconPadding(dtpPanel) { /** * Extend AppMenu (AppIconMenu for pre gnome 41) * - * - hide 'Show Details' according to setting + * - hide 'App Details' according to setting * - show windows header only if show-window-previews is disabled * - Add close windows option based on quitfromdash extension * (https://github.com/deuill/shell-extension-quitfromdash) @@ -1901,19 +1901,6 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu { this._enableFavorites = true this._showSingleWindows = true - // Remove "Show Details" menu item - if (!SETTINGS.get_boolean('secondarymenu-contains-showdetails')) { - let existingMenuItems = this._getMenuItems() - for (let i = 0; i < existingMenuItems.length; i++) { - let item = existingMenuItems[i] - if (item !== undefined && item.label !== undefined) { - if (item.label.text == 'Show Details') { - this.box.remove_child(item.actor) - } - } - } - } - // replace quit item delete this._quitItem this._quitItem = this.addAction(_('Quit'), () => this._quitFromTaskbar()) @@ -1958,7 +1945,10 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu { setApp(app) { super.setApp(app) - this._detailsItem.visible = !app.hideDetails + // set "App Details" menu item visibility + this._detailsItem.visible = + !app.hideDetails && + SETTINGS.get_boolean('secondarymenu-contains-showdetails') } } diff --git a/ui/BoxSecondaryMenuOptions.ui b/ui/BoxSecondaryMenuOptions.ui index 483ddc8..96602b9 100644 --- a/ui/BoxSecondaryMenuOptions.ui +++ b/ui/BoxSecondaryMenuOptions.ui @@ -27,7 +27,7 @@ - <i>Show Details</i> menu item + <i>App Details</i> menu item center @@ -40,4 +40,4 @@ - \ No newline at end of file +