Mercurial > pidgin.yaz
changeset 15844:e74c2488448b
Group autocomplete for buddy adding
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Mon, 19 Mar 2007 23:49:30 +0000 |
parents | 2b41d9a2876e |
children | b6983e807711 |
files | finch/gntblist.c finch/gntrequest.c |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntblist.c Mon Mar 19 19:06:57 2007 +0000 +++ b/finch/gntblist.c Mon Mar 19 23:49:30 2007 +0000 @@ -304,6 +304,7 @@ field = purple_request_field_string_new("group", _("Group"), grp, FALSE); purple_request_field_group_add_field(group, field); + purple_request_field_set_type_hint(field, "group"); field = purple_request_field_account_new("account", _("Account"), NULL); purple_request_field_account_set_show_all(field, FALSE);
--- a/finch/gntrequest.c Mon Mar 19 19:06:57 2007 +0000 +++ b/finch/gntrequest.c Mon Mar 19 23:49:30 2007 +0000 @@ -398,6 +398,12 @@ gnt_entry_add_suggest(GNT_ENTRY(entry), purple_buddy_get_name((PurpleBuddy*)node)); } gnt_entry_set_always_suggest(GNT_ENTRY(entry), TRUE); + } else if (hint && !strcmp(hint, "group")) { + PurpleBlistNode *node; + for (node = purple_blist_get_root(); node; node = node->next) { + if (PURPLE_BLIST_NODE_IS_GROUP(node)) + gnt_entry_add_suggest(GNT_ENTRY(entry), ((PurpleGroup *)node)->name); + } } gnt_box_add_widget(GNT_BOX(hbox), entry); field->ui_data = entry;