Mercurial > pidgin.yaz
comparison finch/gntpounce.c @ 21279:47118f6062e9
Enable auto-complete in the pounce dialog.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 05 Nov 2007 18:29:20 +0000 |
parents | a20ef7180680 |
children | 665e04562de0 |
comparison
equal
deleted
inserted
replaced
21278:ebb46dea479a | 21279:47118f6062e9 |
---|---|
166 { | 166 { |
167 update_pounces(); | 167 update_pounces(); |
168 } | 168 } |
169 | 169 |
170 static void | 170 static void |
171 setup_buddy_list_suggestion(GntEntry *entry, gboolean offline) | |
172 { | |
173 PurpleBlistNode *node = purple_blist_get_root(); | |
174 for (; node; node = purple_blist_node_next(node, offline)) { | |
175 if (!PURPLE_BLIST_NODE_IS_BUDDY(node)) | |
176 continue; | |
177 gnt_entry_add_suggest(entry, purple_buddy_get_name((PurpleBuddy*)node)); | |
178 } | |
179 } | |
180 | |
181 static void | |
171 save_pounce_cb(GntWidget *w, PurpleGntPounceDialog *dialog) | 182 save_pounce_cb(GntWidget *w, PurpleGntPounceDialog *dialog) |
172 { | 183 { |
173 const char *name; | 184 const char *name; |
174 const char *message, *command, *reason; | 185 const char *message, *command, *reason; |
175 PurplePounceEvent events = PURPLE_POUNCE_NONE; | 186 PurplePounceEvent events = PURPLE_POUNCE_NONE; |
357 hbox = gnt_hbox_new(FALSE); | 368 hbox = gnt_hbox_new(FALSE); |
358 gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Buddy name:"))); | 369 gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Buddy name:"))); |
359 | 370 |
360 dialog->buddy_entry = gnt_entry_new(NULL); | 371 dialog->buddy_entry = gnt_entry_new(NULL); |
361 gnt_box_add_widget(GNT_BOX(hbox), dialog->buddy_entry); | 372 gnt_box_add_widget(GNT_BOX(hbox), dialog->buddy_entry); |
373 | |
374 setup_buddy_list_suggestion(GNT_ENTRY(dialog->buddy_entry), TRUE); | |
362 | 375 |
363 gnt_box_add_widget(GNT_BOX(window), hbox); | 376 gnt_box_add_widget(GNT_BOX(window), hbox); |
364 | 377 |
365 if (cur_pounce != NULL) { | 378 if (cur_pounce != NULL) { |
366 gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), | 379 gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), |