Example #1
0
/* OSD timeouts */
int COsdSetup::showOsdTimeoutSetup()
{
	/* note: SetupTiming() is already called in CNeutrinoApp::run */

	// dynamic created objects
	std::vector<CMenuTarget*> toDelete;

	CMenuWidget * ots = new CMenuWidget(menue_title, menue_icon, width);

	ots->addIntroItems(LOCALE_TIMING_HEAD);

	for (int i = 0; i < TIMING_SETTING_COUNT; i++)
	{
		CStringInput * colorSettings_timing_item = new CStringInput(timing_setting[i].name, g_settings.timing_string[i], 3, LOCALE_TIMING_HINT_1, LOCALE_TIMING_HINT_2, "0123456789 ", this);
		toDelete.push_back(colorSettings_timing_item);
		ots->addItem(new CMenuForwarder(timing_setting[i].name, true, g_settings.timing_string[i], colorSettings_timing_item));
	}

	ots->addItem(GenericMenuSeparatorLine);
	CMenuForwarder * ots_defaults_fw = new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "osd.def");
	ots_defaults_fw->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
	ots->addItem(ots_defaults_fw);

	int res = ots->exec(NULL, "");
	delete ots;

	// delete dynamic created objects
	unsigned int toDeleteSize = toDelete.size();
	for (unsigned int i = 0; i < toDeleteSize; i++)
		delete toDelete[i];
	toDelete.clear();

	return res;
}
//show international settings menu
int COsdLangSetup::showLocalSetup()
{
	//main local setup
	CMenuWidget *localSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP);
	localSettings->setWizardMode(is_wizard);
	
	//add subhead and back button
	localSettings->addIntroItems(LOCALE_LANGUAGESETUP_HEAD);
	
	//language setup
	CMenuWidget * osdl_setup = new CMenuWidget(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_LOCALE);
	showLanguageSetup(osdl_setup);
	localSettings->addItem(new CMenuForwarder(LOCALE_LANGUAGESETUP_OSD, true, NULL, osdl_setup, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
	
 	//timezone setup
	CMenuOptionStringChooser* tzSelect = getTzItems();
	if (tzSelect != NULL)
		localSettings->addItem(tzSelect);
	
	//prefered audio language
	CLangSelectNotifier *langNotifier = new CLangSelectNotifier();
	CMenuWidget * prefMenu = new CMenuWidget(LOCALE_AUDIOMENU_PREF_LANGUAGES, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_PREFAUDIO_LANGUAGE);
	//call menue for prefered audio languages
	showPrefMenu(prefMenu, langNotifier);
	localSettings->addItem(new CMenuForwarder(LOCALE_AUDIOMENU_PREF_LANGUAGES, true, NULL, prefMenu, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
	langNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
	
	int res = localSettings->exec(NULL, "");
	localSettings->hide();
	delete localSettings;
	return res;
}
Example #3
0
//show menue colorsetup
int COsdSetup::showOsdMenueColorSetup()
{
	CMenuWidget * ocs = new CMenuWidget(menue_title, menue_icon, width);

	CColorChooser chHeadcolor(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, &g_settings.menu_Head_red, &g_settings.menu_Head_green, &g_settings.menu_Head_blue,  &g_settings.menu_Head_alpha, colorSetupNotifier);
	CColorChooser chHeadTextcolor(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR_HEAD, &g_settings.menu_Head_Text_red, &g_settings.menu_Head_Text_green, &g_settings.menu_Head_Text_blue, NULL, colorSetupNotifier);
	CColorChooser chContentcolor(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, &g_settings.menu_Content_red, &g_settings.menu_Content_green, &g_settings.menu_Content_blue,&g_settings.menu_Content_alpha, colorSetupNotifier);
	CColorChooser chContentTextcolor(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR_HEAD, &g_settings.menu_Content_Text_red, &g_settings.menu_Content_Text_green, &g_settings.menu_Content_Text_blue, NULL, colorSetupNotifier);
	CColorChooser chContentSelectedcolor(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, &g_settings.menu_Content_Selected_red, &g_settings.menu_Content_Selected_green, &g_settings.menu_Content_Selected_blue,&g_settings.menu_Content_Selected_alpha, colorSetupNotifier);
	CColorChooser chContentSelectedTextcolor(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR_HEAD, &g_settings.menu_Content_Selected_Text_red, &g_settings.menu_Content_Selected_Text_green, &g_settings.menu_Content_Selected_Text_blue,NULL, colorSetupNotifier);
	CColorChooser chContentInactivecolor(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, &g_settings.menu_Content_inactive_red, &g_settings.menu_Content_inactive_green, &g_settings.menu_Content_inactive_blue, &g_settings.menu_Content_inactive_alpha, colorSetupNotifier);
	CColorChooser chContentInactiveTextcolor(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR_HEAD, &g_settings.menu_Content_inactive_Text_red, &g_settings.menu_Content_inactive_Text_green, &g_settings.menu_Content_inactive_Text_blue,NULL, colorSetupNotifier);

	ocs->addIntroItems(LOCALE_OSDSETTINGS_COLORMENU_MENUCOLORS, LOCALE_COLORMENUSETUP_MENUHEAD);
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND, true, NULL, &chHeadcolor));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR, true, NULL, &chHeadTextcolor));
	ocs->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND, true, NULL, &chContentcolor));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR, true, NULL, &chContentTextcolor));
	ocs->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_INACTIVE));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND, true, NULL, &chContentInactivecolor));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR, true, NULL, &chContentInactiveTextcolor));
	ocs->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND, true, NULL, &chContentSelectedcolor));
	ocs->addItem(new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR, true, NULL, &chContentSelectedTextcolor));

	int res = ocs->exec(NULL, "");
	delete ocs;

	return res;
}
int CUserMenuSetup::showSetup()
{
	CMenuWidget * ums = new CMenuWidget(LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PROTECTING, width);
	ums->setPreselected(selected);

	CStringInputSMS name(LOCALE_USERMENU_NAME, &g_settings.usermenu_text[button], 11, true, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF/- ");
	CMenuForwarder *mf = new CMenuForwarder(LOCALE_USERMENU_NAME, true, g_settings.usermenu_text[button], &name);

	//-------------------------------------
	ums->addIntroItems(local);
	//-------------------------------------
	ums->addItem(mf);
	ums->addItem(GenericMenuSeparatorLine);
	//-------------------------------------
	char text[10];
	for(int item = 0; item < SNeutrinoSettings::ITEM_MAX && item <13; item++) // Do not show more than 13 items
	{
		snprintf(text,10,"%d:",item+1);
		text[9]=0;// terminate for sure
		ums->addItem( new CMenuOptionChooser(text, &g_settings.usermenu[button][item], USERMENU_ITEM_OPTIONS, USERMENU_ITEM_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true ));
	}

	int res = ums->exec(NULL, "");
	selected = ums->getSelected();
	delete ums;

	return res;
}
Example #5
0
int CSoftwareUpdate::showSoftwareUpdateExpert()
/* shows experts-functions to read/write to the mtd */
{
	CFlashExpert* fe = new CFlashExpert();

	CMenuWidget* mtdexpert = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE);
	mtdexpert->addIntroItems(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS);
	
	mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASH, true, NULL, fe, "readflash", CRCInput::RC_red));
	mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASH, true, NULL, fe, "writeflash", CRCInput::RC_green));

	mtdexpert->addItem(GenericMenuSeparatorLine);

	mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD, true, NULL, fe, "readflashmtd", CRCInput::RC_yellow));
	mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_blue));

#ifndef DISABLE_INTERNET_UPDATE
	mtdexpert->addItem(GenericMenuSeparatorLine);
	CStringInputSMS softUpdate_url_file(LOCALE_FLASHUPDATE_URL_FILE, &g_settings.softupdate_url_file, 30, false, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""$%&/()=?-. ");
	mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_URL_FILE, true, g_settings.softupdate_url_file, &softUpdate_url_file));
