- neutrino: mute icon at volume 0 (thx bazi98!)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1620 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
striper
2011-08-12 08:25:08 +00:00
parent 0656ab25da
commit f579bd73f3
6 changed files with 16 additions and 1 deletions

View File

@@ -393,6 +393,7 @@ extra.scan_fast Schnell
extra.scan_full Total extra.scan_full Total
extra.scan_mode Scan-Modus extra.scan_mode Scan-Modus
extra.scrambled_message Verschlüsselung melden extra.scrambled_message Verschlüsselung melden
extra.show_mute_icon Mute-Icon bei Lautstärke 0
extra.sms_channel SMS-Modus Kanal extra.sms_channel SMS-Modus Kanal
extra.south Süden extra.south Süden
extra.spts_mode SPTS-Modus extra.spts_mode SPTS-Modus

View File

@@ -393,6 +393,7 @@ extra.scan_fast Fast
extra.scan_full Full extra.scan_full Full
extra.scan_mode Scan mode extra.scan_mode Scan mode
extra.scrambled_message Scrambled Message extra.scrambled_message Scrambled Message
extra.show_mute_icon mute-icon at volume 0
extra.sms_channel sms-mode channel extra.sms_channel sms-mode channel
extra.south South extra.south South
extra.spts_mode SPTS mode extra.spts_mode SPTS mode

View File

@@ -313,6 +313,7 @@ void COsdSetup::showOsdSetup()
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SCRAMBLED_MESSAGE, &g_settings.scrambled_message, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_POS, &g_settings.volume_pos, VOLUMEBAR_DISP_POS_OPTIONS, VOLUMEBAR_DISP_POS_OPTIONS_COUNT, true));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SHOW_MUTE_ICON, &g_settings.show_mute_icon, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true )); osd_menu->addItem(new CMenuOptionChooser(LOCALE_COLORMENU_FADE, &g_settings.widget_fade, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ));
osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); osd_menu->addItem(new CMenuOptionChooser(LOCALE_EXTRA_BIGWINDOWS, &g_settings.big_windows, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));

View File

@@ -453,6 +453,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.menu_pos = configfile.getInt32("menu_pos", 0 ); g_settings.menu_pos = configfile.getInt32("menu_pos", 0 );
g_settings.infobar_show_var_hdd = configfile.getBool("infobar_show_var_hdd" , true ); g_settings.infobar_show_var_hdd = configfile.getBool("infobar_show_var_hdd" , true );
g_settings.show_infomenu = configfile.getInt32("show_infomenu", 0 ); g_settings.show_infomenu = configfile.getInt32("show_infomenu", 0 );
g_settings.show_mute_icon = configfile.getInt32("show_mute_icon" ,0);
g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 ); g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 );
g_settings.radiotext_enable = configfile.getBool("radiotext_enable" , false); g_settings.radiotext_enable = configfile.getBool("radiotext_enable" , false);
//audio //audio
@@ -1009,6 +1010,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32("menu_pos" , g_settings.menu_pos); configfile.setInt32("menu_pos" , g_settings.menu_pos);
configfile.setInt32("infobar_show_var_hdd" , g_settings.infobar_show_var_hdd ); configfile.setInt32("infobar_show_var_hdd" , g_settings.infobar_show_var_hdd );
configfile.setInt32("show_infomenu" , g_settings.show_infomenu ); configfile.setInt32("show_infomenu" , g_settings.show_infomenu );
configfile.setInt32("show_mute_icon" , g_settings.show_mute_icon);
configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res ); configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res );
configfile.setBool("radiotext_enable" , g_settings.radiotext_enable); configfile.setBool("radiotext_enable" , g_settings.radiotext_enable);
//audio //audio
@@ -3281,6 +3283,8 @@ void CNeutrinoApp::saveEpg()
void CNeutrinoApp::AudioMute( int newValue, bool isEvent ) void CNeutrinoApp::AudioMute( int newValue, bool isEvent )
{ {
if((g_settings.current_volume == 0) && (g_settings.show_mute_icon == 1))
return;
//printf("MUTE: val %d current %d event %d\n", newValue, current_muted, isEvent); //printf("MUTE: val %d current %d event %d\n", newValue, current_muted, isEvent);
int dx = 0; int dx = 0;
int dy = 0; int dy = 0;
@@ -3399,7 +3403,13 @@ printf("CNeutrinoApp::setVolume dx %d dy %d\n", dx, dy);
else if (msg == CRCInput::RC_minus || msg == CRCInput::RC_left) { //FIXME else if (msg == CRCInput::RC_minus || msg == CRCInput::RC_left) { //FIXME
if (g_settings.current_volume > g_settings.current_volume_step) if (g_settings.current_volume > g_settings.current_volume_step)
g_settings.current_volume -= g_settings.current_volume_step; g_settings.current_volume -= g_settings.current_volume_step;
else else if ((g_settings.show_mute_icon == 1) && (g_settings.current_volume = 1))
{
(g_settings.current_volume = 1);
AudioMute( true, true);
g_settings.current_volume = 0;
}
else if (g_settings.show_mute_icon == 0)
g_settings.current_volume = 0; g_settings.current_volume = 0;
} }
else { else {

View File

@@ -420,6 +420,7 @@ typedef enum
LOCALE_EXTRA_SCAN_FULL, LOCALE_EXTRA_SCAN_FULL,
LOCALE_EXTRA_SCAN_MODE, LOCALE_EXTRA_SCAN_MODE,
LOCALE_EXTRA_SCRAMBLED_MESSAGE, LOCALE_EXTRA_SCRAMBLED_MESSAGE,
LOCALE_EXTRA_SHOW_MUTE_ICON,
LOCALE_EXTRA_SMS_CHANNEL, LOCALE_EXTRA_SMS_CHANNEL,
LOCALE_EXTRA_SOUTH, LOCALE_EXTRA_SOUTH,
LOCALE_EXTRA_SPTS_MODE, LOCALE_EXTRA_SPTS_MODE,

View File

@@ -72,6 +72,7 @@ struct SNeutrinoSettings
int casystem_display; int casystem_display;
int scrambled_message; int scrambled_message;
int volume_pos; int volume_pos;
int show_mute_icon;
int menu_pos; int menu_pos;
int infobar_show_var_hdd; int infobar_show_var_hdd;
int infobar_show_res; int infobar_show_res;