diff options
author | David Walter Seikel | 2014-05-04 19:47:26 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-04 19:47:26 +1000 |
commit | 678db28766fb6bcc7bcdc8e598f8aab3bda5f148 (patch) | |
tree | a1e107ce4632ee97fb3028d3a68f1a72467b5813 /src/extantz/extantz.c | |
parent | Major clean up of the file selector. (diff) | |
download | SledjHamr-678db28766fb6bcc7bcdc8e598f8aab3bda5f148.zip SledjHamr-678db28766fb6bcc7bcdc8e598f8aab3bda5f148.tar.gz SledjHamr-678db28766fb6bcc7bcdc8e598f8aab3bda5f148.tar.bz2 SledjHamr-678db28766fb6bcc7bcdc8e598f8aab3bda5f148.tar.xz |
Make the file selector actually useful.
Diffstat (limited to '')
-rw-r--r-- | src/extantz/extantz.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 0579552..4ef9ecc 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -128,7 +128,13 @@ static void _del_gl(Evas_Object *obj) | |||
128 | _clean_gl(ourGlobals, NULL, NULL, NULL); | 128 | _clean_gl(ourGlobals, NULL, NULL, NULL); |
129 | } | 129 | } |
130 | 130 | ||
131 | // Callback for when the app quits. | 131 | static void _on_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
132 | { | ||
133 | globals *ourGlobals = data; | ||
134 | |||
135 | filesShow(ourGlobals->files, NULL, NULL); | ||
136 | } | ||
137 | |||
132 | static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | 138 | static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
133 | { | 139 | { |
134 | // GLData *gld = data; | 140 | // GLData *gld = data; |
@@ -286,6 +292,7 @@ static void makeMainMenu(globals *ourGlobals) | |||
286 | 292 | ||
287 | // Menus. | 293 | // Menus. |
288 | menu = _toolbar_menu_add(ourGlobals->win, tb, "file"); | 294 | menu = _toolbar_menu_add(ourGlobals->win, tb, "file"); |
295 | elm_menu_item_add(menu, NULL, NULL, "open", _on_open, ourGlobals); | ||
289 | elm_menu_item_add(menu, NULL, NULL, "quit", _on_done, gld); | 296 | elm_menu_item_add(menu, NULL, NULL, "quit", _on_done, gld); |
290 | 297 | ||
291 | menu = _toolbar_menu_add(ourGlobals->win, tb, "edit"); | 298 | menu = _toolbar_menu_add(ourGlobals->win, tb, "edit"); |
@@ -327,7 +334,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
327 | Evas_Object *obj; | 334 | Evas_Object *obj; |
328 | EPhysics_World *world; | 335 | EPhysics_World *world; |
329 | GLData *gld = NULL; | 336 | GLData *gld = NULL; |
330 | fangWin *chat = NULL, *files = NULL, *woMan = NULL; | 337 | fangWin *chat = NULL, *woMan = NULL; |
331 | char buf[PATH_MAX]; | 338 | char buf[PATH_MAX]; |
332 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. | 339 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. |
333 | 340 | ||
@@ -413,7 +420,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
413 | // overlay_add(&ourGlobals); | 420 | // overlay_add(&ourGlobals); |
414 | woMan = woMan_add(&ourGlobals); | 421 | woMan = woMan_add(&ourGlobals); |
415 | chat = chat_add(&ourGlobals); | 422 | chat = chat_add(&ourGlobals); |
416 | files = files_add(&ourGlobals); | 423 | ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); |
417 | 424 | ||
418 | // Gotta do this after adding the windows, otherwise the menu renders under the window. | 425 | // Gotta do this after adding the windows, otherwise the menu renders under the window. |
419 | // This sucks, gotta redefine this menu each time we create a new window? | 426 | // This sucks, gotta redefine this menu each time we create a new window? |
@@ -448,7 +455,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
448 | { | 455 | { |
449 | Evas_3D_Demo_fini(&ourGlobals); | 456 | Evas_3D_Demo_fini(&ourGlobals); |
450 | eo_unref(ourGlobals.tb); | 457 | eo_unref(ourGlobals.tb); |
451 | fang_win_del(&ourGlobals, files); | 458 | fang_win_del(&ourGlobals, ourGlobals.files); |
452 | fang_win_del(&ourGlobals, chat); | 459 | fang_win_del(&ourGlobals, chat); |
453 | fang_win_del(&ourGlobals, woMan); | 460 | fang_win_del(&ourGlobals, woMan); |
454 | eo_unref(ourGlobals.bx); | 461 | eo_unref(ourGlobals.bx); |