#endif /*DISABLE_INTERNET_UPDATE*/

	int res = mtdexpert->exec (NULL, "");
	delete mtdexpert;

	delete fe;

	return res;
}
Example #6
0
//channellist
int COsdSetup::showOsdChannelListSetup()
{
	CMenuWidget * ocls = new CMenuWidget(menue_title, menue_icon, width);

	// channellist additional
	CMenuOptionChooser *ocls_additional	= new CMenuOptionChooser(LOCALE_CHANNELLIST_ADDITIONAL, &g_settings.channellist_additional, CHANNELLIST_ADDITIONAL_OPTIONS, CHANNELLIST_ADDITIONAL_OPTION_COUNT, true);
	// epg align
	CMenuOptionChooser *ocls_align_ch 	= new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true);
	// extended channel list
	CMenuOptionChooser *ocls_ext_ch 	= new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	// foot
	CMenuOptionChooser *ocls_foot		= new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true);


	//show items
	ocls->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST);
	//-------------------------------------------------
	ocls->addItem(ocls_additional);
	ocls->addItem(ocls_align_ch);
	ocls->addItem(ocls_ext_ch);
	ocls->addItem(ocls_foot);

	int res = ocls->exec(NULL, "");
	delete ocls;

	return res;
}
int CCECSetup::showMenu()
{
	//menue init
	CMenuWidget *cec = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_CEC);
	cec->addIntroItems(LOCALE_VIDEOMENU_HDMI_CEC);

	//cec
#if HAVE_SPARK_HARDWARE
	CKernelOptions ko;
	g_settings.hdmi_cec_mode = ko.isEnabled("cec");
	CMenuOptionChooser *cec_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_MODE, &g_settings.hdmi_cec_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
	cec1 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_STANDBY, &g_settings.hdmi_cec_standby, VIDEOMENU_HDMI_CEC_STANDBY_OPTIONS, VIDEOMENU_HDMI_CEC_STANDBY_OPTION_COUNT, g_settings.hdmi_cec_mode != 0, this);
	cec2 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_BROADCAST, &g_settings.hdmi_cec_broadcast, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this);
#else
	CMenuOptionChooser *cec_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_MODE, &g_settings.hdmi_cec_mode, VIDEOMENU_HDMI_CEC_MODE_OPTIONS, VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT, true, this);
	cec_ch->setHint("", LOCALE_MENU_HINT_CEC_MODE);
	cec1 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_VIEW_ON, &g_settings.hdmi_cec_view_on, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this);
	cec1->setHint("", LOCALE_MENU_HINT_CEC_VIEW_ON);
	cec2 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_STANDBY, &g_settings.hdmi_cec_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this);
	cec2->setHint("", LOCALE_MENU_HINT_CEC_STANDBY);
#endif

	cec->addItem(cec_ch);
#if !HAVE_SPARK_HARDWARE
	cec->addItem(GenericMenuSeparatorLine);
#endif
	//-------------------------------------------------------
	cec->addItem(cec1);
	cec->addItem(cec2);

	int res = cec->exec(NULL, "");
	delete cec;

	return res;
}
Example #8
0
/* audio settings menu */
int CAudioSetup::showAudioSetup()
{
	CAudioSetupNotifier audioSetupNotifier;

	//menue init
	CMenuWidget* audioSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_AUDIO, width);
	audioSettings->setPreselected(selected);

	// intros
	audioSettings->addIntroItems(LOCALE_MAINSETTINGS_AUDIO);

	CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_ANALOGOUT, &g_settings.audio_AnalogMode, AUDIOMENU_ANALOGOUT_OPTIONS, AUDIOMENU_ANALOGOUT_OPTION_COUNT, true, &audioSetupNotifier);
	audioSettings->addItem( oj );

	oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUDIO_LEFT_RIGHT_SELECTABLE, &g_settings.audio_left_right_selectable, AUDIOMENU_LEFT_RIGHT_SELECTABEL_OPTIONS, AUDIOMENU_LEFT_RIGHT_SELECTABLE_OPTION_COUNT, true);
	audioSettings->addItem( oj );

	audioSettings->addItem(GenericMenuSeparatorLine);

	oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE, &g_settings.audiochannel_up_down_enable, AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE_OPTIONS, AUDIOMENU_AUDIOCHANNEL_UP_DOWN_ENABLE_COUNT, true);
	audioSettings->addItem( oj );

	oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	audioSettings->addItem(oj);
	
	audioSettings->addItem(GenericMenuSeparatorLine);

#ifdef HAVE_DBOX_HARDWARE
	CMenuOptionNumberChooser *mf = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_PCMOFFSET, &g_settings.audio_PCMOffset, (g_settings.audio_avs_Control == CControld::TYPE_LIRC), 0, 99, 0, 0, NONEXISTANT_LOCALE, NULL, &audioSetupNotifier, CRCInput::RC_nokey, "", true);
	CAudioSetupNotifier2 audioSetupNotifier2(mf);

	oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVS_CONTROL, &g_settings.audio_avs_Control, AUDIOMENU_AVS_CONTROL_OPTIONS, AUDIOMENU_AVS_CONTROL_OPTION_COUNT, true, &audioSetupNotifier2);
	audioSettings->addItem(oj);
	audioSettings->addItem(mf);
#endif
#ifdef HAVE_TRIPLEDRAGON
	CAudioSetupNotifier2 audioSetupNotifier2(NULL);
	oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVS_CONTROL, &g_settings.audio_avs_Control, AUDIOMENU_AVS_CONTROL_OPTIONS, AUDIOMENU_AVS_CONTROL_OPTION_COUNT, true, &audioSetupNotifier2);
	audioSettings->addItem(oj);
#endif
	
	// volume bar steps
	CMenuOptionNumberChooser *as = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUMEBAR_AUDIOSTEPS, &g_settings.audio_step, true, 0, 25, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true);
	audioSettings->addItem(as);

	// initial volume
	CMenuOptionNumberChooser *iv = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_INITIAL_VOLUME, &g_settings.audio_initial_volume, true, 0, 100, 0, 0, LOCALE_AUDIOMENU_INITIAL_VOLUME_RESTORE, NULL, NULL, CRCInput::RC_nokey, "", true);
	iv->setNumberFormat("%d%%");
	audioSettings->addItem(iv);

	int res = audioSettings->exec(NULL, "");
	selected = audioSettings->getSelected();
	delete audioSettings;

	return res;
}
Example #9
0
int CVideoSetup::showVideoSetup()
{
	//init
	CMenuWidget * videosetup = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_VIDEO, width);
	videosetup->setPreselected(selected);

	//video signal type
	CMenuOptionChooser * scart = new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOSIGNAL, &video_out_signal, VIDEOMENU_VIDEOSIGNAL_OPTIONS, VIDEOMENU_VIDEOSIGNAL_OPTION_COUNT, true, this);

	//intros
	videosetup->addIntroItems(LOCALE_VIDEOMENU_HEAD, LOCALE_VIDEOMENU_TV_SCART);

	videosetup->addItem(scart); 	//video signal type
	
	//video format
	CMenuOptionChooser * oj1 = new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOFORMAT, &g_settings.video_Format, VIDEOMENU_VIDEOFORMAT_OPTIONS, VIDEOMENU_VIDEOFORMAT_OPTION_COUNT, true, this);
	//video format background
	CMenuOptionChooser * oj2 = new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOFORMAT_BG, &g_settings.video_backgroundFormat, VIDEOMENU_VIDEOFORMAT_OPTIONS, VIDEOMENU_VIDEOFORMAT_OPTION_COUNT-1, true, this);

#ifdef HAVE_DBOX_HARDWARE
	//rgb centering
	CRGBCSyncControler * RGBCSyncControler = new CRGBCSyncControler(LOCALE_VIDEOMENU_RGB_CENTERING, &g_settings.video_csync);
	bool sc_active = ((video_out_signal == CControldClient::VIDEOOUTPUT_RGB) || (video_out_signal == CControldClient::VIDEOOUTPUT_YUV_VBS) || (video_out_signal ==  CControldClient::VIDEOOUTPUT_YUV_CVBS));
	SyncControlerForwarder = new CMenuForwarder(LOCALE_VIDEOMENU_RGB_CENTERING, sc_active, NULL, RGBCSyncControler, NULL, CRCInput::RC_red);
#endif

	videosetup->addItem(oj1);	//video format
	videosetup->addItem(oj2);	//video format background
#ifdef HAVE_DBOX_HARDWARE
	/* only the dbox can change the RGB centering */
	videosetup->addItem(SyncControlerForwarder);	//rgb centering
