summaryrefslogtreecommitdiff
path: root/src/organizerproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/organizerproxy.cpp')
-rw-r--r--src/organizerproxy.cpp40
1 files changed, 32 insertions, 8 deletions
diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp
index a47e8798..0c1fb409 100644
--- a/src/organizerproxy.cpp
+++ b/src/organizerproxy.cpp
@@ -324,6 +324,19 @@ MOBase::IPluginGame const* OrganizerProxy::managedGame() const
bool OrganizerProxy::onAboutToRun(const std::function<bool(const QString&)>& func)
{
+ return m_Proxied
+ ->onAboutToRun(MOShared::callIfPluginActive(
+ this,
+ [func](const QString& binary, const QDir&, const QString&) {
+ return func(binary);
+ },
+ true))
+ .connected();
+}
+
+bool OrganizerProxy::onAboutToRun(
+ const std::function<bool(const QString&, const QDir&, const QString&)>& func)
+{
return m_Proxied->onAboutToRun(MOShared::callIfPluginActive(this, func, true))
.connected();
}
@@ -334,6 +347,25 @@ bool OrganizerProxy::onFinishedRun(
return m_Proxied->onFinishedRun(MOShared::callIfPluginActive(this, func)).connected();
}
+bool OrganizerProxy::onUserInterfaceInitialized(
+ std::function<void(QMainWindow*)> const& func)
+{
+ // Always call this one to allow plugin to initialize themselves even when not active:
+ return m_UserInterfaceInitialized.connect(func).connected();
+}
+
+bool OrganizerProxy::onNextRefresh(const std::function<void()>& func,
+ bool immediateIfPossible)
+{
+ using enum OrganizerCore::RefreshCallbackMode;
+ return m_Proxied
+ ->onNextRefresh(MOShared::callIfPluginActive(this, func),
+ OrganizerCore::RefreshCallbackGroup::EXTERNAL,
+ immediateIfPossible ? RUN_NOW_IF_POSSIBLE
+ : FORCE_WAIT_FOR_REFRESH)
+ .connected();
+}
+
bool OrganizerProxy::onProfileCreated(std::function<void(IProfile*)> const& func)
{
return m_ProfileCreated.connect(func).connected();
@@ -355,14 +387,6 @@ bool OrganizerProxy::onProfileChanged(
{
return m_ProfileChanged.connect(func).connected();
}
-
-bool OrganizerProxy::onUserInterfaceInitialized(
- std::function<void(QMainWindow*)> const& func)
-{
- // Always call this one to allow plugin to initialize themselves even when not active:
- return m_UserInterfaceInitialized.connect(func).connected();
-}
-
// Always call these one, otherwise plugin cannot detect they are being enabled /
// disabled:
bool OrganizerProxy::onPluginSettingChanged(