From 5fbf92bc07793a5699f06706bdba3caa7d02bc10 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Thu, 26 Jul 2018 23:16:15 -0700 Subject: [PATCH] bugfix for extensions --- GUI/extensions.h | 2 ++ GUI/hostsignaller.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/GUI/extensions.h b/GUI/extensions.h index df0ce6a..3937f40 100644 --- a/GUI/extensions.h +++ b/GUI/extensions.h @@ -6,10 +6,12 @@ #include #include #include +#include std::map LoadExtensions(); std::wstring DispatchSentenceToExtensions(std::wstring sentence, std::unordered_map miscInfo); typedef std::wstring(*ExtensionFunction)(std::wstring, std::unordered_map&); +extern QComboBox* ttCombo; #endif // EXTENSIONS_H diff --git a/GUI/hostsignaller.cpp b/GUI/hostsignaller.cpp index 6d89421..7287f81 100644 --- a/GUI/hostsignaller.cpp +++ b/GUI/hostsignaller.cpp @@ -10,7 +10,10 @@ void HostSignaller::Initialize() emit AddThread(thread); thread->RegisterOutputCallBack([&](TextThread* thread, std::wstring output) { - output = DispatchSentenceToExtensions(output, {}); + output = DispatchSentenceToExtensions(output, + { + { "current select", ttCombo->currentText().split(":")[0].toInt() == thread->Number() ? 1 : 0 } + }); emit ThreadOutput(thread, QString::fromWCharArray(output.c_str())); return output; });