mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
update_settings: fix update autocheck on/off handling
Origin commit data
------------------
Branch: ni/coolstream
Commit: 30b47b60ed
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-12 (Fri, 12 Jan 2018)
Origin message was:
------------------
- update_settings: fix update autocheck on/off handling
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -79,6 +79,9 @@ void CFlashUpdateCheck::stopThread()
|
||||
pthread_cancel(c4u_thread);
|
||||
}
|
||||
c4u_thread = 0;
|
||||
|
||||
if (access(C4U_FLAGFILE, F_OK) == 0)
|
||||
unlink(C4U_FLAGFILE);
|
||||
}
|
||||
|
||||
void* CFlashUpdateCheck::c4u_proc(void*)
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <mymenu.h>
|
||||
#include <neutrino_menue.h>
|
||||
#include <gui/filebrowser.h>
|
||||
#include <gui/update_check.h>
|
||||
#include <gui/update_ext.h>
|
||||
#include <gui/update_settings.h>
|
||||
#include <gui/widget/icons.h>
|
||||
@@ -143,7 +144,7 @@ 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);
|
||||
CMenuOptionChooser *autocheck = new CMenuOptionChooser(LOCALE_FLASHUPDATE_AUTOCHECK, &g_settings.softupdate_autocheck, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
|
||||
// apply_settings->setHint("", LOCALE_MENU_HINT_XXX);
|
||||
|
||||
w_upsettings.addItem(fw_update_dir);
|
||||
@@ -167,3 +168,15 @@ int CUpdateSettings::initMenu()
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CUpdateSettings::changeNotify(const neutrino_locale_t OptionName, void * /* data */)
|
||||
{
|
||||
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_FLASHUPDATE_AUTOCHECK))
|
||||
{
|
||||
CFlashUpdateCheck::getInstance()->stopThread();
|
||||
if (g_settings.softupdate_autocheck)
|
||||
CFlashUpdateCheck::getInstance()->startThread();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class CUrlConfigSetupNotifier : public CChangeObserver
|
||||
bool changeNotify(const neutrino_locale_t = NONEXISTANT_LOCALE, void *data = NULL);
|
||||
};
|
||||
|
||||
class CUpdateSettings : public CMenuTarget
|
||||
class CUpdateSettings : public CMenuTarget, CChangeObserver
|
||||
{
|
||||
private:
|
||||
int width;
|
||||
@@ -69,6 +69,7 @@ class CUpdateSettings : public CMenuTarget
|
||||
CUpdateSettings();
|
||||
~CUpdateSettings();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
bool changeNotify(const neutrino_locale_t = NONEXISTANT_LOCALE, void *data = NULL);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user