summaryrefslogtreecommitdiff
path: root/plugingui/plugingui.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-08 07:30:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-08 07:30:10 +0200
commit02f78d5eb03670bc07f615ad629e1ec03959be14 (patch)
tree544ce15e8aabd0b9ae4b59221db040d8ab9e7170 /plugingui/plugingui.cc
parentf8740b3195bdff33d11d4cd23cdd791aec175c5c (diff)
Refactored EventHandler and friends.
Diffstat (limited to 'plugingui/plugingui.cc')
-rw-r--r--plugingui/plugingui.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 0a68d72..9bb451d 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -224,10 +224,9 @@ void PluginGUI::deinit()
if(window) delete window;
}
-void closeEventHandler(void *ptr)
+void PluginGUI::closeEventHandler()
{
- volatile bool *closing = (volatile bool*)ptr;
- *closing = true;
+ closing = true;
}
void PluginGUI::init()
@@ -238,8 +237,8 @@ void PluginGUI::init()
config->load();
window = new Window();
- window->eventHandler()->registerCloseHandler(closeEventHandler,
- (void*)&closing);
+ auto eventHandler = window->eventHandler();
+ CONNECT(eventHandler, closeNotifier, this, &PluginGUI::closeEventHandler);
window->setFixedSize(370, 330);
window->setCaption("DrumGizmo v" VERSION);