diff -r 55718d4ed227 -r efe2f65bea17 ui/gtk/container.c --- a/ui/gtk/container.c Wed Jan 21 11:21:47 2015 +0100 +++ b/ui/gtk/container.c Wed Jan 21 12:29:03 2015 +0100 @@ -63,6 +63,7 @@ void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { gtk_container_add(GTK_CONTAINER(ct->widget), widget); ui_reset_layout(ct->layout); + ct->current = widget; } @@ -95,6 +96,7 @@ gtk_box_pack_start(GTK_BOX(ct->widget), widget, expand, fill, 0); ui_reset_layout(ct->layout); + ct->current = widget; } UiContainer* ui_grid_container(UiObject *obj, GtkWidget *grid) { @@ -125,6 +127,7 @@ grid->x++; ui_reset_layout(ct->layout); + ct->current = widget; } #endif #ifdef UI_GTK2 @@ -145,6 +148,9 @@ grid->height = grid->y + 1; gtk_table_resize(GTK_TABLE(ct->widget), grid->width, grid->height); } + + ui_reset_layout(ct->layout); + ct->current = widget; } #endif @@ -163,6 +169,9 @@ GTK_NOTEBOOK(ct->widget), widget, gtk_label_new(ct->layout.label)); + + ui_reset_layout(ct->layout); + ct->current = widget; } @@ -271,10 +280,16 @@ void ui_split_container_add1(UiContainer *ct, GtkWidget *widget, UiBool fill) { // TODO: remove gtk_paned_pack1(GTK_PANED(ct->widget), widget, TRUE, FALSE); + + ui_reset_layout(ct->layout); + ct->current = widget; } void ui_split_container_add2(UiContainer *ct, GtkWidget *widget, UiBool fill) { gtk_paned_pack2(GTK_PANED(ct->widget), widget, TRUE, FALSE); + + ui_reset_layout(ct->layout); + ct->current = widget; }