[gnome-photos] Add a help overlay for shortcuts



commit 46eb8142ad7ecea1cd9181f7c1edccea6bfdcdea
Author: Umang Jain <mailumangjain gmail com>
Date:   Wed Nov 18 00:35:38 2015 +0530

    Add a help overlay for shortcuts
    
    Bump minimum GTK+ version to 3.19.1.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757909

 configure.ac               |    2 +-
 po/POTFILES.in             |    1 +
 src/Makefile.am            |    1 +
 src/photos-help-overlay.ui |  145 ++++++++++++++++++++++++++++++++++++++++++++
 src/photos-menus.ui        |    4 +
 src/photos.gresource.xml   |    1 +
 6 files changed, 153 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7bb444d..fea8d58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ GFBGRAPH_MIN_VERSION=0.2.1
 GLIB_MIN_VERSION=2.39.3
 GOA_MIN_VERSION=3.8.0
 GRILO_MIN_VERSION=0.3.0
-GTK_MIN_VERSION=3.15.5
+GTK_MIN_VERSION=3.19.1
 
 AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
 IT_PROG_INTLTOOL([0.50.1])
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a3f1acf..a447d46 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,6 +13,7 @@ src/photos-facebook-item.c
 src/photos-fetch-metas-job.c
 src/photos-flickr-item.c
 src/photos-google-item.c
+[type: gettext/glade]src/photos-help-overlay.ui
 src/photos-indexing-notification.c
 src/photos-local-item.c
 src/photos-main-toolbar.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 0772293..0289db1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -241,6 +241,7 @@ EXTRA_DIST = \
        photos-generate-about \
        photos.gresource.xml \
        photos-dlna-renderers-dialog.ui \
+       photos-help-overlay.ui \
        photos-marshalers.list \
        photos-menus.ui \
        photos-preview-menu.ui \
diff --git a/src/photos-help-overlay.ui b/src/photos-help-overlay.ui
new file mode 100644
index 0000000..1488aa5
--- /dev/null
+++ b/src/photos-help-overlay.ui
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Photos - access, organize and share your photos on GNOME
+ Copyright © 2015 Umang Jain
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Based on code from:
+   + Documents
+-->
+
+
+<interface>
+<object class="GtkShortcutsWindow" id="help_overlay">
+    <property name="modal">1</property>
+    <child>
+      <object class="GtkShortcutsSection">
+        <property name="visible">1</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="title" translatable="yes">Show help</property>
+                <property name="accelerator">F1</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Quit</property>
+                <property name="accelerator">&lt;Primary&gt;q</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Print the current photo</property>
+                <property name="accelerator">&lt;Primary&gt;p</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Delete</property>
+                <property name="accelerator">Delete</property>
+              </object>
+            </child>
+         </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Navigation</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Next photo</property>
+                <property name="accelerator">Right</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Previous photo</property>
+                <property name="accelerator">Left</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Go back</property>
+                <property name="accelerator">&lt;Alt&gt;Left</property>
+                <property name="direction">ltr</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Go back</property>
+                <property name="accelerator">&lt;Alt&gt;Right</property>
+                <property name="direction">rtl</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Overview</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Search</property>
+                <property name="accelerator">&lt;Primary&gt;f</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Select all</property>
+                <property name="accelerator">&lt;Primary&gt;a</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Preview</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Action menu</property>
+                <property name="accelerator">F10</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Fullscreen</property>
+                <property name="accelerator">F11</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+</object>
+</interface>
diff --git a/src/photos-menus.ui b/src/photos-menus.ui
index bc9bd37..db26442 100644
--- a/src/photos-menus.ui
+++ b/src/photos-menus.ui
@@ -8,6 +8,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.help</attribute>
         <attribute name="label" translatable="yes">_Help</attribute>
       </item>
diff --git a/src/photos.gresource.xml b/src/photos.gresource.xml
index 702aad4..b422ab1 100644
--- a/src/photos.gresource.xml
+++ b/src/photos.gresource.xml
@@ -14,6 +14,7 @@
   </gresource>
 
   <gresource prefix="/org/gnome/Photos/gtk">
+    <file alias="help-overlay.ui" preprocess="xml-stripblanks" 
compressed="true">photos-help-overlay.ui</file>
     <file alias="menus.ui" preprocess="xml-stripblanks" compressed="true">photos-menus.ui</file>
   </gresource>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]