#endif
	videosetup->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_VIDEOMENU_VCR_SCART));

	// Switching VCR Output presently does not work on the Philips and on non-dboxes
	if (g_info.box_Type == CControld::TUXBOX_MAKER_SAGEM || g_info.box_Type == CControld::TUXBOX_MAKER_NOKIA)
	{
		bool vo_active = ((video_out_signal == CControldClient::VIDEOOUTPUT_COMPOSITE) || (video_out_signal == CControldClient::VIDEOOUTPUT_SVIDEO));
		VcrVideoOutSignalOptionChooser = new CMenuOptionChooser(LOCALE_VIDEOMENU_VCRSIGNAL, &vcr_video_out_signal, VIDEOMENU_VCRSIGNAL_OPTIONS, VIDEOMENU_VCRSIGNAL_OPTION_COUNT, vo_active, this);
		videosetup->addItem(VcrVideoOutSignalOptionChooser);
	}

	//video vcr switch
	videosetup->addItem(new CMenuOptionChooser(LOCALE_VIDEOMENU_VCRSWITCH, &g_settings.vcr_AutoSwitch, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); //video vcr switch

	int res = videosetup->exec(NULL, "");
	selected = videosetup->getSelected();
	delete videosetup;

#ifdef HAVE_DBOX_HARDWARE
	delete RGBCSyncControler;
#endif

	return res;
}
Example #10
0
int CRecordSetup::showRecordSetup()
{
	//menue init
	CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP);

	//apply settings
	recordingSettings->addIntroItems(LOCALE_MAINSETTINGS_RECORDING);
	recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_SETUPNOW, true, NULL, this, "recording", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
	recordingSettings->addItem(GenericMenuSeparatorLine);

	//record dir
	CMenuForwarder* fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, true, g_settings.network_nfs_recordingdir, this, "recordingdir");
	recordingSettings->addItem(fRecDir);
	CMenuOptionChooser* channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	recordingSettings->addItem(channel_rec_dir);

	//rec hours
	recordingSettings->addItem(new CMenuOptionNumberChooser(LOCALE_EXTRA_RECORD_TIME, &g_settings.record_hours, true, 1, 24, NULL) );

	// end of recording
	CMenuOptionChooser* end_of_recording = new CMenuOptionChooser(LOCALE_RECORDINGMENU_END_OF_RECORDING_NAME, &g_settings.recording_epg_for_end, END_OF_RECORDING, END_OF_RECORDING_COUNT, true);
	recordingSettings->addItem(end_of_recording);

	//template
	//CStringInput * recordingSettings_filenameTemplate = new CStringInput(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template[0], 21, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_IPSETUP_HINT_2, "%/-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ");
	//CMenuForwarder* mf11 = new CMenuForwarder(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, true, g_settings.recording_filename_template[0],recordingSettings_filenameTemplate);
	recordingSettings->addItem(GenericMenuSeparatorLine);

	//timeshift
	CMenuWidget* recordingTsSettings = new CMenuWidget(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMESHIFT);
	showRecordTimeShiftSetup(recordingTsSettings);
	recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, recordingTsSettings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));

	//timersettings
	CMenuWidget* recordingTimerSettings = new CMenuWidget(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMERSETTINGS);
	showRecordTimerSetup(recordingTimerSettings);
	recordingSettings->addItem(new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, recordingTimerSettings, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));

	//audiosettings
	CMenuWidget* recordingaAudioSettings = new CMenuWidget(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_AUDIOSETTINGS);
	showRecordAudioSetup(recordingaAudioSettings);
	recordingSettings->addItem(new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, recordingaAudioSettings, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));

#ifdef EVOLUX
	recordingSettings->addItem(GenericMenuSeparatorLine);
	recordingSettings->addItem(new CMenuOptionChooser(LOCALE_RECORDINGMENU_PMT_PID, &g_settings.recording_stream_pmt_pid, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
	recordingSettings->addItem(new CMenuOptionChooser(LOCALE_RECORDINGMENU_DVBSUB_PIDS, &g_settings.recording_stream_subtitle_pids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
	recordingSettings->addItem(new CMenuOptionChooser(LOCALE_RECORDINGMENU_VTXT_PID, &g_settings.recording_stream_vtxt_pid, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
#endif
	int res = recordingSettings->exec(NULL, "");
	recordingSettings->hide();
	delete recordingSettings;
	return res;
}
int CVfdSetup::showSetup()
{
	CMenuWidget *vfds = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP);
	vfds->addIntroItems(LOCALE_LCDMENU_HEAD);

	CMenuForwarder * mf;

	//led menu
	if (cs_get_revision() > 7) // not HD1 and BSE
	{
 		CMenuWidget * ledMenu = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP_LED_SETUP);
		showLedSetup(ledMenu);
		mf = new CMenuDForwarder(LOCALE_LEDCONTROLER_MENU, true, NULL, ledMenu, NULL, CRCInput::RC_red);
		mf->setHint("", LOCALE_MENU_HINT_POWER_LEDS);
		vfds->addItem(mf);
	}

	if (CVFD::getInstance()->has_lcd) {
		//vfd brightness menu
		mf = new CMenuForwarder(LOCALE_LCDMENU_LCDCONTROLER, vfd_enabled, NULL, this, "brightness", CRCInput::RC_green);
		mf->setHint("", LOCALE_MENU_HINT_VFD_BRIGHTNESS_SETUP);
		vfds->addItem(mf);

		if (cs_get_revision() == 9) // Tank only
		{
			//backlight menu
			CMenuWidget * blMenu = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP_BACKLIGHT);
			showBacklightSetup(blMenu);
			mf = new CMenuDForwarder(LOCALE_LEDCONTROLER_BACKLIGHT, true, NULL, blMenu, NULL, CRCInput::RC_yellow);
			mf->setHint("", LOCALE_MENU_HINT_BACKLIGHT);
			vfds->addItem(mf);
		}

		vfds->addItem(GenericMenuSeparatorLine);

		//status and info line options
		CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_LCDMENU_STATUSLINE, &g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME], LCDMENU_STATUSLINE_OPTIONS, LCDMENU_STATUSLINE_OPTION_COUNT, vfd_enabled);
		oj->setHint("", LOCALE_MENU_HINT_VFD_STATUSLINE);
		CMenuOptionChooser* lcd_clock_channelname_menu = new CMenuOptionChooser(LOCALE_LCD_INFO_LINE, &g_settings.lcd_info_line, LCD_INFO_OPTIONS, LCD_INFO_OPTION_COUNT, vfd_enabled);
		lcd_clock_channelname_menu->setHint("", LOCALE_MENU_HINT_VFD_INFOLINE);
		vfds->addItem(oj);
		vfds->addItem(lcd_clock_channelname_menu);

		oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled);
		oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL);
		vfds->addItem(oj);
	}

	int res = vfds->exec(NULL, "");

	delete vfds;
	return res;
}
Example #12
0
int CInfoMenu::showMenu()
{
	CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_INFOMENUE);

	info->addIntroItems();
	info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO,  true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false);
	info->addItem(new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, 	true, NULL, new CDBoxInfoWidget, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
	info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, 	true, NULL, new CStreamInfo2(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));

	int res = info->exec(NULL, "");
	info->hide();
	delete info;
	return res;
}
Example #13
0
//infobar settings
int COsdSetup::showOsdInfobarSetup()
{
	CMenuWidget * oibs = new CMenuWidget(menue_title, menue_icon, width);

	//prepare items
	CMenuOptionChooser *oibs_sat_display_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	CMenuOptionChooser *oibs_subchanpos_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true);
	CMenuOptionChooser *oibs_vzap_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_VIRTUAL_ZAP_MODE, &g_settings.virtual_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	CMenuOptionChooser *oibs_epgshow_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, INFOBAR_EPG_SHOW_OPTIONS, INFOBAR_EPG_SHOW_OPTIONS_COUNT, true);

#ifdef ENABLE_RADIOTEXT
	CMenuOptionChooser *oibs_radiotext_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT, &g_settings.radiotext_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
