commit 3621081bbcaf2672ed023149cf1814f611309547
parent 57a4749c713d4b8d72ae3e93f61c57c1b2f1023a
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sat, 5 Dec 2015 22:53:59 -0800
block input on the progress dialog when a message box is shown over
Diffstat:
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/dialog.cpp b/src/dialog.cpp
@@ -97,6 +97,11 @@ void Dialog::center()
SetWindowPos(m_handle, HWND_TOP, left, top, 0, 0, SWP_NOSIZE);
}
+void Dialog::setEnabled(const bool enabled)
+{
+ EnableWindow(m_handle, enabled);
+}
+
void Dialog::onInit()
{
}
diff --git a/src/dialog.hpp b/src/dialog.hpp
@@ -25,7 +25,9 @@ public:
void init(REAPER_PLUGIN_HINSTANCE, HWND);
HWND handle() const { return m_handle; }
+
bool isVisible() const { return m_isVisible; }
+ void setEnabled(const bool);
void show();
void hide();
diff --git a/src/reapack.cpp b/src/reapack.cpp
@@ -134,11 +134,15 @@ Transaction *ReaPack::createTransaction()
});
m_transaction->onFinish([=] {
+ m_progress->setEnabled(false);
+
if(m_transaction->packages().empty())
ShowMessageBox("Nothing to do!", "ReaPack", 0);
else
ShowMessageBox("Synchronization complete!", "ReaPack", 0);
+ m_progress->setEnabled(true);
+
m_progress->setTransaction(0);
m_progress->hide();