From e6be158506ec874e92cdd2e69a0209c9f4c63de9 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 3 Sep 2020 22:52:52 +0200 Subject: [PATCH] update-menu: just disable online update if softupdate_url_file doesn't exist Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8c2827f040fe4f130db591fb748d8c9571cf4045 Author: vanhofen Date: 2020-09-03 (Thu, 03 Sep 2020) Origin message was: ------------------ - update-menu: just disable online update if softupdate_url_file doesn't exist ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/update_menue.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index 091bb57e1..0ca6da3e8 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -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);