mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 19:01:13 +02:00
neutrino.cpp: enable check for package updates with new setting
Origin commit data
------------------
Commit: 981f5d6f1f
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-04-10 (Sat, 10 Apr 2021)
This commit is contained in:
@@ -51,7 +51,7 @@ CUpdateCheck* CUpdateCheck::getInstance()
|
||||
|
||||
void CUpdateCheck::check4PackageUpdates()
|
||||
{
|
||||
if (!g_settings.softupdate_autocheck)
|
||||
if (!g_settings.softupdate_autocheck_packages)
|
||||
return;
|
||||
|
||||
COPKGManager man;
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <neutrino_menue.h>
|
||||
#include <gui/filebrowser.h>
|
||||
#include <gui/update_check.h>
|
||||
#include <gui/opkg_manager.h>
|
||||
#include <gui/update_ext.h>
|
||||
#include <gui/update_settings.h>
|
||||
#include <gui/widget/icons.h>
|
||||
@@ -144,7 +145,8 @@ 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, this);
|
||||
CMenuOptionChooser *autocheck = new CMenuOptionChooser(LOCALE_FLASHUPDATE_AUTOCHECK, &g_settings.softupdate_autocheck, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, OnOffNotifier);
|
||||
CMenuOptionChooser *package_autocheck = new CMenuOptionChooser("Package update check", &g_settings.softupdate_autocheck_packages, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, OnOffNotifier);
|
||||
// apply_settings->setHint("", LOCALE_MENU_HINT_XXX);
|
||||
|
||||
w_upsettings.addItem(fw_update_dir);
|
||||
@@ -158,7 +160,8 @@ int CUpdateSettings::initMenu()
|
||||
#endif
|
||||
#endif
|
||||
w_upsettings.addItem(autocheck);
|
||||
|
||||
if (COPKGManager::hasOpkgSupport())
|
||||
w_upsettings.addItem(package_autocheck);
|
||||
#if 0
|
||||
w_upsettings.addItem(apply_kernel);
|
||||
#endif
|
||||
|
@@ -98,9 +98,10 @@
|
||||
#include "gui/update_ext.h"
|
||||
#include "gui/update.h"
|
||||
#include "gui/update_check.h"
|
||||
#include "gui/update_check_packages.h"
|
||||
#include "gui/videosettings.h"
|
||||
#include "gui/audio_select.h"
|
||||
#include <gui/weather.h>
|
||||
#include "gui/weather.h"
|
||||
#include "gui/webchannels_setup.h"
|
||||
|
||||
#include "gui/widget/hintbox.h"
|
||||
@@ -404,6 +405,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.show_ecm_pos = configfile.getInt32("show_ecm_pos" , 0);
|
||||
|
||||
g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false);
|
||||
g_settings.softupdate_autocheck_packages = configfile.getInt32("softupdate_autocheck_packages" , false);
|
||||
|
||||
// video
|
||||
int vid_Mode_default = VIDEO_STD_720P50;
|
||||
@@ -1942,6 +1944,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32 ("softupdate_name_mode_apply", g_settings.softupdate_name_mode_apply);
|
||||
configfile.setInt32 ("softupdate_name_mode_backup", g_settings.softupdate_name_mode_backup);
|
||||
configfile.setBool("softupdate_autocheck", g_settings.softupdate_autocheck);
|
||||
configfile.setInt32("softupdate_autocheck_packages", g_settings.softupdate_autocheck_packages);
|
||||
|
||||
configfile.setInt32("flashupdate_createimage_add_var", g_settings.flashupdate_createimage_add_var);
|
||||
configfile.setInt32("flashupdate_createimage_add_root1", g_settings.flashupdate_createimage_add_root1);
|
||||
@@ -3129,6 +3132,7 @@ TIMER_START();
|
||||
TIMER_STOP("################################## after all ##################################");
|
||||
if (g_settings.softupdate_autocheck) {
|
||||
#if 0
|
||||
|
||||
hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET));
|
||||
hintBox->paint();
|
||||
CFlashUpdate flash;
|
||||
@@ -3142,6 +3146,7 @@ TIMER_STOP("################################## after all #######################
|
||||
#endif
|
||||
CFlashUpdateCheck::getInstance()->startThread();
|
||||
}
|
||||
//CUpdateCheck::getInstance()->startThread();
|
||||
|
||||
for (std::list<std::string>::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); it++)
|
||||
g_Sectionsd->readSIfromXMLTV((*it).c_str());
|
||||
|
@@ -833,6 +833,7 @@ struct SNeutrinoSettings
|
||||
std::string softupdate_proxyusername;
|
||||
std::string softupdate_proxypassword;
|
||||
int softupdate_autocheck;
|
||||
int softupdate_autocheck_packages;
|
||||
int softupdate_name_mode_apply;
|
||||
int softupdate_name_mode_backup;
|
||||
int apply_settings;
|
||||
|
Reference in New Issue
Block a user