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 96f3a112de7e6ceb5c48d419862338be9c1b3e88..add496a1cf90717a2c7223a3ccc6e7318d67cc17 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]
 2003-06-25 [christoph] 0.9.0claws61
 
        * src/addr_compl.[ch]
index 3be913640a6b5dac7e08c580bb737271f1143c40..86b2c1fdebe333478f259852254a24a3e4b68148 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 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
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index efb14338478cf6d9ede0833f0da61ff69a6ac813..67000dc57f38cb25c4fe911ac5787a10f0fd5e23 100644 (file)
@@ -1262,6 +1262,7 @@ static gboolean completion_window_key_press(GtkWidget *widget,
        gchar *searchTerm;
        gint cursor_pos;
        GtkWidget *clist;
        gchar *searchTerm;
        gint cursor_pos;
        GtkWidget *clist;
+       GtkWidget *parent;
 
        g_return_val_if_fail(compWin != NULL, FALSE);
 
 
        g_return_val_if_fail(compWin != NULL, FALSE);
 
@@ -1279,6 +1280,7 @@ static gboolean completion_window_key_press(GtkWidget *widget,
                return FALSE;
        }               
 
                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) {
        /* 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;
        }
                        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) {
 
        /* look for presses that accept the selection */
        if (event->keyval == GDK_Return || event->keyval == GDK_space) {