summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/efreet/efreetd.c3
-rw-r--r--src/bin/efreet/efreetd_cache.c24
2 files changed, 22 insertions, 5 deletions
diff --git a/src/bin/efreet/efreetd.c b/src/bin/efreet/efreetd.c
index a4ae720a4e..97b516299c 100644
--- a/src/bin/efreet/efreetd.c
+++ b/src/bin/efreet/efreetd.c
@@ -18,7 +18,7 @@ quit(void)
18} 18}
19 19
20int 20int
21main(void) 21main(int argc, char *argv[])
22{ 22{
23 if (!eina_init()) return 1; 23 if (!eina_init()) return 1;
24 efreetd_log_dom = eina_log_domain_register("efreetd", EFREETD_DEFAULT_LOG_COLOR); 24 efreetd_log_dom = eina_log_domain_register("efreetd", EFREETD_DEFAULT_LOG_COLOR);
@@ -28,6 +28,7 @@ main(void)
28 goto ecore_error; 28 goto ecore_error;
29 } 29 }
30 if (!ecore_init()) goto ecore_error; 30 if (!ecore_init()) goto ecore_error;
31 ecore_app_args_set(argc, (const char **)argv);
31 if (!ecore_file_init()) goto ecore_file_error; 32 if (!ecore_file_init()) goto ecore_file_error;
32 33
33 if (!dbus_init()) goto dbus_error; 34 if (!dbus_init()) goto dbus_error;
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 5af928bde0..db392821c3 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -22,6 +22,7 @@ static Ecore_Exe *icon_cache_exe = NULL;
22static Ecore_Exe *desktop_cache_exe = NULL; 22static Ecore_Exe *desktop_cache_exe = NULL;
23static Ecore_Timer *icon_cache_timer = NULL; 23static Ecore_Timer *icon_cache_timer = NULL;
24static Ecore_Timer *desktop_cache_timer = NULL; 24static Ecore_Timer *desktop_cache_timer = NULL;
25static Eina_Prefix *pfx = NULL;
25 26
26static Eina_Bool desktop_exists = EINA_FALSE; 27static Eina_Bool desktop_exists = EINA_FALSE;
27 28
@@ -56,8 +57,9 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
56 /* TODO: Queue if already running */ 57 /* TODO: Queue if already running */
57 prio = ecore_exe_run_priority_get(); 58 prio = ecore_exe_run_priority_get();
58 ecore_exe_run_priority_set(19); 59 ecore_exe_run_priority_set(19);
59 // XXX: use eina_prefix, not hard-coded prefixes 60
60 eina_strlcpy(file, PACKAGE_LIB_DIR "/efreet/efreet_icon_cache_create", sizeof(file)); 61 snprintf(file, sizeof(file), "%s/efreet/efreet_icon_cache_create",
62 eina_prefix_lib_get(pfx));
61 if (icon_extra_dirs) 63 if (icon_extra_dirs)
62 { 64 {
63 Eina_List *ll; 65 Eina_List *ll;
@@ -118,8 +120,9 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
118 desktop_queue = EINA_FALSE; 120 desktop_queue = EINA_FALSE;
119 prio = ecore_exe_run_priority_get(); 121 prio = ecore_exe_run_priority_get();
120 ecore_exe_run_priority_set(19); 122 ecore_exe_run_priority_set(19);
121 // XXX: use eina_prefix, not hard-coded prefixes 123
122 eina_strlcpy(file, PACKAGE_LIB_DIR "/efreet/efreet_desktop_cache_create", sizeof(file)); 124 snprintf(file, sizeof(file), "%s/efreet/efreet/efreet_desktop_cache_create",
125 eina_prefix_lib_get(pfx));
123 if (desktop_extra_dirs) 126 if (desktop_extra_dirs)
124 { 127 {
125 Eina_List *ll; 128 Eina_List *ll;
@@ -497,8 +500,18 @@ cache_desktop_exists(void)
497Eina_Bool 500Eina_Bool
498cache_init(void) 501cache_init(void)
499{ 502{
503 char **argv;
500 char buf[PATH_MAX]; 504 char buf[PATH_MAX];
501 505
506 ecore_app_args_get(NULL, &argv);
507
508 pfx = eina_prefix_new(argv[0], cache_init,
509 "EFREET", "efreet", "checkme",
510 PACKAGE_BIN_DIR,
511 PACKAGE_LIB_DIR,
512 PACKAGE_DATA_DIR,
513 PACKAGE_DATA_DIR);
514
502 snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get()); 515 snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get());
503 if (!ecore_file_mkpath(buf)) 516 if (!ecore_file_mkpath(buf))
504 { 517 {
@@ -553,6 +566,9 @@ cache_shutdown(void)
553{ 566{
554 const char *data; 567 const char *data;
555 568
569 eina_prefix_free(pfx);
570 pfx = NULL;
571
556 efreet_shutdown(); 572 efreet_shutdown();
557 573
558 if (cache_exe_del_handler) ecore_event_handler_del(cache_exe_del_handler); 574 if (cache_exe_del_handler) ecore_event_handler_del(cache_exe_del_handler);