Ephoto: Fix directory tree structure initialization.
This commit is contained in:
parent
8a3cc811f4
commit
9ca0e7ad9b
|
@ -110,7 +110,7 @@ void ephoto_thumb_browser_dirs_only_set(Ephoto *ephoto, Eina_Bool dirs_o
|
||||||
|
|
||||||
/*directory browser functions*/
|
/*directory browser functions*/
|
||||||
Evas_Object *ephoto_directory_browser_add(Ephoto *ephoto, Evas_Object *parent);
|
Evas_Object *ephoto_directory_browser_add(Ephoto *ephoto, Evas_Object *parent);
|
||||||
void ephoto_directory_browser_initialize_structure(Ephoto *ephoto);
|
void ephoto_directory_browser_initialize_structure(Ephoto *ephoto, char *rp);
|
||||||
void ephoto_directory_browser_top_dir_set(Ephoto *ephoto, const char *dir);
|
void ephoto_directory_browser_top_dir_set(Ephoto *ephoto, const char *dir);
|
||||||
void ephoto_directory_browser_clear(Ephoto *ephoto);
|
void ephoto_directory_browser_clear(Ephoto *ephoto);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ _config_save_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
ephoto_thumb_browser_clear(ephoto);
|
ephoto_thumb_browser_clear(ephoto);
|
||||||
eina_stringshare_replace(&ephoto->config->directory, rp);
|
eina_stringshare_replace(&ephoto->config->directory, rp);
|
||||||
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
||||||
ephoto_directory_browser_initialize_structure(ephoto);
|
ephoto_directory_browser_initialize_structure(ephoto, rp);
|
||||||
free(rp);
|
free(rp);
|
||||||
}
|
}
|
||||||
ephoto->config->prompts = elm_check_state_get(ephoto->config->show_prompts);
|
ephoto->config->prompts = elm_check_state_get(ephoto->config->show_prompts);
|
||||||
|
|
|
@ -523,7 +523,7 @@ _fsel_menu_go_root(void *data, Evas_Object *obj EINA_UNUSED, void *event_data EI
|
||||||
ephoto_thumb_browser_clear(ephoto);
|
ephoto_thumb_browser_clear(ephoto);
|
||||||
eina_stringshare_replace(&ephoto->config->directory, rp);
|
eina_stringshare_replace(&ephoto->config->directory, rp);
|
||||||
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
||||||
ephoto_directory_browser_initialize_structure(ephoto);
|
ephoto_directory_browser_initialize_structure(ephoto, rp);
|
||||||
free(rp);
|
free(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ _fsel_menu_go_home(void *data, Evas_Object *obj EINA_UNUSED, void *event_data EI
|
||||||
ephoto_thumb_browser_clear(ephoto);
|
ephoto_thumb_browser_clear(ephoto);
|
||||||
eina_stringshare_replace(&ephoto->config->directory, rp);
|
eina_stringshare_replace(&ephoto->config->directory, rp);
|
||||||
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
||||||
ephoto_directory_browser_initialize_structure(ephoto);
|
ephoto_directory_browser_initialize_structure(ephoto, rp);
|
||||||
free(rp);
|
free(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1226,7 +1226,7 @@ ephoto_directory_browser_top_dir_set(Ephoto *ephoto, const char *dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ephoto_directory_browser_initialize_structure(Ephoto *ephoto)
|
ephoto_directory_browser_initialize_structure(Ephoto *ephoto, char *rp)
|
||||||
{
|
{
|
||||||
Ephoto_Directory_Browser *db =
|
Ephoto_Directory_Browser *db =
|
||||||
evas_object_data_get(ephoto->dir_browser, "directory_browser");
|
evas_object_data_get(ephoto->dir_browser, "directory_browser");
|
||||||
|
@ -1259,8 +1259,8 @@ ephoto_directory_browser_initialize_structure(Ephoto *ephoto)
|
||||||
dir = NULL;
|
dir = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
snprintf(top, PATH_MAX, "%s", ephoto->config->open);
|
snprintf(top, PATH_MAX, "%s", rp);
|
||||||
tentry = ephoto_entry_new(ephoto, ephoto->config->open, basename(top),
|
tentry = ephoto_entry_new(ephoto, rp, basename(top),
|
||||||
EINA_FILE_DIR);
|
EINA_FILE_DIR);
|
||||||
tentry->parent = NULL;
|
tentry->parent = NULL;
|
||||||
tic = _ephoto_dir_tree_class;
|
tic = _ephoto_dir_tree_class;
|
||||||
|
|
|
@ -609,7 +609,7 @@ ephoto_window_add(const char *path)
|
||||||
ephoto->trash_path = eina_stringshare_add(trash);
|
ephoto->trash_path = eina_stringshare_add(trash);
|
||||||
|
|
||||||
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
ephoto_directory_browser_top_dir_set(ephoto, ephoto->config->directory);
|
||||||
ephoto_directory_browser_initialize_structure(ephoto);
|
ephoto_directory_browser_initialize_structure(ephoto, (char *)ephoto->config->open);
|
||||||
evas_object_resize(ephoto->win, ephoto->config->window_width,
|
evas_object_resize(ephoto->win, ephoto->config->window_width,
|
||||||
ephoto->config->window_height);
|
ephoto->config->window_height);
|
||||||
evas_object_show(ephoto->win);
|
evas_object_show(ephoto->win);
|
||||||
|
|
Loading…
Reference in New Issue