start_wizard: add handling update check

This commit is contained in:
2021-04-10 15:51:30 +02:00
parent 844b4050b1
commit f25831e90e
5 changed files with 30 additions and 1 deletions

View File

@@ -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/");

View File

@@ -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,

View File

@@ -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",