Fix the current directory when one hasn't been provided.

SVN revision: 56943
This commit is contained in:
titan 2011-02-11 00:09:33 +00:00 committed by titan
parent c9c56e117d
commit 4ef79b29a5
2 changed files with 9 additions and 10 deletions

View File

@ -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();

View File

@ -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);