Really make it the root directory...

SVN revision: 60003
This commit is contained in:
Stephen Houston 2011-06-06 19:23:57 +00:00
parent 4ed9b65e6a
commit bfa68a6151
2 changed files with 14 additions and 10 deletions

View File

@ -191,23 +191,27 @@ static Eina_Bool
_ephoto_list_populate_start(void *data, int type __UNUSED__, void *event __UNUSED__) _ephoto_list_populate_start(void *data, int type __UNUSED__, void *event __UNUSED__)
{ {
Ephoto_List_Browser *lb = data; Ephoto_List_Browser *lb = data;
char *parent_dir; char *parent_dir, p[PATH_MAX];
_todo_items_free(lb); _todo_items_free(lb);
_list_items_free(lb); _list_items_free(lb);
elm_genlist_clear(lb->list); elm_genlist_clear(lb->list);
parent_dir = ecore_file_dir_get(lb->ephoto->config->directory); parent_dir = ecore_file_dir_get(lb->ephoto->config->directory);
if (parent_dir && strcmp(lb->ephoto->config->directory, "/")) snprintf(p, PATH_MAX, "%s/.e/e/fileman/favorites", getenv("HOME"));
if (strcmp (lb->ephoto->config->directory, p))
{ {
Elm_Genlist_Item_Class *ic; if (parent_dir && strcmp(lb->ephoto->config->directory, "/"))
{
Elm_Genlist_Item_Class *ic;
if (up_entry) if (up_entry)
ephoto_entry_free(up_entry); ephoto_entry_free(up_entry);
up_entry = ephoto_entry_new(lb->ephoto, parent_dir, "Up"); up_entry = ephoto_entry_new(lb->ephoto, parent_dir, "Up");
ic = &_ephoto_list_up_item_class; ic = &_ephoto_list_up_item_class;
elm_genlist_item_append elm_genlist_item_append
(lb->list, ic, up_entry, NULL, ELM_GENLIST_ITEM_NONE, _change_dir, up_entry); (lb->list, ic, up_entry, NULL, ELM_GENLIST_ITEM_NONE, _change_dir, up_entry);
}
} }
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;

View File

@ -356,7 +356,7 @@ ephoto_directory_set(Ephoto *ephoto, const char *path)
{ {
EINA_SAFETY_ON_NULL_RETURN(ephoto); EINA_SAFETY_ON_NULL_RETURN(ephoto);
ephoto_title_set(ephoto, path); ephoto_title_set(ephoto, basename(path));
eina_stringshare_replace(&ephoto->config->directory, path); eina_stringshare_replace(&ephoto->config->directory, path);
if (ephoto->job.change_dir) ecore_job_del(ephoto->job.change_dir); if (ephoto->job.change_dir) ecore_job_del(ephoto->job.change_dir);
ephoto->job.change_dir = ecore_job_add(_ephoto_change_dir, ephoto); ephoto->job.change_dir = ecore_job_add(_ephoto_change_dir, ephoto);