From 1b9da21d09aff0b15b6f2c8928c7196155fd1c9e Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 18 Feb 2010 17:44:43 +0000 Subject: [PATCH] -add menu scrambled message on/off git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@378 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- data/locale/deutsch.locale | 4 ++++ data/locale/english.locale | 4 ++++ src/neutrino.cpp | 7 +++++-- src/neutrino_menue.cpp | 15 +++++++++++++-- src/system/locals.h | 4 ++++ src/system/locals_intern.h | 4 ++++ src/system/settings.h | 2 ++ 7 files changed, 36 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 0db5ba01e..22965209b 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -236,6 +236,8 @@ extra.auto_delete Automatisch löschen extra.auto_timeshift Autom. Aufnahme, Sek. (0 = deakt.) extra.auto_to_record Timeshift zu den Aufnahmen hinzufügen extra.cache_txt Teletext zwischenspeichern +extra.scrambled_message Verschlüsselung Meldeung +extra.volume_pos Lautstärkeanzeige extra.chadded Der aktuelle Kanal wird dem selektierten Bouquet hinzugefügt....\n extra.chalreadyinbq Der aktuelle Kanal ist bereits im selektierten Bouquet....\n extra.clear_log Logdatei löschen @@ -1152,6 +1154,8 @@ settings.missingoptionsconffile Die Neutrino-Einstellungen wurden erweitert.\nDi settings.noconffile Die Neutrino-Einstellungen wurden nicht\ngefunden. Es werden Standardwerte benutzt. settings.pos_bottom_left unten links settings.pos_bottom_right unten rechts +settings.pos_default_center unten Mitte +settings.pos_higher_center erhöht Mitte settings.pos_top_left oben links settings.pos_top_right oben rechts shutdown.recoding_query Aufnahme läuft. Trotzdem beenden? diff --git a/data/locale/english.locale b/data/locale/english.locale index 3579b5558..59ff10eb5 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -748,6 +748,8 @@ settings.missingoptionsconffile The neutrino-settings have been updated.\nNew Op settings.noconffile No neutrino-settings found.\nUsing defaults. settings.pos_bottom_left bottom left settings.pos_bottom_right bottom right +settings.pos_default_center bottom center +settings.pos_higher_center higher center settings.pos_top_left oben top left settings.pos_top_right oben top right shutdowntimer.announce Box will shutdown in 1 min.\nCancel Sutdown ? @@ -1050,6 +1052,8 @@ imageinfo.image Image: imageinfo.license License: imageinfo.version Version: extra.cache_txt Cache teletext +extra.scrambled_message Scrambled Message +extra.volume_pos Volumebar extra.use_gotoxx Use gotoXX extra.latitude Latitude extra.longitude Longitude diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ecd181e33..cba6cd74b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -793,7 +793,8 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); g_settings.casystem_display = configfile.getBool("casystem_display", false ); - + g_settings.scrambled_message = configfile.getBool("scrambled_message", true ); + g_settings.volume_pos = configfile.getInt32("volume_pos", 0 ); //audio g_settings.audio_AnalogMode = configfile.getInt32( "audio_AnalogMode", 0 ); g_settings.audio_DolbyDigital = configfile.getBool("audio_DolbyDigital" , false); @@ -1301,6 +1302,8 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("progressbar_color" , g_settings.progressbar_color ); configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); configfile.setBool("casystem_display" , g_settings.casystem_display ); + configfile.setBool("scrambled_message" , g_settings.scrambled_message ); + configfile.setInt32("volume_pos" , g_settings.volume_pos ); //audio configfile.setInt32( "audio_AnalogMode", g_settings.audio_AnalogMode ); @@ -2947,7 +2950,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data) return messages_return::handled; } else if(data == scrambled_timer) { scrambled_timer = 0; - if(videoDecoder->getBlank() && videoDecoder->getPlayState()) { + if(g_settings.scrambled_message && videoDecoder->getBlank() && videoDecoder->getPlayState()) { const char * text = g_Locale->getText(LOCALE_SCRAMBLED_CHANNEL); ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, 5); } diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index aeac89b99..97c526bbb 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -1465,6 +1465,17 @@ const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCAL { 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 } }; +#define VOLUMEBAR_DISP_POS_OPTIONS_COUNT 6 +const CMenuOptionChooser::keyval VOLUMEBAR_DISP_POS_OPTIONS[VOLUMEBAR_DISP_POS_OPTIONS_COUNT]= +{ + { 0 , LOCALE_SETTINGS_POS_TOP_RIGHT }, + { 1 , LOCALE_SETTINGS_POS_TOP_LEFT }, + { 2 , LOCALE_SETTINGS_POS_BOTTOM_LEFT }, + { 3 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT }, + { 4 , LOCALE_SETTINGS_POS_DEFAULT_CENTER }, + { 5 , LOCALE_SETTINGS_POS_HIGHER_CENTER } +}; + void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings) { dprintf(DEBUG_DEBUG, "init miscsettings\n"); @@ -1492,8 +1503,8 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings) //miscSettings.addItem(new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 0, 14, funNotifier, 0, 0, LOCALE_OPTIONS_OFF) ); // miscSettings.addItem(GenericMenuSeparatorLine); 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); - + funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); +// miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true)); miscSettings.addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_GENERAL, true, NULL, miscSettingsGeneral, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED) ); //channellist diff --git a/src/system/locals.h b/src/system/locals.h index a0cbe4c1e..4cbdee559 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -984,6 +984,8 @@ typedef enum { LOCALE_SETTINGS_NOCONFFILE, LOCALE_SETTINGS_POS_BOTTOM_LEFT, LOCALE_SETTINGS_POS_BOTTOM_RIGHT, + LOCALE_SETTINGS_POS_DEFAULT_CENTER, + LOCALE_SETTINGS_POS_HIGHER_CENTER, LOCALE_SETTINGS_POS_TOP_LEFT, LOCALE_SETTINGS_POS_TOP_RIGHT, LOCALE_SHUTDOWNTIMER_ANNOUNCE, @@ -1308,6 +1310,8 @@ typedef enum { LOCALE_IMAGEINFO_VERSION, LOCALE_INETRADIO_NAME, LOCALE_EXTRA_CACHE_TXT, + LOCALE_EXTRA_SCRAMBLED_MESSAGE, + LOCALE_EXTRA_VOLUME_POS, LOCALE_EXTRA_USE_GOTOXX, LOCALE_EXTRA_LAT, LOCALE_EXTRA_LONG, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index b7c840660..2e3badddf 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -984,6 +984,8 @@ const char *locale_real_names[] = { "settings.noconffile", "settings.pos_bottom_left", "settings.pos_bottom_right", + "settings.pos_default_center", + "settings.pos_higher_center", "settings.pos_top_left", "settings.pos_top_right", "shutdowntimer.announce", @@ -1308,6 +1310,8 @@ const char *locale_real_names[] = { "imageinfo.version", "inetradio.name", "extra.cache_txt", + "extra.scrambled_message", + "extra.volume_pos", "extra.use_gotoxx", "extra.latitude", "extra.longitude", diff --git a/src/system/settings.h b/src/system/settings.h index 7997d8eac..07fd85ed8 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -65,6 +65,8 @@ struct SNeutrinoSettings int infobar_show_channellogo; int progressbar_color; int casystem_display; + int scrambled_message; + int volume_pos; //audio int audio_AnalogMode;