| 66 mvwprintw(widget->window, 0, pos, title); |
66 mvwprintw(widget->window, 0, pos, title); |
| 67 mvwaddch(widget->window, 0, right, ACS_LTEE | COLOR_PAIR(GNT_COLOR_NORMAL)); |
67 mvwaddch(widget->window, 0, right, ACS_LTEE | COLOR_PAIR(GNT_COLOR_NORMAL)); |
| 68 g_free(title); |
68 g_free(title); |
| 69 } |
69 } |
| 70 |
70 |
| 71 DEBUG; |
71 GNTDEBUG; |
| 72 } |
72 } |
| 73 |
73 |
| 74 static void |
74 static void |
| 75 reposition_children(GntWidget *widget) |
75 reposition_children(GntWidget *widget) |
| 76 { |
76 { |
| 213 if (widget->priv.width == 0 || widget->priv.height == 0) |
213 if (widget->priv.width == 0 || widget->priv.height == 0) |
| 214 { |
214 { |
| 215 gnt_widget_size_request(widget); |
215 gnt_widget_size_request(widget); |
| 216 find_focusable_widget(GNT_BOX(widget)); |
216 find_focusable_widget(GNT_BOX(widget)); |
| 217 } |
217 } |
| 218 DEBUG; |
218 GNTDEBUG; |
| 219 } |
219 } |
| 220 |
220 |
| 221 /* Ensures that the current widget can take focus */ |
221 /* Ensures that the current widget can take focus */ |
| 222 static GntWidget * |
222 static GntWidget * |
| 223 find_focusable_widget(GntBox *box) |
223 find_focusable_widget(GntBox *box) |
| 496 parent_class->lost_focus = gnt_box_lost_focus; |
496 parent_class->lost_focus = gnt_box_lost_focus; |
| 497 parent_class->gained_focus = gnt_box_gained_focus; |
497 parent_class->gained_focus = gnt_box_gained_focus; |
| 498 parent_class->confirm_size = gnt_box_confirm_size; |
498 parent_class->confirm_size = gnt_box_confirm_size; |
| 499 parent_class->size_changed = gnt_box_size_changed; |
499 parent_class->size_changed = gnt_box_size_changed; |
| 500 |
500 |
| 501 DEBUG; |
501 GNTDEBUG; |
| 502 } |
502 } |
| 503 |
503 |
| 504 static void |
504 static void |
| 505 gnt_box_init(GTypeInstance *instance, gpointer class) |
505 gnt_box_init(GTypeInstance *instance, gpointer class) |
| 506 { |
506 { |
| 507 /* Initially make both the height and width resizable. |
507 /* Initially make both the height and width resizable. |
| 508 * Update the flags as necessary when widgets are added to it. */ |
508 * Update the flags as necessary when widgets are added to it. */ |
| 509 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(instance), GNT_WIDGET_GROW_X | GNT_WIDGET_GROW_Y); |
509 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(instance), GNT_WIDGET_GROW_X | GNT_WIDGET_GROW_Y); |
| 510 DEBUG; |
510 GNTDEBUG; |
| 511 } |
511 } |
| 512 |
512 |
| 513 /****************************************************************************** |
513 /****************************************************************************** |
| 514 * GntBox API |
514 * GntBox API |
| 515 *****************************************************************************/ |
515 *****************************************************************************/ |