* Software Update with apply the settings (Part9)

- Functions now available for internet & local update.
- Rename writemtdExt() to applySettings()
This commit is contained in:
micha-bbg
2012-11-05 08:13:50 +01:00
parent e145f9a5e8
commit 0c84840e10
7 changed files with 44 additions and 23 deletions

View File

@@ -451,16 +451,20 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &)
CNeutrinoApp::getInstance()->exec(NULL, "savesettings");
sleep(2);
//flash it...
#ifdef DEBUG1
if(1)
#else
if(!ft.program(filename, 80, 100))
#endif
{
hide();
ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8
if (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_APPLY_SETTINGS), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NEUTRINO_ICON_UPDATE) == CMessageBox::mbrYes)
if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE))
return menu_return::RETURN_REPAINT;
}
#ifdef DEBUG1
if(1) {
#else
if(!ft.program(filename, 80, 100)) {
#endif
hide();
ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, ft.getErrorMessage().c_str()); // UTF-8
return menu_return::RETURN_REPAINT;
}
//status anzeigen
showGlobalStatus(100);
@@ -690,7 +694,7 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
showFileSelector("");
} else {
if(selectedMTD == 10) {
CExtUpdate::getInstance()->writemtdExt(actionKey);
CExtUpdate::getInstance()->applySettings(actionKey, CExtUpdate::MODE_EXPERT);
}
else if(selectedMTD==-1) {
writemtd(actionKey, MTD_OF_WHOLE_IMAGE);