summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-09-23 20:52:44 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-09-23 20:52:44 +0200
commit5b4b2178dfdc7c91a59c3bc5c60e61e48aae0492 (patch)
treecdc85055dab8c3f0c9b4e7744ea3b176fbac9a2b /plugingui
parente1aeab0b62474e8a291237f82b151448dd39c577 (diff)
Saving lastkit and lastmidimap instantly when file is selected from filebrowser.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/plugingui.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index b235af3..f345660 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -94,11 +94,13 @@ static void selectKitFile(void *ptr, std::string filename)
PluginGUI *gui = (PluginGUI*)ptr;
gui->lineedit->setText(filename);
+
fb->hide();
std::string drumkit = gui->lineedit->text();
gui->config->lastkit = drumkit;
+ gui->config->save();
gui->progress->setProgress(0);
gui->progress->setState(GUI::ProgressBar::blue);
@@ -132,6 +134,7 @@ static void selectMapFile(void *ptr, std::string filename)
std::string midimap = gui->lineedit2->text();
gui->config->lastmidimap = midimap;
+ gui->config->save();
LoadMidimapMessage *msg = new LoadMidimapMessage();
msg->midimapfile = midimap;
@@ -334,7 +337,8 @@ void PluginGUI::init()
lineedit = new GUI::LineEdit(window);
lineedit->move(XOFFSET, y);
lineedit->resize(243, 29);
-
+ lineedit->setReadOnly(true);
+
GUI::Button *btn_brw = new GUI::Button(window);
btn_brw->setText("Browse...");
btn_brw->move(266, y - 6 + 4);
@@ -364,7 +368,8 @@ void PluginGUI::init()
lineedit2 = new GUI::LineEdit(window);
lineedit2->move(XOFFSET, y);
lineedit2->resize(243, 29);
-
+ lineedit2->setReadOnly(true);
+
GUI::Button *btn_brw = new GUI::Button(window);
btn_brw->setText("Browse...");
btn_brw->move(266, y - 6 + 4);