FIX: Properly handle Pictures Play/Stop notif (fixes #13501; fixes #13503)
authorChris "Koying" Browet <cbro@semperpax.com>
Tue, 6 Nov 2012 00:01:38 +0000 (01:01 +0100)
committerChris "Koying" Browet <cbro@semperpax.com>
Tue, 6 Nov 2012 01:43:10 +0000 (02:43 +0100)
xbmc/pictures/GUIWindowPictures.cpp
xbmc/pictures/GUIWindowSlideShow.cpp

index ef92b37..ef620ff 100644 (file)
@@ -41,6 +41,7 @@
 #include "utils/log.h"
 #include "utils/URIUtils.h"
 #include "Autorun.h"
+#include "interfaces/AnnouncementManager.h"
 
 #define CONTROL_BTNVIEWASICONS      2
 #define CONTROL_BTNSORTBY           3
@@ -354,6 +355,13 @@ bool CGUIWindowPictures::ShowPicture(int iItem, bool startSlideShow)
 
   if (startSlideShow)
     pSlideShow->StartSlideShow(false);
+  else 
+  {
+    CVariant param;
+    param["player"]["speed"] = 1;
+    param["player"]["playerid"] = PLAYLIST_PICTURE;
+    ANNOUNCEMENT::CAnnouncementManager::Announce(ANNOUNCEMENT::Player, "xbmc", "OnPlay", pSlideShow->GetCurrentSlide(), param);
+  }
 
   m_slideShowStarted = true;
   g_windowManager.ActivateWindow(WINDOW_SLIDESHOW);
index 44cbe88..c810ed3 100644 (file)
@@ -378,6 +378,8 @@ void CGUIWindowSlideShow::StartSlideShow(bool screensaver)
   m_bSlideShow = true;
   m_iDirection = 1;
   m_bScreensaver = screensaver;
+  if (m_slides->Size())
+    AnnouncePlayerPlay(m_slides->Get(m_iCurrentSlide));
 }
 
 void CGUIWindowSlideShow::Process(unsigned int currentTime, CDirtyRegionList &regions)
@@ -699,7 +701,7 @@ bool CGUIWindowSlideShow::OnAction(const CAction &action)
   case ACTION_PREVIOUS_MENU:
   case ACTION_NAV_BACK:
   case ACTION_STOP:
-    if (m_bSlideShow && m_slides->Size())
+    if (m_slides->Size())
       AnnouncePlayerStop(m_slides->Get(m_iCurrentSlide));
     g_windowManager.PreviousWindow();
     break;