Skip to content
This repository
Browse code

Merge pull request #2022 from ronie/skin-startup

Always load Startup.xml
  • Loading branch information...
commit d27da6cfedbb38ad59f40f7220a1da0ee933f415 2 parents 67dc2a9 + 5d836ce
authored April 06, 2013
6  addons/skin.confluence/720p/Startup.xml
@@ -4,7 +4,7 @@
4 4
 	<controls>
5 5
 		<control type="button" id="10">
6 6
 			<description>trigger</description>
7  
-			<onfocus>ReplaceWindow(Home)</onfocus>
  7
+			<onfocus>ReplaceWindow($INFO[System.StartupWindow])</onfocus>
8 8
 			<texturenofocus>-</texturenofocus>
9 9
 			<texturefocus>-</texturefocus>
10 10
 			<visible>!Skin.HasSetting(Use_Startup_Playlist)</visible>
@@ -12,11 +12,11 @@
12 12
 		<control type="button" id="10">
13 13
 			<description>trigger with startup Playlist</description>
14 14
 			<onfocus>XBMC.PlayMedia($INFO[Skin.String(Startup_Playlist_Path)])</onfocus>
15  
-			<onfocus>ReplaceWindow(Home)</onfocus>
  15
+			<onfocus>ReplaceWindow($INFO[System.StartupWindow])</onfocus>
16 16
 			<texturenofocus>-</texturenofocus>
17 17
 			<texturefocus>-</texturefocus>
18 18
 			<visible>Skin.HasSetting(Use_Startup_Playlist)</visible>
19 19
 		</control>
20 20
 		<include>CommonBackground</include>
21 21
 	</controls>
22  
-</window>
  22
+</window>
6  xbmc/GUIInfoManager.cpp
@@ -275,7 +275,8 @@ const infomap system_labels[] =  {{ "hasnetwork",       SYSTEM_ETHERNET_LINK_ACT
275 275
                                   { "alarmpos",         SYSTEM_ALARM_POS },
276 276
                                   { "isinhibit",        SYSTEM_ISINHIBIT },
277 277
                                   { "hasshutdown",      SYSTEM_HAS_SHUTDOWN },
278  
-                                  { "haspvr",           SYSTEM_HAS_PVR }};
  278
+                                  { "haspvr",           SYSTEM_HAS_PVR },
  279
+                                  { "startupwindow",    SYSTEM_STARTUP_WINDOW }};
279 280
 
280 281
 const infomap system_param[] =   {{ "hasalarm",         SYSTEM_HAS_ALARM },
281 282
                                   { "hascoreid",        SYSTEM_HAS_CORE_ID },
@@ -1646,6 +1647,9 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
1646 1647
   case SYSTEM_CURRENT_WINDOW:
1647 1648
     return g_localizeStrings.Get(g_windowManager.GetFocusedWindow());
1648 1649
     break;
  1650
+  case SYSTEM_STARTUP_WINDOW:
  1651
+    strLabel.Format("%i", g_guiSettings.GetInt("lookandfeel.startupwindow"));
  1652
+    break;
1649 1653
   case SYSTEM_CURRENT_CONTROL:
1650 1654
     {
1651 1655
       CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
1  xbmc/GUIInfoManager.h
@@ -169,6 +169,7 @@ namespace INFO
169 169
 #define SYSTEM_ISINHIBIT            184
170 170
 #define SYSTEM_HAS_SHUTDOWN         185
171 171
 #define SYSTEM_HAS_PVR              186
  172
+#define SYSTEM_STARTUP_WINDOW       187
172 173
 
173 174
 #define NETWORK_IP_ADDRESS          190
174 175
 #define NETWORK_MAC_ADDRESS         191
4  xbmc/addons/Skin.cpp
@@ -91,7 +91,6 @@ CSkinInfo::CSkinInfo(const cp_extension_t *ext)
91 91
   str = CAddonMgr::Get().GetExtValue(ext->configuration, "@debugging");
92 92
   m_debugging = !strcmp(str.c_str(), "true");
93 93
 
94  
-  m_onlyAnimateToHome = true;
95 94
   LoadStartupWindows(ext);
96 95
   m_Version = 2.11;
97 96
 }
@@ -221,7 +220,6 @@ bool CSkinInfo::LoadStartupWindows(const cp_extension_t *ext)
221 220
   m_startupWindows.push_back(CStartupWindow(WINDOW_FILES, "7"));
222 221
   m_startupWindows.push_back(CStartupWindow(WINDOW_SETTINGS_MENU, "5"));
223 222
   m_startupWindows.push_back(CStartupWindow(WINDOW_WEATHER, "8"));
224  
-  m_onlyAnimateToHome = true;
225 223
   return true;
226 224
 }
227 225
 
@@ -257,7 +255,7 @@ bool CSkinInfo::TranslateResolution(const CStdString &name, RESOLUTION_INFO &res
257 255
 int CSkinInfo::GetFirstWindow() const
258 256
 {
259 257
   int startWindow = GetStartWindow();
260  
-  if (HasSkinFile("Startup.xml") && (!m_onlyAnimateToHome || startWindow == WINDOW_HOME))
  258
+  if (HasSkinFile("Startup.xml"))
261 259
     startWindow = WINDOW_STARTUP_ANIM;
262 260
   return startWindow;
263 261
 }
1  xbmc/addons/Skin.h
@@ -137,7 +137,6 @@ class CSkinInfo : public CAddon
137 137
   CStdString m_currentAspect;
138 138
 
139 139
   std::vector<CStartupWindow> m_startupWindows;
140  
-  bool m_onlyAnimateToHome;
141 140
   bool m_debugging;
142 141
 };
143 142
 

0 notes on commit d27da6c

Please sign in to comment.
Something went wrong with that request. Please try again.