diff options
Diffstat (limited to '')
-rw-r--r-- | src/extantz/extantz.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index b7de3a7..aceebe7 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -140,8 +140,6 @@ static void _on_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info | |||
140 | 140 | ||
141 | static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | 141 | static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
142 | { | 142 | { |
143 | // GLData *gld = data; | ||
144 | |||
145 | elm_exit(); | 143 | elm_exit(); |
146 | } | 144 | } |
147 | 145 | ||
@@ -420,13 +418,14 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
420 | elm_config_finger_size_set(0); | 418 | elm_config_finger_size_set(0); |
421 | elm_config_scale_set(1.0); | 419 | elm_config_scale_set(1.0); |
422 | 420 | ||
423 | eina_clist_init(&ourGlobals.winFangs); | ||
424 | gld = &ourGlobals.gld; | 421 | gld = &ourGlobals.gld; |
425 | gldata_init(gld); | 422 | gldata_init(gld); |
426 | 423 | ||
427 | // Set the engine to opengl_x11, then open our window. | 424 | // Set the engine to opengl_x11, then open our window. |
428 | elm_config_preferred_engine_set("opengl_x11"); | 425 | elm_config_preferred_engine_set("opengl_x11"); |
429 | ourGlobals.win = elm_win_util_standard_add("extantz", "extantz virtual world viewer"); | 426 | |
427 | ourGlobals.mainWindow = winFangAdd(NULL, 0, 0, 50, 20, "extantz virtual world viewer", "extantz"); | ||
428 | ourGlobals.win = ourGlobals.mainWindow->win; | ||
430 | // Set preferred engine back to default from config | 429 | // Set preferred engine back to default from config |
431 | elm_config_preferred_engine_set(NULL); | 430 | elm_config_preferred_engine_set(NULL); |
432 | 431 | ||
@@ -444,7 +443,6 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
444 | return 1; | 443 | return 1; |
445 | #endif | 444 | #endif |
446 | 445 | ||
447 | evas_object_smart_callback_add(ourGlobals.win, "delete,request", _on_done, gld); | ||
448 | evas_object_event_callback_add(ourGlobals.win, EVAS_CALLBACK_RESIZE, _on_resize, &ourGlobals); | 446 | evas_object_event_callback_add(ourGlobals.win, EVAS_CALLBACK_RESIZE, _on_resize, &ourGlobals); |
449 | 447 | ||
450 | // Get the screen size. | 448 | // Get the screen size. |
@@ -476,7 +474,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
476 | chat_add(&ourGlobals); | 474 | chat_add(&ourGlobals); |
477 | ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); | 475 | ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); |
478 | char *args[] = {"extantz", "-l", "test", "-foo", "COMBINED!", NULL}; | 476 | char *args[] = {"extantz", "-l", "test", "-foo", "COMBINED!", NULL}; |
479 | GuiLua *test = GuiLuaDo(5, args, ourGlobals.win); | 477 | GuiLua *test = GuiLuaDo(5, args, ourGlobals.mainWindow); |
480 | 478 | ||
481 | // Gotta do this after adding the windows, otherwise the menu renders under the window. | 479 | // Gotta do this after adding the windows, otherwise the menu renders under the window. |
482 | // This sucks, gotta redefine this menu each time we create a new window? | 480 | // This sucks, gotta redefine this menu each time we create a new window? |
@@ -511,22 +509,10 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
511 | 509 | ||
512 | if (ourGlobals.win) | 510 | if (ourGlobals.win) |
513 | { | 511 | { |
514 | winFang *win; | ||
515 | |||
516 | Evas_3D_Demo_fini(&ourGlobals); | 512 | Evas_3D_Demo_fini(&ourGlobals); |
517 | eo_unref(ourGlobals.tb); | 513 | eo_unref(ourGlobals.tb); |
518 | |||
519 | EINA_CLIST_FOR_EACH_ENTRY(win, &test->winFangs, winFang, node) | ||
520 | { | ||
521 | winFangDel(win); | ||
522 | } | ||
523 | |||
524 | EINA_CLIST_FOR_EACH_ENTRY(win, &ourGlobals.winFangs, winFang, node) | ||
525 | { | ||
526 | winFangDel(win); | ||
527 | } | ||
528 | eo_unref(ourGlobals.bx); | 514 | eo_unref(ourGlobals.bx); |
529 | evas_object_del(ourGlobals.win); | 515 | winFangDel(ourGlobals.mainWindow); |
530 | } | 516 | } |
531 | 517 | ||
532 | if (logDom >= 0) | 518 | if (logDom >= 0) |