Permalink
Browse files

FIX: Properly handle Pictures Play/Stop notif (fixes #13501; fixes #1…

…3503)
  • Loading branch information...
1 parent a22348d commit 2f40a8d9b96d9a1a161705b31d87e243527c58fb @koying committed Nov 6, 2012
Showing with 11 additions and 1 deletion.
  1. +8 −0 xbmc/pictures/GUIWindowPictures.cpp
  2. +3 −1 xbmc/pictures/GUIWindowSlideShow.cpp
@@ -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);
@@ -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;

0 comments on commit 2f40a8d

Please sign in to comment.