示例#1
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;
}
示例#2
0
void CSoftwareUpdate::showSoftwareUpdate()
/* shows the menue and options for software update */
{
	CMenuWidget* softUpdate = new CMenuWidget(LOCALE_SERVICEMENU_UPDATE, NEUTRINO_ICON_UPDATE, width);
	softUpdate->addItem(GenericMenuSeparator);
	softUpdate->addItem(GenericMenuBack);
	softUpdate->addItem(GenericMenuSeparatorLine);

	// experts-functions 
	softUpdate->addItem( new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, ""  , this     , "experts",CRCInput::RC_red, NEUTRINO_ICON_BUTTON_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);

#ifndef DISABLE_INTERNET_UPDATE
#ifndef HAVE_DREAMBOX_HARDWARE
	showSoftwareUpdateProxySetup(softUpdate);
#endif
#endif
	// update check
	softUpdate->addItem(GenericMenuSeparatorLine);
	softUpdate->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE, true, NULL, new CFlashUpdate(), NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));

	softUpdate->exec (NULL, "");
	softUpdate->hide ();
	delete softUpdate;

}