From 4ef79b29a52d32effec14f0e34c19bad0138983f Mon Sep 17 00:00:00 2001 From: titan Date: Fri, 11 Feb 2011 00:09:33 +0000 Subject: [PATCH] Fix the current directory when one hasn't been provided. SVN revision: 56943 --- src/bin/ephoto_main.c | 18 +++++++++--------- src/bin/ephoto_thumb_browser.c | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index 5ac01df..64dfd4e 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -35,6 +35,15 @@ ephoto_window_add(void) elm_win_resize_object_add(ephoto->win, ephoto->pager); evas_object_show(ephoto->pager); + if (!ephoto->directory && !ephoto->file) + { + char buf[PATH_MAX], *cwd; + cwd = getcwd(buf, PATH_MAX); + ephoto->directory = eina_stringshare_add(cwd); + } + else if (ephoto->file) + ephoto->directory = eina_stringshare_add(ecore_file_dir_get(ephoto->file)); + ephoto->flow_browser = ephoto_flow_browser_add(); elm_pager_content_push(ephoto->pager, ephoto->flow_browser); @@ -44,15 +53,6 @@ ephoto_window_add(void) elm_pager_content_promote(ephoto->pager, ephoto->thumb_browser); ephoto->state = EPHOTO_STATE_THUMB; - if (!ephoto->directory && !ephoto->file) - { - char buf[PATH_MAX], *cwd; - cwd = getcwd(buf, PATH_MAX); - ephoto->directory = eina_stringshare_add(cwd); - } - else if (ephoto->file) - ephoto->directory = eina_stringshare_add(ecore_file_dir_get(ephoto->file)); - ephoto->current_index = ephoto->images; _ephoto_thumb_populate(); diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c index f1314b8..8d5ef94 100644 --- a/src/bin/ephoto_thumb_browser.c +++ b/src/bin/ephoto_thumb_browser.c @@ -82,7 +82,6 @@ ephoto_thumb_browser_add(void) etb->dir_entry = elm_fileselector_entry_add(etb->box); elm_fileselector_entry_path_set(etb->dir_entry, ephoto->directory); elm_fileselector_entry_button_label_set(etb->dir_entry, "Choose"); - elm_fileselector_entry_folder_only_set(etb->dir_entry, EINA_TRUE); elm_fileselector_entry_is_save_set(etb->dir_entry, EINA_FALSE); elm_fileselector_entry_inwin_mode_set(etb->dir_entry, EINA_TRUE); evas_object_size_hint_weight_set(etb->dir_entry, 0.0, 0.0);