mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
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.
This commit is contained in:
@@ -861,7 +861,7 @@
|
||||
</key>
|
||||
<key type="b" name="secondarymenu-contains-showdetails">
|
||||
<default>false</default>
|
||||
<summary>Display Show Details to open Gnome Software from right click menu</summary>
|
||||
<summary>Display App Details to open Gnome Software from right click menu</summary>
|
||||
</key>
|
||||
<key type="s" name="shortcut-text">
|
||||
<default>"<Super>q"</default>
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes"><i>Show Details</i> menu item</property>
|
||||
<property name="title" translatable="yes"><i>App Details</i> menu item</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="secondarymenu_showdetails_switch">
|
||||
<property name="valign">center</property>
|
||||
|
||||
Reference in New Issue
Block a user