keybind-setup: use g_settings.backup_dir to save/load keys

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6aca3dcbfb
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-03-24 (Sun, 24 Mar 2019)

Origin message was:
------------------
- keybind-setup: use g_settings.backup_dir to save/load keys

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-03-24 17:51:08 +01:00
parent 2cb4df52ea
commit 1e4cd89897

View File

@@ -97,7 +97,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
CFileFilter fileFilter; CFileFilter fileFilter;
fileFilter.addFilter("conf"); fileFilter.addFilter("conf");
fileBrowser.Filter = &fileFilter; fileBrowser.Filter = &fileFilter;
if (fileBrowser.exec(CONFIGDIR) == true) { if (fileBrowser.exec(g_settings.backup_dir.c_str()) == true) {
CNeutrinoApp::getInstance()->loadKeys(fileBrowser.getSelectedFile()->Name.c_str()); CNeutrinoApp::getInstance()->loadKeys(fileBrowser.getSelectedFile()->Name.c_str());
printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str()); printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str());
for (int i = 0; i < KEYBINDS_COUNT; i++){ for (int i = 0; i < KEYBINDS_COUNT; i++){
@@ -109,7 +109,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
else if(actionKey == "savekeys") { else if(actionKey == "savekeys") {
CFileBrowser fileBrowser; CFileBrowser fileBrowser;
fileBrowser.Dir_Mode = true; fileBrowser.Dir_Mode = true;
if (fileBrowser.exec(CONFIGDIR) == true) { if (fileBrowser.exec(g_settings.backup_dir.c_str()) == true) {
std::string fname = "keys.conf"; std::string fname = "keys.conf";
CKeyboardInput * sms = new CKeyboardInput(LOCALE_EXTRA_SAVEKEYS, &fname); CKeyboardInput * sms = new CKeyboardInput(LOCALE_EXTRA_SAVEKEYS, &fname);
sms->exec(NULL, ""); sms->exec(NULL, "");