mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
Infoclock: unify handling in some classes with singleton
This commit is contained in:
@@ -79,7 +79,7 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
extern CBouquetList * bouquetList; /* neutrino.cpp */
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
extern cVideo * videoDecoder;
|
||||
extern CInfoClock *InfoClock;
|
||||
|
||||
|
||||
#define LEFT_OFFSET 5
|
||||
|
||||
@@ -249,7 +249,7 @@ void CInfoViewer::initClock()
|
||||
clock->setClockIntervall(1);
|
||||
}
|
||||
|
||||
InfoClock->getInstance()->disableInfoClock();
|
||||
CInfoClock::getInstance()->disableInfoClock();
|
||||
clock->enableColBodyGradient(gradient_top, COL_INFOBAR_PLUS_0);
|
||||
clock->doPaintBg(!gradient_top);
|
||||
clock->enableTboxSaveScreen(gradient_top);
|
||||
@@ -1213,7 +1213,7 @@ void CInfoViewer::killRadiotext()
|
||||
if (g_Radiotext->S_RtOsd)
|
||||
frameBuffer->paintBackgroundBox(rt_x, rt_y, rt_w, rt_h);
|
||||
rt_x = rt_y = rt_h = rt_w = 0;
|
||||
InfoClock->enableInfoClock(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
}
|
||||
|
||||
void CInfoViewer::showRadiotext()
|
||||
@@ -1225,7 +1225,7 @@ void CInfoViewer::showRadiotext()
|
||||
infoViewerBB->showIcon_RadioText(g_Radiotext->haveRadiotext());
|
||||
|
||||
if (g_Radiotext->S_RtOsd) {
|
||||
InfoClock->enableInfoClock(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
// dimensions of radiotext window
|
||||
int /*yoff = 8,*/ ii = 0;
|
||||
rt_dx = BoxEndX - BoxStartX;
|
||||
@@ -2099,7 +2099,7 @@ void CInfoViewer::killTitle()
|
||||
}
|
||||
}
|
||||
showButtonBar = false;
|
||||
InfoClock->getInstance()->enableInfoClock();
|
||||
CInfoClock::getInstance()->enableInfoClock();
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@@ -53,7 +53,7 @@
|
||||
#include <system/debug.h>
|
||||
#include <video.h>
|
||||
extern cVideo * videoDecoder;
|
||||
extern CInfoClock *InfoClock;
|
||||
|
||||
|
||||
CMediaPlayerMenu::CMediaPlayerMenu()
|
||||
{
|
||||
@@ -108,7 +108,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
else if (actionKey == "movieplayer")
|
||||
{
|
||||
audiomute->enableMuteIcon(false);
|
||||
InfoClock->enableInfoClock(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if( mode == NeutrinoMessages::mode_radio )
|
||||
CFrameBuffer::getInstance()->stopFrame();
|
||||
@@ -116,7 +116,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
if( mode == NeutrinoMessages::mode_radio )
|
||||
CFrameBuffer::getInstance()->showFrame("radiomode.jpg");
|
||||
audiomute->enableMuteIcon(true);
|
||||
InfoClock->enableInfoClock(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,7 @@
|
||||
|
||||
extern cVideo * videoDecoder;
|
||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
extern CInfoClock *InfoClock;
|
||||
|
||||
extern CVolume* g_volume;
|
||||
|
||||
#define TIMESHIFT_SECONDS 3
|
||||
@@ -459,7 +459,7 @@ void CMoviePlayerGui::ClearQueue()
|
||||
void CMoviePlayerGui::EnableClockAndMute(bool enable)
|
||||
{
|
||||
CAudioMute::getInstance()->enableMuteIcon(enable);
|
||||
InfoClock->enableInfoClock(enable);
|
||||
CInfoClock::getInstance()->enableInfoClock(enable);
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::makeFilename()
|
||||
@@ -1828,7 +1828,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
bool restore = FileTime.IsVisible();
|
||||
if (restore)
|
||||
FileTime.kill();
|
||||
InfoClock->enableInfoClock(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
|
||||
if (isLuaPlay && haveLuaInfoFunc) {
|
||||
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
|
||||
@@ -1843,7 +1843,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
||||
else if (p_movie_info)
|
||||
cMovieInfo.showMovieInfo(*p_movie_info);
|
||||
|
||||
InfoClock->enableInfoClock(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
if (restore) {
|
||||
FileTime.setMode(m_mode);
|
||||
FileTime.update(position, duration);
|
||||
|
@@ -76,7 +76,7 @@
|
||||
#include <zapit/zapit.h>
|
||||
#include <video.h>
|
||||
extern cVideo * videoDecoder;
|
||||
extern CInfoClock *InfoClock;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool comparePictureByDate (const CPicture& a, const CPicture& b)
|
||||
@@ -258,7 +258,7 @@ int CPictureViewerGui::show()
|
||||
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(false);
|
||||
InfoClock->enableInfoClock(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
|
||||
while (loop)
|
||||
{
|
||||
@@ -644,7 +644,7 @@ int CPictureViewerGui::show()
|
||||
hide();
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(true);
|
||||
InfoClock->enableInfoClock(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
|
||||
return(res);
|
||||
}
|
||||
|
@@ -459,8 +459,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
||||
}
|
||||
}
|
||||
|
||||
extern CInfoClock *InfoClock;
|
||||
InfoClock->enableInfoClock(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
// show menu if there are more than 2 items only
|
||||
// otherwise, we start the item directly (must be the last one)
|
||||
if (menu_items > 1 )
|
||||
@@ -468,7 +467,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
||||
else if (last_menu_item)
|
||||
last_menu_item->exec( NULL );
|
||||
|
||||
InfoClock->enableInfoClock(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
CNeutrinoApp::getInstance()->StartSubtitles();
|
||||
|
||||
if (button < COL_BUTTONMAX)
|
||||
|
Reference in New Issue
Block a user