[polari] ui: Add shortcuts help
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] ui: Add shortcuts help
- Date: Fri, 23 Oct 2015 11:49:42 +0000 (UTC)
commit 97c60c387e236042efa05a6d49a049c67e4e04c1
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Oct 22 17:27:14 2015 +0200
ui: Add shortcuts help
Use GTK+'s new shortcut window to document our shortcuts.
https://bugzilla.gnome.org/show_bug.cgi?id=756981
data/org.gnome.Polari.data.gresource.xml | 1 +
data/resources/help-overlay.ui | 94 ++++++++++++++++++++++++++++++
data/resources/menus.ui | 4 +
3 files changed, 99 insertions(+), 0 deletions(-)
---
diff --git a/data/org.gnome.Polari.data.gresource.xml b/data/org.gnome.Polari.data.gresource.xml
index ddda70e..12ae79d 100644
--- a/data/org.gnome.Polari.data.gresource.xml
+++ b/data/org.gnome.Polari.data.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/Polari">
<file alias="gtk/menus.ui" preprocess="xml-stripblanks">resources/menus.ui</file>
+ <file alias="gtk/help-overlay.ui" preprocess="xml-stripblanks">resources/help-overlay.ui</file>
<file alias="connection-details.ui" preprocess="xml-stripblanks">resources/connection-details.ui</file>
<file alias="connection-list-dialog.ui"
preprocess="xml-stripblanks">resources/connection-list-dialog.ui</file>
<file alias="join-room-dialog.ui" preprocess="xml-stripblanks">resources/join-room-dialog.ui</file>
diff --git a/data/resources/help-overlay.ui b/data/resources/help-overlay.ui
new file mode 100644
index 0000000..16fb938
--- /dev/null
+++ b/data/resources/help-overlay.ui
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkShortcutsWindow" id="help_overlay">
+ <property name="modal">True</property>
+ <child>
+ <object class="GtkShortcutsSection">
+ <property name="visible">True</property>
+ <!--property name="section-name">shortcuts</property-->
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">General</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Join Room</property>
+ <property name="accelerator"><Primary>n</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Message User</property>
+ <property name="accelerator"><Primary>m</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Leave Room</property>
+ <property name="accelerator"><Primary>w</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Show Userlist</property>
+ <property name="accelerator">F9</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Quit</property>
+ <property name="accelerator"><Primary>q</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Navigation</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Next Room</property>
+ <property name="accelerator"><Primary>Page_Down</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Previous Room</property>
+ <property name="accelerator"><Primary>Page_Up</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">First Room</property>
+ <property name="accelerator"><Primary>Home</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Last Room</property>
+ <property name="accelerator"><Primary>End</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">First - Ninth Room</property>
+ <property name="accelerator"><Alt>1...9</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/data/resources/menus.ui b/data/resources/menus.ui
index c3afad7..5d44533 100644
--- a/data/resources/menus.ui
+++ b/data/resources/menus.ui
@@ -14,6 +14,10 @@
</section>
<section>
<item>
+ <attribute name="action">win.show-help-overlay</attribute>
+ <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
+ </item>
+ <item>
<attribute name="action">app.about</attribute>
<attribute name="label" translatable="yes">About</attribute>
</item>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]