parent
e629126d7b
commit
4e125e3bff
|
@ -103,7 +103,6 @@ extern EAPI E_Path *path_icons;
|
||||||
extern EAPI E_Path *path_init;
|
extern EAPI E_Path *path_init;
|
||||||
extern EAPI E_Path *path_modules;
|
extern EAPI E_Path *path_modules;
|
||||||
extern EAPI E_Path *path_backgrounds;
|
extern EAPI E_Path *path_backgrounds;
|
||||||
extern EAPI E_Path *path_bin;
|
|
||||||
extern EAPI int restart;
|
extern EAPI int restart;
|
||||||
extern EAPI int good;
|
extern EAPI int good;
|
||||||
extern EAPI int evil;
|
extern EAPI int evil;
|
||||||
|
|
|
@ -4383,7 +4383,7 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key)
|
||||||
"widgets/border/default/sendto"),
|
"widgets/border/default/sendto"),
|
||||||
"widgets/border/default/sendto");
|
"widgets/border/default/sendto");
|
||||||
|
|
||||||
if (e_util_app_installed("e_util_eapp_edit"))
|
if (ecore_file_app_installed("e_util_eapp_edit"))
|
||||||
{
|
{
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_separator_set(mi, 1);
|
e_menu_item_separator_set(mi, 1);
|
||||||
|
|
|
@ -125,7 +125,7 @@ e_int_menus_main_new(void)
|
||||||
IF_FREE(s);
|
IF_FREE(s);
|
||||||
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
|
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
|
||||||
|
|
||||||
if (e_util_app_installed("exige"))
|
if (ecore_file_app_installed("exige"))
|
||||||
{
|
{
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_label_set(mi, _("Run Command"));
|
e_menu_item_label_set(mi, _("Run Command"));
|
||||||
|
|
|
@ -35,7 +35,6 @@ E_Path *path_init = NULL;
|
||||||
E_Path *path_icons = NULL;
|
E_Path *path_icons = NULL;
|
||||||
E_Path *path_modules = NULL;
|
E_Path *path_modules = NULL;
|
||||||
E_Path *path_backgrounds = NULL;
|
E_Path *path_backgrounds = NULL;
|
||||||
E_Path *path_bin = NULL;
|
|
||||||
int restart = 0;
|
int restart = 0;
|
||||||
int good = 0;
|
int good = 0;
|
||||||
int evil = 0;
|
int evil = 0;
|
||||||
|
@ -793,14 +792,6 @@ _e_main_path_init(void)
|
||||||
e_path_default_path_append(path_backgrounds, "~/.e/e/backgrounds");
|
e_path_default_path_append(path_backgrounds, "~/.e/e/backgrounds");
|
||||||
e_path_user_path_set(path_backgrounds, &(e_config->path_append_backgrounds));
|
e_path_user_path_set(path_backgrounds, &(e_config->path_append_backgrounds));
|
||||||
|
|
||||||
/* setup PATH path */
|
|
||||||
path_bin = e_path_from_env("PATH");
|
|
||||||
if (!path_bin)
|
|
||||||
{
|
|
||||||
e_error_message_show("Cannot allocate path for path_bin\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,39 +18,6 @@ e_path_new(void)
|
||||||
return ep;
|
return ep;
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Path *
|
|
||||||
e_path_from_env(char *env)
|
|
||||||
{
|
|
||||||
E_Path *ep;
|
|
||||||
char *env_path, *p, *last;
|
|
||||||
|
|
||||||
ep = e_path_new();
|
|
||||||
env_path = getenv(env);
|
|
||||||
|
|
||||||
if (!env_path)
|
|
||||||
return ep;
|
|
||||||
|
|
||||||
env_path = strdup(env_path);
|
|
||||||
last = env_path;
|
|
||||||
for (p = env_path; *p; p++)
|
|
||||||
{
|
|
||||||
if (*p == ':')
|
|
||||||
*p = '\0';
|
|
||||||
|
|
||||||
if (!*p)
|
|
||||||
{
|
|
||||||
e_path_default_path_append(ep, last);
|
|
||||||
last = p+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (p > last)
|
|
||||||
e_path_default_path_append(ep, last);
|
|
||||||
|
|
||||||
free(env_path);
|
|
||||||
return ep;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
e_path_default_path_append(E_Path *ep, const char *path)
|
e_path_default_path_append(E_Path *ep, const char *path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ struct _E_Path
|
||||||
|
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
EAPI E_Path *e_path_new(void);
|
EAPI E_Path *e_path_new(void);
|
||||||
EAPI E_Path *e_path_from_env(char *env);
|
|
||||||
EAPI void e_path_user_path_set(E_Path *ep, Evas_List **user_dir_list);
|
EAPI void e_path_user_path_set(E_Path *ep, Evas_List **user_dir_list);
|
||||||
EAPI void e_path_inherit_path_set(E_Path *ep, E_Path *path_inherit);
|
EAPI void e_path_inherit_path_set(E_Path *ep, E_Path *path_inherit);
|
||||||
/* append a hardcoded path */
|
/* append a hardcoded path */
|
||||||
|
|
|
@ -117,35 +117,6 @@ _e_util_wakeup_cb(void *data)
|
||||||
int
|
int
|
||||||
e_util_utils_installed(void)
|
e_util_utils_installed(void)
|
||||||
{
|
{
|
||||||
return e_util_app_installed("emblem");
|
return ecore_file_app_installed("emblem");
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
e_util_app_installed(char *app)
|
|
||||||
{
|
|
||||||
char buf[PATH_MAX];
|
|
||||||
Evas_List *list, *l;
|
|
||||||
E_Path_Dir *dir;
|
|
||||||
int found;
|
|
||||||
|
|
||||||
if (!app)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
found = 0;
|
|
||||||
list = e_path_dir_list_get(path_bin);
|
|
||||||
for (l = list; l; l = l->next)
|
|
||||||
{
|
|
||||||
dir = l->data;
|
|
||||||
snprintf(buf, strlen(dir->dir) + strlen(app) + 2, "%s/%s", dir->dir,
|
|
||||||
app); // 2 = "/" + "\0"
|
|
||||||
if (ecore_file_exists(buf) && ecore_file_can_exec(buf))
|
|
||||||
{
|
|
||||||
found = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
e_path_dir_list_free(list);
|
|
||||||
return found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue