update-menu: just disable online update if softupdate_url_file doesn't exist

Origin commit data
------------------
Commit: 8c2827f040
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-09-03 (Thu, 03 Sep 2020)

Origin message was:
------------------
- update-menu: just disable online update if softupdate_url_file doesn't exist
This commit is contained in:
vanhofen
2020-09-03 22:52:52 +02:00
parent 94d94a0602
commit 6322424fbb

View File

@@ -93,12 +93,11 @@ int CSoftwareUpdate::showSoftwareUpdate()
CFlashUpdate flash;
flash.enableNotify(false);
//online update
if (file_exists(g_settings.softupdate_url_file.c_str())) {
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, allow_update, NULL, &flash, "inet", inetkey);
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
softUpdate.addItem(update_item);
}
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, allow_update && file_exists(g_settings.softupdate_url_file.c_str()), NULL, &flash, "inet", inetkey);
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
softUpdate.addItem(update_item);
//local update
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL, allow_update, NULL, &flash, "local", CRCInput::RC_green);