Skip to content

Commit

Permalink
Fix display of Extensions in context menu. Allow to use custom System…
Browse files Browse the repository at this point in the history
… monitor
  • Loading branch information
lufog committed Nov 17, 2024
1 parent 504ede4 commit 7820e9a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
6 changes: 3 additions & 3 deletions appIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1807,8 +1807,8 @@ export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu {
});

this._appendItem({
title: _('System monitor'),
cmd: ['gnome-system-monitor']
title: _(SETTINGS.get_string('contextmenu-sysmon-title')),
cmd: [SETTINGS.get_string('contextmenu-sysmon-cmd')]
});

this._appendItem({
Expand All @@ -1818,7 +1818,7 @@ export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu {

this._appendItem({
title: _('Extensions'),
cmd: ['gnome-shell-extension-prefs']
cmd: ['gnome-extensions-app']
});

this._appendItem({
Expand Down
10 changes: 10 additions & 0 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,16 @@ const Preferences = class {
'active',
Gio.SettingsBindFlags.DEFAULT);

this._settings.bind('contextmenu-sysmon-title',
this._builder.get_object('sysmon_title_entry'),
'text',
Gio.SettingsBindFlags.DEFAULT);

this._settings.bind('contextmenu-sysmon-cmd',
this._builder.get_object('sysmon_cmd_entry'),
'text',
Gio.SettingsBindFlags.DEFAULT);

// About Panel

this._builder.get_object('extension_version').set_label(this._metadata.version.toString() + (this._metadata.commit ? ' (' + this._metadata.commit + ')' : ''));
Expand Down
8 changes: 8 additions & 0 deletions schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,14 @@
<default>{'SIMPLE':1,'RIPPLE':1.25,'PLANK':2}</default>
<summary>App icon hover animation zoom scale in relation to the app icon size</summary>
</key>
<key type="s" name="contextmenu-sysmon-title">
<default>"System monitor"</default>
<summary>Context menu system monitor titile</summary>
</key>
<key type="s" name="contextmenu-sysmon-cmd">
<default>"gnome-system-monitor"</default>
<summary>Context menu system monitor command</summary>
</key>
<key type="b" name="secondarymenu-contains-appmenu">
<default>true</default>
<summary>Integrate items from the gnome appmenu into the right click menu</summary>
Expand Down
30 changes: 29 additions & 1 deletion ui/SettingsFineTune.ui
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,34 @@
</object>
</child>

<!-- group context menu -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_context_menu">
<property name="title" translatable="yes">Context Menu</property>

<child>
<object class="AdwExpanderRow">
<property name="title" bind-source="sysmon_title_entry" bind-property="text" bind-flags="sync-create"></property>
<property name="subtitle" bind-source="sysmon_cmd_entry" bind-property="text" bind-flags="sync-create"></property>

<child>
<object class="AdwEntryRow" id="sysmon_title_entry">
<property name="title" translatable="yes">Title</property>
</object>
</child>

<child>
<object class="AdwEntryRow" id="sysmon_cmd_entry">
<property name="title" translatable="yes">Command</property>
</object>
</child>

</object>
</child>

</object>
</child>

<!-- group panel -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_">
Expand Down Expand Up @@ -276,4 +304,4 @@
</child>

</object>
</interface>
</interface>

0 comments on commit 7820e9a

Please sign in to comment.