Commit fde96cc6 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

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
parent 85b440b6
......@@ -109,10 +109,19 @@ completion_DATA = $(completion_in_files:.in=)
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)`," > $@
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 = \
gnome-control-center.desktop.in.in \
$(servicefile_in_files) \
$(completion_in_files) \
gnome-control-center.gresource.xml \
help-overlay.ui \
$(resource_files) \
list-panel.sh
CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) $(servicefile_DATA)
......
......@@ -248,6 +248,7 @@ cc_application_startup (GApplication *application)
menu = 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, _("Quit"), "app.quit");
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/ControlCenter/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
</gresources>
<?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">&lt;ctrl&gt;Q</property>
<property name="title" translatable="yes">Quit</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;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">&lt;Alt&gt;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>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment