*neutrino audio_setup: optional wizard mode functionality added

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@981 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2010-12-30 22:43:57 +00:00
parent a38863e28e
commit 080d122f92
2 changed files with 25 additions and 4 deletions

View File

@@ -48,10 +48,12 @@
extern CAudioSetupNotifier * audioSetupNotifier;
CAudioSetup::CAudioSetup()
CAudioSetup::CAudioSetup(bool wizard_mode)
{
frameBuffer = CFrameBuffer::getInstance();
is_wizard = wizard_mode;
width = w_max (40, 10);
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
@@ -123,6 +125,7 @@ void CAudioSetup::showAudioSetup()
//menue init
CMenuWidget* audioSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width);
audioSettings->setSelected(selected);
audioSettings->setWizardMode(is_wizard);
//analog modes (stereo, mono l/r...)
CMenuOptionChooser * as_oj_analogmode = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOG_MODE, &g_settings.audio_AnalogMode, AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, true, audioSetupNotifier);
@@ -195,3 +198,10 @@ void CAudioSetup::showAudioSetup()
delete audioSettings;
}
//sets menu mode to "wizard" or "default"
void CAudioSetup::setWizardMode(bool mode)
{
printf("[neutrino audio setup] %s set audio settings menu to mode %d...\n", __FUNCTION__, mode);
is_wizard = mode;
}

View File

@@ -42,15 +42,26 @@ class CAudioSetup : public CMenuTarget
private:
CFrameBuffer *frameBuffer;
int x, y, width, height, menue_width, hheight, mheight, selected;
int x, y, width, height, hheight, mheight, selected;
void hide();
void showAudioSetup();
bool is_wizard;
public:
CAudioSetup();
enum AUDIO_SETUP_MODE
{
AUDIO_SETUP_MODE_WIZARD_NO = 0,
AUDIO_SETUP_MODE_WIZARD = 1
};
CAudioSetup(bool wizard_mode = AUDIO_SETUP_MODE_WIZARD_NO);
~CAudioSetup();
bool getWizardMode() {return is_wizard;};
void setWizardMode(bool mode);
int exec(CMenuTarget* parent, const std::string & actionKey);
};