Make 1 mean "zoom to actual" and 0 mean "zoom to fit"
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 17 Jan 2008 17:41:45 +0000 (18:41 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 17 Jan 2008 17:41:45 +0000 (18:41 +0100)
[Ctrl+]1 seems to be more popular than [Ctrl+0] to enter "actual size"
mode. Changed meaning of Ctrl+0 to "zoom to fit" in fullscreen view.

src/gkofoto/glade/gkofoto.glade
src/packages/kofoto/gkofoto/fullscreenwindow.py

index 4febfb5..2675866 100644 (file)
                              <property name="label" translatable="yes">_Actual size</property>
                              <property name="use_underline">True</property>
                              <signal name="activate" handler="on_menubarActualSize_activate" last_modification_time="Wed, 21 Jul 2004 14:33:49 GMT"/>
-                             <accelerator key="0" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                             <accelerator key="1" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                              <child internal-child="image">
                                <widget class="GtkImage" id="image1252">
index 50d24e7..62483d1 100644 (file)
@@ -121,6 +121,10 @@ class FullScreenWindow(gtk.Window):
         return 0 <= index < len(self._image_versions)
 
     def _key_press_event_cb(self, unused, event):
+        # GIMP: 1 --> 100%, C-S-e --> fit
+        # EOG: [1,C-0,C-1] --> 100%
+        # f-spot: [0,1,C-0,C-1] --> fit
+
         k = gtk.keysyms
         if event.keyval in [k.space, k.Right, k.Down, k.Page_Down]:
             self._goto(self._current_index + 1)
@@ -143,10 +147,10 @@ class FullScreenWindow(gtk.Window):
         if event.keyval == k.minus:
             self._image_view.zoom_out()
             return True
-        if event.keyval == k._0:
+        if event.keyval == k._1:
             self._image_view.zoom_to_actual()
             return True
-        if event.keyval == k.equal:
+        if event.keyval in [k.equal, k._0]:
             self._image_view.zoom_to_fit()
             return True
         return False