shell: Add a help overlay
This explains the various keyboard shortcuts that are available in the control-center. See https://wiki.gnome.org/Initiatives/GnomeGoals/ShortcutWindows https://bugzilla.gnome.org/show_bug.cgi?id=759320
This commit is contained in:
parent
85b440b622
commit
fde96cc691
4 changed files with 77 additions and 0 deletions
|
@ -109,10 +109,19 @@ completion_DATA = $(completion_in_files:.in=)
|
||||||
completions/gnome-control-center: completions/gnome-control-center.in list-panel.sh
|
completions/gnome-control-center: completions/gnome-control-center.in list-panel.sh
|
||||||
$(AM_V_GEN) mkdir -p `dirname $@` && cat $< | sed "s,@PANELS@,`$(srcdir)/list-panel.sh $(top_srcdir)`," > $@
|
$(AM_V_GEN) mkdir -p `dirname $@` && cat $< | sed "s,@PANELS@,`$(srcdir)/list-panel.sh $(top_srcdir)`," > $@
|
||||||
|
|
||||||
|
resource_files = $(shell glib-compile-resources --generate-dependencies --sourcedir=$(srcdir) gnome-control-center.gresource.xml)
|
||||||
|
resources.c: gnome-control-center.gresource.xml $(resource_files)
|
||||||
|
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source $<
|
||||||
|
|
||||||
|
BUILT_SOURCES = resources.c
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
gnome-control-center.desktop.in.in \
|
gnome-control-center.desktop.in.in \
|
||||||
$(servicefile_in_files) \
|
$(servicefile_in_files) \
|
||||||
$(completion_in_files) \
|
$(completion_in_files) \
|
||||||
|
gnome-control-center.gresource.xml \
|
||||||
|
help-overlay.ui \
|
||||||
|
$(resource_files) \
|
||||||
list-panel.sh
|
list-panel.sh
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) $(servicefile_DATA)
|
CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) $(servicefile_DATA)
|
||||||
|
|
|
@ -248,6 +248,7 @@ cc_application_startup (GApplication *application)
|
||||||
menu = g_menu_new ();
|
menu = g_menu_new ();
|
||||||
|
|
||||||
section = g_menu_new ();
|
section = g_menu_new ();
|
||||||
|
g_menu_append (section, _("Keyboard Shortcuts"), "win.show-help-overlay");
|
||||||
g_menu_append (section, _("Help"), "app.help");
|
g_menu_append (section, _("Help"), "app.help");
|
||||||
g_menu_append (section, _("Quit"), "app.quit");
|
g_menu_append (section, _("Quit"), "app.quit");
|
||||||
|
|
||||||
|
|
6
shell/gnome-control-center.gresource.xml
Normal file
6
shell/gnome-control-center.gresource.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/org/gnome/ControlCenter/gtk">
|
||||||
|
<file preprocess="xml-stripblanks">help-overlay.ui</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
61
shell/help-overlay.ui
Normal file
61
shell/help-overlay.ui
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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">10</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="title" translatable="yes">General</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><ctrl>Q</property>
|
||||||
|
<property name="title" translatable="yes">Quit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><ctrl>S</property>
|
||||||
|
<property name="title" translatable="yes">Search</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="title" translatable="yes">Panels</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><Alt>Left</property>
|
||||||
|
<property name="title" translatable="yes">Go back to the overview</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="title" translatable="yes">Search</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator">Escape</property>
|
||||||
|
<property name="title" translatable="yes">Cancel search</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
Add table
Add a link
Reference in a new issue