mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
screensaver: rework timeosd handling
Origin commit data
------------------
Branch: ni/coolstream
Commit: d7ac78c0c2
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-01-07 (Thu, 07 Jan 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
#include "screensaver.h"
|
#include "screensaver.h"
|
||||||
#include <system/debug.h>
|
#include <system/debug.h>
|
||||||
#include <gui/infoclock.h>
|
#include <gui/infoclock.h>
|
||||||
extern CInfoClock *InfoClock;
|
|
||||||
|
|
||||||
#include <video.h>
|
#include <video.h>
|
||||||
extern cVideo * videoDecoder;
|
extern cVideo * videoDecoder;
|
||||||
@@ -84,6 +84,9 @@ void CScreenSaver::Start()
|
|||||||
status_mute = CAudioMute::getInstance()->getStatus();
|
status_mute = CAudioMute::getInstance()->getStatus();
|
||||||
CAudioMute::getInstance()->enableMuteIcon(false);
|
CAudioMute::getInstance()->enableMuteIcon(false);
|
||||||
|
|
||||||
|
if(!CInfoClock::getInstance()->isBlocked())
|
||||||
|
CInfoClock::getInstance()->disableInfoClock();
|
||||||
|
|
||||||
m_viewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling);
|
m_viewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling);
|
||||||
m_viewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY);
|
m_viewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY);
|
||||||
|
|
||||||
@@ -125,7 +128,7 @@ void CScreenSaver::Stop()
|
|||||||
if (!OnAfterStop.empty())
|
if (!OnAfterStop.empty())
|
||||||
OnAfterStop();
|
OnAfterStop();
|
||||||
else
|
else
|
||||||
InfoClock->enableInfoClock();
|
CInfoClock::getInstance()->enableInfoClock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CScreenSaver::ScreenSaverPrg(void* arg)
|
void* CScreenSaver::ScreenSaverPrg(void* arg)
|
||||||
@@ -281,3 +284,10 @@ void CScreenSaver::paint()
|
|||||||
clr.i_color = COL_DARK_GRAY;
|
clr.i_color = COL_DARK_GRAY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CScreenSaver::IsRun()
|
||||||
|
{
|
||||||
|
if(thrScreenSaver)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
@@ -65,7 +65,7 @@ class CScreenSaver : public sigc::trackable
|
|||||||
CScreenSaver();
|
CScreenSaver();
|
||||||
~CScreenSaver();
|
~CScreenSaver();
|
||||||
static CScreenSaver* getInstance();
|
static CScreenSaver* getInstance();
|
||||||
|
bool IsRun();
|
||||||
void Start();
|
void Start();
|
||||||
void Stop();
|
void Stop();
|
||||||
sigc::signal<void> OnBeforeStart;
|
sigc::signal<void> OnBeforeStart;
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
#include <gui/volumebar.h>
|
#include <gui/volumebar.h>
|
||||||
#include <gui/timeosd.h>
|
#include <gui/timeosd.h>
|
||||||
|
#include "screensaver.h"
|
||||||
|
|
||||||
|
|
||||||
CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0)
|
CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0)
|
||||||
@@ -96,7 +96,7 @@ void CTimeOSD::initTimeString()
|
|||||||
void CTimeOSD::show(time_t time_show, bool force)
|
void CTimeOSD::show(time_t time_show, bool force)
|
||||||
{
|
{
|
||||||
time_show /= 1000;
|
time_show /= 1000;
|
||||||
if (!force && (m_mode == MODE_HIDE || m_time_show == time_show))
|
if (!force && (m_mode == MODE_HIDE || m_time_show == time_show) || CScreenSaver::getInstance()->IsRun())
|
||||||
return;
|
return;
|
||||||
m_time_show = time_show;
|
m_time_show = time_show;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user