mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
COPKGManager: add variable to hold last selected source dir
This commit is contained in:
@@ -90,6 +90,7 @@ COPKGManager::COPKGManager()
|
|||||||
list_installed_done = false;
|
list_installed_done = false;
|
||||||
list_upgradeable_done = false;
|
list_upgradeable_done = false;
|
||||||
expert_mode = false;
|
expert_mode = false;
|
||||||
|
local_dir = g_settings.update_dir.c_str();
|
||||||
CFileHelpers::createDir("/tmp/.opkg");
|
CFileHelpers::createDir("/tmp/.opkg");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,10 +145,11 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
|||||||
CFileBrowser fileBrowser;
|
CFileBrowser fileBrowser;
|
||||||
fileBrowser.Filter = &fileFilter;
|
fileBrowser.Filter = &fileFilter;
|
||||||
|
|
||||||
if (fileBrowser.exec(g_settings.update_dir.c_str()))
|
if (fileBrowser.exec(local_dir.c_str()))
|
||||||
{
|
{
|
||||||
string pgk_name = fileBrowser.getSelectedFile()->Name;
|
string pgk_name = fileBrowser.getSelectedFile()->Name;
|
||||||
int r = execCmd(pkg_types[OM_INSTALL] + pgk_name, true, true);
|
int r = execCmd(pkg_types[OM_INSTALL] + pgk_name, true, true);
|
||||||
|
local_dir = fileBrowser.getCurrentDir();
|
||||||
if (r) {
|
if (r) {
|
||||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pgk_name);
|
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pgk_name);
|
||||||
} else
|
} else
|
||||||
|
@@ -57,6 +57,7 @@ class COPKGManager : public CMenuTarget
|
|||||||
bool installed;
|
bool installed;
|
||||||
bool expert_mode;
|
bool expert_mode;
|
||||||
int menu_offset;
|
int menu_offset;
|
||||||
|
std::string local_dir;
|
||||||
|
|
||||||
int execCmd(const char* cmdstr, bool verbose = false, bool acknowledge = false);
|
int execCmd(const char* cmdstr, bool verbose = false, bool acknowledge = false);
|
||||||
int execCmd(std::string cmdstr, bool verbose = false, bool acknowledge = false) {
|
int execCmd(std::string cmdstr, bool verbose = false, bool acknowledge = false) {
|
||||||
|
Reference in New Issue
Block a user