Add Ctrl+L binding for focusing the search field
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 9 May 2007 18:25:58 +0000 (20:25 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 9 May 2007 18:25:58 +0000 (20:25 +0200)
src/gkofoto/glade/gkofoto.glade
src/packages/kofoto/gkofoto/mainwindow.py

index 8506318..5a7c883 100644 (file)
                      <accelerator key="s" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1013">
+                       <widget class="GtkImage" id="image1037">
                          <property name="visible">True</property>
                          <property name="stock">gtk-save</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_revert_activate" last_modification_time="Sat, 17 May 2003 15:02:14 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1014">
+                       <widget class="GtkImage" id="image1038">
                          <property name="visible">True</property>
                          <property name="stock">gtk-revert-to-saved</property>
                          <property name="icon_size">1</property>
                      <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1015">
+                       <widget class="GtkImage" id="image1039">
                          <property name="visible">True</property>
                          <property name="stock">gtk-quit</property>
                          <property name="icon_size">1</property>
                      <accelerator key="x" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1016">
+                       <widget class="GtkImage" id="image1040">
                          <property name="visible">True</property>
                          <property name="stock">gtk-cut</property>
                          <property name="icon_size">1</property>
                      <accelerator key="c" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1017">
+                       <widget class="GtkImage" id="image1041">
                          <property name="visible">True</property>
                          <property name="stock">gtk-copy</property>
                          <property name="icon_size">1</property>
                      <accelerator key="v" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1018">
+                       <widget class="GtkImage" id="image1042">
                          <property name="visible">True</property>
                          <property name="stock">gtk-paste</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_menubarDelete_activate" last_modification_time="Sun, 11 Jul 2004 19:26:27 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1019">
+                       <widget class="GtkImage" id="image1043">
                          <property name="visible">True</property>
                          <property name="stock">gtk-delete</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_destroy_activate" last_modification_time="Sun, 11 Jul 2004 19:26:27 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1020">
+                       <widget class="GtkImage" id="image1044">
                          <property name="visible">True</property>
                          <property name="stock">gtk-delete</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_clear_activate" last_modification_time="Sun, 11 Jul 2004 20:06:16 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1021">
+                       <widget class="GtkImage" id="image1045">
                          <property name="visible">True</property>
                          <property name="stock">gtk-clear</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_menubarProperties_activate" last_modification_time="Wed, 14 Jul 2004 10:12:21 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1022">
+                       <widget class="GtkImage" id="image1046">
                          <property name="visible">True</property>
                          <property name="stock">gtk-properties</property>
                          <property name="icon_size">1</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">_Table</property>
                      <property name="use_underline">True</property>
-                     <property name="active">False</property>
+                     <property name="active">True</property>
                      <signal name="activate" handler="on_table_view_activate" last_modification_time="Sun, 11 Jul 2004 19:28:48 GMT"/>
                    </widget>
                  </child>
                    </widget>
                  </child>
 
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator12">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="menubarSearch">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Search...</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_menubarSearch_activate" last_modification_time="Sun, 29 Apr 2007 20:47:01 GMT"/>
+                     <accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                   </widget>
+                 </child>
+
                  <child>
                    <widget class="GtkSeparatorMenuItem" id="separator2">
                      <property name="visible">True</property>
                      <accelerator key="F6" modifiers="0" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1023">
+                       <widget class="GtkImage" id="image1047">
                          <property name="visible">True</property>
                          <property name="stock">gtk-go-forward</property>
                          <property name="icon_size">1</property>
                      <accelerator key="F6" modifiers="GDK_SHIFT_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1024">
+                       <widget class="GtkImage" id="image1048">
                          <property name="visible">True</property>
                          <property name="stock">gtk-go-back</property>
                          <property name="icon_size">1</property>
                              <accelerator key="0" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                              <child internal-child="image">
-                               <widget class="GtkImage" id="image1025">
+                               <widget class="GtkImage" id="image1049">
                                  <property name="visible">True</property>
                                  <property name="stock">gtk-zoom-100</property>
                                  <property name="icon_size">1</property>
                              <accelerator key="equal" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                              <child internal-child="image">
-                               <widget class="GtkImage" id="image1026">
+                               <widget class="GtkImage" id="image1050">
                                  <property name="visible">True</property>
                                  <property name="stock">gtk-zoom-fit</property>
                                  <property name="icon_size">1</property>
                              <accelerator key="plus" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                              <child internal-child="image">
-                               <widget class="GtkImage" id="image1027">
+                               <widget class="GtkImage" id="image1051">
                                  <property name="visible">True</property>
                                  <property name="stock">gtk-zoom-in</property>
                                  <property name="icon_size">1</property>
                              <accelerator key="minus" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                              <child internal-child="image">
-                               <widget class="GtkImage" id="image1028">
+                               <widget class="GtkImage" id="image1052">
                                  <property name="visible">True</property>
                                  <property name="stock">gtk-zoom-out</property>
                                  <property name="icon_size">1</property>
                      <signal name="activate" handler="on_open_image_activate" last_modification_time="Sun, 11 Jul 2004 19:52:02 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1029">
+                       <widget class="GtkImage" id="image1053">
                          <property name="visible">True</property>
                          <property name="stock">gtk-open</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_menubarDuplicateAndOpenImage_activate" last_modification_time="Thu, 14 Jul 2005 10:29:29 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1030">
+                       <widget class="GtkImage" id="image1054">
                          <property name="visible">True</property>
                          <property name="stock">gtk-open</property>
                          <property name="icon_size">1</property>
                      <accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1031">
+                       <widget class="GtkImage" id="image1055">
                          <property name="visible">True</property>
                          <property name="stock">gtk-add</property>
                          <property name="icon_size">1</property>
                      <accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1032">
+                       <widget class="GtkImage" id="image1056">
                          <property name="visible">True</property>
                          <property name="stock">gtk-add</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_open_image_version(s)_in_external_program1_activate" last_modification_time="Wed, 13 Jul 2005 10:11:26 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1033">
+                       <widget class="GtkImage" id="image1057">
                          <property name="visible">True</property>
                          <property name="stock">gtk-open</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_menubarDuplicateAndOpenImageVersion_activate" last_modification_time="Thu, 14 Jul 2005 12:03:08 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1034">
+                       <widget class="GtkImage" id="image1058">
                          <property name="visible">True</property>
                          <property name="stock">gtk-open</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_rotate_left1_activate" last_modification_time="Wed, 13 Jul 2005 10:11:26 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1035">
+                       <widget class="GtkImage" id="image1059">
                          <property name="visible">True</property>
                          <property name="stock">gtk-add</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_rotate_right1_activate" last_modification_time="Wed, 13 Jul 2005 10:11:26 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1036">
+                       <widget class="GtkImage" id="image1060">
                          <property name="visible">True</property>
                          <property name="stock">gtk-add</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_about_activate" last_modification_time="Sun, 11 Jul 2004 20:05:01 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image1037">
+                       <widget class="GtkImage" id="image1061">
                          <property name="visible">True</property>
                          <property name="stock">gtk-add</property>
                          <property name="icon_size">1</property>
index ecfc8c1..87323f5 100644 (file)
@@ -42,6 +42,8 @@ class MainWindow(gtk.Window):
         env.widgets["fullScreenViewButton"].set_icon_widget(self.getIconImage("fullscreen-24.png"))
         env.widgets["menubarFullScreenView"].connect("activate", self._fullScreen)
 
+        env.widgets["menubarSearch"].connect("activate", self._search)
+
         env.widgets["previousButton"].set_sensitive(False)
         env.widgets["nextButton"].set_sensitive(False)
         env.widgets["zoom100"].set_sensitive(False)
@@ -173,6 +175,9 @@ class MainWindow(gtk.Window):
         if self.__currentObjectCollection is not None:
             self.__currentObjectCollection.fullScreen()
 
+    def _search(self, *unused):
+        self.__sourceEntry.grab_focus()
+
     def _toggleTree(self, button):
         if button.get_active():
             env.widgets["sourceNotebook"].show()