Mercurial > pidgin.yaz
comparison console/libgnt/gntbox.c @ 13980:c9509bd42d7a
[gaim-migrate @ 16542]
Show the mail-notification checkbox in the account-dialog only if
the prpl has support for it.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 23 Jul 2006 02:03:19 +0000 |
parents | 8b2306c64efa |
children | 7573bd40a190 |
comparison
equal
deleted
inserted
replaced
13979:a71678d2da16 | 13980:c9509bd42d7a |
---|---|
87 cury += 1; | 87 cury += 1; |
88 } | 88 } |
89 | 89 |
90 for (iter = box->list; iter; iter = iter->next) | 90 for (iter = box->list; iter; iter = iter->next) |
91 { | 91 { |
92 if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(iter->data), GNT_WIDGET_INVISIBLE)) | |
93 continue; | |
92 gnt_widget_set_position(GNT_WIDGET(iter->data), curx, cury); | 94 gnt_widget_set_position(GNT_WIDGET(iter->data), curx, cury); |
93 gnt_widget_get_size(GNT_WIDGET(iter->data), &w, &h); | 95 gnt_widget_get_size(GNT_WIDGET(iter->data), &w, &h); |
94 if (box->vertical) | 96 if (box->vertical) |
95 { | 97 { |
96 if (h) | 98 if (h) |
215 | 217 |
216 /* Ensures that the current widget can take focus */ | 218 /* Ensures that the current widget can take focus */ |
217 static GntWidget * | 219 static GntWidget * |
218 find_focusable_widget(GntBox *box) | 220 find_focusable_widget(GntBox *box) |
219 { | 221 { |
222 /* XXX: Make sure the widget is visible? */ | |
220 if (box->focus == NULL && GNT_WIDGET(box)->parent == NULL) | 223 if (box->focus == NULL && GNT_WIDGET(box)->parent == NULL) |
221 g_list_foreach(box->list, add_to_focus, box); | 224 g_list_foreach(box->list, add_to_focus, box); |
222 | 225 |
223 if (box->active == NULL && box->focus) | 226 if (box->active == NULL && box->focus) |
224 box->active = box->focus->data; | 227 box->active = box->focus->data; |
227 } | 230 } |
228 | 231 |
229 static void | 232 static void |
230 find_next_focus(GntBox *box) | 233 find_next_focus(GntBox *box) |
231 { | 234 { |
232 GList *iter = g_list_find(box->focus, box->active); | 235 gpointer last = box->active; |
233 if (iter && iter->next) | 236 do |
234 box->active = iter->next->data; | 237 { |
235 else if (box->focus) | 238 GList *iter = g_list_find(box->focus, box->active); |
236 box->active = box->focus->data; | 239 if (iter && iter->next) |
240 box->active = iter->next->data; | |
241 else if (box->focus) | |
242 box->active = box->focus->data; | |
243 if (!GNT_WIDGET_IS_FLAG_SET(box->active, GNT_WIDGET_INVISIBLE)) | |
244 break; | |
245 } while (box->active != last); | |
237 } | 246 } |
238 | 247 |
239 static gboolean | 248 static gboolean |
240 gnt_box_key_pressed(GntWidget *widget, const char *text) | 249 gnt_box_key_pressed(GntWidget *widget, const char *text) |
241 { | 250 { |
562 { | 571 { |
563 GntWidget *w = GNT_WIDGET(iter->data); | 572 GntWidget *w = GNT_WIDGET(iter->data); |
564 int height, width; | 573 int height, width; |
565 int x, y; | 574 int x, y; |
566 | 575 |
576 if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_INVISIBLE)) | |
577 continue; | |
578 | |
567 if (GNT_IS_BOX(w)) | 579 if (GNT_IS_BOX(w)) |
568 gnt_box_sync_children(GNT_BOX(w)); | 580 gnt_box_sync_children(GNT_BOX(w)); |
569 | 581 |
570 gnt_widget_get_size(w, &width, &height); | 582 gnt_widget_get_size(w, &width, &height); |
571 | 583 |