mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
COPKGManager: remember for last selected update directory
Use g_settings to handle local package directory.
Extra settings handler via gui for this directory is not intended. Default update directory
is the same like in flash settings.
Origin commit data
------------------
Commit: 1606cf8a30
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-28 (Fri, 28 Nov 2014)
This commit is contained in:
@@ -90,7 +90,7 @@ COPKGManager::COPKGManager()
|
||||
list_installed_done = false;
|
||||
list_upgradeable_done = false;
|
||||
expert_mode = false;
|
||||
local_dir = g_settings.update_dir.c_str();
|
||||
local_dir = &g_settings.update_dir_opkg;
|
||||
CFileHelpers::createDir("/tmp/.opkg");
|
||||
}
|
||||
|
||||
@@ -148,11 +148,11 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
||||
CFileBrowser fileBrowser;
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
|
||||
if (fileBrowser.exec(local_dir.c_str()))
|
||||
if (fileBrowser.exec((*local_dir).c_str()))
|
||||
{
|
||||
string pgk_name = fileBrowser.getSelectedFile()->Name;
|
||||
int r = execCmd(pkg_types[OM_INSTALL] + pgk_name, true, true);
|
||||
local_dir = fileBrowser.getCurrentDir();
|
||||
*local_dir = fileBrowser.getCurrentDir();
|
||||
if (r) {
|
||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pgk_name);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user