Software Update with apply the settings (Part9)

- Functions now available for internet & local update.
- Rename writemtdExt() to applySettings()


Origin commit data
------------------
Commit: 0c84840e10
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-11-05 (Mon, 05 Nov 2012)

Origin message was:
------------------
* Software Update with apply the settings (Part9)

- Functions now available for internet & local update.
- Rename writemtdExt() to applySettings()
This commit is contained in:
Michael Liebmann
2012-11-05 08:13:50 +01:00
parent 1c1c978de7
commit e61906948d
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);