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

Origin commit data
------------------
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
This commit is contained in:
vanhofen
2019-03-24 17:51:08 +01:00
parent fb82c2b2b1
commit dd3771a15b

View File

@@ -97,7 +97,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
CFileFilter fileFilter;
fileFilter.addFilter("conf");
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());
printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str());
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") {
CFileBrowser fileBrowser;
fileBrowser.Dir_Mode = true;
if (fileBrowser.exec(CONFIGDIR) == true) {
if (fileBrowser.exec(g_settings.backup_dir.c_str()) == true) {
std::string fname = "keys.conf";
CKeyboardInput * sms = new CKeyboardInput(LOCALE_EXTRA_SAVEKEYS, &fname);
sms->exec(NULL, "");