From f860c12384b095252d71691679a9fd0c415fbb91 Mon Sep 17 00:00:00 2001 From: Joohyun Kim Date: Sun, 14 Apr 2013 15:59:25 +0900 Subject: [PATCH] Fix font compatibility issue and add log Change-Id: I79ba6c0ef25d39fd3d3b2d296fb752d48aea79c3 Signed-off-by: Joohyun Kim --- src/system/FSys_SettingClient.cpp | 3 +++ src/system/FSys_SettingInfoImpl.cpp | 29 +++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/system/FSys_SettingClient.cpp b/src/system/FSys_SettingClient.cpp index 28eecc0..3a368d5 100644 --- a/src/system/FSys_SettingClient.cpp +++ b/src/system/FSys_SettingClient.cpp @@ -1075,6 +1075,8 @@ _SettingClient::AddSettingEventListenerForInternal(ISettingEventListener& listen SysTryReturnResult(NID_SYS, pSettingEvent != null, E_SYSTEM, "listener event is not ready."); result r = pSettingEvent->AddSettingEventListener(listener); + SysLog(NID_SYS, "Add Setting event result is %s for internal.", GetErrorMessage(r)); + if (r == E_INVALID_OPERATION) { r = E_SYSTEM; @@ -1096,6 +1098,7 @@ _SettingClient::RemoveSettingEventListenerForInternal(ISettingEventListener& lis SysTryReturnResult(NID_SYS, pSettingEvent != null, E_SYSTEM, "listener event is not ready."); result r = pSettingEvent->RemoveSettingEventListener(listener); + SysLog(NID_SYS, "Remove setting event result is %s for internal.", GetErrorMessage(r)); SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, "It is failed to remove event listener."); diff --git a/src/system/FSys_SettingInfoImpl.cpp b/src/system/FSys_SettingInfoImpl.cpp index 17e657e..e6e0cd8 100644 --- a/src/system/FSys_SettingInfoImpl.cpp +++ b/src/system/FSys_SettingInfoImpl.cpp @@ -20,10 +20,12 @@ * @brief This is the implementation file for _SysSettingInfoImpl class. */ #include + #include #include #include +#include #include #include #include @@ -54,7 +56,9 @@ static const wchar_t* _SETTING_SOUND_NOTIFICATION_VOLUME = L"http://tizen.org/se //Font static const wchar_t* _FONT_SIZE = L"http://tizen.org/setting/font.size"; +static const wchar_t* _FONTSIZE = L"FontSize"; static const wchar_t* _FONT_TYPE = L"http://tizen.org/setting/font.type"; +static const wchar_t* _FONTTYPE = L"FontType"; static const wchar_t* _FONT_SIZE_GIANT = L"giant"; static const wchar_t* _FONT_SIZE_HUGE = L"huge"; @@ -84,9 +88,30 @@ _SettingInfoImpl::GetValue(const Tizen::Base::String& key, Tizen::Base::String& { result r = E_SUCCESS; - if (key == _FONT_SIZE || key == _FONT_TYPE) + if (key == _FONT_SIZE || key == _FONT_TYPE || key == _FONTSIZE || key == _FONTTYPE) { - r = GetValueForFont(key, value); + String tizenKey(key); + if(tizenKey == _FONTSIZE) + { + tizenKey = _FONT_SIZE; + } + else if(tizenKey == _FONTTYPE) + { + tizenKey = _FONT_TYPE; + } + + r = GetValueForFont(tizenKey, value); + + if(key == _FONTSIZE) + { + if(_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat() == true) + { + if(value == _FONT_SIZE_GIANT || value == _FONT_SIZE_HUGE) + { + value = _FONT_SIZE_LARGE; //OSP not support giant or huge size of font. + } + } + } } else { -- 2.7.4