Elegantly record your screen
feat: port to AdwShortcutsDialog
Dave Patrick Caberto3707e91678e6
diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xmlindex fe5e682..a046f53 100644--- a/data/resources/resources.gresource.xml+++ b/data/resources/resources.gresource.xml@@ -17,7 +17,7 @@<file compressed="true" preprocess="xml-stripblanks">ui/area_selector.ui</file><file compressed="true" preprocess="xml-stripblanks">ui/item_row.ui</file><file compressed="true" preprocess="xml-stripblanks">ui/preferences_dialog.ui</file>- <file compressed="true" preprocess="xml-stripblanks" alias="gtk/help-overlay.ui">ui/shortcuts.ui</file>+ <file compressed="true" preprocess="xml-stripblanks" alias="shortcuts-dialog.ui">ui/shortcuts.ui</file><file compressed="true" preprocess="xml-stripblanks">ui/view_port.ui</file><file compressed="true" preprocess="xml-stripblanks">ui/window.ui</file></gresource>diff --git a/data/resources/ui/shortcuts.ui b/data/resources/ui/shortcuts.uiindex d4cc89e..978ed7c 100644--- a/data/resources/ui/shortcuts.ui+++ b/data/resources/ui/shortcuts.ui@@ -1,90 +1,83 @@<?xml version="1.0" encoding="UTF-8"?><interface>- <object class="GtkShortcutsWindow" id="help_overlay">- <property name="modal">True</property>+ <object class="AdwShortcutsDialog" id="shortcuts_dialog"><child>- <object class="GtkShortcutsSection">- <property name="section-name">shortcuts</property>+ <object class="AdwShortcutsSection">+ <property name="title" translatable="yes" context="shortcut window">General</property><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">Show Preferences</property>- <property name="action-name">app.show-preferences</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>- <property name="action-name">win.show-help-overlay</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Close Window</property>- <property name="action-name">window.close</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Quit</property>- <property name="action-name">app.quit</property>- </object>- </child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Open Menu</property>+ <property name="accelerator">F10</property></object></child><child>- <object class="GtkShortcutsGroup">- <property name="title" translatable="yes" context="shortcut window">Recording</property>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Toggle Record</property>- <property name="action-name">win.toggle-record</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="visible">False</property>- <property name="title" translatable="yes" context="shortcut window">Toggle Pause</property>- <property name="action-name">win.toggle-pause</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Cancel Record</property>- <property name="action-name">win.cancel-record</property>- </object>- </child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Show Preferences</property>+ <property name="action-name">app.show-preferences</property></object></child><child>- <object class="GtkShortcutsGroup">- <property name="title" translatable="yes" context="shortcut window">Settings</property>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Toggle Desktop Audio</property>- <property name="action-name">win.record-desktop-audio</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Toggle Microphone</property>- <property name="action-name">win.record-microphone</property>- </object>- </child>- <child>- <object class="GtkShortcutsShortcut">- <property name="title" translatable="yes" context="shortcut window">Toggle Pointer</property>- <property name="action-name">win.show-pointer</property>- </object>- </child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>+ <property name="action-name">app.shortcuts</property>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Close Window</property>+ <property name="action-name">window.close</property>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Quit</property>+ <property name="action-name">app.quit</property>+ </object>+ </child>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsSection">+ <property name="title" translatable="yes" context="shortcut window">Recording</property>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Toggle Record</property>+ <property name="action-name">win.toggle-record</property>+ </object>+ </child>+ <!-- <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Toggle Pause</property>+ <property name="action-name">win.toggle-pause</property>+ </object>+ </child> -->+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Cancel Record</property>+ <property name="action-name">win.cancel-record</property>+ </object>+ </child>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsSection">+ <property name="title" translatable="yes" context="shortcut window">Settings</property>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Toggle Desktop Audio</property>+ <property name="action-name">win.record-desktop-audio</property>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Toggle Microphone</property>+ <property name="action-name">win.record-microphone</property>+ </object>+ </child>+ <child>+ <object class="AdwShortcutsItem">+ <property name="title" translatable="yes" context="shortcut window">Toggle Pointer</property>+ <property name="action-name">win.show-pointer</property></object></child></object>diff --git a/data/resources/ui/window.ui b/data/resources/ui/window.uiindex 60a7432..19f9744 100644--- a/data/resources/ui/window.ui+++ b/data/resources/ui/window.ui@@ -297,7 +297,7 @@</item><item><attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>- <attribute name="action">win.show-help-overlay</attribute>+ <attribute name="action">app.shortcuts</attribute></item><item><attribute name="label" translatable="yes">_About Kooha</attribute>diff --git a/meson.build b/meson.buildindex 9c76979..caf52e4 100644--- a/meson.build+++ b/meson.build@@ -14,7 +14,7 @@ base_id = 'io.github.seadve.Kooha'dependency('glib-2.0', version: '>= 2.80')dependency('gio-2.0', version: '>= 2.80')dependency('gtk4', version: '>= 4.15.3')-dependency('libadwaita-1', version: '>= 1.6')+dependency('libadwaita-1', version: '>= 1.9')dependency('gstreamer-1.0', version: '>= 1.24')dependency('gstreamer-plugins-base-1.0', version: '>= 1.24')