Fix crash in setting font type 18/283018/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060506 accepted/tizen/7.0/unified/hotfix/20221116.111707 accepted/tizen/unified/20221016.171536 tizen_7.0_m2_release
authorkiso.chang <kiso.chang@samsung.com>
Sun, 16 Oct 2022 07:02:35 +0000 (16:02 +0900)
committerkiso.chang <kiso.chang@samsung.com>
Sun, 16 Oct 2022 07:04:59 +0000 (16:04 +0900)
Change-Id: I7377f60805a3c6c3a66ea0ff8aff6366654f72d9
Signed-off-by: kiso.chang <kiso.chang@samsung.com>
SettingMain/SettingContent_Display.cs
SettingMain/SettingContent_Fonttype.cs
packaging/org.tizen.cssettings-1.0.0.tpk

index 3ce1589788e7b269821a6987ac4b03dddc180a36..52ac10621e998c95b7d549417c016d4f21cce847 100644 (file)
@@ -144,7 +144,8 @@ namespace SettingMain
             }\r
 \r
 \r
-            item = SettingItemCreator.CreateItemWithCheck(Resources.IDS_ST_BODY_THEME, SettingContent_Theme.GetThemeName());\r
+            //item = SettingItemCreator.CreateItemWithCheck(Resources.IDS_ST_BODY_THEME, SettingContent_Theme.GetThemeName());\r
+            item = SettingItemCreator.CreateItemWithCheck(Resources.IDS_ST_BODY_THEME);\r
             if (item != null)\r
             {\r
                 item.Clicked += (o, e) =>\r
index 7a883db983cb61e2e9b0808e1b208d5a513502e6..d7c0d1422229451f4893e00b89fc7850aabd2359 100644 (file)
@@ -52,35 +52,9 @@ namespace SettingMain
         {\r
             FonttypeList = new ArrayList();\r
 \r
-\r
             FonttypeList.Add(SystemSettings.FontType);\r
-\r
-#if false\r
-            string sharedData = "/opt/usr/data";\r
-            string type = sharedData + "/settings/Alerts";\r
-\r
-            Tizen.Log.Debug("NUI", String.Format("fonttype type : {0}", type));\r
-\r
-            System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(type);\r
-\r
-            int i = 0;\r
-\r
-            FileInfo[] wavFiles = d.GetFiles("*.wav");\r
-            foreach (FileInfo file in wavFiles)\r
-            {\r
-                Tizen.Log.Debug("NUI", String.Format("[{0}] {1}", i, file.Name));\r
-                FonttypeList.Add(type +"/"+ file.Name);\r
-                i++;\r
-            }\r
-\r
-            FileInfo[] mp3Files = d.GetFiles("*.mp3");\r
-            foreach (FileInfo file in mp3Files)\r
-            {\r
-                Tizen.Log.Debug("NUI", String.Format("[{0}] {1}", i, file.Name));\r
-                FonttypeList.Add(type + "/" + file.Name);\r
-                i++;\r
-            }\r
-#endif\r
+            Tizen.Log.Debug("NUI", "SystemSettings.DefaultFontType : "+ SystemSettings.DefaultFontType);\r
+            Tizen.Log.Debug("NUI", "SystemSettings.FontType : " + SystemSettings.FontType);\r
 \r
         }\r
 \r
@@ -178,7 +152,18 @@ namespace SettingMain
 \r
         private static void SetFonttype(string fonttype)\r
         {\r
-            SystemSettings.FontType = fonttype;\r
+            try\r
+            {\r
+                if (fonttype.Equals("Default")) {\r
+                    fonttype = SystemSettings.DefaultFontType;\r
+                }\r
+                SystemSettings.FontType = fonttype;\r
+            }\r
+            catch (Exception e)\r
+            {\r
+                Tizen.Log.Debug("NUI", string.Format("error :({0}) {1} ", e.GetType().ToString(), e.Message));\r
+            }\r
+\r
         }\r
 \r
         public static string GetFonttype()\r
index d8d9a390987edc6e8eb67e5047351f1dabfdf97e..6e3fb578bc37186976cc2803ab4e736e0193198b 100644 (file)
Binary files a/packaging/org.tizen.cssettings-1.0.0.tpk and b/packaging/org.tizen.cssettings-1.0.0.tpk differ