forked from enlightenment/enlightenment
parent
02e2fcbec4
commit
90e15a8678
|
@ -10355,3 +10355,25 @@ e_fm2_real_path_map(const char *dev, const char *path)
|
|||
{
|
||||
return _e_fm2_dev_path_map(dev, path);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_fm2_favorites_init(void)
|
||||
{
|
||||
Eina_List *files;
|
||||
char buf[PATH_MAX], buf2[PATH_MAX], *file;
|
||||
|
||||
// make dir for favorites and install ones shipped
|
||||
snprintf(buf, sizeof(buf), "%s/fileman/favorites", e_user_dir_get());
|
||||
ecore_file_mkpath(buf);
|
||||
e_prefix_data_concat(buf, sizeof(buf), "data/favorites");
|
||||
files = ecore_file_ls(buf);
|
||||
if (!files) return 0;
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
e_prefix_data_snprintf(buf, sizeof(buf), "data/favorites/%s", file);
|
||||
snprintf(buf2, sizeof(buf2), "%s/fileman/favorites/%s",
|
||||
e_user_dir_get(), file);
|
||||
ecore_file_cp(buf, buf2);
|
||||
free(file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ EAPI void e_fm2_client_del(Ecore_Ipc_Event_Client_Del *e);
|
|||
EAPI E_Fm2_View_Mode e_fm2_view_mode_get(Evas_Object *obj);
|
||||
EAPI void e_fm2_optimal_size_calc(Evas_Object *obj, int maxw, int maxh, int *w, int *h);
|
||||
EAPI const char *e_fm2_real_path_map(const char *dev, const char *path);
|
||||
EAPI void e_fm2_favorites_init(void);
|
||||
|
||||
EAPI int _e_fm2_client_mount(const char *udi, const char *mountpoint);
|
||||
EAPI int _e_fm2_client_unmount(const char *udi);
|
||||
|
|
|
@ -20,20 +20,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__)
|
|||
Eina_List *files;
|
||||
char buf[PATH_MAX], buf2[PATH_MAX], *file;
|
||||
|
||||
// make dir for favorites and install ones shipped
|
||||
snprintf(buf, sizeof(buf), "%s/fileman/favorites", e_user_dir_get());
|
||||
ecore_file_mkpath(buf);
|
||||
e_prefix_data_concat(buf, sizeof(buf), "data/favorites");
|
||||
files = ecore_file_ls(buf);
|
||||
if (!files) return 0;
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
e_prefix_data_snprintf(buf, sizeof(buf), "data/favorites/%s", file);
|
||||
snprintf(buf2, sizeof(buf2), "%s/fileman/favorites/%s",
|
||||
e_user_dir_get(), file);
|
||||
ecore_file_cp(buf, buf2);
|
||||
free(file);
|
||||
}
|
||||
e_fm2_favorites_init();
|
||||
// make desktop dir
|
||||
e_user_homedir_concat(buf, sizeof(buf), _("Desktop"));
|
||||
ecore_file_mkpath(buf);
|
||||
|
|
Loading…
Reference in New Issue