ui/gtk/window.c

changeset 930
4ce8df2311f0
parent 867
83bb0dd7123f
child 951
13cf4c932f21
equal deleted inserted replaced
929:43cb1ea4c582 930:4ce8df2311f0
33 #include "../ui/window.h" 33 #include "../ui/window.h"
34 #include "../ui/properties.h" 34 #include "../ui/properties.h"
35 #include "../common/context.h" 35 #include "../common/context.h"
36 #include "../common/menu.h" 36 #include "../common/menu.h"
37 #include "../common/toolbar.h" 37 #include "../common/toolbar.h"
38 #include "../common/utils.h"
38 39
39 #include <cx/mempool.h> 40 #include <cx/mempool.h>
40 41
41 #include "menu.h" 42 #include "menu.h"
42 #include "toolbar.h" 43 #include "toolbar.h"
167 } 168 }
168 169
169 int window_width = window_default_width; 170 int window_width = window_default_width;
170 int window_height = window_default_height; 171 int window_height = window_default_height;
171 if(!simple) { 172 if(!simple) {
172 const char *width = ui_get_property("ui.window.width"); 173 ui_get_window_default_width(&window_width, &window_height);
173 const char *height = ui_get_property("ui.window.height");
174 if(width && height) {
175 int w = atoi(width);
176 int h = atoi(height);
177 if(w > 0 && h > 0) {
178 window_width = w;
179 window_height = h;
180 }
181 }
182 } 174 }
183 gtk_window_set_default_size( 175 gtk_window_set_default_size(
184 GTK_WINDOW(obj->widget), 176 GTK_WINDOW(obj->widget),
185 window_width, 177 window_width,
186 window_height); 178 window_height);

mercurial