summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 10:39:49 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 10:39:49 +0200
commit158838f9b52d21610626f55964170a3e82f6ccdb (patch)
tree0dee778483d667209aca5f2a0a09d9f0c213bca0 /plugingui
parentbef1d5542f926a3b942374707dd56041013d35ff (diff)
parent2699cb7d324ffb1d2adc62e1f62434397aa39e2d (diff)
Merge with master
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/pluginconfig.cc12
-rw-r--r--plugingui/pluginconfig.h4
-rw-r--r--plugingui/plugingui.cc6
3 files changed, 13 insertions, 9 deletions
diff --git a/plugingui/pluginconfig.cc b/plugingui/pluginconfig.cc
index 0beef6e..d4c4477 100644
--- a/plugingui/pluginconfig.cc
+++ b/plugingui/pluginconfig.cc
@@ -39,21 +39,25 @@ Config::~Config()
{
}
-void Config::load()
+bool Config::load()
{
lastkit.clear();
lastmidimap.clear();
- ConfigFile::load();
+ if(!ConfigFile::load()) {
+ return false;
+ }
lastkit = getValue("lastkit");
lastmidimap = getValue("lastmidimap");
+
+ return true;
}
-void Config::save()
+bool Config::save()
{
setValue("lastkit", lastkit);
setValue("lastmidimap", lastmidimap);
- ConfigFile::save();
+ return ConfigFile::save();
}
diff --git a/plugingui/pluginconfig.h b/plugingui/pluginconfig.h
index 29d2ef5..9bef1f0 100644
--- a/plugingui/pluginconfig.h
+++ b/plugingui/pluginconfig.h
@@ -34,8 +34,8 @@ public:
Config();
~Config();
- void load();
- void save();
+ bool load();
+ bool save();
std::string lastkit;
std::string lastmidimap;
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 60a75fc..170f4f9 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -169,10 +169,10 @@ void closeClick(void *ptr)
*/
PluginGUI::PluginGUI()
- : MessageReceiver(MSGRCV_UI), sem("plugingui")
+ : MessageReceiver(MSGRCV_UI)
+ , initialised(false)
+ , sem("plugingui")
{
- initialised = false;
-
windowClosedHandler = NULL;
changeMidimapHandler = NULL;