extensions-app: Add shortcuts window

There aren't many shortcuts and all of them are standard, but
documenting them is still good practice, and our main menu is
a tad bit less empty.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
This commit is contained in:
Florian Müllner 2023-12-12 21:13:56 +01:00 committed by Marge Bot
parent fdb7700535
commit 05c4db4372
4 changed files with 46 additions and 0 deletions

View File

@ -95,6 +95,7 @@ subprojects/extensions-app/data/org.gnome.Extensions.desktop.in.in
subprojects/extensions-app/js/main.js
subprojects/extensions-app/data/ui/extension-row.ui
subprojects/extensions-app/data/ui/extensions-window.ui
subprojects/extensions-app/data/ui/help-overlay.ui
subprojects/extensions-tool/src/command-create.c
subprojects/extensions-tool/src/command-disable.c
subprojects/extensions-tool/src/command-enable.c

View File

@ -2,6 +2,8 @@
<gresources>
<gresource prefix="/org/gnome/Extensions@profile@">
<file alias="style.css">css/style.css</file>
<file alias="gtk/help-overlay.ui">ui/help-overlay.ui</file>
</gresource>
<gresource prefix="/org/gnome/Extensions">

View File

@ -2,6 +2,10 @@
<interface>
<menu id="primary-menu">
<section>
<item>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">About Extensions</attribute>
<attribute name="action">win.show-about</attribute>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">true</property>
<child>
<object class="GtkShortcutsSection">
<child>
<object class="GtkShortcutsGroup">
<property name="title" translatable="yes" context="shortcut window">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Open Menu</property>
<property name="accelerator">F10</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Toggle Search</property>
<property name="accelerator">&lt;Control&gt;s</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>
<property name="accelerator">&lt;Control&gt;question</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Quit</property>
<property name="accelerator">&lt;Control&gt;q</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>