File paths updated in setting-display project 96/181996/1
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Tue, 19 Jun 2018 12:48:58 +0000 (14:48 +0200)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Tue, 19 Jun 2018 12:48:58 +0000 (14:48 +0200)
Change-Id: I2524c5cd7d897ff4134478e2327bb29131bcbabb
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
setting-common/inc/setting-common-general-func.h
setting-common/inc/setting-common-init.h
setting-common/src/setting-common-general-func.c
setting-display/.cproject
setting-display/src/setting-display-brightness.c
setting-main/.tproject

index 9f0f73f579fef2534bd1d9fe843b12df17f0f5a7..57a0d30028bca2d00d829431f224928eb724510a 100755 (executable)
@@ -72,7 +72,7 @@ extern bool get_tethering_status();
 extern const char *get_font_size_str(int value);
 extern char *get_pa_backlight_time_value_str();
 
-char *get_resource_path(char *name);
+char *get_resource_path(const char *name);
 char *get_data_path(char *name);
 char *get_shared_path(char *name);
 char *get_globaluser_data(char *name);
index df8fd57453808793f37e40b07e0bfb52892dd974..f67b19663acb45c88aa340e56f2a9c82efafa75e 100644 (file)
@@ -40,6 +40,5 @@ int view_rotate_support(MainData *md);
 int app_control_init(MainData *md, app_control_h service);
 int app_control_finish(MainData *md);
 int add_app_reply(MainData *md, const char *key, const char *val);
-char *get_resource_path(char *name);
 
 #endif                         /*__SETTING_COMMON_INIT_H__ */
index 7891d1ce6347724ee91a202933b127a80042ef35..306b6b15298d59763217fcc74c68358370dba1e7 100755 (executable)
@@ -974,7 +974,7 @@ EXPORT_PUBLIC const char *get_font_size_str(int font_size)
 }
 
 EXPORT_PUBLIC
-char *get_resource_path(char *name)
+char *get_resource_path(const char *name)
 {
        char *final_path = calloc(PATH_MAX, sizeof(char));
        char *res = app_get_resource_path();
index f1b1f1a02b731c323c0aa9680ecb620d16c2b773..392d38396bb4abb935ff9dd3b9930fd729c35127 100644 (file)
                                                                </option>
                                                                <option id="gnu.cpp.link.option.libs.1036707908" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
                                                                        <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="setting-common"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="deviced"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="vconf"/>
-                                                                       <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="vconf"/>
                                                                        <listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="vconf"/>
                                                                </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1129445683" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
index d8efcc39142f15b04cc1d7a77b89f4641fdf7984..08120c87dff7f3203880ee6bd2d5d97bcf306c7f 100755 (executable)
@@ -106,6 +106,17 @@ static int settings_display_util_set_brightness(int value)
        return 0;
 }
 
+static void set_layout_file(Evas_Object *layout, char *name, char *group)
+{
+       char *path = get_resource_path(name);
+       Eina_Bool ret = elm_layout_file_set(layout, path, group);
+       if (!ret) {
+               SETTING_TRACE_ERROR("Failed to load edj file. Name: %s, group: %s", name, group);
+       }
+
+       free(path);
+}
+
 static void update_overheating_text(void *data)
 {
        SettingDisplay *ad = (SettingDisplay *)data;
@@ -427,7 +438,7 @@ static void _brightness_slider_mouse_up_cb(void *data, Evas *e,
        _brightness_overheat_check(ad);
 }
 
-const char     *setting_brightness_get_slider_icon(int level)
+char *setting_brightness_get_slider_icon(int level)
 {
        int mapped_level = 0;
 
@@ -442,20 +453,23 @@ const char        *setting_brightness_get_slider_icon(int level)
 
        SETTING_TRACE_DEBUG("mapped_level:%d", mapped_level);
 
-       return iconPath[mapped_level];
+       char *path = get_resource_path(iconPath[mapped_level]);
+       return path;
 }
 
 void setting_display_update_slider_icon(Setting_GenGroupItem_Data *item_data,
                int value)
 {
        Evas_Object *cur_icon = NULL;
-       const char *new_file = NULL;
+       char *new_file = NULL;
 
        SETTING_TRACE_BEGIN;
 
        cur_icon = elm_object_content_get(item_data->eo_check);
        new_file = setting_brightness_get_slider_icon(value);
        elm_image_file_set(cur_icon, new_file, NULL);
+
+       free(new_file);
 }
 
 void __display_int_vconf_cb(keynode_t *key, void *data)
@@ -631,8 +645,7 @@ static Evas_Object *__setting_brightness_add_slider(void *data,
 
        /* Set custom layout style */
        layout = elm_layout_add(obj);
-       elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME,
-                       "gl_custom_item");
+       set_layout_file(layout, SETTING_THEME_EDJ_NAME, "gl_custom_item");
        evas_object_size_hint_align_set(layout, EVAS_HINT_FILL,
                        EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
@@ -690,7 +703,7 @@ static Evas_Object *__setting_brightness_add_slider(void *data,
 void construct_brightness(void *data, Evas_Object *genlist)
 {
        SettingDisplay *ad = (SettingDisplay *)data;
-       const char *left_icon = NULL;
+       char *left_icon = NULL;
        int auto_value = SETTING_BRIGHTNESS_AUTOMATIC_ON;
        int err;
        int ret = -1;
@@ -740,6 +753,8 @@ void construct_brightness(void *data, Evas_Object *genlist)
                        NULL,
                        setting_display_birghtness_bright_slider_value_change_cb);
 
+       free(left_icon);
+
        if (ad->data_br_sli) {
                elm_genlist_item_select_mode_set(ad->data_br_sli->item,
                                                                                        ELM_OBJECT_SELECT_MODE_NONE);
index 17182cdfd7f7ed3e642390e0e9ee666188fc0547..4f31900eab1440ff44e624f2e5ced2d39aa37071 100644 (file)
@@ -8,8 +8,6 @@
     <package>
         <blacklist/>
         <referencedProject project="setting-common" path="lib"/>
-        <referencedProject project="setting-profile-common" path="lib"/>
-        <referencedProject project="setting-smartmanager" path="lib"/>
         <resFallback autoGen="true"/>
         <subProjects>
             <tizenProject project="setting-about"/>