Select the address when only one match is found.
authorDarko Koruga <darko@users.sourceforge.net>
Sun, 21 Mar 2004 16:49:39 +0000 (16:49 +0000)
committerDarko Koruga <darko@users.sourceforge.net>
Sun, 21 Mar 2004 16:49:39 +0000 (16:49 +0000)
ChangeLog.claws
configure.ac
src/addr_compl.c

index 30f2494deee8a6ce0463aef6b61dcc67d25cb396..08f8f85f4370c4c9bd37175de52eb8590b4dd195 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-21 [darko]     0.9.10claws25
+
+       * src/addr_compl.c
+               select the address when only one match is found while
+               doing address completion with tab key (feature
+               request #914720)
+
 2004-03-21 [alfons]    0.9.10claws24
 
        * src/messageview.c
index 23b361191f1185b2a41cdab1aff4236ae281532b..e6908e651376360541df8a29ec90ed8aded306e5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=24
+EXTRA_VERSION=25
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 8f7f4683107596ef8c48b12f3e3ad4be93159915..603da295ef8885fa296472d062aa9032899076e4 100644 (file)
@@ -1088,8 +1088,21 @@ static gboolean address_completion_complete_address_in_entry(GtkEntry *entry,
                g_free( new );
        }
 
+       /* Select the address if there is only one match */
+       if (ncount == 2) {
+               /* Display selected address in entry field */           
+               gchar *addr = get_complete_address(1);
+
+               if (addr) {
+                       replace_address_in_edit(entry, addr, 0);
+                       g_free(addr);
+               }
+
+               /* Discard the window */
+               clear_completion_cache();
+       }
        /* Make sure that drop-down appears uniform! */
-       if( ncount == 0 ) {
+       else if( ncount == 0 ) {
                addrcompl_add_queue( g_strdup( searchTerm ) );
        }
        g_free( searchTerm );