From c43438baecd65730c765e9ceff5a88898448a19b Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 20 Oct 2014 14:20:26 +0400 Subject: [PATCH] gui/update_settings.cpp: add option to enable/disable updates check on boot --- data/locale/english.locale | 1 + src/gui/update_settings.cpp | 4 ++++ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/settings.h | 1 + 5 files changed, 8 insertions(+) diff --git a/data/locale/english.locale b/data/locale/english.locale index a1b45d66f..eea5b0497 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -549,6 +549,7 @@ filesystem.is.utf8.option.iso8859.1 ISO-8859-1 filesystem.is.utf8.option.utf8 UTF-8 flashupdate.actionreadflash reading flashupdate.apply_settings Import current settings into new image? +flashupdate.autocheck Auto-check updates on boot flashupdate.cantopenfile can't open file flashupdate.cantopenmtd can't open MTD flashupdate.checkupdate_internet Check for online updates diff --git a/src/gui/update_settings.cpp b/src/gui/update_settings.cpp index d682253d1..022825290 100644 --- a/src/gui/update_settings.cpp +++ b/src/gui/update_settings.cpp @@ -146,6 +146,9 @@ int CUpdateSettings::initMenu() OnOffNotifier->addItem(apply_kernel); #endif + CMenuOptionChooser *autocheck = new CMenuOptionChooser(LOCALE_FLASHUPDATE_AUTOCHECK, &g_settings.softupdate_autocheck, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, OnOffNotifier); +// apply_settings->setHint("", LOCALE_MENU_HINT_XXX); + w_upsettings.addItem(fw_update_dir); w_upsettings.addItem(fw_url); w_upsettings.addItem(name_backup); @@ -154,6 +157,7 @@ int CUpdateSettings::initMenu() w_upsettings.addItem(apply_settings); w_upsettings.addItem(name_apply); #endif + w_upsettings.addItem(autocheck); #if 0 w_upsettings.addItem(apply_kernel); diff --git a/src/system/locals.h b/src/system/locals.h index d417aa5e6..aacf0ef60 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -576,6 +576,7 @@ typedef enum LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8, LOCALE_FLASHUPDATE_ACTIONREADFLASH, LOCALE_FLASHUPDATE_APPLY_SETTINGS, + LOCALE_FLASHUPDATE_AUTOCHECK, LOCALE_FLASHUPDATE_CANTOPENFILE, LOCALE_FLASHUPDATE_CANTOPENMTD, LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 26017f4cc..91daea5ce 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -576,6 +576,7 @@ const char * locale_real_names[] = "filesystem.is.utf8.option.utf8", "flashupdate.actionreadflash", "flashupdate.apply_settings", + "flashupdate.autocheck", "flashupdate.cantopenfile", "flashupdate.cantopenmtd", "flashupdate.checkupdate_internet", diff --git a/src/system/settings.h b/src/system/settings.h index c32b1d7f4..1911f7627 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -548,6 +548,7 @@ struct SNeutrinoSettings std::string softupdate_proxyserver; std::string softupdate_proxyusername; std::string softupdate_proxypassword; + int softupdate_autocheck; int softupdate_name_mode_apply; int softupdate_name_mode_backup; int apply_settings;