summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-14 12:07:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-14 12:07:43 +0100
commit1241760d00758c85cbef2f12e37477099dc02f17 (patch)
tree6891d0a527b4ba46c210feb21b7433a69514f56c
parent32721ed9ce780eef73e6c14fdc27a6821ef6baf9 (diff)
app: use elm_win_util_standard_add()
-rw-r--r--app/src/bin/gui.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/app/src/bin/gui.c b/app/src/bin/gui.c
index b47d45c..5f1f3c7 100644
--- a/app/src/bin/gui.c
+++ b/app/src/bin/gui.c
@@ -246,7 +246,7 @@ EAPI Evas_Object*
246app_gui_create(App *app, Eina_Bool fullscreen, Eina_Rectangle geometry) 246app_gui_create(App *app, Eina_Bool fullscreen, Eina_Rectangle geometry)
247{ 247{
248 const char *title = NULL; 248 const char *title = NULL;
249 Evas_Object *win, *bg; 249 Evas_Object *win;
250 250
251 ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _sigint_handler, NULL); 251 ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _sigint_handler, NULL);
252 252
@@ -257,27 +257,14 @@ app_gui_create(App *app, Eina_Bool fullscreen, Eina_Rectangle geometry)
257 if (!title) title = "Missing Title"; 257 if (!title) title = "Missing Title";
258 258
259 // create window 259 // create window
260 app->gui.win = win = elm_win_add(NULL, "hello", ELM_WIN_BASIC); 260 app->gui.win = win = elm_win_util_standard_add("hello", title);
261 /* app->gui.win = win = elm_win_util_standard_add("hello", title); */
262 if (!win) return NULL; 261 if (!win) return NULL;
263 evas_object_smart_callback_add(win, "delete,request", _on_del, NULL); 262 evas_object_smart_callback_add(win, "delete,request", _on_del, NULL);
264 elm_win_title_set(win, title);
265 elm_win_autodel_set(win, EINA_TRUE); 263 elm_win_autodel_set(win, EINA_TRUE);
266 elm_win_icon_name_set(win, "elm-skel"); 264 elm_win_icon_name_set(win, "elm-skel");
267 /* elm_win_focus_highlight_enabled_set(win, EINA_TRUE); */ 265 /* elm_win_focus_highlight_enabled_set(win, EINA_TRUE); */
268 evas_object_show(win); 266 evas_object_show(win);
269 267
270 // add resizing background (done by elm_win_util_standard_add)
271 bg = elm_bg_add(win);
272 if (!bg) {
273 evas_object_del(win);
274 return NULL;
275 }
276 /* elm_bg_color_set(bg, 0, 0, 0); */
277 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
278 elm_win_resize_object_add(win, bg);
279 evas_object_show(bg);
280
281 _create_naviframe(app, win); 268 _create_naviframe(app, win);
282 269
283 // set position and size according to parameters 270 // set position and size according to parameters