start_wizard: add handling update check

Origin commit data
------------------
Branch: ni/coolstream
Commit: 37b98da0e9
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-04-10 (Sat, 10 Apr 2021)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2021-04-10 22:19:43 +02:00
committed by vanhofen
parent 466c8da888
commit 7595027691
5 changed files with 30 additions and 1 deletions

View File

@@ -3028,6 +3028,9 @@ webtv.xml.auto WebTV-Dateien automatisch laden
window_size Fenstergröße in %
wizard.initial_settings Grundeinstellungen gefunden
wizard.install_settings Kanalliste für Astra 19.2°E installieren?
wizard.message_check_for_updates Aktualisierung
wizard.message_check_for_updates_ask_enable Soll zukünftig automatisch auf Aktualisierungen geprüft werden?\nDie Prüfung erfolgt dann automatisch bei jedem Start.\nDie Prüfung kann jederzeit auch manuell erfolgen und in den Aktualsierungseinstellungen angepasst werden.
wizard.message_check_for_updates_ask_now Jetzt auf Aktualisierungen prüfen?
wizard.setup Erste Installation
wizard.setup_advanced Erweitert
wizard.setup_easy Einfach

View File

@@ -3028,6 +3028,9 @@ webtv.xml.auto Auto-load WebTV files
window_size Window size in %
wizard.initial_settings Initial settings found
wizard.install_settings Do you want to install channels for Astra 19.2°E?
wizard.message_check_for_updates Update
wizard.message_check_for_updates_ask_enable Should updates be checked automatically in future? The check up will run automatically at background on each startup. The check up can also be launched manually at any time and can be adjusted by the update settings.
wizard.message_check_for_updates_ask_now Now check for updates?
wizard.setup First installation
wizard.setup_advanced Advanced
wizard.setup_easy Easy

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>
@@ -138,6 +139,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

@@ -3055,6 +3055,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

@@ -3055,6 +3055,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",