comparison console/libgnt/gntcombobox.c @ 13979:a71678d2da16

[gaim-migrate @ 16540] Complete the notify-ui. I have been unable to test the searchresult-ui. But "looks like" it will work. The accounts-ui is also mostly . I am yet to add the proxy-options. And you cannot still delete an account. That will happen after the request-ui is complete. The account-edit dialog needs some work, but it's usable. Added GntCheckBox, and add some features to some other gnt-widgets. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 23 Jul 2006 01:10:06 +0000
parents 0a0d2a1fd2bc
children 27182f83b79b
comparison
equal deleted inserted replaced
13978:ea00953490a8 13979:a71678d2da16
18 static void 18 static void
19 set_selection(GntComboBox *box, gpointer key) 19 set_selection(GntComboBox *box, gpointer key)
20 { 20 {
21 if (box->selected != key) 21 if (box->selected != key)
22 { 22 {
23 /* XXX: make sure the key actually does exist */
23 gpointer old = box->selected; 24 gpointer old = box->selected;
24 box->selected = key; 25 box->selected = key;
25 g_signal_emit(box, signals[SIG_SELECTION_CHANGED], 0, old, key); 26 g_signal_emit(box, signals[SIG_SELECTION_CHANGED], 0, old, key);
26 gnt_widget_draw(GNT_WIDGET(box)); 27 if (GNT_WIDGET(box)->window)
28 gnt_widget_draw(GNT_WIDGET(box));
29 if (box->dropdown)
30 gnt_tree_set_selected(GNT_TREE(box->dropdown), key);
27 } 31 }
28 } 32 }
29 33
30 static void 34 static void
31 gnt_combo_box_draw(GntWidget *widget) 35 gnt_combo_box_draw(GntWidget *widget)
244 gpointer gnt_combo_box_get_selected_data(GntComboBox *box) 248 gpointer gnt_combo_box_get_selected_data(GntComboBox *box)
245 { 249 {
246 return box->selected; 250 return box->selected;
247 } 251 }
248 252
253 void gnt_combo_box_set_selected(GntComboBox *box, gpointer key)
254 {
255 set_selection(box, key);
256 }
257