diff options
-rw-r--r-- | org.tizen.setting.xml.in | 1 | ||||
-rwxr-xr-x | setting-display/src/setting-display-main.c | 58 | ||||
-rwxr-xr-x | setting-font/CMakeLists.txt | 1 | ||||
-rw-r--r-- | setting-font/src/setting-font.c | 2 |
4 files changed, 16 insertions, 46 deletions
diff --git a/org.tizen.setting.xml.in b/org.tizen.setting.xml.in index afb1543..228a6bf 100644 --- a/org.tizen.setting.xml.in +++ b/org.tizen.setting.xml.in @@ -312,6 +312,5 @@ <privilege>http://tizen.org/privilege/dpm.password</privilege> </privileges> - <feature name="http://tizen.org/feature/systemsetting.font">true</feature> </manifest> diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c index c8e1646..64ac16b 100755 --- a/setting-display/src/setting-display-main.c +++ b/setting-display/src/setting-display-main.c @@ -22,7 +22,6 @@ #include <device/battery.h> #include <system_settings.h> #include <dpm/password.h> -#include <system_info.h> #include "setting-display-main.h" #include "setting-common-draw-widget.h" @@ -49,9 +48,6 @@ static int setting_display_main_create(void *cb); static int setting_display_main_destroy(void *cb); static int setting_display_main_update(void *cb); -static bool settings_display_font_configuration_is_supported(); -static void construct_font(SettingDisplay *ad); - setting_view setting_view_display_main = { .create = setting_display_main_create, .destroy = setting_display_main_destroy, @@ -347,6 +343,7 @@ static int setting_display_main_create(void *cb) SETTING_TRACE_BEGIN; char *pa_backlight_time = NULL; Evas_Object *back_button = NULL; + char font_name_string[NAME_MAX] = {'\0',}; SettingDisplay *ad = (SettingDisplay *)cb; retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); @@ -361,8 +358,21 @@ static int setting_display_main_create(void *cb) /* BRIGHTNESS */ construct_brightness(ad, ad->md.genlist); + /* FONT */ - construct_font(ad); + _get_font_name_string(font_name_string, NAME_MAX); + ad->data_font = setting_create_Gendial_field_def( + ad->md.genlist, &(ad->itc_1text), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Font, + font_name_string, NULL); + if (ad->data_font) { + ad->data_font->userdata = ad; + __BACK_POINTER_SET(ad->data_font); + } else { + SETTING_TRACE_ERROR("ad->data_font is NULL"); + } /* BACKLIGHTTIME */ pa_backlight_time = get_pa_backlight_time_str(); @@ -564,41 +574,3 @@ static void setting_display_main_click_softkey_back_cb( { ui_app_exit(); } - -static bool settings_display_font_configuration_is_supported() -{ - bool val; - int err = system_info_get_platform_bool("http://tizen.org/feature/systemsetting.font", &val); - if (err != TIZEN_ERROR_NONE) { - SETTING_TRACE_ERROR("system_info_get_platform_bool failed: %s", get_error_message(err)); - return false; - } - - return val; -} - -static void construct_font(SettingDisplay *ad) -{ - char font_name_string[NAME_MAX]; - bool is_supported = settings_display_font_configuration_is_supported(); - - if (is_supported) - _get_font_name_string(font_name_string, NAME_MAX); - else - snprintf(font_name_string, NAME_MAX, ""); - - ad->data_font = setting_create_Gendial_field_def( - ad->md.genlist, &(ad->itc_1text), - setting_display_main_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_INVALID, NULL, - NULL, 0, KeyStr_Font, - font_name_string, NULL); - if (ad->data_font) { - ad->data_font->userdata = ad; - __BACK_POINTER_SET(ad->data_font); - } else { - SETTING_TRACE_ERROR("ad->data_font is NULL"); - } - - elm_object_item_disabled_set(ad->data_font, !is_supported); -} diff --git a/setting-font/CMakeLists.txt b/setting-font/CMakeLists.txt index e24dcfb..818ef4f 100755 --- a/setting-font/CMakeLists.txt +++ b/setting-font/CMakeLists.txt @@ -14,7 +14,6 @@ pkg_check_modules(pkgs_font REQUIRED glib-2.0 fontconfig libtzplatform-config - capi-system-info vconf ) diff --git a/setting-font/src/setting-font.c b/setting-font/src/setting-font.c index 1b054f7..1ff6f15 100644 --- a/setting-font/src/setting-font.c +++ b/setting-font/src/setting-font.c @@ -20,7 +20,6 @@ */ #include <setting-font.h> #include <setting-cfg.h> -#include <system_info.h> #define SETTING_FONT_PACKAGE_NAME "org.tizen.setting-font" @@ -193,6 +192,7 @@ static bool _setting_font_app_create(void *priv) setting_create_Gendial_itc(SETTING_GENLIST_GROUP_INDEX_STYLE, &(ad->itc_group_item)); + return true; } |