forked from enlightenment/efl
efl/efreet: use eina_prefix, kill one TODO item.
SVN revision: 82219
This commit is contained in:
parent
733425c62c
commit
1eddf87965
|
@ -22,6 +22,11 @@ eezefiles_DATA = eeze/checkme
|
|||
ecoreimffilesdir = $(datadir)/ecore_imf
|
||||
ecoreimffiles_DATA = ecore_imf/checkme
|
||||
|
||||
########################################################################
|
||||
# Efreet
|
||||
efreetfilesdir = $(datadir)/efreet
|
||||
efreetfiles_DATA = efreet/checkme
|
||||
|
||||
########################################################################
|
||||
# Eo
|
||||
eofilesdir = $(datadir)/eo
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
This is just a test file used to help efreet determine its prefix
|
||||
location.
|
|
@ -21,6 +21,7 @@ EFREET_COMMON_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib/edbus \
|
||||
-I$(top_srcdir)/src/lib/efreet \
|
||||
-I$(top_builddir)/src/lib/efreet \
|
||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)\" \
|
||||
-DLOCALE_DIR=\"@LOCALE_DIR@\" \
|
||||
|
|
|
@ -18,7 +18,7 @@ quit(void)
|
|||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
if (!eina_init()) return 1;
|
||||
efreetd_log_dom = eina_log_domain_register("efreetd", EFREETD_DEFAULT_LOG_COLOR);
|
||||
|
@ -28,6 +28,7 @@ main(void)
|
|||
goto ecore_error;
|
||||
}
|
||||
if (!ecore_init()) goto ecore_error;
|
||||
ecore_app_args_set(argc, (const char **)argv);
|
||||
if (!ecore_file_init()) goto ecore_file_error;
|
||||
|
||||
if (!dbus_init()) goto dbus_error;
|
||||
|
|
|
@ -22,6 +22,7 @@ static Ecore_Exe *icon_cache_exe = NULL;
|
|||
static Ecore_Exe *desktop_cache_exe = NULL;
|
||||
static Ecore_Timer *icon_cache_timer = NULL;
|
||||
static Ecore_Timer *desktop_cache_timer = NULL;
|
||||
static Eina_Prefix *pfx = NULL;
|
||||
|
||||
static Eina_Bool desktop_exists = EINA_FALSE;
|
||||
|
||||
|
@ -56,8 +57,9 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
|
|||
/* TODO: Queue if already running */
|
||||
prio = ecore_exe_run_priority_get();
|
||||
ecore_exe_run_priority_set(19);
|
||||
// XXX: use eina_prefix, not hard-coded prefixes
|
||||
eina_strlcpy(file, PACKAGE_LIB_DIR "/efreet/efreet_icon_cache_create", sizeof(file));
|
||||
|
||||
snprintf(file, sizeof(file), "%s/efreet/efreet_icon_cache_create",
|
||||
eina_prefix_lib_get(pfx));
|
||||
if (icon_extra_dirs)
|
||||
{
|
||||
Eina_List *ll;
|
||||
|
@ -118,8 +120,9 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
|
|||
desktop_queue = EINA_FALSE;
|
||||
prio = ecore_exe_run_priority_get();
|
||||
ecore_exe_run_priority_set(19);
|
||||
// XXX: use eina_prefix, not hard-coded prefixes
|
||||
eina_strlcpy(file, PACKAGE_LIB_DIR "/efreet/efreet_desktop_cache_create", sizeof(file));
|
||||
|
||||
snprintf(file, sizeof(file), "%s/efreet/efreet/efreet_desktop_cache_create",
|
||||
eina_prefix_lib_get(pfx));
|
||||
if (desktop_extra_dirs)
|
||||
{
|
||||
Eina_List *ll;
|
||||
|
@ -497,8 +500,18 @@ cache_desktop_exists(void)
|
|||
Eina_Bool
|
||||
cache_init(void)
|
||||
{
|
||||
char **argv;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
ecore_app_args_get(NULL, &argv);
|
||||
|
||||
pfx = eina_prefix_new(argv[0], cache_init,
|
||||
"EFREET", "efreet", "checkme",
|
||||
PACKAGE_BIN_DIR,
|
||||
PACKAGE_LIB_DIR,
|
||||
PACKAGE_DATA_DIR,
|
||||
PACKAGE_DATA_DIR);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get());
|
||||
if (!ecore_file_mkpath(buf))
|
||||
{
|
||||
|
@ -553,6 +566,9 @@ cache_shutdown(void)
|
|||
{
|
||||
const char *data;
|
||||
|
||||
eina_prefix_free(pfx);
|
||||
pfx = NULL;
|
||||
|
||||
efreet_shutdown();
|
||||
|
||||
if (cache_exe_del_handler) ecore_event_handler_del(cache_exe_del_handler);
|
||||
|
|
Loading…
Reference in New Issue