mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-17 02:13:35 +02:00
infoicons: avoid extern CInfoIcons; use getInstance() instead of this
Origin commit data
------------------
Commit: 5a34b06137
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-03 (Wed, 03 Jan 2018)
Origin message was:
------------------
- infoicons: avoid extern CInfoIcons; use getInstance() instead of this
This commit is contained in:
@@ -38,7 +38,6 @@
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
|
||||
|
||||
typedef struct menu_data_t
|
||||
{
|
||||
@@ -106,7 +105,7 @@ int CInfoIconsSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
res = menu_return::RETURN_EXIT;
|
||||
}
|
||||
else if(actionKey.substr(0,18) == "infoicons_switch") {
|
||||
InfoIcons->switchInfoIconsOnOff();
|
||||
CInfoIcons::getInstance()->switchInfoIconsOnOff();
|
||||
res = menu_return::RETURN_EXIT_ALL;
|
||||
}
|
||||
|
||||
|
@@ -83,7 +83,6 @@
|
||||
|
||||
//NI InfoIcons
|
||||
#include "gui/infoicons.h"
|
||||
extern CInfoIcons *InfoIcons; /* neutrino.cpp */
|
||||
|
||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
extern CBouquetList * bouquetList; /* neutrino.cpp */
|
||||
@@ -794,7 +793,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
|
||||
|
||||
//NI InfoIcons
|
||||
if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
|
||||
InfoIcons->paintIcons(true);
|
||||
CInfoIcons::getInstance()->paintIcons(true);
|
||||
|
||||
if (showButtonBar) {
|
||||
infoViewerBB->paintshowButtonBar(noTimer);
|
||||
@@ -1384,9 +1383,9 @@ void CInfoViewer::killRadiotext()
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
//NI InfoIcons
|
||||
if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
|
||||
InfoIcons->paintIcons(true);
|
||||
CInfoIcons::getInstance()->paintIcons(true);
|
||||
else
|
||||
InfoIcons->enableInfoIcons(true);
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true);
|
||||
}
|
||||
|
||||
void CInfoViewer::showRadiotext()
|
||||
@@ -1409,9 +1408,9 @@ void CInfoViewer::showRadiotext()
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
//NI InfoIcons
|
||||
if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
|
||||
InfoIcons->hideIcons();
|
||||
CInfoIcons::getInstance()->hideIcons();
|
||||
else
|
||||
InfoIcons->enableInfoIcons(false);
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false);
|
||||
|
||||
int rt_font = SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO;
|
||||
int item_h = g_Font[rt_font]->getHeight();
|
||||
@@ -2163,7 +2162,7 @@ void CInfoViewer::killTitle()
|
||||
|
||||
//NI InfoIcons
|
||||
if (!g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_INFOVIEWER)
|
||||
InfoIcons->hideIcons();
|
||||
CInfoIcons::getInstance()->hideIcons();
|
||||
}
|
||||
showButtonBar = false;
|
||||
CInfoClock::getInstance()->enableInfoClock();
|
||||
|
@@ -57,7 +57,6 @@ extern cVideo * videoDecoder;
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
CMediaPlayerMenu::CMediaPlayerMenu()
|
||||
{
|
||||
@@ -108,7 +107,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
audiomute->enableMuteIcon(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if( mode == NeutrinoModes::mode_radio )
|
||||
CFrameBuffer::getInstance()->stopFrame();
|
||||
@@ -117,7 +116,7 @@ int CMediaPlayerMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
CFrameBuffer::getInstance()->showFrame("radiomode.jpg");
|
||||
audiomute->enableMuteIcon(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
InfoIcons->enableInfoIcons(true); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -82,7 +82,6 @@ extern cVideo * videoDecoder;
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool comparePictureByDate (const CPicture& a, const CPicture& b)
|
||||
@@ -264,7 +263,7 @@ int CPictureViewerGui::show()
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(false);
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
|
||||
while (loop)
|
||||
{
|
||||
@@ -663,7 +662,7 @@ int CPictureViewerGui::show()
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(true);
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
InfoIcons->enableInfoIcons(true); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
|
||||
return(res);
|
||||
}
|
||||
|
@@ -49,7 +49,6 @@ extern cVideo * videoDecoder;
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -60,7 +59,7 @@ CScreenSaver::CScreenSaver()
|
||||
m_viewer = new CPictureViewer();
|
||||
index = 0;
|
||||
status_mute = CAudioMute::getInstance()->getStatus();
|
||||
status_icons = InfoIcons->getStatus(); //NI
|
||||
status_icons = CInfoIcons::getInstance()->getStatus(); //NI
|
||||
scr_clock = NULL;
|
||||
clr.i_color = COL_DARK_GRAY;
|
||||
pip_channel_id = 0;
|
||||
@@ -99,8 +98,8 @@ void CScreenSaver::Start()
|
||||
CInfoClock::getInstance()->disableInfoClock();
|
||||
|
||||
//NI
|
||||
status_icons = InfoIcons->getStatus();
|
||||
InfoIcons->enableInfoIcons(false);
|
||||
status_icons = CInfoIcons::getInstance()->getStatus();
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false);
|
||||
|
||||
#ifdef ENABLE_PIP
|
||||
pip_channel_id = CZapit::getInstance()->GetPipChannelID();
|
||||
@@ -152,7 +151,7 @@ void CScreenSaver::Stop()
|
||||
#endif
|
||||
|
||||
m_frameBuffer->paintBackground(); //clear entire screen
|
||||
InfoIcons->enableInfoIcons(status_icons); //NI
|
||||
CInfoIcons::getInstance()->enableInfoIcons(status_icons); //NI
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(status_mute);
|
||||
if (!OnAfterStop.empty()){
|
||||
|
@@ -38,7 +38,6 @@
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
|
||||
CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON)
|
||||
@@ -158,21 +157,21 @@ void CTimeOSD::switchMode(int position, int duration)
|
||||
switch (m_mode) {
|
||||
case MODE_ASC:
|
||||
case MODE_TMP:
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
m_mode = MODE_DESC;
|
||||
CComponents::kill();
|
||||
break;
|
||||
case MODE_DESC:
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
m_mode = MODE_BAR;
|
||||
CComponents::kill();
|
||||
break;
|
||||
case MODE_BAR:
|
||||
InfoIcons->enableInfoIcons(true); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
KillAndResetTimescale();
|
||||
return;
|
||||
default:
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
m_mode = MODE_ASC;
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,6 @@ extern CPictureViewer * g_PicViewer;
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
const struct button_label RescanButton = {NEUTRINO_ICON_BUTTON_BLUE , LOCALE_UPNPBROWSER_RESCAN};
|
||||
const struct button_label BrowseButtons[] =
|
||||
@@ -521,7 +520,7 @@ void CUpnpBrowserGui::selectDevice()
|
||||
return;
|
||||
|
||||
CAudioMute::getInstance()->enableMuteIcon(false);
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
|
||||
while (loop)
|
||||
{
|
||||
@@ -593,7 +592,7 @@ void CUpnpBrowserGui::selectDevice()
|
||||
}
|
||||
}
|
||||
CAudioMute::getInstance()->enableMuteIcon(true);
|
||||
InfoIcons->enableInfoIcons(true); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::playnext(void)
|
||||
|
@@ -99,7 +99,6 @@ extern CCAMMenuHandler * g_CamHandler;
|
||||
#include <gui/infoicons_setup.h>
|
||||
|
||||
#include <gui/infoicons.h>
|
||||
extern CInfoIcons *InfoIcons;
|
||||
|
||||
CUserMenu::CUserMenu()
|
||||
{
|
||||
@@ -571,7 +570,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
||||
}
|
||||
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
InfoIcons->enableInfoIcons(false); //NI
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI
|
||||
// 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 )
|
||||
@@ -580,7 +579,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
||||
last_menu_item->exec( NULL );
|
||||
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
InfoIcons->enableInfoIcons(true); //NI
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI
|
||||
CNeutrinoApp::getInstance()->StartSubtitles();
|
||||
|
||||
if (button < COL_BUTTONMAX)
|
||||
|
Reference in New Issue
Block a user