Use efreet to get information about .desktop files.
SVN revision: 29038
This commit is contained in:
parent
e25c2ffdec
commit
c7872bf9f7
|
@ -976,16 +976,12 @@ e_fm2_icon_get(Evas *evas, const char *realpath,
|
||||||
}
|
}
|
||||||
else if (!strcmp(icon, "DESKTOP"))
|
else if (!strcmp(icon, "DESKTOP"))
|
||||||
{
|
{
|
||||||
E_App *app;
|
Efreet_Desktop *ef;
|
||||||
|
|
||||||
oic = NULL;
|
oic = NULL;
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||||
app = e_app_new(buf, 0);
|
ef = efreet_desktop_get(buf);
|
||||||
if (app)
|
if (ef) oic = e_util_desktop_icon_add(ef, "24x24", evas);
|
||||||
{
|
|
||||||
oic = e_app_icon_add(app, evas);
|
|
||||||
e_object_unref(E_OBJECT(app));
|
|
||||||
}
|
|
||||||
if (type_ret) *type_ret = "DESKTOP";
|
if (type_ret) *type_ret = "DESKTOP";
|
||||||
}
|
}
|
||||||
else if (!strncmp(icon, "e/icons/fileman/mime/", 21))
|
else if (!strncmp(icon, "e/icons/fileman/mime/", 21))
|
||||||
|
@ -1021,9 +1017,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath,
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||||
/* fallback */
|
/* fallback */
|
||||||
if (
|
if ((e_util_glob_case_match(ici->file, "*.edj")))
|
||||||
(e_util_glob_case_match(ici->file, "*.edj"))
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
oic = e_thumb_icon_add(evas);
|
oic = e_thumb_icon_add(evas);
|
||||||
if (keyhint)
|
if (keyhint)
|
||||||
|
@ -1051,15 +1045,11 @@ e_fm2_icon_get(Evas *evas, const char *realpath,
|
||||||
else if ((e_util_glob_case_match(ici->file, "*.desktop")) ||
|
else if ((e_util_glob_case_match(ici->file, "*.desktop")) ||
|
||||||
(e_util_glob_case_match(ici->file, "*.directory")))
|
(e_util_glob_case_match(ici->file, "*.directory")))
|
||||||
{
|
{
|
||||||
E_App *app;
|
Efreet_Desktop *ef;
|
||||||
|
|
||||||
oic = NULL;
|
oic = NULL;
|
||||||
app = e_app_new(buf, 0);
|
ef = efreet_desktop_get(buf);
|
||||||
if (app)
|
if (ef) oic = e_util_desktop_icon_add(ef, "24x24", evas);
|
||||||
{
|
|
||||||
oic = e_app_icon_add(app, evas);
|
|
||||||
e_object_unref(E_OBJECT(app));
|
|
||||||
}
|
|
||||||
if (type_ret) *type_ret = "DESKTOP";
|
if (type_ret) *type_ret = "DESKTOP";
|
||||||
}
|
}
|
||||||
else if (e_util_glob_case_match(ici->file, "*.imc"))
|
else if (e_util_glob_case_match(ici->file, "*.imc"))
|
||||||
|
|
|
@ -225,15 +225,11 @@ _e_imc_setup_button_toggle(Evas_Object *button, E_Input_Method_Config *imc)
|
||||||
{
|
{
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
flag = ( imc->e_im_setup_exec == NULL ) ||
|
flag = (!imc->e_im_setup_exec) || (!imc->e_im_setup_exec[0]);
|
||||||
( imc->e_im_setup_exec[0] == 0 );
|
|
||||||
e_widget_disabled_set(button, flag);
|
e_widget_disabled_set(button, flag);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
e_widget_disabled_set(button, 1);
|
||||||
e_widget_disabled_set(button, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -264,7 +260,7 @@ _e_imc_setup_cb(void *data, void *data2)
|
||||||
|
|
||||||
imc = evas_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
|
imc = evas_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
|
||||||
|
|
||||||
if (imc && imc->e_im_setup_exec)
|
if ((imc) && (imc->e_im_setup_exec))
|
||||||
{
|
{
|
||||||
Ecore_Exe *exe;
|
Ecore_Exe *exe;
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
|
|
|
@ -846,6 +846,21 @@ e_util_icon_add(const char *path, Evas *evas)
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Evas_Object *
|
||||||
|
e_util_desktop_icon_add(Efreet_Desktop *desktop, const char *size, Evas *evas)
|
||||||
|
{
|
||||||
|
if ((!desktop) || (!desktop->icon)) return NULL;
|
||||||
|
|
||||||
|
if (desktop->icon[0] == '/') return e_util_icon_add(desktop->icon, evas);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char *path;
|
||||||
|
path = efreet_icon_path_find(e_config->icon_theme, desktop->icon, size);
|
||||||
|
if (path) return e_util_icon_add(path, evas);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_e_util_container_fake_mouse_up_cb(void *data)
|
_e_util_container_fake_mouse_up_cb(void *data)
|
||||||
|
|
|
@ -50,6 +50,7 @@ EAPI char *e_util_file_time_get(time_t ftime);
|
||||||
EAPI void e_util_library_path_strip(void);
|
EAPI void e_util_library_path_strip(void);
|
||||||
EAPI void e_util_library_path_restore(void);
|
EAPI void e_util_library_path_restore(void);
|
||||||
EAPI Evas_Object *e_util_icon_add(const char *path, Evas *evas);
|
EAPI Evas_Object *e_util_icon_add(const char *path, Evas *evas);
|
||||||
|
EAPI Evas_Object *e_util_desktop_icon_add(Efreet_Desktop *desktop, const char *size, Evas *evas);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue