summaryrefslogtreecommitdiff
path: root/setting-display/src/setting-display-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'setting-display/src/setting-display-main.c')
-rwxr-xr-xsetting-display/src/setting-display-main.c58
1 files changed, 15 insertions, 43 deletions
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);
-}