start_wizard: avoid complete initial of COPKGManager object

For a little less effort.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 9e2a752367
Author: Thilo Graf <dbt@novatux.de>
Date: 2023-04-28 (Fri, 28 Apr 2023)



------------------
This commit was generated by Migit
This commit is contained in:
2023-04-28 23:35:57 +02:00
committed by vanhofen
parent 09aae408f2
commit 966c29f508

View File

@@ -124,12 +124,14 @@ int CStartUpWizard::exec(CMenuTarget *parent, const string &/*actionKey*/)
// package update check
if (res != menu_return::RETURN_EXIT_ALL)
{
COPKGManager man(SNeutrinoSettings::WIZARD_START);
if (man.hasOpkgSupport())
if (COPKGManager::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)
{
COPKGManager man(SNeutrinoSettings::WIZARD_START);
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;