mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
update.cpp: remove pkg management stuff from image update
Was broken here, and it's easier for users of package manager to handle since last changes of package manager, and it's easier to maintain class CFlashUpdate without impact of package manager.
This commit is contained in:
@@ -48,9 +48,6 @@
|
||||
|
||||
#include <gui/color.h>
|
||||
#include <gui/filebrowser.h>
|
||||
#if ENABLE_PKG_MANAGEMENT
|
||||
#include <gui/opkg_manager.h>
|
||||
#endif
|
||||
#include <gui/widget/menue_options.h>
|
||||
#include <gui/widget/msgbox.h>
|
||||
#include <gui/widget/hintbox.h>
|
||||
@@ -468,8 +465,7 @@ bool CFlashUpdate::checkVersion4Update()
|
||||
UpdatesFilter.addFilter("zip");
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string filters[] = {"bin", "txt", "opk", "ipk"};
|
||||
std::string filters[] = {"bin", "txt"};
|
||||
for (size_t i = 0; i < sizeof(filters) / sizeof(filters[0]) ; i++)
|
||||
UpdatesFilter.addFilter(filters[i]);
|
||||
|
||||
@@ -501,27 +497,6 @@ bool CFlashUpdate::checkVersion4Update()
|
||||
}
|
||||
hide();
|
||||
|
||||
#if ENABLE_PKG_MANAGEMENT
|
||||
// package install:
|
||||
if (file_selected->getType() == CFile::FILE_PKG_PACKAGE)
|
||||
{
|
||||
COPKGManager opkg;
|
||||
if (opkg.hasOpkgSupport())
|
||||
{
|
||||
int msgres = ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_WARNING_3RDPARTY_PACKAGES, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE, 700);
|
||||
if (msgres == CMsgBox::mbrYes)
|
||||
{
|
||||
if (!opkg.installPackage(UpdatesBrowser.getSelectedFile()->Name))
|
||||
DisplayErrorMessage(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL));
|
||||
}
|
||||
}
|
||||
else
|
||||
DisplayInfoMessage(g_Locale->getText(LOCALE_MESSAGEBOX_FEATURE_NOT_SUPPORTED));
|
||||
// !always leave here!
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// set internal filetype
|
||||
char const *ptr = rindex(filename.c_str(), '.');
|
||||
if (ptr)
|
||||
|
Reference in New Issue
Block a user