Fix font compatibility issue and add log
authorJoohyun Kim <joohyune.kim@samsung.com>
Sun, 14 Apr 2013 06:59:25 +0000 (15:59 +0900)
committerJoohyun Kim <joohyune.kim@samsung.com>
Sun, 14 Apr 2013 08:25:28 +0000 (17:25 +0900)
Change-Id: I79ba6c0ef25d39fd3d3b2d296fb752d48aea79c3
Signed-off-by: Joohyun Kim <joohyune.kim@samsung.com>
src/system/FSys_SettingClient.cpp
src/system/FSys_SettingInfoImpl.cpp

index 28eecc0..3a368d5 100644 (file)
@@ -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.");
 
index 17e657e..e6e0cd8 100644 (file)
  * @brief              This is the implementation file for _SysSettingInfoImpl class.
  */
 #include <system/system_settings.h>
+
 #include <FBase.h>
 #include <FBaseColArrayList.h>
 #include <FBaseSysLog.h>
 
+#include <FApp_AppInfo.h>
 #include <FBase_StringConverter.h>
 #include <FBase_NativeError.h>
 #include <FSys_SettingInfoImpl.h>
@@ -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
        {