| 154 |
154 |
| 155 if(!simple) { |
155 if(!simple) { |
| 156 g_object_set_data(G_OBJECT(obj->widget), "ui.appwindow", obj); |
156 g_object_set_data(G_OBJECT(obj->widget), "ui.appwindow", obj); |
| 157 } |
157 } |
| 158 |
158 |
| 159 const char *width = ui_get_property("ui.window.width"); |
159 int window_width = window_default_width; |
| 160 const char *height = ui_get_property("ui.window.height"); |
160 int window_height = window_default_height; |
| 161 if(width && height) { |
161 if(!simple) { |
| 162 gtk_window_set_default_size( |
162 const char *width = ui_get_property("ui.window.width"); |
| |
163 const char *height = ui_get_property("ui.window.height"); |
| |
164 if(width && height) { |
| |
165 int w = atoi(width); |
| |
166 int h = atoi(height); |
| |
167 if(w > 0 && h > 0) { |
| |
168 window_width = w; |
| |
169 window_height = h; |
| |
170 } |
| |
171 } |
| |
172 } |
| |
173 gtk_window_set_default_size( |
| 163 GTK_WINDOW(obj->widget), |
174 GTK_WINDOW(obj->widget), |
| 164 atoi(width), |
175 window_width, |
| 165 atoi(height)); |
176 window_height); |
| 166 } else { |
|
| 167 gtk_window_set_default_size( |
|
| 168 GTK_WINDOW(obj->widget), |
|
| 169 window_default_width + sidebar*250, |
|
| 170 window_default_height); |
|
| 171 } |
|
| 172 |
177 |
| 173 obj->destroy = ui_window_widget_destroy; |
178 obj->destroy = ui_window_widget_destroy; |
| 174 g_signal_connect( |
179 g_signal_connect( |
| 175 obj->widget, |
180 obj->widget, |
| 176 "destroy", |
181 "destroy", |