diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 15556f180..793e536ce 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -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 diff --git a/src/gui/opkg_manager.h b/src/gui/opkg_manager.h index 7fac42452..c93fb5d38 100644 --- a/src/gui/opkg_manager.h +++ b/src/gui/opkg_manager.h @@ -57,7 +57,7 @@ class COPKGManager : public CMenuTarget bool installed; bool expert_mode; int menu_offset; - std::string local_dir; + std::string *local_dir; int execCmd(const char* cmdstr, bool verbose = false, bool acknowledge = false); int execCmd(std::string cmdstr, bool verbose = false, bool acknowledge = false) { diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 9d68da15e..385a36a70 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -766,7 +766,9 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.font_file = configfile.getString("font_file", FONTDIR"/neutrino.ttf"); g_settings.ttx_font_file = configfile.getString( "ttx_font_file", FONTDIR"/DejaVuLGCSansMono-Bold.ttf"); ttx_font_file = g_settings.ttx_font_file.c_str(); + g_settings.update_dir = configfile.getString("update_dir", "/tmp"); + g_settings.update_dir_opkg = configfile.getString("update_dir_opkg", g_settings.update_dir); // parentallock if (!parentallocked) { @@ -1239,6 +1241,8 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString("softupdate_proxypassword" , g_settings.softupdate_proxypassword ); configfile.setString("update_dir", g_settings.update_dir); + configfile.setString("update_dir_opkg", g_settings.update_dir_opkg); + configfile.setString("font_file", g_settings.font_file); configfile.setString("ttx_font_file", g_settings.ttx_font_file); diff --git a/src/system/settings.h b/src/system/settings.h index 21a4d336d..c07a7428a 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -608,6 +608,9 @@ struct SNeutrinoSettings int flashupdate_createimage_add_spare; int flashupdate_createimage_add_kernel; + std::string update_dir; + std::string update_dir_opkg; + //BouquetHandling int bouquetlist_mode; @@ -725,7 +728,7 @@ struct SNeutrinoSettings int sms_channel; std::string font_file; std::string ttx_font_file; - std::string update_dir; + // USERMENU typedef enum {