aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-03-10 07:33:50 +0000
committerjmarshallnz <jmarshallnz@svn>2010-03-10 07:33:50 +0000
commit156c7986482825af3ccf8598caac35238e3aeca3 (patch)
tree3de36439b6c0a517b2db2b81100ebf1656c4ee2e /guilib
parente36f23395c3b06cafd981a178397c05bf5f9c666 (diff)
refactor: Moved common startup window code to CSkinInfo
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28509 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/SkinInfo.cpp8
-rw-r--r--guilib/SkinInfo.h14
2 files changed, 20 insertions, 2 deletions
diff --git a/guilib/SkinInfo.cpp b/guilib/SkinInfo.cpp
index c935205a2d..2e3a6aa812 100644
--- a/guilib/SkinInfo.cpp
+++ b/guilib/SkinInfo.cpp
@@ -331,3 +331,11 @@ bool CSkinInfo::GetResolution(const TiXmlNode *root, const char *tag, RESOLUTION
}
return false;
}
+
+int CSkinInfo::GetFirstWindow() const
+{
+ int startWindow = GetStartWindow();
+ if (HasSkinFile("Startup.xml") && (!m_onlyAnimateToHome || startWindow == WINDOW_HOME))
+ startWindow = WINDOW_STARTUP;
+ return startWindow;
+}
diff --git a/guilib/SkinInfo.h b/guilib/SkinInfo.h
index a03af3abed..a6dee65c0e 100644
--- a/guilib/SkinInfo.h
+++ b/guilib/SkinInfo.h
@@ -64,6 +64,18 @@ public:
CStdString GetBaseDir() const;
double GetVersion() const { return m_Version; };
+
+ /*! \brief Get the id of the first window to load
+ The first window is generally Startup.xml unless it doesn't exist or if the skinner
+ has specified which start windows they support and the user is going to somewhere other
+ than the home screen.
+ \return id of the first window to load
+ */
+ int GetFirstWindow() const;
+
+ /*! \brief Get the id of the window the user wants to start in after any skin animation
+ \return id of the start window
+ */
int GetStartWindow() const;
void ResolveIncludes(TiXmlElement *node, const CStdString &type = "");
@@ -74,8 +86,6 @@ public:
const std::vector<CStartupWindow> &GetStartupWindows() const { return m_startupWindows; };
- bool OnlyAnimateToHome() const { return m_onlyAnimateToHome; };
-
/*! \brief Retrieve the skin paths to search for skin XML files
\param paths [out] vector of paths to search, in order.
*/