- drop easymenu

This commit is contained in:
vanhofen
2017-09-12 23:42:52 +02:00
committed by Jacek Jendrzej
parent 6576729fd1
commit 816de89898
25 changed files with 338 additions and 653 deletions

View File

@@ -158,20 +158,19 @@ int CAudioSetup::showAudioSetup()
CMenuOptionChooser * as_oj_avsync = NULL;
CMenuOptionNumberChooser * as_oj_vsteps = NULL;
CMenuOptionNumberChooser * st = NULL;
if (!g_settings.easymenu) {
//av synch
as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier);
as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC);
//volume steps
as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL);
as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP);
//av synch
as_oj_avsync = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVSYNC, &g_settings.avsync, AUDIOMENU_AVSYNC_OPTIONS, AUDIOMENU_AVSYNC_OPTION_COUNT, true, audioSetupNotifier);
as_oj_avsync->setHint("", LOCALE_MENU_HINT_AUDIO_AVSYNC);
st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF);
st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART);
//clock rec
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
}
//volume steps
as_oj_vsteps = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_STEP, (int *)&g_settings.current_volume_step, true, 1, 25, NULL);
as_oj_vsteps->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTEP);
st = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_START, &g_settings.start_volume, true, -1, 100, NULL, CRCInput::RC_nokey, NULL, 0, -1, LOCALE_OPTIONS_OFF);
st->setHint("", LOCALE_MENU_HINT_AUDIO_VOLSTART);
//clock rec
//CMenuOptionChooser * as_oj_clockrec new CMenuOptionChooser(LOCALE_AUDIOMENU_CLOCKREC, &g_settings.clockrec, AUDIOMENU_CLOCKREC_OPTIONS, AUDIOMENU_CLOCKREC_OPTION_COUNT, true, audioSetupNotifier);
//SRS
//SRS algo
@@ -194,20 +193,20 @@ int CAudioSetup::showAudioSetup()
// ac3,pcm and clear volume adjustment
CMenuOptionNumberChooser *adj_ac3 = NULL, *adj_pcm = NULL;
CMenuForwarder *adj_clear = NULL;
if (!g_settings.easymenu) {
adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3,
(int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier);
adj_ac3->setNumberFormat("%d%%");
adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3);
adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM,
(int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier);
adj_pcm->setNumberFormat("%d%%");
adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM);
adj_ac3 = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_AC3,
(int *)&g_settings.audio_volume_percent_ac3, true, 0, 100, audioSetupNotifier);
adj_ac3->setNumberFormat("%d%%");
adj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3);
adj_pcm = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_PCM,
(int *)&g_settings.audio_volume_percent_pcm, true, 0, 100, audioSetupNotifier);
adj_pcm->setNumberFormat("%d%%");
adj_pcm->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_PCM);
adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map");
adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR);
adj_clear = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT_CLEAR, true, NULL, this, "clear_vol_map");
adj_clear->setHint("", LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR);
}
//paint items
audioSettings->addIntroItems(LOCALE_MAINSETTINGS_AUDIO);
//---------------------------------------------------------
@@ -218,13 +217,11 @@ int CAudioSetup::showAudioSetup()
audioSettings->addItem(as_oj_dd_spdif);
audioSettings->addItem(as_oj_ddsubchn);
//---------------------------------------------------------
if (!g_settings.easymenu) {
audioSettings->addItem(GenericMenuSeparatorLine);
audioSettings->addItem(as_oj_avsync);
audioSettings->addItem(as_oj_vsteps);
audioSettings->addItem(st);
//audioSettings->addItem(as_clockrec);
}
audioSettings->addItem(GenericMenuSeparatorLine);
audioSettings->addItem(as_oj_avsync);
audioSettings->addItem(as_oj_vsteps);
audioSettings->addItem(st);
//audioSettings->addItem(as_clockrec);
//---------------------------------------------------------
audioSettings->addItem(GenericMenuSeparatorLine);
audioSettings->addItem(as_oj_srsonoff);
@@ -236,12 +233,10 @@ int CAudioSetup::showAudioSetup()
#if 0
audioSettings->addItem(mf);
#endif
if (!g_settings.easymenu) {
audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT));
audioSettings->addItem(adj_ac3);
audioSettings->addItem(adj_pcm);
audioSettings->addItem(adj_clear);
}
audioSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_VOLUME_ADJUSTMENT));
audioSettings->addItem(adj_ac3);
audioSettings->addItem(adj_pcm);
audioSettings->addItem(adj_clear);
int res = audioSettings->exec(NULL, "");
selected = audioSettings->getSelected();
@@ -249,8 +244,7 @@ int CAudioSetup::showAudioSetup()
#ifdef BOXMODEL_CS_HD2
delete as_oj_noise;
#endif
if (!g_settings.easymenu)
CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm);
CZapit::getInstance()->SetVolumePercent(g_settings.audio_volume_percent_ac3, g_settings.audio_volume_percent_pcm);
return res;
}