mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
start_wizard: add handling update check
This commit is contained in:
@@ -48,10 +48,11 @@
|
||||
#include "scan_setup.h"
|
||||
#include "settings_manager.h"
|
||||
#include "videosettings.h"
|
||||
#include "opkg_manager.h"
|
||||
#include <zapit/zapit.h>
|
||||
#include <system/helpers.h>
|
||||
|
||||
#include <gui/widget/msgbox.h>
|
||||
#include "widget/msgbox.h"
|
||||
|
||||
#include <hardware/video.h>
|
||||
|
||||
@@ -133,6 +134,22 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
||||
res = CNetworkSetup::getInstance()->exec(NULL, "");
|
||||
CNetworkSetup::getInstance()->setWizardMode(SNeutrinoSettings::WIZARD_OFF);
|
||||
}
|
||||
|
||||
//package update check
|
||||
if(advanced && res != menu_return::RETURN_EXIT_ALL)
|
||||
{
|
||||
COPKGManager man(SNeutrinoSettings::WIZARD_START);
|
||||
if (man.hasOpkgSupport())
|
||||
{
|
||||
int msg = ShowMsg(LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES, LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES_ASK_NOW, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450);
|
||||
if (msg == CMsgBox::mbrYes)
|
||||
res = man.exec(NULL, "");
|
||||
msg = ShowMsg(LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES, LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES_ASK_ENABLE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450);
|
||||
if (msg == CMsgBox::mbrYes)
|
||||
g_settings.softupdate_autocheck_packages = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool init_settings = false;
|
||||
if (CFEManager::getInstance()->haveSat())
|
||||
init_settings = file_exists(CONFIGDIR "/initial/");
|
||||
|
@@ -2897,6 +2897,9 @@ typedef enum
|
||||
LOCALE_WINDOW_SIZE,
|
||||
LOCALE_WIZARD_INITIAL_SETTINGS,
|
||||
LOCALE_WIZARD_INSTALL_SETTINGS,
|
||||
LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES,
|
||||
LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES_ASK_ENABLE,
|
||||
LOCALE_WIZARD_MESSAGE_CHECK_FOR_UPDATES_ASK_NOW,
|
||||
LOCALE_WIZARD_SETUP,
|
||||
LOCALE_WIZARD_SETUP_ADVANCED,
|
||||
LOCALE_WIZARD_SETUP_EASY,
|
||||
|
@@ -2897,6 +2897,9 @@ const char * locale_real_names[] =
|
||||
"window_size",
|
||||
"wizard.initial_settings",
|
||||
"wizard.install_settings",
|
||||
"wizard.message_check_for_updates",
|
||||
"wizard.message_check_for_updates_ask_enable",
|
||||
"wizard.message_check_for_updates_ask_now",
|
||||
"wizard.setup",
|
||||
"wizard.setup_advanced",
|
||||
"wizard.setup_easy",
|
||||
|
Reference in New Issue
Block a user