Add a help overlay to bloatpad
This will let us explore the (non-)interaction between help overlays and editing shortcuts.
This commit is contained in:
@ -19,7 +19,8 @@ nodist_bloatpad_SOURCES = bloatpad-gresources.c
|
|||||||
|
|
||||||
resource_files = \
|
resource_files = \
|
||||||
bloatpad.gresources.xml \
|
bloatpad.gresources.xml \
|
||||||
gtk/menus.ui
|
gtk/menus.ui \
|
||||||
|
gtk/help-overlay.ui
|
||||||
|
|
||||||
bloatpad-gresources.c: $(resource_files)
|
bloatpad-gresources.c: $(resource_files)
|
||||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
|
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
<gresources>
|
<gresources>
|
||||||
<gresource prefix="/org/gtk/bloatpad">
|
<gresource prefix="/org/gtk/bloatpad">
|
||||||
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
|
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
|
||||||
|
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
47
examples/bp/gtk/help-overlay.ui
Normal file
47
examples/bp/gtk/help-overlay.ui
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<interface>
|
||||||
|
<!-- interface-requires gtk+ 3.17 -->
|
||||||
|
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||||
|
<property name="modal">1</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsSection">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="section-name">shortcuts</property>
|
||||||
|
<property name="max-height">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="title">Shortcuts</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><Primary>c</property>
|
||||||
|
<property name="title" translatable="yes">Copy</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><Primary>p</property>
|
||||||
|
<property name="title" translatable="yes">Paste</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator">F11</property>
|
||||||
|
<property name="title" translatable="yes">Fullscreen</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><Primary>q</property>
|
||||||
|
<property name="title" translatable="yes">Quit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@ -60,6 +60,12 @@
|
|||||||
<attribute name='action'>app.edit-accels</attribute>
|
<attribute name='action'>app.edit-accels</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
|
<section>
|
||||||
|
<item>
|
||||||
|
<attribute name='label' translatable='yes'>Shortcuts...</attribute>
|
||||||
|
<attribute name='action'>win.show-help-overlay</attribute>
|
||||||
|
</item>
|
||||||
|
</section>
|
||||||
</submenu>
|
</submenu>
|
||||||
<submenu>
|
<submenu>
|
||||||
<attribute name='label' translatable='yes'>_View</attribute>
|
<attribute name='label' translatable='yes'>_View</attribute>
|
||||||
|
Reference in New Issue
Block a user