cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=fad2f79bacf79e37bafbf0252a1560b199a8b5ee

commit fad2f79bacf79e37bafbf0252a1560b199a8b5ee
Author: michelle legrand <[email protected]>
Date:   Wed Feb 11 14:47:00 2015 +0100

    elm_prefs: looking for right lib directory in prefix.
    
    Summary:
    Using elm_app_data_dir_get() to get the right application's prefix.
    
    @fix
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/modules/prefs/elm_swallow.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/modules/prefs/elm_swallow.c b/src/modules/prefs/elm_swallow.c
index 0fd738c..e5ea11d 100644
--- a/src/modules/prefs/elm_swallow.c
+++ b/src/modules/prefs/elm_swallow.c
@@ -1,10 +1,5 @@
 #include "private.h"
 
-static const char LAYOUT_EDJ[] = PACKAGE_LIB_DIR\
-                                 "/elementary/modules/prefs/"\
-                                 MODULE_ARCH\
-                                 "/elm_prefs_swallow.edj";
-
 static Elm_Prefs_Item_Type supported_types[] =
 {
    ELM_PREFS_TYPE_SWALLOW,
@@ -19,8 +14,11 @@ elm_prefs_swallow_add(const Elm_Prefs_Item_Iface *iface 
EINA_UNUSED,
                       Elm_Prefs_Item_Changed_Cb cb EINA_UNUSED)
 {
    Evas_Object *obj = elm_layout_add(prefs);
+   char layout_edj[PATH_MAX];
+
+   snprintf(layout_edj, sizeof(layout_edj), 
"%s/elementary/modules/prefs/%s/elm_prefs_swallow.edj", elm_app_lib_dir_get(), 
MODULE_ARCH);
 
-   elm_layout_file_set(obj, LAYOUT_EDJ, "elm_prefs_swallow");
+   elm_layout_file_set(obj, layout_edj, "elm_prefs_swallow");
 
    return obj;
 }

-- 


Reply via email to