1. Add Settings Icon in setting subpanel
authorHyerim Kim <rimi.kim@samsung.com>
Thu, 23 Mar 2017 06:04:50 +0000 (15:04 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:49 +0000 (18:34 +0900)
2. Change AppControlID of Recent.

Change-Id: I1fa0a54291d04dfa63c38d40ec90608d99b7e6ff
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
LibTVRefCommonPortable/Models/SettingShortcutController.cs [changed mode: 0644->0755]
LibTVRefCommonPortable/Models/SettingShortcutFactory.cs
TVHome/TVHome/ViewModels/MainPageViewModel.cs
TVHome/TVHome/Views/SubPanel.xaml.cs

old mode 100644 (file)
new mode 100755 (executable)
index e899de7..3f35578
@@ -27,6 +27,9 @@ namespace LibTVRefCommonPortable.Models
 
         public SettingShortcutController()
         {
+            ShortcutInfo settings = SettingShortcutFactory.Get(SettingID.SETTINGS);
+            settingShortcutList.Add(settings);
+
             ShortcutInfo wifi = SettingShortcutFactory.Get(SettingID.WiFi);
             settingShortcutList.Add(wifi);
 
index 143758a..4830e32 100755 (executable)
@@ -20,6 +20,7 @@ namespace LibTVRefCommonPortable.Models
 {
     public enum SettingID
     {
+        SETTINGS,
         WiFi,
         BLUETOOTH
     };
@@ -31,6 +32,27 @@ namespace LibTVRefCommonPortable.Models
             ShortcutInfo sc;
             switch (id)
             {
+                case SettingID.SETTINGS:
+                    sc = new AppShortcutInfo()
+                    {
+                        StateDescriptions =
+                        {
+                            {
+                                "default",
+                                new StateDescription
+                                {
+                                    Label = "Settings",
+                                    IconPath = "ic_tizen_home_menu_settings_selected.png",
+                                    Action = new AppControlAction() {
+                                        AppID = "org.tizen.settings"
+                                    },
+                                }
+                            },
+                        }
+                    };
+                    sc.UpdateState();
+                    return sc;
+
                 case SettingID.WiFi:
                     sc = new WiFiSettingShortcutInfo()
                     {
index bcbb686..ba4522b 100755 (executable)
@@ -130,7 +130,7 @@ namespace TVHome.ViewModels
             string[] AppName = { "Recent", "Apps", "Settings" };
             // TODO : Revert this before release
             //string[] AppControlID = { "org.tizen.settings", "org.tizen.apps", "org.tizen.settings" };
-            string[] AppControlID = { "org.tizen.settings", "org.tizen.example.TVApps.TizenTV", "org.tizen.settings" };
+            string[] AppControlID = { "org.tizen.example.TVApps.TizenTV", "org.tizen.example.TVApps.TizenTV", "org.tizen.settings" };
             string[] AppDefaultIconPath = { "ic_tizen_home_menu_recent_normal.png", "ic_tizen_home_menu_apps_normal.png", "ic_tizen_home_menu_settings_normal.png" };
             string[] AppFocusedIconPath = { "ic_tizen_home_menu_recent_focused.png", "ic_tizen_home_menu_apps_focused.png", "ic_tizen_home_menu_settings_focused.png" };
             string[] AppSelectedIconPath = { "ic_tizen_home_menu_recent_selected.png", "ic_tizen_home_menu_apps_selected.png", "ic_tizen_home_menu_settings_selected.png" };
index 7da3f09..547155e 100755 (executable)
@@ -58,7 +58,8 @@ namespace TVHome.Views
                 PanelButton button;
 
                 if (item.StateDescriptions["default"].Label.Equals("All apps")
-                    || item.StateDescriptions["default"].Label.Equals("Add pin"))
+                    || item.StateDescriptions["default"].Label.Equals("Add pin")
+                    || item.StateDescriptions["default"].Label.Equals("Settings"))
                 {
                     button = new SubPanelAllAppsButton();
                 }