aboutsummaryrefslogtreecommitdiff
path: root/main/data
diff options
context:
space:
mode:
authorChristopher Davis <christopherdavis@gnome.org>2023-07-03 21:55:11 -0400
committerfiaxh <fiaxh@users.noreply.github.com>2023-07-08 11:20:51 +0200
commit3d5dad25d8d400003bea74b4c891f041c01351b5 (patch)
tree7ce3a1c811a239deaec65a9e9cec7f7923bd009c /main/data
parenta36a63d7e42f5a21ecc3755db2570ce2b379f5ff (diff)
downloaddino-3d5dad25d8d400003bea74b4c891f041c01351b5.tar.gz
dino-3d5dad25d8d400003bea74b4c891f041c01351b5.zip
application: Load help overlay automatically
GTK automatically loads and sets up the action and keyboard shortcut for the Keyboard Shortcuts dialog. We don't need to manually do it as long as we put everything in the right place. See https://docs.gtk.org/gtk4/class.Application.html#automatic-resources
Diffstat (limited to 'main/data')
-rw-r--r--main/data/gresource.xml3
-rw-r--r--main/data/gtk/help-overlay.ui (renamed from main/data/shortcuts.ui)2
-rw-r--r--main/data/menu_app.ui2
3 files changed, 3 insertions, 4 deletions
diff --git a/main/data/gresource.xml b/main/data/gresource.xml
index 603d7fd0..84c6f2b4 100644
--- a/main/data/gresource.xml
+++ b/main/data/gresource.xml
@@ -61,11 +61,10 @@
<file>quote.ui</file>
<file>search_autocomplete.ui</file>
<file>settings_dialog.ui</file>
- <file>shortcuts.ui</file>
+ <file>gtk/help-overlay.ui</file>
<file>style-dark.css</file>
<file>style.css</file>
<file>unified_main_content.ui</file>
<file>unified_window_placeholder.ui</file>
</gresource>
</gresources>
-
diff --git a/main/data/shortcuts.ui b/main/data/gtk/help-overlay.ui
index 6cc5851a..17b0555c 100644
--- a/main/data/shortcuts.ui
+++ b/main/data/gtk/help-overlay.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkShortcutsWindow" id="shortcuts-window">
+ <object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
diff --git a/main/data/menu_app.ui b/main/data/menu_app.ui
index f269e219..bb33ff65 100644
--- a/main/data/menu_app.ui
+++ b/main/data/menu_app.ui
@@ -13,7 +13,7 @@
<attribute name="label" translatable="yes">Preferences</attribute>
</item>
<item>
- <attribute name="action">app.open_shortcuts</attribute>
+ <attribute name="action">win.show-help-overlay</attribute>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
</item>
<item>