#endif
	CMenuSeparator     *oibs_chanlogo_sep 	= new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO);
	
	
	//channel logo
	bool activ_logo_opts = g_settings.infobar_show_channellogo != INFOBAR_NO_LOGO ? true : false; 
	CMenuForwarder 	   *oibs_chanlogo_fw 	= new CMenuForwarder(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_LOGODIR, activ_logo_opts, g_settings.infobar_channel_logodir, this, "channel_logodir");
	CMenuOptionChooser *oibs_chanlogo_bg_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_BACKGROUND, &g_settings.infobar_channellogo_background, INFOBAR_CHANNELLOGO_BACKGROUND_SHOW_OPTIONS, INFOBAR_CHANNELLOGO_BACKGROUND_SHOW_OPTIONS_COUNT, activ_logo_opts);

	COnOffNotifier channelLogoNotifier;
	channelLogoNotifier.addItem(oibs_chanlogo_fw);
	channelLogoNotifier.addItem(oibs_chanlogo_bg_ch);
	CMenuOptionChooser *oibs_chanlogo_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_SHOW, &g_settings.infobar_show_channellogo, INFOBAR_CHANNELLOGO_SHOW_OPTIONS, INFOBAR_CHANNELLOGO_SHOW_OPTIONS_COUNT, true, &channelLogoNotifier);
	


	//show items
	oibs->addIntroItems(LOCALE_OSDSETTINGS_INFOBAR);
	//-------------------------------------------------
	oibs->addItem(oibs_sat_display_ch);
	oibs->addItem(oibs_subchanpos_ch);
	oibs->addItem(oibs_vzap_ch);
	oibs->addItem(oibs_epgshow_ch);
#ifdef ENABLE_RADIOTEXT
	oibs->addItem(oibs_radiotext_ch);
