Permalink
Browse files

Disable the idle timer during a slideshow

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information...
1 parent 3b81805 commit ab9a50c8ba8c899e493efa159ed74acd3ad1bede @chadparry chadparry committed with stuartm Aug 24, 2012
@@ -135,6 +135,7 @@ GLSingleView::GLSingleView(ThumbList itemList, int *pos, int slideShow,
if (slideShow)
{
+ GetMythMainWindow()->PauseIdleTimer(true);
m_slideshow_running = true;
m_slideshow_timer->stop();
m_slideshow_timer->setSingleShot(true);
@@ -270,6 +271,8 @@ void GLSingleView::keyPressEvent(QKeyEvent *e)
{
bool handled = false;
+ if (m_slideshow_running)
+ GetMythMainWindow()->PauseIdleTimer(false);
bool wasRunning = m_slideshow_running;
m_slideshow_timer->stop();
m_slideshow_running = false;
@@ -473,6 +476,7 @@ void GLSingleView::keyPressEvent(QKeyEvent *e)
if (m_slideshow_running)
{
+ GetMythMainWindow()->PauseIdleTimer(true);
GetMythUI()->DisableScreensaver();
}
@@ -137,6 +137,7 @@ SingleView::SingleView(
if (slideShow)
{
+ GetMythMainWindow()->PauseIdleTimer(true);
m_slideshow_running = true;
m_slideshow_timer->stop();
m_slideshow_timer->setSingleShot(true);
@@ -333,6 +334,8 @@ void SingleView::keyPressEvent(QKeyEvent *e)
{
bool handled = false;
+ if (m_slideshow_running)
+ GetMythMainWindow()->PauseIdleTimer(false);
bool wasRunning = m_slideshow_running;
m_slideshow_timer->stop();
m_caption_timer->stop();
@@ -524,6 +527,7 @@ void SingleView::keyPressEvent(QKeyEvent *e)
}
if (m_slideshow_running)
{
+ GetMythMainWindow()->PauseIdleTimer(true);
GetMythUI()->DisableScreensaver();
}

0 comments on commit ab9a50c

Please sign in to comment.