mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
* gui/update_menue.cpp: add menu hints
This commit is contained in:
@@ -75,6 +75,7 @@ int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
|
||||
int CSoftwareUpdate::showSoftwareUpdate()
|
||||
/* shows the menue and options for software update */
|
||||
{
|
||||
CMenuForwarder * mf;
|
||||
CMenuWidget softUpdate(LOCALE_MAINMENU_SERVICE, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_SOFTWAREUPDATE);
|
||||
|
||||
softUpdate.addIntroItems(LOCALE_SERVICEMENU_UPDATE);
|
||||
@@ -83,18 +84,23 @@ int CSoftwareUpdate::showSoftwareUpdate()
|
||||
CFlashUpdate flash;
|
||||
neutrino_locale_t up_text = (g_settings.softupdate_mode == 0) ? LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL : LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET;
|
||||
update_item = new CMenuForwarder(up_text, true, NULL, &flash, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
|
||||
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
|
||||
softUpdate.addItem(update_item);
|
||||
|
||||
//settings
|
||||
CUpdateSettings update_settings(update_item);
|
||||
softUpdate.addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_SETTINGS, true, NULL, &update_settings, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_SETTINGS);
|
||||
softUpdate.addItem(mf);
|
||||
|
||||
softUpdate.addItem(GenericMenuSeparatorLine);
|
||||
|
||||
//expert-functions
|
||||
CMenuWidget mtdexpert(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT);
|
||||
showSoftwareUpdateExpert(&mtdexpert);
|
||||
softUpdate.addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, true, NULL, &mtdexpert, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT);
|
||||
softUpdate.addItem(mf);
|
||||
|
||||
int res = softUpdate.exec (NULL, "");
|
||||
return res;
|
||||
@@ -103,8 +109,13 @@ int CSoftwareUpdate::showSoftwareUpdate()
|
||||
/* shows experts-functions to read/write to the mtd */
|
||||
void CSoftwareUpdate::showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert)
|
||||
{
|
||||
CMenuForwarder * mf;
|
||||
w_mtd_expert->addIntroItems();
|
||||
|
||||
w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED));
|
||||
w_mtd_expert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_READFLASHMTD , true, NULL, fe, "readflashmtd" , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_READ);
|
||||
w_mtd_expert->addItem(mf);
|
||||
mf = new CMenuForwarder(LOCALE_FLASHUPDATE_WRITEFLASHMTD, true, NULL, fe, "writeflashmtd", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_EXPERT_WRITE);
|
||||
w_mtd_expert->addItem(mf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user