- screensaver: remove audioplayer_screensaver; add screensaver_delay

This commit is contained in:
svenhoefer
2014-12-29 21:53:50 +01:00
parent 9d34d4ba97
commit df18f1f4e5
9 changed files with 23 additions and 22 deletions

View File

@@ -373,9 +373,9 @@ int CAudioPlayerGui::show()
if ( msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER)
{
int timeout = time(NULL) - m_idletime;
int screensaver_timeout = g_settings.audioplayer_screensaver;
if (screensaver_timeout != 0 && timeout > screensaver_timeout*60 && !m_screensaver)
int delay = time(NULL) - m_idletime;
int screensaver_delay = g_settings.screensaver_delay;
if (screensaver_delay != 0 && delay > screensaver_delay*60 && !m_screensaver)
screensaver(true);
}
else

View File

@@ -125,11 +125,6 @@ int CAudioPlayerSetup::showAudioPlayerSetup()
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_PLAYLIST);
audioplayerSetup->addItem(mc);
CMenuOptionNumberChooser *cc = new CMenuOptionNumberChooser(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, &g_settings.audioplayer_screensaver, true, 0, 999, NULL, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF);
cc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE));
cc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SCREENSAVER);
audioplayerSetup->addItem(cc);
mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO, &g_settings.audioplayer_highprio, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true );
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_HIGHPRIO);
audioplayerSetup->addItem(mc);

View File

@@ -1271,8 +1271,14 @@ void COsdSetup::showOsdScreensaverSetup(CMenuWidget *menu_screensaver)
mf->setHint("", LOCALE_MENU_HINT_SCREENSAVER_DIR);
menu_screensaver->addItem(mf);
// screensaver delay
CMenuOptionNumberChooser* nc = new CMenuOptionNumberChooser(LOCALE_SCREENSAVER_DELAY, &g_settings.screensaver_delay, true, 0, 999, NULL, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF);
nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE));
nc->setHint("", LOCALE_MENU_HINT_SCREENSAVER_DELAY);
menu_screensaver->addItem(nc);
// screensaver timeout
CMenuOptionNumberChooser* nc = new CMenuOptionNumberChooser(LOCALE_SCREENSAVER_TIMEOUT, &g_settings.screensaver_timeout, true, 10, 60);
nc = new CMenuOptionNumberChooser(LOCALE_SCREENSAVER_TIMEOUT, &g_settings.screensaver_timeout, true, 0, 60);
nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_SECOND));
nc->setHint("", LOCALE_MENU_HINT_SCREENSAVER_TIMEOUT);
menu_screensaver->addItem(nc);