Skip to content

Commit

Permalink
FIX: Properly handle Pictures Play/Stop notif (fixes xbmc#13501; fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Nov 6, 2012
1 parent a22348d commit 2f40a8d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions xbmc/pictures/GUIWindowPictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion xbmc/pictures/GUIWindowSlideShow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2f40a8d

Please sign in to comment.