ui/gtk/window.c

changeset 59
eb6611be50c7
parent 30
34513f76d5a8
child 106
a4f4123ca12a
--- a/ui/gtk/window.c	Sat Aug 30 22:48:46 2014 +0200
+++ b/ui/gtk/window.c	Thu Jan 01 11:23:43 2015 +0100
@@ -87,12 +87,7 @@
             G_CALLBACK(ui_exit_event),
             window_data);
     
-    GtkWidget *vbox;
-#ifdef UI_GTK3
-    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-#else
-    vbox = gtk_vbox_new(FALSE, 0);
-#endif
+    GtkWidget *vbox = ui_gtk_vbox_new();
     gtk_container_add(GTK_CONTAINER(obj->widget), vbox);
     
     // menu
@@ -108,9 +103,14 @@
     }
     
     // window content
+    // the content has a (TODO: not yet) configurable frame
     GtkWidget *frame = gtk_alignment_new(0.5, 0.5, 1, 1);
     gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
-    obj->container = ui_frame_container(obj, frame);
+    
+    // content vbox
+    GtkWidget *content_box = ui_gtk_vbox_new();
+    gtk_container_add(GTK_CONTAINER(frame), content_box);
+    obj->container = ui_box_container(obj, content_box);
     
     nwindows++;
     return obj;

mercurial