[eog] EogApplication: Add shortcuts window



commit 0f2ae50a53c4ed6e1add01dd8bfcfb97e43b3e44
Author: Felix Riemann <friemann gnome org>
Date:   Sat Dec 12 19:21:11 2015 +0100

    EogApplication: Add shortcuts window
    
    Use GtkApplication's automatic shortcut window support
    via GtkBuilder.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757827

 configure.ac          |    4 +-
 data/Makefile.am      |    1 +
 data/help-overlay.ui  |  262 +++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in        |    1 +
 src/eog-application.c |    1 +
 src/eog.gresource.xml |    3 +
 6 files changed, 270 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index eb3f739..b85c9cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,8 +85,8 @@ YELP_HELP_INIT
 # GNOME Libs
 # **********
 
-GTK_REQUIRED=3.19.2
-GLIB_REQUIRED=2.38.0
+GTK_REQUIRED=3.19.3
+GLIB_REQUIRED=2.42.0
 GNOME_DESKTOP_REQUIRED=2.91.2
 GDKPIXBUF_REQUIRED=2.30.0
 GTK_PRINT_REQUIRED=3.5.4
diff --git a/data/Makefile.am b/data/Makefile.am
index 498141a..cfaa3a8 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -34,6 +34,7 @@ EXTRA_DIST =                  \
        eog-image-properties-dialog.ui  \
        eog-multiple-save-as-dialog.ui  \
        eog-preferences-dialog.ui \
+       help-overlay.ui         \
        metadata-sidebar.ui     \
        popup-menus.ui          \
        $(DESKTOP_IN_FILES)     \
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
new file mode 100644
index 0000000..813ab76
--- /dev/null
+++ b/data/help-overlay.ui
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.19"/>
+  <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;O</property>
+                <property name="title" translatable="yes">Open an image file</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">Save the image</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;shift&gt;&lt;ctrl&gt;S</property>
+                <property name="title" translatable="yes">Save the image with a new file name</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;P</property>
+                <property name="title" translatable="yes">Print the current image</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;W</property>
+                <property name="title" translatable="yes">Close the current window</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;Q</property>
+                <property name="title" translatable="yes">Close all windows</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;F8</property>
+                <property name="title" translatable="yes">Set the image as desktop background</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;F9</property>
+                <property name="title" translatable="yes">Show/Hide the sidebar</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;alt&gt;Return</property>
+                <property name="title" translatable="yes">Show image properties dialog</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F1</property>
+                <property name="title" translatable="yes">Open the application manual</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Zoom</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Zoom in</property>
+                <property name="shortcut-type">gesture-stretch</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Zoom out</property>
+                <property name="shortcut-type">gesture-pinch</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">plus</property>
+                <property name="title" translatable="yes">Zoom in</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">minus</property>
+                <property name="title" translatable="yes">Zoom out</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">1</property>
+                <property name="title" translatable="yes">Actual size</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F</property>
+                <property name="title" translatable="yes">Best fit  </property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Browsing Images</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Go to the previous image in the folder</property>
+                <property name="shortcut-type">gesture-two-finger-swipe-left</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Go to the previous image in the folder</property>
+                <property name="shortcut-type">gesture-two-finger-swipe-right</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">Left</property>
+                <property name="title" translatable="yes">Go to the previous image in the folder</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">Right</property>
+                <property name="title" translatable="yes">Go to the next image in the folder</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">Home</property>
+                <property name="title" translatable="yes">Go to the first image in the folder</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">End</property>
+                <property name="title" translatable="yes">Go to the last image in the folder</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;M</property>
+                <property name="title" translatable="yes">Go to a random image in the folder</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F9</property>
+                <property name="title" translatable="yes">Show/Hide the image gallery</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Rotation</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Rotate clockwise</property>
+                <property name="shortcut-type">gesture-rotate-clockwise</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Rotate counterclockwise</property>
+                <property name="shortcut-type">gesture-rotate-counterclockwise</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;R</property>
+                <property name="title" translatable="yes">Rotate clockwise</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;shift&gt;&lt;ctrl&gt;R</property>
+                <property name="title" translatable="yes">Rotate counter-clockwise</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes">Fullscreen</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F11</property>
+                <property name="title" translatable="yes">Enter/Leave fullscreen</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F5</property>
+                <property name="title" translatable="yes">Start/Stop slideshow</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">P</property>
+                <property name="title" translatable="yes">Pause slideshow</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 162a4ec..b3dc4d6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -9,6 +9,7 @@ data/eog.desktop.in.in
 [type: gettext/glade]data/eog-multiple-save-as-dialog.ui
 [type: gettext/glade]data/eog-preferences-dialog.ui
 [type: gettext/glade]data/fullscreen-toolbar.ui
+[type: gettext/glade]data/help-overlay.ui
 [type: gettext/glade]data/metadata-sidebar.ui
 [type: gettext/gsettings]data/org.gnome.eog.gschema.xml.in
 [type: gettext/glade]data/popup-menus.ui
diff --git a/src/eog-application.c b/src/eog-application.c
index bfd8118..2f8aa92 100644
--- a/src/eog-application.c
+++ b/src/eog-application.c
@@ -293,6 +293,7 @@ eog_application_startup (GApplication *application)
        GtkSettings *settings;
        GtkCssProvider *provider;
 
+       g_application_set_resource_base_path (application, "/org/gnome/eog");
        G_APPLICATION_CLASS (eog_application_parent_class)->startup (application);
 
 #ifdef HAVE_EXEMPI
diff --git a/src/eog.gresource.xml b/src/eog.gresource.xml
index 0f69c90..94c8b31 100644
--- a/src/eog.gresource.xml
+++ b/src/eog.gresource.xml
@@ -12,6 +12,9 @@
     <file>pixmaps/thumbnail-frame.png</file>
     <file compressed="true" preprocess="xml-stripblanks">popup-menus.ui</file>
   </gresource>
+  <gresource prefix="/org/gnome/eog/gtk">
+    <file compressed="true" preprocess="xml-stripblanks">help-overlay.ui</file>
+  </gresource>
 </gresources>
 
 


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