#endif
	oibs->addItem(oibs_chanlogo_sep);
	//-------------------------------------------------	
	oibs->addItem(oibs_chanlogo_ch);
	oibs->addItem(oibs_chanlogo_fw);
	oibs->addItem(oibs_chanlogo_bg_ch);

	int res = oibs->exec(NULL, "");
	delete oibs;

	return res;
}
int CParentalSetup::showParentalSetup()
{
	//menue init
	CMenuWidget* plock = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_LOCK, width, MN_WIDGET_ID_PLOCKSETUP);

	//subhead
	plock->addItem( new CMenuSeparator(CMenuSeparator::ALIGN_LEFT | CMenuSeparator::SUB_HEAD | CMenuSeparator::STRING, LOCALE_PARENTALLOCK_PARENTALLOCK));

	// intros
	plock->addIntroItems();

	CMenuForwarder * mf;
	CPersonalizeGui &p = CNeutrinoApp::getInstance()->getPersonalizeGui();
	if (g_settings.easymenu) {
		mf = new CMenuForwarder(LOCALE_PARENTALLOCK_MENU, true, NULL, &p, NULL, CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED);
		mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_MENU);
		plock->addItem(mf);
	}

	CMenuOptionChooser * mc;
	if (g_settings.easymenu)
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
	else
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_PROMPT , &g_settings.parentallock_prompt , PARENTALLOCK_PROMPT_OPTIONS, PARENTALLOCK_PROMPT_OPTION_COUNT , !parentallocked);
	mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_PROMPT);
	plock->addItem(mc);

	if (g_settings.easymenu)
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
	else
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_LOCKAGE, &g_settings.parentallock_lockage, PARENTALLOCK_LOCKAGE_OPTIONS, PARENTALLOCK_LOCKAGE_OPTION_COUNT, !parentallocked);
	mc->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_LOCKAGE);
	plock->addItem(mc);

	if (g_settings.easymenu)
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
	else
		mc = new CMenuOptionChooser(LOCALE_PARENTALLOCK_BOUQUETMODE, &g_settings.parentallock_defaultlocked, PARENTALLOCK_DEFAULTLOCKED_OPTIONS, PARENTALLOCK_DEFAULTLOCKED_OPTION_COUNT, !parentallocked);
	plock->addItem(mc);

	CPINChangeWidget pinChangeWidget(LOCALE_PARENTALLOCK_CHANGEPIN, &g_settings.parentallock_pincode, 4, LOCALE_PARENTALLOCK_CHANGEPIN_HINT1);
	mf = new CMenuForwarder(LOCALE_PARENTALLOCK_CHANGEPIN, true, g_settings.parentallock_pincode, &pinChangeWidget);
	mf->setHint("", LOCALE_MENU_HINT_PARENTALLOCK_CHANGEPIN);
	plock->addItem(mf);

	int res = plock->exec(NULL, "");
	delete plock;
	return res;
}
int CZapitSetup::showMenu()
{
	//menue init
	CMenuWidget *zapit = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_ZAPIT);
	zapit->addIntroItems(LOCALE_ZAPITSETUP_INFO);
	COnOffNotifier* miscZapitNotifier = new COnOffNotifier(1);
	//zapit
	CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_ZAPITSETUP_LAST_USE, &g_settings.uselastchannel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, miscZapitNotifier, CRCInput::RC_red);
	mc->setHint("", LOCALE_MENU_HINT_LAST_USE);

	CSelectChannelWidget select;

	CMenuForwarder 	*zapit1 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_TV    , !g_settings.uselastchannel, g_settings.StartChannelTV, &select, "tv", CRCInput::RC_green);
	zapit1->setHint("", LOCALE_MENU_HINT_LAST_TV);

	CMenuForwarder 	*zapit2 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_RADIO , !g_settings.uselastchannel, g_settings.StartChannelRadio, &select, "radio", CRCInput::RC_yellow);
	zapit2->setHint("", LOCALE_MENU_HINT_LAST_RADIO);

	#define CHANNEL_LIST_MODE_OPTION_COUNT 5
	const CMenuOptionChooser::keyval CHANNEL_LIST_MODE_OPTIONS[CHANNEL_LIST_MODE_OPTION_COUNT] = {
		  { -1,			LOCALE_CHANNELLIST_REMEMBER	}
		, { LIST_MODE_FAV,	LOCALE_CHANNELLIST_FAVS		}
		, { LIST_MODE_PROV,	LOCALE_CHANNELLIST_PROVS	}
		, { LIST_MODE_SAT,	LOCALE_CHANNELLIST_SATS		}
		, { LIST_MODE_ALL,	LOCALE_CHANNELLIST_HEAD		}
	};

	CMenuOptionChooser *channel_mode = new CMenuOptionChooser(LOCALE_ZAPITSETUP_CHANNELMODE, &g_settings.channel_mode_initial, CHANNEL_LIST_MODE_OPTIONS, CHANNEL_LIST_MODE_OPTION_COUNT, true, NULL, CRCInput::RC_1, NULL, true);
	channel_mode->setHint("", LOCALE_MENU_HINT_CHANNELLIST_MODE);
	CMenuOptionChooser *channel_mode_radio = new CMenuOptionChooser(LOCALE_ZAPITSETUP_CHANNELMODE_RADIO, &g_settings.channel_mode_initial_radio, CHANNEL_LIST_MODE_OPTIONS, CHANNEL_LIST_MODE_OPTION_COUNT, true, NULL, CRCInput::RC_2, NULL, true);
	channel_mode_radio->setHint("", LOCALE_MENU_HINT_CHANNELLIST_MODE_RADIO);

	miscZapitNotifier->addItem(zapit1);
	miscZapitNotifier->addItem(zapit2);

	zapit->addItem(mc);
	zapit->addItem(GenericMenuSeparatorLine);
	zapit->addItem(zapit1);
	zapit->addItem(zapit2);
	zapit->addItem(GenericMenuSeparatorLine);
	zapit->addItem(channel_mode);
	zapit->addItem(channel_mode_radio);

	int res = zapit->exec(NULL, "");
	delete miscZapitNotifier;
	delete zapit;
	return res;
}
int CSelectChannelWidget::InitZapitChannelHelper(CZapitClient::channelsMode mode)
{
	std::vector<CMenuWidget *> toDelete;
	CMenuWidget mctv(LOCALE_TIMERLIST_BOUQUETSELECT, NEUTRINO_ICON_SETTINGS, width);
	mctv.addIntroItems();

	for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) {
		CMenuWidget* mwtv = new CMenuWidget(LOCALE_TIMERLIST_CHANNELSELECT, NEUTRINO_ICON_SETTINGS, width);
		toDelete.push_back(mwtv);
		mwtv->addIntroItems();
		ZapitChannelList channels;
		if (mode == CZapitClient::MODE_RADIO)
			g_bouquetManager->Bouquets[i]->getRadioChannels(channels);
		else
			g_bouquetManager->Bouquets[i]->getTvChannels(channels);
		for(int j = 0; j < (int) channels.size(); j++) {
			CZapitChannel * channel = channels[j];
			char cChannelId[60] = {0};
			snprintf(cChannelId, sizeof(cChannelId), "ZC%c:%d|%" PRIx64 "#", (mode==CZapitClient::MODE_TV)?'T':'R', channel->number, channel->channel_id);

			CMenuForwarder * chan_item = new CMenuForwarder(channel->getName(), true, NULL, this,
				(std::string(cChannelId) + channel->getName()).c_str(), CRCInput::RC_nokey, NULL,
				channel->scrambled ? NEUTRINO_ICON_SCRAMBLED: (channel->getUrl().empty() ? NULL : NEUTRINO_ICON_STREAMING));
			chan_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
			mwtv->addItem(chan_item);

		}
#if 1 // FIXME, probably unneeded by now --martii
		if (g_bouquetManager->Bouquets[i]->Name == "extra.zapit_bouquetname_others"
		 || g_bouquetManager->Bouquets[i]->Name == "extra.zapit_bouquetname_newchannels")
			continue;
#endif
		if(!channels.empty() && (!g_bouquetManager->Bouquets[i]->bHidden ))
		{
			mctv.addItem(new CMenuForwarder(g_bouquetManager->Bouquets[i]->Name, true, NULL, mwtv));
		}
	}
	int res = mctv.exec (NULL, "");

	// delete dynamic created objects
	for(unsigned int count=0;count<toDelete.size();count++)
	{
		delete toDelete[count];
	}
	toDelete.clear();
	return res;
}
Example #17
0
int CThemes::Show()
{
	move_userDir();

	std::string file_name = "";

	CMenuWidget themes (LOCALE_COLORMENU_MENUCOLORS, NEUTRINO_ICON_SETTINGS, width);
	
	themes.addIntroItems(LOCALE_COLORTHEMEMENU_HEAD2);
	
	//set default theme
	themes.addItem(new CMenuForwarder(LOCALE_COLORTHEMEMENU_NEUTRINO_THEME, true, NULL, this, "theme_neutrino", CRCInput::RC_red));
	
	readThemes(themes);

	CKeyboardInput nameInput(LOCALE_COLORTHEMEMENU_NAME, &file_name);
	CMenuForwarder *m1 = new CMenuForwarder(LOCALE_COLORTHEMEMENU_SAVE, true , NULL, &nameInput, NULL, CRCInput::RC_green);

	if (CFileHelpers::createDir(THEMESDIR_VAR) && errno != EEXIST) {
		printf("[neutrino theme] error creating %s\n", THEMESDIR_VAR);

	}
	if (access(THEMESDIR_VAR, F_OK) == 0 ) {
		themes.addItem(GenericMenuSeparatorLine);
		themes.addItem(m1);
	} else {
		delete m1;
		printf("[neutrino theme] error accessing %s\n", THEMESDIR_VAR);
	}

	int res = themes.exec(NULL, "");

	if (!file_name.empty()) {
		saveFile(((std::string)THEMESDIR_VAR + "/" + file_name + FILE_PREFIX).c_str());
	}

	if (hasThemeChanged) {
		if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_COLORTHEMEMENU_QUESTION, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_SETTINGS) != CMessageBox::mbrYes)
			rememberOldTheme( false );
		else
			hasThemeChanged = false;
	}
	return res;
}
Example #18
0
void CAdZapMenu::ShowMenu()
{
	bool show_monitor = monitorLifeTime.tv_sec;

	CMenuWidget *menu = new CMenuWidget(LOCALE_ADZAP, NEUTRINO_ICON_SETTINGS, width);
	//menu->addKey(CRCInput::RC_red, this, "disable");
	menu->addKey(CRCInput::RC_green, this, "enable");
	menu->addKey(CRCInput::RC_blue, this, "monitor");
	menu->addIntroItems();

	CMenuOptionChooser *oc = new CMenuOptionChooser(LOCALE_ADZAP_WRITEDATA, &g_settings.adzap_writeData, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	oc->setHint(NEUTRINO_ICON_HINT_ADZAP, LOCALE_MENU_HINT_ADZAP_WRITEDATA);
	menu->addItem(oc);

	menu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_ADZAP_SWITCHBACK));

	neutrino_locale_t minute = LOCALE_ADZAP_MINUTE;
	for (int shortcut = 1; shortcut < 10; shortcut++) {
		char actionKey[2];
		actionKey[0] = '0' + shortcut;
		actionKey[1] = 0;
		bool selected = g_settings.adzap_zapBackPeriod == 60 * shortcut;
		forwarders[shortcut - 1] = new CMenuForwarder(minute, true, NULL, this, actionKey, CRCInput::convertDigitToKey(shortcut));
		forwarders[shortcut - 1]->setMarked(selected);
		forwarders[shortcut - 1]->iconName_Info_right = selected ? NEUTRINO_ICON_CHECKMARK : NULL;
		forwarders[shortcut - 1]->setHint(NEUTRINO_ICON_HINT_ADZAP, "");
		menu->addItem(forwarders[shortcut - 1], selected);
		minute = LOCALE_ADZAP_MINUTES;
	}

	menu->addItem(GenericMenuSeparator);

	int zapBackPeriod = g_settings.adzap_zapBackPeriod / 60;
	nc = new CMenuOptionNumberChooser(minute, &zapBackPeriod, true, 10, 120, this, CRCInput::RC_0);
	nc->setMarked(g_settings.adzap_zapBackPeriod / 60 > 9);
	nc->setHint(NEUTRINO_ICON_HINT_ADZAP, "");
	menu->addItem(nc);

	menu->setFooter(CAdZapMenuFooterButtons, CAdZapMenuFooterButtonCount - (show_monitor ? 0 : 1));
	menu->exec(NULL, "");
	menu->hide();
	delete menu;
	Update();
}
Example #19
0
/* infobar colors */
int COsdSetup::showOsdInfobarColorSetup()
{
	CMenuWidget * ois = new CMenuWidget(menue_title, menue_icon, width);

	CColorChooser chInfobarcolor(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND_HEAD, &g_settings.infobar_red, &g_settings.infobar_green, &g_settings.infobar_blue,  &g_settings.infobar_alpha, colorSetupNotifier);
	CColorChooser chInfobarTextcolor_head(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR_HEAD, &g_settings.infobar_Text_red, &g_settings.infobar_Text_green, &g_settings.infobar_Text_blue, NULL, colorSetupNotifier);
	CMenuForwarder *fwInfobarBackground = new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_BACKGROUND, true, NULL, &chInfobarcolor);
	CMenuForwarder *fwInfobarTextcolor = new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_TEXTCOLOR, true, NULL, &chInfobarTextcolor_head);

	ois->addIntroItems(LOCALE_COLORSTATUSBAR_TEXT);
	//-----------------------------------------------
	ois->addItem(fwInfobarBackground);
	ois->addItem(fwInfobarTextcolor);

	int res = ois->exec(NULL, "");
	delete ois;

	return res;
}
Example #20
0
int CThemes::Show()
{
	std::string file_name = "";

	CMenuWidget themes (LOCALE_COLORMENU_MENUCOLORS, NEUTRINO_ICON_SETTINGS, width);
	
	themes.addIntroItems(LOCALE_COLORTHEMEMENU_HEAD2);
	
	//set default theme
	themes.addItem(new CMenuForwarder(LOCALE_COLORTHEMEMENU_NEUTRINO_THEME, true, NULL, this, "theme_neutrino", CRCInput::RC_red));
	
	readThemes(themes);

	CStringInputSMS nameInput(LOCALE_COLORTHEMEMENU_NAME, &file_name, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789- ");
	CMenuForwarder *m1 = new CMenuForwarder(LOCALE_COLORTHEMEMENU_SAVE, true , NULL, &nameInput, NULL, CRCInput::RC_green);

	if (mkdirhier(USERDIR) && errno != EEXIST) {
		printf("[neutrino theme] error creating %s\n", USERDIR);
	}
	if (access(USERDIR, F_OK) == 0 ) {
		themes.addItem(GenericMenuSeparatorLine);
		themes.addItem(m1);
	} else {
		delete m1;
		printf("[neutrino theme] error accessing %s\n", USERDIR);
	}

	int res = themes.exec(NULL, "");

	if (file_name.length() > 1) {
		saveFile((char*)((std::string)USERDIR + file_name + FILE_PREFIX).c_str());
	}

	if (hasThemeChanged) {
		if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_COLORTHEMEMENU_QUESTION, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_SETTINGS) != CMessageBox::mbrYes)
			rememberOldTheme( false );
		else
			hasThemeChanged = false;
	}
	return res;
}
void CKernelOptions::Settings()
{
	CMenuWidget *menu = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS);
	menu->addKey(CRCInput::RC_red, this, "reset");
	menu->addKey(CRCInput::RC_green, this, "apply");
	menu->setFooter(KernelOptionsButtons, KernelOptionsButtonCount);
	menu->addIntroItems(LOCALE_KERNELOPTIONS_HEAD, LOCALE_KERNELOPTIONS_MODULES);

	load();

	for (unsigned int i = 0; i < modules.size(); i++) {
		modules[i].mc = new CMenuOptionChooser(modules[i].comment.c_str(), &modules[i].active,
				ONOFF_OPTIONS, ONOFF_OPTION_COUNT, true, this);
		menu->addItem(modules[i].mc);
	}

	updateStatus();

	menu->exec(NULL, "");
	menu->hide();
	delete menu;
}
int CProgressbarSetup::showMenu()
{
	//menue init
	CMenuWidget *progress = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PROGRESSBAR);

	//intros: back ande save
	progress->addIntroItems(LOCALE_MISCSETTINGS_PROGRESSBAR);

	COnOffNotifier* miscProgressNotifier = new COnOffNotifier(0);

	//color on/off
	CMenuOptionChooser *color;
	color = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, miscProgressNotifier);
	color->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR);

	//design
	CMenuOptionChooser *design;
	design = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN, &g_settings.progressbar_design, PROGRESSBAR_DESIGN_OPTIONS, PROGRESSBAR_DESIGN_COUNT, g_settings.progressbar_color);
	design->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_DESIGN);

	//infobar position
	CMenuOptionChooser *infobar_position;
	infobar_position = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION, &g_settings.infobar_progressbar, PROGRESSBAR_INFOBAR_POSITION_OPTIONS, PROGRESSBAR_INFOBAR_POSITION_COUNT, true);
	infobar_position->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION);

	miscProgressNotifier->addItem(design);

	//paint items
	progress->addItem(color);
	progress->addItem(design);
	progress->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_INFOBAR));
	progress->addItem(infobar_position);

	int res = progress->exec (NULL, "");
	delete miscProgressNotifier;
	delete progress;

	return res;
}
/*shows the picviewer setup menue*/
int CPictureViewerSetup::showPictureViewerSetup()
{
	CMenuWidget* picviewsetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PVIEWERSETUP);

	// intros: back ande save
	picviewsetup->addIntroItems(LOCALE_PICTUREVIEWER_HEAD);

	CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING, &g_settings.picviewer_scaling, PICTUREVIEWER_SCALING_OPTIONS, PICTUREVIEWER_SCALING_OPTION_COUNT, true);
	mc->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SCALING);
	picviewsetup->addItem(mc);

	CStringInput pic_timeout(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ");
	CMenuForwarder * mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, &pic_timeout);
	mf->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME);
	picviewsetup->addItem(mf);

	mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir");
	mf->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_DEFDIR);
	picviewsetup->addItem(mf);

	int res = picviewsetup->exec(NULL, "");
	delete picviewsetup;
	return res;
}
Example #24
0
int CSoftwareUpdate::showSoftwareUpdate()
/* shows the menue and options for software update */
{
	CMenuWidget* softUpdate = new CMenuWidget(LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_UPDATE, width);
	softUpdate->setPreselected(selected);

	// intros
	softUpdate->addIntroItems(LOCALE_SERVICEMENU_UPDATE);

	// experts-functions 
	softUpdate->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, this, "experts", CRCInput::RC_red));

