summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:28:13 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:28:13 +0200
commitf880068c5ce939b78ffe777d5791266af6bc3929 (patch)
tree2022675ede1ac329813ee61dc74faab491bcaaec
parent5ee9eea8553e1757ae6a1cdaf294dd69ff05ae4d (diff)
Added meta data request from gui.
-rw-r--r--plugingui/plugingui.cc4
-rw-r--r--src/drumgizmo.cc12
2 files changed, 14 insertions, 2 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 0a95e23..6530ea2 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -306,6 +306,10 @@ void PluginGUI::thread_main()
EngineSettingsMessage *msg = new EngineSettingsMessage();
msghandler.sendMessage(MSGRCV_ENGINE, msg);
}
+ { // Request meta data
+ DrumkitInfoMessage *msg = new DrumkitInfoMessage();
+ msghandler.sendMessage(MSGRCV_ENGINE, msg);
+ }
while(running) {
#ifdef WIN32
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 220f3e9..14a5516 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -72,9 +72,10 @@ bool DrumGizmo::loadkit(std::string file)
return false;
}
+ loader.metadata = parser.getMetaData();
+
DrumkitInfoMessage *msg = new DrumkitInfoMessage();
- MetaData metadata = parser.getMetaData();
- msg->metadata = metadata;
+ msg->metadata = loader.metadata;
msghandler.sendMessage(MSGRCV_UI, msg);
loader.loadKit(&kit);
@@ -142,6 +143,13 @@ void DrumGizmo::handleMessage(Message *msg)
msghandler.sendMessage(MSGRCV_UI, msg);
}
break;
+ case Message::DrumkitInfoMessage:
+ {
+ DrumkitInfoMessage *msg = new DrumkitInfoMessage();
+ msg->metadata = loader.metadata;
+ msghandler.sendMessage(MSGRC_UI, msg);
+ }
+ break;
case Message::ChangeSettingMessage:
{
ChangeSettingMessage *ch = (ChangeSettingMessage*)msg;