mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
-fix shutdown for neo
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@719 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -125,6 +125,10 @@ void EpgPlus::Header::paint(const char * Name)
|
||||
this->font->RenderString (this->x + 10, this->y + this->font->getHeight(),
|
||||
this->width - 20, head, COL_MENUHEAD, 0, true);
|
||||
//this->width - 20, g_Locale->getText (LOCALE_EPGPLUS_HEAD) , COL_MENUHEAD, 0, true);
|
||||
int icol_w, icol_h;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h);
|
||||
this->frameBuffer->paintIcon (NEUTRINO_ICON_BUTTON_HELP, this->x + this->width - icol_w - RADIUS_LARGE - 10, this->y, icol_h);
|
||||
|
||||
}
|
||||
|
||||
int EpgPlus::Header::getUsedHeight()
|
||||
@@ -501,7 +505,7 @@ struct button_label buttonLabels[] = {
|
||||
|
||||
void EpgPlus::Footer::paintButtons (button_label * pbuttonLabels, int numberOfButtons)
|
||||
{
|
||||
int buttonWidth = (this->width - 20) / 4;
|
||||
int buttonWidth = (this->width - RADIUS_LARGE) / 4;
|
||||
int yPos = this->y + this->getUsedHeight();
|
||||
|
||||
this->frameBuffer->paintBoxRel (this->x, yPos, this->width, buttonHeight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
@@ -509,9 +513,6 @@ void EpgPlus::Footer::paintButtons (button_label * pbuttonLabels, int numberOfBu
|
||||
::paintButtons (this->frameBuffer, this->fontButtons, g_Locale, this->x + 10,
|
||||
yPos, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels);
|
||||
|
||||
int icol_w, icol_h;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h);
|
||||
this->frameBuffer->paintIcon (NEUTRINO_ICON_BUTTON_HELP, this->x + this->width - icol_w - 10, yPos, buttonHeight);
|
||||
}
|
||||
|
||||
EpgPlus::EpgPlus()
|
||||
@@ -652,8 +653,8 @@ void EpgPlus::init()
|
||||
currentViewMode = ViewMode_Scroll;
|
||||
currentSwapMode = SwapMode_ByPage;
|
||||
#endif
|
||||
usableScreenWidth = w_max (g_settings.screen_EndX, 4);
|
||||
usableScreenHeight = h_max (g_settings.screen_EndY, 4);
|
||||
usableScreenWidth = w_max (g_settings.screen_EndX, 0);
|
||||
usableScreenHeight = h_max (g_settings.screen_EndY, 0);
|
||||
std::string FileName = std::string (g_settings.font_file);
|
||||
for (size_t i = 0; i < NumberOfFontSettings; ++i) {
|
||||
int size = fontSettingTable[i].size;
|
||||
|
@@ -43,7 +43,8 @@ CProgressWindow::CProgressWindow()
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||
width = w_max (420, 0);
|
||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
|
||||
width = w_max (32*fw, 0);
|
||||
height = h_max(hheight+5*mheight, 20);
|
||||
|
||||
global_progress = local_progress = 101;
|
||||
@@ -145,7 +146,7 @@ void CProgressWindow::paint()
|
||||
int ypos=y;
|
||||
frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
||||
if (caption != NONEXISTANT_LOCALE)
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width- 10, g_Locale->getText(caption), COL_MENUHEAD, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width - 10, g_Locale->getText(caption), COL_MENUHEAD, 0, true); // UTF-8
|
||||
frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
||||
ypos+= hheight + (mheight >>1);
|
||||
|
@@ -2667,7 +2667,7 @@ int CNeutrinoApp::run(int argc, char **argv)
|
||||
|
||||
RealRun(mainMenu);
|
||||
|
||||
ExitRun(true);
|
||||
ExitRun(true, (cs_get_revision() > 7));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3515,7 +3515,7 @@ printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout);
|
||||
}
|
||||
else if( msg == NeutrinoMessages::SLEEPTIMER) {
|
||||
if(g_settings.shutdown_real)
|
||||
ExitRun(true);
|
||||
ExitRun(true, (cs_get_revision() > 7));
|
||||
else
|
||||
standbyMode( true );
|
||||
return messages_return::handled;
|
||||
@@ -3545,7 +3545,7 @@ printf("NeutrinoMessages::EVT_BOUQUETSCHANGED\n");fflush(stdout);
|
||||
}
|
||||
else if( msg == NeutrinoMessages::SHUTDOWN ) {
|
||||
if(!skipShutdownTimer) {
|
||||
ExitRun(true);
|
||||
ExitRun(true, (cs_get_revision() > 7));
|
||||
}
|
||||
else {
|
||||
skipShutdownTimer=false;
|
||||
|
@@ -1654,10 +1654,6 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
||||
CMiscNotifier* miscNotifier = new CMiscNotifier( m1 );
|
||||
miscSettings.addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier));
|
||||
#endif
|
||||
if(cs_get_revision() > 7){
|
||||
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
|
||||
miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, true, g_settings.shutdown_count, miscSettings_shutdown_count));
|
||||
}
|
||||
miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_STARTSTANDBY, &g_settings.power_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
//miscSettings.addItem(new CMenuForwarder(LOCALE_EXTRA_KEY_PLUGIN, true, g_settings.onekey_plugin,this,"onekeyplugin"));
|
||||
@@ -1669,6 +1665,21 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
|
||||
miscSettingsGeneral->addItem(new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, funNotifier, 0, 0, LOCALE_OPTIONS_OFF) );
|
||||
funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed);
|
||||
}
|
||||
if(cs_get_revision() > 7){
|
||||
miscSettingsGeneral->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_SHUTDOWN));
|
||||
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real);
|
||||
|
||||
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
|
||||
CMenuForwarder *m2 = new CMenuForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, g_settings.shutdown_count, miscSettings_shutdown_count);
|
||||
|
||||
CMiscNotifier* miscNotifier = new CMiscNotifier( m1, m2 );
|
||||
|
||||
miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier));
|
||||
miscSettingsGeneral->addItem(m1);
|
||||
miscSettingsGeneral->addItem(m2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
@@ -2780,15 +2791,6 @@ void CNeutrinoApp::InitKeySettings(CMenuWidget &keySettings)
|
||||
keySettings.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_RC));
|
||||
keySettings.addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, keySettings_repeatBlocker));
|
||||
keySettings.addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, keySettings_repeat_genericblocker));
|
||||
if(cs_get_revision() > 7){
|
||||
keySettings.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_SHUTDOWN));
|
||||
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real);
|
||||
|
||||
CMiscNotifier* miscNotifier = new CMiscNotifier( m1 );
|
||||
|
||||
keySettings.addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier));
|
||||
keySettings.addItem(m1);
|
||||
}
|
||||
int * keyvalue_p[KEYBINDS_COUNT] =
|
||||
{
|
||||
&g_settings.key_tvradio_mode,
|
||||
|
@@ -354,13 +354,15 @@ bool CRecordingSafetyNotifier::changeNotify(const neutrino_locale_t, void *)
|
||||
return true;
|
||||
}
|
||||
|
||||
CMiscNotifier::CMiscNotifier( CMenuItem* i1)
|
||||
CMiscNotifier::CMiscNotifier( CMenuItem* i1, CMenuItem* i2)
|
||||
{
|
||||
toDisable[0]=i1;
|
||||
toDisable[1]=i2;
|
||||
}
|
||||
bool CMiscNotifier::changeNotify(const neutrino_locale_t, void *)
|
||||
{
|
||||
toDisable[0]->setActive(!g_settings.shutdown_real);
|
||||
toDisable[1]->setActive(!g_settings.shutdown_real);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -133,9 +133,9 @@ class CRecordingNotifier2 : public CChangeObserver
|
||||
class CMiscNotifier : public CChangeObserver
|
||||
{
|
||||
private:
|
||||
CMenuItem* toDisable[1];
|
||||
CMenuItem* toDisable[2];
|
||||
public:
|
||||
CMiscNotifier( CMenuItem* );
|
||||
CMiscNotifier( CMenuItem*, CMenuItem* );
|
||||
bool changeNotify(const neutrino_locale_t, void *);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user