#ifndef DISABLE_INTERNET_UPDATE
#ifndef HAVE_DREAMBOX_HARDWARE
	softUpdate->addItem(GenericMenuSeparatorLine);
	CMenuOptionChooser *oj = new CMenuOptionChooser(LOCALE_FLASHUPDATE_UPDATEMODE, &g_settings.softupdate_mode, FLASHUPDATE_UPDATEMODE_OPTIONS, FLASHUPDATE_UPDATEMODE_OPTION_COUNT, true);
	softUpdate->addItem( oj );
#endif
#endif
	
 	/* show current version */
	showSoftwareUpdateImageinfo(softUpdate);

	// update check
	CFlashUpdate* flashUpdate = new CFlashUpdate();
	softUpdate->addItem(GenericMenuSeparatorLine);
	softUpdate->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE, true, NULL, flashUpdate, NULL, CRCInput::RC_green));

	int res = softUpdate->exec (NULL, "");
	selected = softUpdate->getSelected();
	delete softUpdate;

	delete flashUpdate;

	return res;
}
/*shows the picviewer setup menue*/
int CPictureViewerSetup::showPictureViewerSetup()
{
	CMenuWidget* picviewsetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PVIEWERSETUP);

	// intros: back ande save
	picviewsetup->addIntroItems(LOCALE_PICTUREVIEWER_HEAD);

	CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING, &g_settings.picviewer_scaling, PICTUREVIEWER_SCALING_OPTIONS, PICTUREVIEWER_SCALING_OPTION_COUNT, true);
	mc->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SCALING);
	picviewsetup->addItem(mc);

	CMenuOptionNumberChooser *cc = new CMenuOptionNumberChooser(LOCALE_PICTUREVIEWER_SLIDE_TIME, &g_settings.picviewer_slide_time, true, 0, 999);
	cc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_SECOND));
	cc->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME);
	picviewsetup->addItem(cc);

	CMenuForwarder *mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir");
	mf->setHint("", LOCALE_MENU_HINT_PICTUREVIEWER_DEFDIR);
	picviewsetup->addItem(mf);

	int res = picviewsetup->exec(NULL, "");
	delete picviewsetup;
	return res;
}
Example #26
0
int CInfoMenu::showMenu()
{
	CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_INFOMENUE);

	CImageInfo imageinfo;
	CDBoxInfoWidget boxinfo;
	CStreamInfo2 streaminfo;


	info->addIntroItems();
	CMenuForwarder * mf = new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO,  true, NULL, &imageinfo, NULL, CRCInput::RC_red);
	mf->setHint(NEUTRINO_ICON_HINT_IMAGEINFO, LOCALE_MENU_HINT_IMAGEINFO);
	info->addItem(mf);

	mf = new CMenuForwarder(LOCALE_EXTRA_DBOXINFO,         true, NULL, &boxinfo, NULL, CRCInput::RC_green);
	mf->setHint(NEUTRINO_ICON_HINT_DBOXINFO, LOCALE_MENU_HINT_DBOXINFO);
	info->addItem(mf);

	mf = new CMenuForwarder(LOCALE_STREAMINFO_HEAD,        !CNeutrinoApp::getInstance()->channelList->isEmpty(), NULL, &streaminfo, NULL, CRCInput::RC_yellow);
	mf->setHint(NEUTRINO_ICON_HINT_STREAMINFO, LOCALE_MENU_HINT_STREAMINFO);
	info->addItem(mf);
	
#if 0
	CBuildInfo buildinfo;
	mf = new CMenuForwarder(LOCALE_BUILDINFO_MENU,  true, NULL, &buildinfo, NULL, CRCInput::RC_blue);
	mf->setHint(NEUTRINO_ICON_HINT_IMAGEINFO, LOCALE_MENU_HINT_BUILDINFO);
	info->addItem(mf);
#endif

	//add I_TYPE_INFORMATION plugins
	info->integratePlugins(CPlugins::I_TYPE_INFORMATION, 1);

	int res = info->exec(NULL, "");
	delete info;
	return res;
}
/*shows media setup menue entries*/
int CMediaPlayerSetup::showMediaPlayerSetup()
{
	CMenuWidget* mediaSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
	mediaSetup->setSelected(selected);

	// intros
	mediaSetup->addIntroItems(LOCALE_MAINMENU_MEDIA);

	CMenuForwarder *mf;

	CAudioPlayerSetup asetup;
	mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, &asetup, "", CRCInput::RC_red);
	mf->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY_SETUP);
	mediaSetup->addItem(mf);

	CPictureViewerSetup psetup;
	mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, &psetup, "", CRCInput::RC_green);
	mf->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICTUREVIEWER_SETUP);
	mediaSetup->addItem(mf);

	CWebTVSetup wsetup;
	mf = new CMenuForwarder(LOCALE_WEBTV_HEAD, true, NULL, &wsetup, "show_menu", CRCInput::RC_yellow);
	mf->setHint(NEUTRINO_ICON_HINT_TVMODE /* FIXME */, LOCALE_MENU_HINT_WEBTV_SETUP);
	mediaSetup->addItem(mf);

	mediaSetup->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_MOVIEPLAYER));

	CMovieBrowser msetup;
	int shortcut = 1;
	mf = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, &msetup, "show_menu", CRCInput::convertDigitToKey(shortcut++));
	mf->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MOVIEBROWSER_SETUP);
	mediaSetup->addItem(mf);

	mf = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, true, NULL, &msetup, "show_ytmenu", CRCInput::convertDigitToKey(shortcut++));
	mf->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY_SETUP);
	mediaSetup->addItem(mf);


	int res = mediaSetup->exec (NULL, "");
	selected = mediaSetup->getSelected();
	delete mediaSetup;
	return res;

