diff options
34 files changed, 326 insertions, 271 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj index ce5a7f7b84..ae7d472a80 100644 --- a/Kodi.xcodeproj/project.pbxproj +++ b/Kodi.xcodeproj/project.pbxproj @@ -272,6 +272,9 @@ 3994427F1A8DD96F006C39E9 /* VideoLibraryQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3994427D1A8DD96F006C39E9 /* VideoLibraryQueue.cpp */; }; 399442801A8DD96F006C39E9 /* VideoLibraryQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3994427D1A8DD96F006C39E9 /* VideoLibraryQueue.cpp */; }; 399442811A8DD96F006C39E9 /* VideoLibraryQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3994427D1A8DD96F006C39E9 /* VideoLibraryQueue.cpp */; }; + 4260D5C71B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4260D5C51B67BB8F003F6F2D /* GUIWindowSplash.cpp */; }; + 4260D5C81B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4260D5C51B67BB8F003F6F2D /* GUIWindowSplash.cpp */; }; + 4260D5C91B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4260D5C51B67BB8F003F6F2D /* GUIWindowSplash.cpp */; }; 42DAC16E1A6E789E0066B4C8 /* PVRActionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42DAC16C1A6E789E0066B4C8 /* PVRActionListener.cpp */; }; 42DAC16F1A6E789E0066B4C8 /* PVRActionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42DAC16C1A6E789E0066B4C8 /* PVRActionListener.cpp */; }; 42DAC1701A6E789E0066B4C8 /* PVRActionListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42DAC16C1A6E789E0066B4C8 /* PVRActionListener.cpp */; }; @@ -3607,6 +3610,8 @@ 3994426A1A8DD920006C39E9 /* VideoLibraryScanningJob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLibraryScanningJob.h; sourceTree = "<group>"; }; 3994427D1A8DD96F006C39E9 /* VideoLibraryQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoLibraryQueue.cpp; sourceTree = "<group>"; }; 3994427E1A8DD96F006C39E9 /* VideoLibraryQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLibraryQueue.h; sourceTree = "<group>"; }; + 4260D5C51B67BB8F003F6F2D /* GUIWindowSplash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIWindowSplash.cpp; sourceTree = "<group>"; }; + 4260D5C61B67BB8F003F6F2D /* GUIWindowSplash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowSplash.h; sourceTree = "<group>"; }; 42DAC16B1A6E780C0066B4C8 /* IActionListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IActionListener.h; sourceTree = "<group>"; }; 42DAC16C1A6E789E0066B4C8 /* PVRActionListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PVRActionListener.cpp; sourceTree = "<group>"; }; 42DAC16D1A6E789E0066B4C8 /* PVRActionListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PVRActionListener.h; sourceTree = "<group>"; }; @@ -6671,6 +6676,8 @@ E38E18260D25F9FA00618676 /* GUIWindowScreensaver.h */, 7C89619013B6A16F003631FE /* GUIWindowScreensaverDim.cpp */, 7C89619113B6A16F003631FE /* GUIWindowScreensaverDim.h */, + 4260D5C51B67BB8F003F6F2D /* GUIWindowSplash.cpp */, + 4260D5C61B67BB8F003F6F2D /* GUIWindowSplash.h */, E38E18370D25F9FA00618676 /* GUIWindowStartup.cpp */, E38E18380D25F9FA00618676 /* GUIWindowStartup.h */, E38E18390D25F9FA00618676 /* GUIWindowSystemInfo.cpp */, @@ -10590,6 +10597,7 @@ 18B7C7C61294222E009E7A26 /* GUIIncludes.cpp in Sources */, 18B7C7C71294222E009E7A26 /* GUIInfoTypes.cpp in Sources */, 18B7C7C81294222E009E7A26 /* GUILabel.cpp in Sources */, + 4260D5C71B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */, 18B7C7C91294222E009E7A26 /* GUILabelControl.cpp in Sources */, 18B7C7CA1294222E009E7A26 /* GUIListContainer.cpp in Sources */, 18B7C7CB1294222E009E7A26 /* GUIListGroup.cpp in Sources */, @@ -11559,6 +11567,7 @@ DFF0F2B817528350002DA3A4 /* imagefactory.cpp in Sources */, DFF0F2B917528350002DA3A4 /* IWindowManagerCallback.cpp in Sources */, DFF0F2BA17528350002DA3A4 /* JpegIO.cpp in Sources */, + 4260D5C91B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */, DFF0F2BC17528350002DA3A4 /* LocalizeStrings.cpp in Sources */, DFF0F2BD17528350002DA3A4 /* MatrixGLES.cpp in Sources */, DFF0F2BE17528350002DA3A4 /* Shader.cpp in Sources */, @@ -13024,6 +13033,7 @@ E499156A174E65AB00741B6D /* ButtonTranslator.cpp in Sources */, E499156B174E65AB00741B6D /* InertialScrollingHandler.cpp in Sources */, E499156D174E65AB00741B6D /* KeyboardStat.cpp in Sources */, + 4260D5C81B67BB8F003F6F2D /* GUIWindowSplash.cpp in Sources */, E499156E174E65AB00741B6D /* SDLJoystick.cpp in Sources */, E499156F174E65AC00741B6D /* XBMC_keytable.cpp in Sources */, E4991574174E661400741B6D /* WinEventsIOS.mm in Sources */, diff --git a/addons/skin.confluence/720p/MyPVRRecordings.xml b/addons/skin.confluence/720p/MyPVRRecordings.xml index 00a36cfcd8..5c39911c90 100644 --- a/addons/skin.confluence/720p/MyPVRRecordings.xml +++ b/addons/skin.confluence/720p/MyPVRRecordings.xml @@ -112,19 +112,18 @@ <control type="image"> <left>730</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>!ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> </control> <control type="image"> <left>730</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> </control> </itemlayout> <focusedlayout height="40" width="760"> @@ -189,19 +188,18 @@ <control type="image"> <left>730</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>!ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> </control> <control type="image"> <left>730</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> </control> </focusedlayout> </control> diff --git a/addons/skin.confluence/720p/ViewsFileMode.xml b/addons/skin.confluence/720p/ViewsFileMode.xml index 08852888fc..0b3be747e4 100644 --- a/addons/skin.confluence/720p/ViewsFileMode.xml +++ b/addons/skin.confluence/720p/ViewsFileMode.xml @@ -75,19 +75,19 @@ <control type="image"> <left>665</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>Window.IsVisible(Videos) + !ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> </control> <control type="image"> <left>665</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> + <visible>Window.IsVisible(Videos)</visible> </control> </itemlayout> <focusedlayout height="40" width="580"> @@ -168,19 +168,19 @@ <control type="image"> <left>665</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>Window.IsVisible(Videos) + !ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> </control> - <control type="image"> + <control type="image"> <left>665</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> + <visible>Window.IsVisible(Videos)</visible> </control> </focusedlayout> </control> @@ -575,19 +575,19 @@ <control type="image"> <left>1050</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>Window.IsVisible(Videos) + !ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> </control> <control type="image"> <left>1050</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> + <visible>Window.IsVisible(Videos)</visible> </control> </itemlayout> <focusedlayout height="40" width="1080"> @@ -676,19 +676,19 @@ <control type="image"> <left>1050</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>Window.IsVisible(Videos) + !ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> </control> <control type="image"> <left>1050</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>Window.IsVisible(Videos) + ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> + <visible>Window.IsVisible(Videos)</visible> </control> </focusedlayout> </control> diff --git a/addons/skin.confluence/720p/ViewsVideoLibrary.xml b/addons/skin.confluence/720p/ViewsVideoLibrary.xml index 02ec2de473..443cd629d5 100644 --- a/addons/skin.confluence/720p/ViewsVideoLibrary.xml +++ b/addons/skin.confluence/720p/ViewsVideoLibrary.xml @@ -818,9 +818,17 @@ <control type="image"> <left>555</left> <top>14</top> - <width>20</width> + <width>16</width> + <height>16</height> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> + </control> + <control type="image"> + <left>555</left> + <top>14</top> + <width>16</width> <height>16</height> - <texture>$VAR[OverlayVar]</texture> + <texture>$INFO[ListItem.Overlay]</texture> <aspectratio align="left">keep</aspectratio> </control> </itemlayout> @@ -889,9 +897,17 @@ <control type="image"> <left>555</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$VAR[OverlayVar]</texture> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> + </control> + <control type="image"> + <left>555</left> + <top>14</top> + <width>16</width> + <height>16</height> + <texture>$INFO[ListItem.Overlay]</texture> <aspectratio align="left">keep</aspectratio> </control> </focusedlayout> @@ -1234,9 +1250,17 @@ <control type="image"> <left>555</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$VAR[OverlayVar]</texture> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> + </control> + <control type="image"> + <left>555</left> + <top>14</top> + <width>16</width> + <height>16</height> + <texture>$INFO[ListItem.Overlay]</texture> <aspectratio align="left">keep</aspectratio> </control> </itemlayout> @@ -1305,9 +1329,17 @@ <control type="image"> <left>555</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$VAR[OverlayVar]</texture> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> + </control> + <control type="image"> + <left>555</left> + <top>14</top> + <width>16</width> + <height>16</height> + <texture>$INFO[ListItem.Overlay]</texture> <aspectratio align="left">keep</aspectratio> </control> </focusedlayout> @@ -1595,21 +1627,20 @@ <control type="image"> <left>320</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>!ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> </control> + </itemlayout> <control type="image"> <left>320</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> </control> - </itemlayout> <focusedlayout height="40" width="345"> <control type="image"> <left>0</left> @@ -1644,19 +1675,18 @@ <control type="image"> <left>320</left> <top>14</top> - <width>20</width> + <width>16</width> <height>16</height> - <texture>$INFO[ListItem.Overlay]</texture> - <aspectratio>keep</aspectratio> - <visible>!ListItem.IsResumable</visible> + <texture>OverlayWatching.png</texture> + <visible>ListItem.IsResumable</visible> </control> <control type="image"> <left>320</left> <top>14</top> - <width>16</width> + <width>20</width> <height>16</height> - <texture>OverlayWatching.png</texture> - <visible>ListItem.IsResumable</visible> + <texture>$INFO[ListItem.Overlay]</texture> + <aspectratio>keep</aspectratio> </control> </focusedlayout> </control> diff --git a/addons/skin.confluence/720p/includes.xml b/addons/skin.confluence/720p/includes.xml index 94831a40d2..ce5ad24f2d 100644 --- a/addons/skin.confluence/720p/includes.xml +++ b/addons/skin.confluence/720p/includes.xml @@ -21,10 +21,6 @@ <value condition="!ListItem.IsStereoscopic">$INFO[ListItem.VideoResolution,flagging/lists/,.png]</value> <value>flagging/lists/3D.png</value> </variable> - <variable name="OverlayVar"> - <value condition="!ListItem.IsResumable">$INFO[ListItem.Overlay]</value> - <value>OverlayWatching.png</value> - </variable> <variable name="BannerThumb"> <value condition="!IsEmpty(ListItem.Art(banner))">$INFO[ListItem.Art(banner)]</value> <value>$INFO[ListItem.Icon]</value> diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index e8e8dce36a..7f652a2eb6 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -1655,6 +1655,7 @@ <ClCompile Include="..\..\xbmc\windows\GUIWindowPointer.cpp" /> <ClCompile Include="..\..\xbmc\windows\GUIWindowScreensaver.cpp" /> <ClCompile Include="..\..\xbmc\windows\GUIWindowScreensaverDim.cpp" /> + <ClCompile Include="..\..\xbmc\windows\GUIWindowSplash.cpp" /> <ClCompile Include="..\..\xbmc\windows\GUIWindowStartup.cpp" /> <ClCompile Include="..\..\xbmc\windows\GUIWindowSystemInfo.cpp" /> <ClCompile Include="..\..\xbmc\windows\GUIWindowWeather.cpp" /> @@ -2151,6 +2152,7 @@ <ClInclude Include="..\..\xbmc\win32\IMMNotificationClient.h" /> <ClInclude Include="..\..\xbmc\win32\pch.h" /> <ClInclude Include="..\..\xbmc\win32\PlatformDefs.h" /> + <ClInclude Include="..\..\xbmc\windows\GUIWindowSplash.h" /> <ClInclude Include="..\..\xbmc\XBDateTime.h" /> <ClInclude Include="..\..\xbmc\XbmcContext.h" /> <ClInclude Include="..\..\xbmc\win32\PlatformInclude.h" /> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index cada31e827..cd39ec68d4 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -3096,6 +3096,9 @@ <ClCompile Include="..\..\xbmc\contrib\kissfft\kiss_fftr.c"> <Filter>contrib\kissfft</Filter> </ClCompile> + <ClCompile Include="..\..\xbmc\windows\GUIWindowSplash.cpp"> + <Filter>windows</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\xbmc\win32\pch.h"> @@ -5989,6 +5992,9 @@ <ClInclude Include="..\..\xbmc\contrib\kissfft\kiss_fftr.h"> <Filter>contrib\kissfft</Filter> </ClInclude> + <ClInclude Include="..\..\xbmc\windows\GUIWindowSplash.h"> + <Filter>windows</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc"> diff --git a/tools/android/packaging/xbmc/res/layout/activity_splash.xml b/tools/android/packaging/xbmc/res/layout/activity_splash.xml index 04d417e2dd..5fdab946fa 100644 --- a/tools/android/packaging/xbmc/res/layout/activity_splash.xml +++ b/tools/android/packaging/xbmc/res/layout/activity_splash.xml @@ -10,7 +10,7 @@ android:layout_centerHorizontal="true" android:adjustViewBounds="true" android:layout_alignParentTop="true" - android:scaleType="center" + android:scaleType="centerCrop" android:src="@drawable/splash" /> <RelativeLayout diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 36e3b97dad..f3f65c5f6d 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -299,7 +299,6 @@ CApplication::CApplication(void) m_Autorun = new CAutorun(); #endif - m_splash = NULL; m_threadID = 0; m_progressTrackingPlayCountUpdate = false; m_currentStackPosition = 0; @@ -342,7 +341,7 @@ bool CApplication::OnEvent(XBMC_Event& newEvent) CApplicationMessenger::Get().Quit(); break; case XBMC_VIDEORESIZE: - if (!g_application.m_bInitializing && + if (g_windowManager.Initialized() && !g_advancedSettings.m_fullScreen) { g_Windowing.SetWindowResolution(newEvent.resize.w, newEvent.resize.h); @@ -798,20 +797,7 @@ bool CApplication::CreateGUI() CDisplaySettings::Get().SetCurrentResolution(RES_DESKTOP, true); if (g_advancedSettings.m_splashImage) - { - std::string strUserSplash = "special://home/media/Splash.png"; - if (CFile::Exists(strUserSplash)) - { - CLog::Log(LOGINFO, "load user splash image: %s", CSpecialProtocol::TranslatePath(strUserSplash).c_str()); - m_splash = new CSplash(strUserSplash); - } - else - { - CLog::Log(LOGINFO, "load default splash image: %s", CSpecialProtocol::TranslatePath("special://xbmc/media/Splash.png").c_str()); - m_splash = new CSplash("special://xbmc/media/Splash.png"); - } - m_splash->Show(); - } + CSplash::Get().Show(); // The key mappings may already have been loaded by a peripheral CLog::Log(LOGINFO, "load keymapping"); @@ -823,6 +809,7 @@ bool CApplication::CreateGUI() info.iWidth, info.iHeight, info.strMode.c_str()); + g_windowManager.Initialize(); return true; @@ -1157,6 +1144,12 @@ bool CApplication::Initialize() g_windowManager.CreateWindows(); /* window id's 3000 - 3100 are reserved for python */ + // initialize splash window after splash screen disappears + // because we need a real window in the background which gets + // rendered while we load the main window or enter the master lock key + if (g_advancedSettings.m_splashImage) + g_windowManager.ActivateWindow(WINDOW_SPLASH); + // Make sure we have at least the default skin string defaultSkin = ((const CSettingString*)CSettings::Get().GetSetting("lookandfeel.skin"))->GetDefault(); if (!LoadSkin(CSettings::Get().GetString("lookandfeel.skin")) && !LoadSkin(defaultSkin)) @@ -1165,9 +1158,6 @@ bool CApplication::Initialize() return false; } - if (g_advancedSettings.m_splashImage) - SAFE_DELETE(m_splash); - if (CSettings::Get().GetBool("masterlock.startuplock") && CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !CProfilesManager::Get().GetMasterProfile().getLockCode().empty()) @@ -3891,6 +3881,9 @@ bool CApplication::OnMessage(CGUIMessage& message) } else if (message.GetParam1() == GUI_MSG_UI_READY) { + // remove splash window + g_windowManager.Delete(WINDOW_SPLASH); + if (m_fallbackLanguageLoaded) CGUIDialogOK::ShowAndGetInput(24133, 24134); diff --git a/xbmc/Application.h b/xbmc/Application.h index fe92b99c0a..362dd7afca 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -363,7 +363,6 @@ public: bool SwitchToFullScreen(bool force = false); - CSplash* GetSplash() { return m_splash; } void SetRenderGUI(bool renderGUI); bool GetRenderGUI() const { return m_renderGUI; }; @@ -444,7 +443,6 @@ protected: CFileItemPtr m_stackFileItemToUpdate; std::string m_prevMedia; - CSplash* m_splash; ThreadIdentifier m_threadID; // application thread ID. Used in applicationMessanger to know where we are firing a thread with delay from. bool m_bInitializing; bool m_bPlatformDirectories; diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp index 76ba9f29ec..90424af656 100644 --- a/xbmc/ApplicationMessenger.cpp +++ b/xbmc/ApplicationMessenger.cpp @@ -40,7 +40,6 @@ #include "guilib/GUIKeyboardFactory.h" #include "guilib/Resolution.h" #include "GUIInfoManager.h" -#include "utils/Splash.h" #include "cores/VideoRenderers/RenderManager.h" #include "cores/AudioEngine/AEFactory.h" #include "music/tags/MusicInfoTag.h" @@ -802,13 +801,6 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg) g_application.ShowVolumeBar(&action); } break; - - case TMSG_SPLASH_MESSAGE: - { - if (g_application.GetSplash()) - g_application.GetSplash()->Show(pMsg->strParam); - } - break; case TMSG_DISPLAY_SETUP: { @@ -1332,18 +1324,6 @@ void CApplicationMessenger::ShowVolumeBar(bool up) SendMessage(tMsg, false); } -void CApplicationMessenger::SetSplashMessage(const std::string& message) -{ - ThreadMessage tMsg = {TMSG_SPLASH_MESSAGE}; - tMsg.strParam = message; - SendMessage(tMsg, true); -} - -void CApplicationMessenger::SetSplashMessage(int stringID) -{ - SetSplashMessage(g_localizeStrings.Get(stringID)); -} - bool CApplicationMessenger::SetupDisplay() { bool result; diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h index fdaab45381..8e1b4aa6a1 100644 --- a/xbmc/ApplicationMessenger.h +++ b/xbmc/ApplicationMessenger.h @@ -111,7 +111,6 @@ namespace MUSIC_INFO #define TMSG_CALLBACK 800 #define TMSG_VOLUME_SHOW 900 -#define TMSG_SPLASH_MESSAGE 901 #define TMSG_DISPLAY_SETUP 1000 #define TMSG_DISPLAY_DESTROY 1001 @@ -251,9 +250,6 @@ public: void ShowVolumeBar(bool up); - void SetSplashMessage(const std::string& message); - void SetSplashMessage(int stringID); - /*! \brief Used to enable/disable PVR system without waiting. \param onOff if true it becomes switched on otherwise off */ diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index 9f45a220b5..7c84557499 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -2984,7 +2984,7 @@ void CDVDPlayer::GetGeneralInfo(std::string& strGeneralInfo) CSingleLock lock(m_StateSection); if(m_StateInput.cache_bytes >= 0) { - strBuf += StringUtils::Format(" cache:%s %2.0f%%" + strBuf += StringUtils::Format(" forward:%s %2.0f%%" , StringUtils::SizeToString(m_StateInput.cache_bytes).c_str() , m_StateInput.cache_level * 100); if(m_playSpeed == 0 || m_caching == CACHESTATE_FULL) @@ -3020,7 +3020,7 @@ void CDVDPlayer::GetGeneralInfo(std::string& strGeneralInfo) CSingleLock lock(m_StateSection); if(m_StateInput.cache_bytes >= 0) { - strBuf += StringUtils::Format(" cache:%s %2.0f%%" + strBuf += StringUtils::Format(" forward:%s %2.0f%%" , StringUtils::SizeToString(m_StateInput.cache_bytes).c_str() , m_StateInput.cache_level * 100); if(m_playSpeed == 0 || m_caching == CACHESTATE_FULL) diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp index 5d28b97f0a..113948a4e1 100644 --- a/xbmc/epg/GUIEPGGridContainer.cpp +++ b/xbmc/epg/GUIEPGGridContainer.cpp @@ -44,8 +44,6 @@ using namespace EPG; #define BLOCKJUMP 4 // how many blocks are jumped with each analogue scroll action #define BLOCK_SCROLL_OFFSET 60 / MINSPERBLOCK // how many blocks are jumped if we are at left/right edge of grid -#define MAX_UPDATE_FREQUENCY 3000 // Do at maximum 1 grid data update in MAX_UPDATE_FREQUENCY milliseconds - CGUIEPGGridContainer::CGUIEPGGridContainer(int parentID, int controlID, float posX, float posY, float width, float height, int scrollTime, int preloadItems, int timeBlocks, int rulerUnit, const CTextureInfo& progressIndicatorTexture) @@ -158,8 +156,8 @@ CGUIEPGGridContainer::CGUIEPGGridContainer(const CGUIEPGGridContainer &other) m_channelScrollLastTime = other.m_channelScrollLastTime; m_channelScrollSpeed = other.m_channelScrollSpeed; m_channelScrollOffset = other.m_channelScrollOffset; - m_nextUpdateTimeout = other.m_nextUpdateTimeout; } + CGUIEPGGridContainer::~CGUIEPGGridContainer(void) { Reset(); @@ -803,7 +801,7 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) return true; case GUI_MSG_LABEL_BIND: - if (message.GetPointer() && m_nextUpdateTimeout.IsTimePast()) + if (message.GetPointer()) { CSingleLock lock(m_critSection); @@ -889,10 +887,7 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) { // Grid index got recreated. Do cursors and offsets still point to the same epg tag? if (prevSelectedEpgTag == GetSelectedEpgInfoTag()) - { - m_nextUpdateTimeout.Set(MAX_UPDATE_FREQUENCY); // TODO ksooo: Refactor to have only one return statement. return true; - } int newChannelCursor = GetChannel(prevSelectedEpgTag); if (newChannelCursor >= 0) @@ -901,10 +896,7 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) if (newBlockCursor >= 0) { if (newChannelCursor == m_channelCursor && newBlockCursor == m_blockCursor) - { - m_nextUpdateTimeout.Set(MAX_UPDATE_FREQUENCY); // TODO ksooo: Refactor to have only one return statement. return true; - } if (newBlockCursor > 0 && newBlockCursor != m_blockCursor) { @@ -919,10 +911,7 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) } if (newBlockCursor > 0) - { - m_nextUpdateTimeout.Set(MAX_UPDATE_FREQUENCY); // TODO ksooo: Refactor to have only one return statement. return true; - } } } } @@ -935,7 +924,6 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) SetInvalid(); GoToNow(); - m_nextUpdateTimeout.Set(MAX_UPDATE_FREQUENCY); // TODO ksooo: Refactor to have only one return statement. return true; } break; diff --git a/xbmc/epg/GUIEPGGridContainer.h b/xbmc/epg/GUIEPGGridContainer.h index 5ef003001f..7ad182456a 100644 --- a/xbmc/epg/GUIEPGGridContainer.h +++ b/xbmc/epg/GUIEPGGridContainer.h @@ -24,7 +24,6 @@ #include "guilib/GUIControl.h" #include "guilib/GUIListItemLayout.h" #include "guilib/IGUIContainer.h" -#include "threads/SystemClock.h" namespace EPG { @@ -229,7 +228,5 @@ namespace EPG float m_channelScrollOffset; CCriticalSection m_critSection; - - XbmcThreads::EndTime m_nextUpdateTimeout; }; } diff --git a/xbmc/guilib/GUISliderControl.cpp b/xbmc/guilib/GUISliderControl.cpp index a076f131b0..3ef9345a84 100644 --- a/xbmc/guilib/GUISliderControl.cpp +++ b/xbmc/guilib/GUISliderControl.cpp @@ -554,13 +554,19 @@ EVENT_RESULT CGUISliderControl::OnMouseEvent(const CPoint &point, const CMouseEv } else if (event.m_id == ACTION_MOUSE_WHEEL_UP) { - Move(10); - return EVENT_RESULT_HANDLED; + if (m_guiBackground.HitTest(point)) + { + Move(10); + return EVENT_RESULT_HANDLED; + } } else if (event.m_id == ACTION_MOUSE_WHEEL_DOWN) { - Move(-10); - return EVENT_RESULT_HANDLED; + if (m_guiBackground.HitTest(point)) + { + Move(-10); + return EVENT_RESULT_HANDLED; + } } else if (event.m_id == ACTION_GESTURE_NOTIFY) { diff --git a/xbmc/guilib/GUISpinControl.cpp b/xbmc/guilib/GUISpinControl.cpp index 57a9f6f135..78e320ae04 100644 --- a/xbmc/guilib/GUISpinControl.cpp +++ b/xbmc/guilib/GUISpinControl.cpp @@ -948,13 +948,19 @@ EVENT_RESULT CGUISpinControl::OnMouseEvent(const CPoint &point, const CMouseEven } else if (event.m_id == ACTION_MOUSE_WHEEL_UP) { - MoveUp(); - return EVENT_RESULT_HANDLED; + if (m_imgspinUpFocus.HitTest(point) || m_imgspinDownFocus.HitTest(point)) + { + MoveUp(); + return EVENT_RESULT_HANDLED; + } } else if (event.m_id == ACTION_MOUSE_WHEEL_DOWN) { - MoveDown(); - return EVENT_RESULT_HANDLED; + if (m_imgspinUpFocus.HitTest(point) || m_imgspinDownFocus.HitTest(point)) + { + MoveDown(); + return EVENT_RESULT_HANDLED; + } } return EVENT_RESULT_UNHANDLED; } diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp index 6030c4c69d..aa6713d897 100644 --- a/xbmc/guilib/GUIWindowManager.cpp +++ b/xbmc/guilib/GUIWindowManager.cpp @@ -67,6 +67,7 @@ #include "windows/GUIWindowScreensaver.h" #include "windows/GUIWindowScreensaverDim.h" #include "pictures/GUIWindowSlideShow.h" +#include "windows/GUIWindowSplash.h" #include "windows/GUIWindowStartup.h" #include "video/windows/GUIWindowFullScreen.h" #include "video/dialogs/GUIDialogVideoOSD.h" @@ -164,6 +165,7 @@ CGUIWindowManager::~CGUIWindowManager(void) void CGUIWindowManager::Initialize() { m_tracker.SelectAlgorithm(); + m_initialized = true; LoadNotOnDemandWindows(); @@ -291,12 +293,14 @@ void CGUIWindowManager::CreateWindows() Add(new CGUIWindowScreensaver); Add(new CGUIWindowWeather); Add(new CGUIWindowStartup); + Add(new CGUIWindowSplash); } bool CGUIWindowManager::DestroyWindows() { try { + Delete(WINDOW_SPLASH); Delete(WINDOW_MUSIC_PLAYLIST); Delete(WINDOW_MUSIC_PLAYLIST_EDITOR); Delete(WINDOW_MUSIC_FILES); diff --git a/xbmc/guilib/WindowIDs.h b/xbmc/guilib/WindowIDs.h index 2548e2b32b..145496ec7c 100644 --- a/xbmc/guilib/WindowIDs.h +++ b/xbmc/guilib/WindowIDs.h @@ -157,6 +157,7 @@ #define WINDOW_DIALOG_VIDEO_OVERLAY 12904 #define WINDOW_VIDEO_TIME_SEEK 12905 // virtual window for time seeking during fullscreen video +#define WINDOW_SPLASH 12997 // splash window #define WINDOW_START 12998 // first window to load #define WINDOW_STARTUP_ANIM 12999 // for startup animations diff --git a/xbmc/interfaces/legacy/Control.h b/xbmc/interfaces/legacy/Control.h index cadfb78bb3..10430eb5f2 100644 --- a/xbmc/interfaces/legacy/Control.h +++ b/xbmc/interfaces/legacy/Control.h @@ -126,7 +126,7 @@ namespace XBMCAddon // setVisibleCondition() Method /** * setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition. - * Allows XBMC to control the visible status of the control. + * Allows Kodi to control the visible status of the control. * * visible : string - Visible condition.\n * allowHiddenFocus : bool - True=gains focus even if hidden. @@ -141,7 +141,7 @@ namespace XBMCAddon // setEnableCondition() Method /** * setEnableCondition(enable) -- Set's the control's enabled condition. - * Allows XBMC to control the enabled status of the control. + * Allows Kodi to control the enabled status of the control. * * enable : string - Enable condition. * diff --git a/xbmc/interfaces/legacy/Dialog.h b/xbmc/interfaces/legacy/Dialog.h index 5cc7c3ee1a..9fc9694273 100644 --- a/xbmc/interfaces/legacy/Dialog.h +++ b/xbmc/interfaces/legacy/Dialog.h @@ -56,7 +56,7 @@ namespace XBMCAddon * yesno(heading, line1[, line2, line3]) -- Show a dialog 'YES/NO'.\n * \n * heading : string or unicode - dialog heading.\n - * line1 : string or unicode - line #1 text.\n + * line1 : string or unicode - line #1 multi-line text.\n * line2 : [opt] string or unicode - line #2 text.\n * line3 : [opt] string or unicode - line #3 text.\n * nolabel : [opt] label to put on the no button.\n @@ -64,11 +64,11 @@ namespace XBMCAddon * autoclose : [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose)\n * \n * *Note, Returns True if 'Yes' was pressed, else False.\n - * *Note, Optionally line1 can be sent as multi-line text. In this case line2 and line3 must be omitted.\n + * *Note, it is preferred to only use line1 as it is actually a multi-line text. In this case line2 and line3 must be omitted.\n * \n * example:\n * - dialog = xbmcgui.Dialog()\n - * - ret = dialog.yesno('XBMC', 'Do you want to exit this script?')n\n + * - ret = dialog.yesno('Kodi', 'Do you want to exit this script?')n\n */ bool yesno(const String& heading, const String& line1, const String& line2 = emptyString, @@ -96,12 +96,12 @@ namespace XBMCAddon * ok(heading, line1[, line2, line3]) -- Show a dialog 'OK'.\n * \n * heading : string or unicode - dialog heading.\n - * line1 : string or unicode - line #1 text.\n + * line1 : string or unicode - line #1 multi-line text.\n * line2 : [opt] string or unicode - line #2 text.\n * line3 : [opt] string or unicode - line #3 text.\n * \n * *Note, Returns True if 'Ok' was pressed, else False.\n - * *Note: Optionally line1 can be sent as multi-line text. In this case line2 and line3 must be omitted.\n + * *Note, it is preferred to only use line1 as it is actually a multi-line text. In this case line2 and line3 must be omitted.\n * \n * example:\n * - dialog = xbmcgui.Dialog()\n @@ -306,11 +306,11 @@ namespace XBMCAddon * create(heading[, line1, line2, line3]) -- Create and show a progress dialog.\n * \n * heading : string or unicode - dialog heading.\n - * line1 : [opt] string or unicode - line #1 text.\n + * line1 : [opt] string or unicode - line #1 multi-line text.\n * line2 : [opt] string or unicode - line #2 text.\n * line3 : [opt] string or unicode - line #3 text.\n * \n - * *Note, Optionally line1 can be sent as multi-line text. In this case line2 and line3 must be omitted.\n + * *Note, it is preferred to only use line1 as it is actually a multi-line text. In this case line2 and line3 must be omitted.\n * *Note, Use update() to update lines and progressbar.\n * \n * example: @@ -325,11 +325,11 @@ namespace XBMCAddon * update(percent[, line1, line2, line3]) -- Updates the progress dialog.\n * \n * percent : integer - percent complete. (0:100)\n - * line1 : [opt] string or unicode - line #1 text.\n + * line1 : [opt] string or unicode - line #1 multi-line text.\n * line2 : [opt] string or unicode - line #2 text.\n * line3 : [opt] string or unicode - line #3 text.\n * \n - * *Note, Optionally line1 can be sent as multi-line text. In this case line2 and line3 must be omitted.\n + * *Note, it is preferred to only use line1 as it is actually a multi-line text. In this case line2 and line3 must be omitted.\n * *Note, If percent == 0, the progressbar will be hidden.\n * \n * example: diff --git a/xbmc/interfaces/legacy/ListItem.h b/xbmc/interfaces/legacy/ListItem.h index 9178bb99cc..c841068f07 100644 --- a/xbmc/interfaces/legacy/ListItem.h +++ b/xbmc/interfaces/legacy/ListItem.h @@ -340,7 +340,7 @@ namespace XBMCAddon * \n * mimetype : string or unicode - mimetype.\n * \n - * *If known prehand, this can avoid xbmc doing HEAD requests to http servers to figure out file type.\n + * *If known prehand, this can avoid Kodi doing HEAD requests to http servers to figure out file type.\n */ void setMimeType(const String& mimetype); diff --git a/xbmc/interfaces/legacy/ModuleXbmc.h b/xbmc/interfaces/legacy/ModuleXbmc.h index cde3dd49b3..9817525b5d 100644 --- a/xbmc/interfaces/legacy/ModuleXbmc.h +++ b/xbmc/interfaces/legacy/ModuleXbmc.h @@ -44,9 +44,9 @@ namespace XBMCAddon * Once you use a keyword, all following arguments require the keyword.\n * \n * Text is written to the log for the following conditions.\n - * XBMC loglevel == -1 (NONE, nothing at all is logged)\n - * XBMC loglevel == 0 (NORMAL, shows LOGNOTICE, LOGERROR, LOGSEVERE and LOGFATAL)\n - * XBMC loglevel == 1 (DEBUG, shows all)\n + * - loglevel == -1 (NONE, nothing at all is logged) + * - loglevel == 0 (NORMAL, shows LOGNOTICE, LOGERROR, LOGSEVERE and LOGFATAL) + * - loglevel == 1 (DEBUG, shows all) * See pydocs for valid values for level.\n * * example: @@ -80,7 +80,7 @@ namespace XBMCAddon void executescript(const char* script); /** - * executebuiltin(function) -- Execute a built in XBMC function. + * executebuiltin(function) -- Execute a built in Kodi function. * * function : string - builtin function to execute. * diff --git a/xbmc/interfaces/legacy/ModuleXbmcplugin.h b/xbmc/interfaces/legacy/ModuleXbmcplugin.h index f89e2205ab..d610677e48 100644 --- a/xbmc/interfaces/legacy/ModuleXbmcplugin.h +++ b/xbmc/interfaces/legacy/ModuleXbmcplugin.h @@ -47,7 +47,7 @@ namespace XBMCAddon bool isFolder = false, int totalItems = 0); /** - * addDirectoryItems(handle, items [,totalItems]) -- Callback function to pass directory contents back to XBMC as a list. + * addDirectoryItems(handle, items [,totalItems]) -- Callback function to pass directory contents back to Kodi as a list. * - Returns a bool for successful completion. * * handle : integer - handle the plugin was started with.\n @@ -65,7 +65,7 @@ namespace XBMCAddon int totalItems = 0); /** - * endOfDirectory(handle[, succeeded, updateListing, cacheToDisc]) -- Callback function to tell XBMC that the end of the directory listing in a virtualPythonFolder module is reached. + * endOfDirectory(handle[, succeeded, updateListing, cacheToDisc]) -- Callback function to tell Kodi that the end of the directory listing in a virtualPythonFolder module is reached. * * handle : integer - handle the plugin was started with.\n * succeeded : [opt] bool - True=script completed successfully(Default)/False=Script did not.\n @@ -79,7 +79,7 @@ namespace XBMCAddon bool cacheToDisc = true); /** - * setResolvedUrl(handle, succeeded, listitem) -- Callback function to tell XBMC that the file plugin has been resolved to a url + * setResolvedUrl(handle, succeeded, listitem) -- Callback function to tell Kodi that the file plugin has been resolved to a url * * handle : integer - handle the plugin was started with.\n * succeeded : bool - True=script completed successfully/False=Script did not.\n @@ -91,10 +91,10 @@ namespace XBMCAddon void setResolvedUrl(int handle, bool succeeded, const XBMCAddon::xbmcgui::ListItem* listitem); /** - * addSortMethod(handle, sortMethod, label2Mask) -- Adds a sorting method for the media list. + * addSortMethod(handle, sortMethod [,label2Mask]) -- Adds a sorting method for the media list. * * handle : integer - handle the plugin was started with.\n - * sortMethod : integer - number for sortmethod see SortFileItem.h.\n + * sortMethod : integer - see available sort methods at the bottom (or see SortFileItem.h).\n * label2Mask : [opt] string - the label mask to use for the second label. Defaults to '%D' * - applies to: * - SORT_METHOD_NONE, SORT_METHOD_UNSORTED, SORT_METHOD_VIDEO_TITLE, @@ -103,9 +103,10 @@ namespace XBMCAddon * - SORT_METHOD_LABEL_IGNORE_THE, SORT_METHOD_VIDEO_SORT_TITLE, * - SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE, SORT_METHOD_FULLPATH, * - SORT_METHOD_LABEL_IGNORE_FOLDERS, SORT_METHOD_CHANNEL - * + * *Note: to add multiple sort methods just call the method multiple times. + * * example: - * - xbmcplugin.addSortMethod(int(sys.argv[1]), 1) + * - xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORTMETHOD_DATEADDED) */ void addSortMethod(int handle, int sortMethod, const String& label2Mask = emptyString); diff --git a/xbmc/interfaces/legacy/Monitor.h b/xbmc/interfaces/legacy/Monitor.h index fa94c494ca..7312fbd91c 100644 --- a/xbmc/interfaces/legacy/Monitor.h +++ b/xbmc/interfaces/legacy/Monitor.h @@ -159,7 +159,7 @@ namespace XBMCAddon * method : name of the notification\n * data : JSON-encoded data of the notification\n *\n - * Will be called when XBMC receives or sends a notification\n + * Will be called when Kodi receives or sends a notification\n */ virtual void onNotification(const String sender, const String method, const String data) { XBMC_TRACE; } diff --git a/xbmc/interfaces/legacy/Player.h b/xbmc/interfaces/legacy/Player.h index 1908f51acf..551d7e395c 100644 --- a/xbmc/interfaces/legacy/Player.h +++ b/xbmc/interfaces/legacy/Player.h @@ -124,7 +124,7 @@ namespace XBMCAddon /** * onPlayBackStarted() -- onPlayBackStarted method. * - * Will be called when xbmc starts playing a file + * Will be called when Kodi starts playing a file */ // Player_OnPlayBackStarted virtual void onPlayBackStarted(); @@ -133,7 +133,7 @@ namespace XBMCAddon /** * onPlayBackEnded() -- onPlayBackEnded method. * - * Will be called when xbmc stops playing a file + * Will be called when Kodi stops playing a file */ // Player_OnPlayBackEnded virtual void onPlayBackEnded(); @@ -141,7 +141,7 @@ namespace XBMCAddon /** * onPlayBackStopped() -- onPlayBackStopped method. * - * Will be called when user stops xbmc playing a file + * Will be called when user stops Kodi playing a file */ // Player_OnPlayBackStopped virtual void onPlayBackStopped(); @@ -200,19 +200,19 @@ namespace XBMCAddon virtual void onPlayBackSeekChapter(int chapter); /** - * isPlaying() -- returns True is xbmc is playing a file. + * isPlaying() -- returns True is Kodi is playing a file. */ // Player_IsPlaying bool isPlaying(); /** - * isPlayingAudio() -- returns True is xbmc is playing an audio file. + * isPlayingAudio() -- returns True is Kodi is playing an audio file. */ // Player_IsPlayingAudio bool isPlayingAudio(); /** - * isPlayingVideo() -- returns True if xbmc is playing a video. + * isPlayingVideo() -- returns True if Kodi is playing a video. */ // Player_IsPlayingVideo bool isPlayingVideo(); diff --git a/xbmc/pvr/channels/PVRChannel.cpp b/xbmc/pvr/channels/PVRChannel.cpp index a2a175a3e3..5427882972 100644 --- a/xbmc/pvr/channels/PVRChannel.cpp +++ b/xbmc/pvr/channels/PVRChannel.cpp @@ -807,8 +807,13 @@ int CPVRChannel::EpgID(void) const void CPVRChannel::SetEpgID(int iEpgId) { CSingleLock lock(m_critSection); - m_iEpgId = iEpgId; - SetChanged(); + + if (m_iEpgId != iEpgId) + { + m_iEpgId = iEpgId; + SetChanged(); + m_bChanged = true; + } } bool CPVRChannel::EPGEnabled(void) const diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp index c829ff3449..dbb599b12c 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp @@ -33,6 +33,8 @@ #include "pvr/addons/PVRClients.h" #include "pvr/timers/PVRTimers.h" +#define MAX_UPDATE_FREQUENCY 3000 // limit to maximum one update/refresh in x milliseconds + using namespace PVR; using namespace EPG; @@ -259,6 +261,7 @@ bool CGUIWindowPVRGuide::OnMessage(CGUIMessage& message) { // let's set the view mode first before update CGUIWindowPVRBase::OnMessage(message); + m_nextUpdateTimeout.SetExpired(); Refresh(true); bReturn = true; break; @@ -271,9 +274,12 @@ bool CGUIWindowPVRGuide::OnMessage(CGUIMessage& message) case ObservableMessageEpgContainer: { m_bUpdateRequired = true; - /* update the current window if the EPG timeline view is visible */ - if (IsActive() && m_viewControl.GetCurrentControl() == GUIDE_VIEW_TIMELINE) + // do not allow more than MAX_UPDATE_FREQUENCY updates + if (IsActive() && m_nextUpdateTimeout.IsTimePast()) + { Refresh(true); + m_nextUpdateTimeout.Set(MAX_UPDATE_FREQUENCY); + } bReturn = true; break; } diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.h b/xbmc/pvr/windows/GUIWindowPVRGuide.h index cc815b2fa7..af30eb6176 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.h +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.h @@ -22,6 +22,7 @@ #include "GUIWindowPVRBase.h" #include "epg/GUIEPGGridContainer.h" +#include "threads/SystemClock.h" class CSetting; @@ -65,5 +66,7 @@ namespace PVR CPVRChannelGroupPtr m_cachedChannelGroup; bool m_bUpdateRequired; + + XbmcThreads::EndTime m_nextUpdateTimeout; }; } diff --git a/xbmc/utils/Splash.cpp b/xbmc/utils/Splash.cpp index c5da041d3f..5d663919e0 100644 --- a/xbmc/utils/Splash.cpp +++ b/xbmc/utils/Splash.cpp @@ -29,46 +29,39 @@ using namespace XFILE; -CSplash::CSplash(const std::string& imageName) : CThread("Splash"), m_ImageName(imageName) +CSplash::CSplash() { - fade = 0.5; - m_messageLayout = NULL; - m_image = NULL; - m_layoutWasLoading = false; } - CSplash::~CSplash() { - Stop(); delete m_image; - delete m_messageLayout; } -void CSplash::OnStartup() -{} - -void CSplash::OnExit() -{} - -void CSplash::Show() +CSplash& CSplash::Get() { - Show(""); + static CSplash instance; + return instance; } -void CSplash::Show(const std::string& message) +void CSplash::Show() { - g_graphicsContext.Lock(); - g_graphicsContext.Clear(); - - RESOLUTION_INFO res(1280,720,0); - g_graphicsContext.SetRenderingResolution(res, true); if (!m_image) { - m_image = new CGUIImage(0, 0, 0, 0, 1280, 720, CTextureInfo(m_ImageName)); + std::string splashImage = "special://home/media/Splash.png"; + if (!XFILE::CFile::Exists(splashImage)) + splashImage = "special://xbmc/media/Splash.png"; + + m_image = new CGUIImage(0, 0, 0, 0, g_graphicsContext.GetWidth(), g_graphicsContext.GetHeight(), CTextureInfo(splashImage)); m_image->SetAspectRatio(CAspectRatio::AR_CENTER); } + g_graphicsContext.Lock(); + g_graphicsContext.Clear(); + + RESOLUTION_INFO res = g_graphicsContext.GetResInfo(); + g_graphicsContext.SetRenderingResolution(res, true); + //render splash image g_Windowing.BeginRender(); @@ -76,60 +69,9 @@ void CSplash::Show(const std::string& message) m_image->Render(); m_image->FreeResources(); - // render message - if (!message.empty()) - { - if (!m_layoutWasLoading) - { - // load arial font, white body, no shadow, size: 20, no additional styling - CGUIFont *messageFont = g_fontManager.LoadTTF("__splash__", "arial.ttf", 0xFFFFFFFF, 0, 20, FONT_STYLE_NORMAL, false, 1.0f, 1.0f, &res); - if (messageFont) - m_messageLayout = new CGUITextLayout(messageFont, true, 0); - m_layoutWasLoading = true; - } - if (m_messageLayout) - { - m_messageLayout->Update(message, 1150, false, true); - - float textWidth, textHeight; - m_messageLayout->GetTextExtent(textWidth, textHeight); - // ideally place text in center of empty area below splash image - float y = 540 + m_image->GetTextureHeight() / 4 - textHeight / 2; - if (y + textHeight > 720) // make sure entire text is visible - y = 720 - textHeight; - - m_messageLayout->RenderOutline(640, y, 0, 0xFF000000, XBFONT_CENTER_X, 1280); - } - } - //show it on screen g_Windowing.EndRender(); CDirtyRegionList dirty; g_graphicsContext.Flip(dirty); g_graphicsContext.Unlock(); } - -void CSplash::Hide() -{ -} - -void CSplash::Process() -{ - Show(); -} - -bool CSplash::Start() -{ - if (m_ImageName.empty() || !CFile::Exists(m_ImageName)) - { - CLog::Log(LOGDEBUG, "Splash image %s not found", m_ImageName.c_str()); - return false; - } - Create(); - return true; -} - -void CSplash::Stop() -{ - StopThread(); -} diff --git a/xbmc/utils/Splash.h b/xbmc/utils/Splash.h index 2cd7a4b13c..5f4375dbb9 100644 --- a/xbmc/utils/Splash.h +++ b/xbmc/utils/Splash.h @@ -21,36 +21,24 @@ */ #include <string> -#include "threads/Thread.h" -class CGUITextLayout; class CGUIImage; -class CSplash : public CThread +class CSplash { public: - CSplash(const std::string& imageName); - virtual ~CSplash(); - - bool Start(); - void Stop(); + static CSplash& Get(); - // In case you don't want to use another thread void Show(); - void Show(const std::string& message); - void Hide(); - -private: - virtual void Process(); - virtual void OnStartup(); - virtual void OnExit(); - float fade; - std::string m_ImageName; +protected: + CSplash(); + CSplash(const CSplash&); + CSplash& operator=(CSplash const&); + virtual ~CSplash(); - CGUITextLayout* m_messageLayout; +private: CGUIImage* m_image; - bool m_layoutWasLoading; #ifdef HAS_DX D3DGAMMARAMP newRamp; D3DGAMMARAMP oldRamp; diff --git a/xbmc/windows/GUIWindowSplash.cpp b/xbmc/windows/GUIWindowSplash.cpp new file mode 100644 index 0000000000..8ac182764a --- /dev/null +++ b/xbmc/windows/GUIWindowSplash.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2015 Team XBMC + * http://xbmc.org + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with XBMC; see the file COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + */ + +#include "GUIWindowSplash.h" +#include "filesystem/File.h" +#include "filesystem/SpecialProtocol.h" +#include "guilib/GUIImage.h" +#include "guilib/GUIWindowManager.h" +#include "utils/log.h" + +CGUIWindowSplash::CGUIWindowSplash(void) : CGUIWindow(WINDOW_SPLASH, "") +{ + m_loadType = LOAD_ON_GUI_INIT; + m_image = nullptr; +} + +CGUIWindowSplash::~CGUIWindowSplash(void) +{ + delete m_image; +} + +void CGUIWindowSplash::OnInitWindow() +{ + std::string splashImage = "special://home/media/Splash.png"; + if (!XFILE::CFile::Exists(splashImage)) + splashImage = "special://xbmc/media/Splash.png"; + + CLog::Log(LOGINFO, "load splash image: %s", CSpecialProtocol::TranslatePath(splashImage).c_str()); + + m_image = new CGUIImage(0, 0, 0, 0, g_graphicsContext.GetWidth(), g_graphicsContext.GetHeight(), CTextureInfo(splashImage)); + m_image->SetAspectRatio(CAspectRatio::AR_CENTER); +} + +void CGUIWindowSplash::Render() +{ + g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), true); + m_image->SetWidth(g_graphicsContext.GetWidth()); + m_image->SetHeight(g_graphicsContext.GetHeight()); + m_image->AllocResources(); + m_image->Render(); + m_image->FreeResources(); +}
\ No newline at end of file diff --git a/xbmc/windows/GUIWindowSplash.h b/xbmc/windows/GUIWindowSplash.h new file mode 100644 index 0000000000..510db066c9 --- /dev/null +++ b/xbmc/windows/GUIWindowSplash.h @@ -0,0 +1,39 @@ +#pragma once + +/* + * Copyright (C) 2015 Team XBMC + * http://xbmc.org + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with XBMC; see the file COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + */ + +#include "guilib/GUIWindow.h" + +class CGUITextLayout; +class CGUIImage; + +class CGUIWindowSplash : public CGUIWindow +{ +public: + CGUIWindowSplash(void); + virtual ~CGUIWindowSplash(void); + virtual bool OnAction(const CAction &action) { return false; }; + virtual void Render(); +protected: + virtual void OnInitWindow(); +private: + CGUIImage* m_image; +}; diff --git a/xbmc/windows/Makefile b/xbmc/windows/Makefile index 059f24abb2..a328db2761 100644 --- a/xbmc/windows/Makefile +++ b/xbmc/windows/Makefile @@ -6,6 +6,7 @@ SRCS=GUIMediaWindow.cpp \ GUIWindowPointer.cpp \ GUIWindowScreensaver.cpp \ GUIWindowScreensaverDim.cpp \ + GUIWindowSplash.cpp \ GUIWindowStartup.cpp \ GUIWindowSystemInfo.cpp \ GUIWindowWeather.cpp \ |