Fix tab/backtab - close bug 147
authorMatch Grun <match@dimensional.com>
Thu, 26 Jun 2003 05:40:21 +0000 (05:40 +0000)
committerMatch Grun <match@dimensional.com>
Thu, 26 Jun 2003 05:40:21 +0000 (05:40 +0000)
ChangeLog.claws
configure.ac
src/addr_compl.c

index 96f3a11..add496a 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25 [match]     0.9.0claws62
+
+       * src/addr_compl.c
+               Fixed tab/backtab for dropped-down completion list to
+               move next/previous field. (close bug 147)
+
 2003-06-25 [christoph] 0.9.0claws61
 
        * src/addr_compl.[ch]
index 3be9136..86b2c1f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws61
+EXTRA_VERSION=claws62
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index efb1433..67000dc 100644 (file)
@@ -1262,6 +1262,7 @@ static gboolean completion_window_key_press(GtkWidget *widget,
        gchar *searchTerm;
        gint cursor_pos;
        GtkWidget *clist;
+       GtkWidget *parent;
 
        g_return_val_if_fail(compWin != NULL, FALSE);
 
@@ -1279,6 +1280,7 @@ static gboolean completion_window_key_press(GtkWidget *widget,
                return FALSE;
        }               
 
+#if 0  
        /* also make tab / shift tab go to next previous completion entry. we're
         * changing the key value */
        if (event->keyval == GDK_Tab || event->keyval == GDK_ISO_Left_Tab) {
@@ -1291,6 +1293,39 @@ static gboolean completion_window_key_press(GtkWidget *widget,
                        event->keyval == GDK_Down ? TRUE : FALSE);
                return FALSE;
        }
+#endif
+
+       /* make tab move to next field */
+       if( event->keyval == GDK_Tab ) {
+               /* Reference to parent */
+               parent = GTK_WIDGET(entry)->parent;
+
+               /* Discard the window */
+               clear_completion_cache();
+               addrcompl_destroy_window( _compWindow_ );
+
+               /* Move focus to next widget */
+               if( parent ) {
+                       gtk_container_focus( GTK_CONTAINER(parent), GTK_DIR_TAB_FORWARD );
+               }
+               return FALSE;
+       }
+
+       /* make backtab move to previous field */
+       if( event->keyval == GDK_ISO_Left_Tab ) {
+               /* Reference to parent */
+               parent = GTK_WIDGET(entry)->parent;
+
+               /* Discard the window */
+               clear_completion_cache();
+               addrcompl_destroy_window( _compWindow_ );
+
+               /* Move focus to previous widget */
+               if( parent ) {
+                       gtk_container_focus( GTK_CONTAINER(parent), GTK_DIR_TAB_BACKWARD );
+               }
+               return FALSE;
+       }
 
        /* look for presses that accept the selection */
        if (event->keyval == GDK_Return || event->keyval == GDK_space) {