#if 0
	CMenuWidget* mediaSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
	mediaSetup->setSelected(selected);

	// intros
	mediaSetup->addIntroItems(LOCALE_MAINSETTINGS_MULTIMEDIA);

	CPictureViewerSetup psetup;
	mediaSetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, &psetup, "", CRCInput::RC_red));
	CAudioPlayerSetup asetup;
	mediaSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, &asetup, "", CRCInput::RC_green));

	CWebTVSetup wsetup;
	CMenuForwarder *mf;
	mf = new CMenuForwarder(LOCALE_WEBTV_HEAD, true, NULL, &wsetup, "show_menu", CRCInput::RC_yellow);
	mf->setHint(NEUTRINO_ICON_HINT_TVMODE /* FIXME */, LOCALE_MENU_HINT_WEBTV_SETUP);
	mediaSetup->addItem(mf);

	int res = mediaSetup->exec (NULL, "");
	selected = mediaSetup->getSelected();
	delete mediaSetup;
	return res;
#endif
}
Example #28
0
int CSettingsManager::showMenu()
{
	printf("[neutrino] CSettingsManager call %s...\n", __FUNCTION__);

	CDataResetNotifier * resetNotifier = new CDataResetNotifier();

	CMenuWidget * mset = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SETTINGS_MNGR);
	mset->addIntroItems(LOCALE_MAINSETTINGS_MANAGE);

	CMenuForwarder * mf;
	if (g_settings.easymenu)
		mf = new CMenuForwarder(LOCALE_RESET_SETTINGS,   true, NULL, resetNotifier,    "settings",     CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
	else
		mf = new CMenuForwarder(LOCALE_RESET_SETTINGS,   true, NULL, resetNotifier,    "settings",     CRCInput::RC_recall);

	mf->setHint(NEUTRINO_ICON_HINT_RESET, LOCALE_MENU_HINT_RESET); // FIXME: RC-button RECALL is broken
	mset->addItem(mf);

	if (!g_settings.easymenu) {
		mset->addItem(GenericMenuSeparatorLine);

		mf = new CMenuForwarder(LOCALE_EXTRA_SAVECONFIG, true, NULL, this, "saveconfig", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
		mf->setHint(NEUTRINO_ICON_HINT_SAVEAS, LOCALE_MENU_HINT_SAVEAS);
		mset->addItem(mf);

		mf = new CMenuForwarder(LOCALE_EXTRA_LOADCONFIG, true, NULL, this, "loadconfig", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
		mf->setHint(NEUTRINO_ICON_HINT_LOAD, LOCALE_MENU_HINT_LOAD);
		mset->addItem(mf);

		mset->addItem(GenericMenuSeparatorLine);
	}

	if (g_settings.easymenu)
		mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup",  CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
	else
		mf = new CMenuForwarder(LOCALE_SETTINGS_BACKUP, true, NULL, this, "backup",  CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);

	mf->setHint(NEUTRINO_ICON_HINT_BACKUP, LOCALE_MENU_HINT_BACKUP);
	mset->addItem(mf);

	if (g_settings.easymenu)
		mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
	else
		mf = new CMenuForwarder(LOCALE_SETTINGS_RESTORE, true, NULL, this, "restore", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);

	mf->setHint(NEUTRINO_ICON_HINT_RESTORE, LOCALE_MENU_HINT_RESTORE);
	mset->addItem(mf);

	if (g_settings.easymenu) {
		mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
	} else {
		mset->addItem(GenericMenuSeparatorLine);
		mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER);
	}
	mf->setHint(NEUTRINO_ICON_HINT_FACTORY, LOCALE_MENU_HINT_FACTORY);
	mset->addItem(mf);

	int res = mset->exec(NULL, "");
	delete resetNotifier;
	delete mset;
	return res;
}
int CRecordSetup::showRecordSetup()
{
	CMenuForwarder * mf;
	//menue init
	CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP);

	recordingSettings->addIntroItems(LOCALE_MAINSETTINGS_RECORDING);
#if 0
	//apply settings
	mf = new CMenuForwarder(LOCALE_RECORDINGMENU_SETUPNOW, true, NULL, this, "recording", CRCInput::RC_red);
	mf->setHint("", LOCALE_MENU_HINT_RECORD_APPLY);
	recordingSettings->addItem(mf);
	recordingSettings->addItem(GenericMenuSeparatorLine);
#endif
	CMenuWidget recordingTsSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMESHIFT);
	showRecordTimeShiftSetup(&recordingTsSettings);

	CMenuWidget recordingTimerSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_TIMERSETTINGS);
	showRecordTimerSetup(&recordingTimerSettings);

	if (g_settings.easymenu) {
		//timeshift
		mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_red);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT);
		recordingSettings->addItem(mf);

		//timersettings
		mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_green);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER);
		recordingSettings->addItem(mf);
	}

	bool recstatus = CNeutrinoApp::getInstance()->recordingstatus;
	//record dir
	CMenuForwarder* fRecDir;
	if (g_settings.easymenu)
		fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, !recstatus, g_settings.network_nfs_recordingdir, this, "recordingdir", CRCInput::RC_yellow);
	else
		fRecDir = new CMenuForwarder(LOCALE_RECORDINGMENU_DEFDIR, !recstatus, g_settings.network_nfs_recordingdir, this, "recordingdir");
	fRecDir->setHint("", LOCALE_MENU_HINT_RECORD_DIR);
	recordingSettings->addItem(fRecDir);

	CMenuOptionChooser* channel_rec_dir;
	if (g_settings.easymenu)
		channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::RC_blue);
	else
		channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	channel_rec_dir->setHint("", LOCALE_MENU_HINT_RECORD_CHANDIR);
	recordingSettings->addItem(channel_rec_dir);

	//rec hours
	CMenuOptionNumberChooser * mc = new CMenuOptionNumberChooser(LOCALE_EXTRA_RECORD_TIME, &g_settings.record_hours, true, 1, 24, NULL);
	mc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_HOUR));
	mc->setHint("", LOCALE_MENU_HINT_RECORD_TIME);
	recordingSettings->addItem(mc);

	// end of recording
	CMenuOptionChooser* end_of_recording = new CMenuOptionChooser(LOCALE_RECORDINGMENU_END_OF_RECORDING_NAME, &g_settings.recording_epg_for_end, END_OF_RECORDING, END_OF_RECORDING_COUNT, true);
	end_of_recording->setHint("", LOCALE_MENU_HINT_RECORD_END);
	recordingSettings->addItem(end_of_recording);

	if (!g_settings.easymenu) {
		CMenuOptionChooser* slow_warn = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SLOW_WARN, &g_settings.recording_slow_warning, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
		slow_warn->setHint("", LOCALE_MENU_HINT_RECORD_SLOW_WARN);
		recordingSettings->addItem(slow_warn);

		CMenuOptionChooser* startstop_msg = new CMenuOptionChooser(LOCALE_RECORDING_STARTSTOP_MSG, &g_settings.recording_startstop_msg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
		startstop_msg->setHint("", LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG);
		recordingSettings->addItem(startstop_msg);
	}

	//filename template
	CKeyboardInput* filename_template = new CKeyboardInput(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template, 0, NULL, NULL, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT2);
	CMenuForwarder* ft = new CMenuDForwarder(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, true, g_settings.recording_filename_template, filename_template, NULL, CRCInput::RC_1);
	ft->setHint("", LOCALE_MENU_HINT_RECORD_FILENAME_TEMPLATE);
	recordingSettings->addItem(ft);

	CMenuOptionChooser* cover = new CMenuOptionChooser(LOCALE_RECORDINGMENU_AUTO_COVER, &g_settings.auto_cover, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	cover->setHint("", LOCALE_MENU_HINT_RECORD_AUTO_COVER);
	recordingSettings->addItem(cover);

	recordingSettings->addItem(GenericMenuSeparatorLine);

	if (!g_settings.easymenu) {
		//timeshift
		mf = new CMenuForwarder(LOCALE_RECORDINGMENU_TIMESHIFT, true, NULL, &recordingTsSettings, NULL, CRCInput::RC_green);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT);
		recordingSettings->addItem(mf);

		//timersettings
		mf = new CMenuForwarder(LOCALE_TIMERSETTINGS_SEPARATOR, true, NULL, &recordingTimerSettings, NULL, CRCInput::RC_yellow);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_TIMER);
		recordingSettings->addItem(mf);
	}

	CMenuWidget recordingaAudioSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_AUDIOSETTINGS);
	CMenuWidget recordingaDataSettings(LOCALE_MAINSETTINGS_RECORDING, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP_DATASETTINGS);
	if (!g_settings.easymenu) {
		//audiosettings
		showRecordAudioSetup(&recordingaAudioSettings);
		mf = new CMenuForwarder(LOCALE_RECORDINGMENU_APIDS, true, NULL, &recordingaAudioSettings, NULL, CRCInput::RC_blue);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_APIDS);
		recordingSettings->addItem(mf);

		//datasettings
		showRecordDataSetup(&recordingaDataSettings);
		mf = new CMenuForwarder(LOCALE_RECORDINGMENU_DATA_PIDS, true, NULL, &recordingaDataSettings, NULL,  CRCInput::RC_2);
		mf->setHint("", LOCALE_MENU_HINT_RECORD_DATA);
		recordingSettings->addItem(mf);
	}

	int res = recordingSettings->exec(NULL, "");
	delete recordingSettings;

	/* activate changes */
        CRecordManager::getInstance()->SetDirectory(g_settings.network_nfs_recordingdir);
        CRecordManager::getInstance()->Config(g_settings.recording_stopsectionsd, g_settings.recording_stream_vtxt_pid, g_settings.recording_stream_pmt_pid, g_settings.recording_stream_subtitle_pids);

	return res;
}
int CKeybindSetup::showKeySetup()
{
#if !HAVE_SPARK_HARDWARE
	//save original rc hardware selection and initialize text strings
	int org_remote_control_hardware = g_settings.remote_control_hardware;
	char RC_HW_str[4][32];
	snprintf(RC_HW_str[CRCInput::RC_HW_COOLSTREAM],   sizeof(RC_HW_str[CRCInput::RC_HW_COOLSTREAM])-1,   "%s", g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_COOLSTREAM));
	snprintf(RC_HW_str[CRCInput::RC_HW_DBOX],         sizeof(RC_HW_str[CRCInput::RC_HW_DBOX])-1,         "%s", g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_DBOX));
	snprintf(RC_HW_str[CRCInput::RC_HW_PHILIPS],      sizeof(RC_HW_str[CRCInput::RC_HW_PHILIPS])-1,      "%s", g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_PHILIPS));
	snprintf(RC_HW_str[CRCInput::RC_HW_TRIPLEDRAGON], sizeof(RC_HW_str[CRCInput::RC_HW_TRIPLEDRAGON])-1, "%s", g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_TRIPLEDRAGON));
	char RC_HW_msg[256];
	snprintf(RC_HW_msg, sizeof(RC_HW_msg)-1, "%s", g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_MSG_PART1));
