# HG changeset patch # User Sadrul Habib Chowdhury # Date 1175131584 0 # Node ID efbced3f38ac06d84c7124911d675cbee4297781 # Parent c44bb13db4688cff8adf0e08f65650d5847889f4 Update the tab completion a little bit. The binding for suggest-show will perform suggest-next if the suggest-dropdown is already showing. If there's just one suggestion, then complete with that suggestion. diff -r c44bb13db468 -r efbced3f38ac finch/libgnt/gntentry.c --- a/finch/libgnt/gntentry.c Wed Mar 28 05:37:29 2007 +0000 +++ b/finch/libgnt/gntentry.c Thu Mar 29 01:26:24 2007 +0000 @@ -16,6 +16,7 @@ static GntWidgetClass *parent_class = NULL; +static gboolean gnt_entry_key_pressed(GntWidget *widget, const char *text); static void gnt_entry_set_text_internal(GntEntry *entry, const char *text); static void @@ -321,7 +322,15 @@ static gboolean suggest_show(GntBindable *bind, GList *null) { - return show_suggest_dropdown(GNT_ENTRY(bind)); + GntEntry *entry = GNT_ENTRY(bind); + if (entry->ddown) { + if (g_list_length(GNT_TREE(entry->ddown)->list) == 1) + gnt_entry_key_pressed(GNT_WIDGET(entry), "\r"); + else + gnt_bindable_perform_action_named(GNT_BINDABLE(entry->ddown), "move-down"); + return TRUE; + } + return show_suggest_dropdown(entry); } static gboolean