#endif

	//keysetup menu
	CMenuWidget* keySettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP);
	keySettings->addIntroItems(LOCALE_MAINSETTINGS_KEYBINDING, LOCALE_KEYBINDINGMENU_HEAD);

	//keybindings menu
	CMenuWidget bindSettings(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING);

	//keybindings
	for (int i = 0; i < KEYBINDS_COUNT; i++)
		keychooser[i] = new CKeyChooser((unsigned int *) key_settings[i].keyvalue_p, key_settings[i].keydescription/*as head caption*/, NEUTRINO_ICON_SETTINGS);

	showKeyBindSetup(&bindSettings);
	CMenuForwarder * mf;

	mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_EDIT, true, NULL, &bindSettings, NULL, CRCInput::RC_red);
	mf->setHint("", LOCALE_MENU_HINT_KEY_BINDING);
	keySettings->addItem(mf);

	mf = new CMenuForwarder(LOCALE_EXTRA_LOADKEYS, true, NULL, this, "loadkeys", CRCInput::RC_green);
	mf->setHint("", LOCALE_MENU_HINT_KEY_LOAD);
	keySettings->addItem(mf);

	mf = new CMenuForwarder(LOCALE_EXTRA_SAVEKEYS, true, NULL, this, "savekeys", CRCInput::RC_yellow);
	mf->setHint("", LOCALE_MENU_HINT_KEY_SAVE);
	keySettings->addItem(mf);

	keySettings->addItem(GenericMenuSeparatorLine);

	//rc tuning
	std::string ms_number_format("%d ");
	ms_number_format += g_Locale->getText(LOCALE_UNIT_SHORT_MILLISECOND);
	CMenuOptionNumberChooser *cc;

	int shortcut = 1;

	cc = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_LONGKEYPRESS_DURATION,
		&g_settings.longkeypress_duration, true, LONGKEYPRESS_OFF, 9999, NULL,
		CRCInput::convertDigitToKey(shortcut++), NULL, 0, LONGKEYPRESS_OFF, LOCALE_OPTIONS_OFF);
	cc->setNumberFormat(ms_number_format);
	cc->setNumericInput(true);
	cc->setHint("", LOCALE_MENU_HINT_LONGKEYPRESS_DURATION);
	keySettings->addItem(cc);

#if HAVE_SPARK_HARDWARE
	g_settings.accept_other_remotes = access("/etc/lircd_predata_lock", R_OK) ? 1 : 0;
	CMenuOptionChooser *mc = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_ACCEPT_OTHER_REMOTES,
		&g_settings.accept_other_remotes, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this,
		CRCInput::convertDigitToKey(shortcut++));
	mc->setHint("", LOCALE_MENU_HINT_ACCEPT_OTHER_REMOTES);
	keySettings->addItem(mc);
#endif
#if !HAVE_SPARK_HARDWARE
	if (RC_HW_SELECT) {
		CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE,
			&g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true, NULL,
			CRCInput::convertDigitToKey(shortcut++));
		mc->setHint("", LOCALE_MENU_HINT_KEY_HARDWARE);
		keySettings->addItem(mc);
	}
#endif

	cc = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCK,
		&g_settings.repeat_blocker, true, 0, 999, NULL,
		CRCInput::convertDigitToKey(shortcut++), NULL, 0, 0, LOCALE_OPTIONS_OFF);
	cc->setNumberFormat(ms_number_format);
	cc->setNumericInput(true);
	cc->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCK);
	keySettings->addItem(cc);

	cc = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC,
		&g_settings.repeat_genericblocker, true, 0, 999, NULL,
		CRCInput::convertDigitToKey(shortcut++), NULL, 0, 0, LOCALE_OPTIONS_OFF);
	cc->setNumberFormat(ms_number_format);
	cc->setNumericInput(true);
	cc->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCKGENERIC);
	keySettings->addItem(cc);

	int res = keySettings->exec(NULL, "");

#if !HAVE_SPARK_HARDWARE
	//check if rc hardware selection has changed before leaving the menu
	if (org_remote_control_hardware != g_settings.remote_control_hardware) {
		g_RCInput->CRCInput::set_rc_hw();
		strcat(RC_HW_msg, RC_HW_str[org_remote_control_hardware]);
		strcat(RC_HW_msg, g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_MSG_PART2));
		strcat(RC_HW_msg, RC_HW_str[g_settings.remote_control_hardware]);
		strcat(RC_HW_msg, g_Locale->getText(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE_MSG_PART3));
		if(ShowMsg(LOCALE_MESSAGEBOX_INFO, RC_HW_msg, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_INFO, 450, 15, true) == CMessageBox::mbrNo) {
			g_settings.remote_control_hardware = org_remote_control_hardware;
			g_RCInput->CRCInput::set_rc_hw();
		}
	}
#endif

	delete keySettings;
	for (int i = 0; i < KEYBINDS_COUNT; i++)
		delete keychooser[i];
	return res;
}