summaryrefslogtreecommitdiff
path: root/ui/gui_status_handler.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
commit669df123648aaa6aeccc70206b5417bc48b4e9ae (patch)
tree463c107a8d6405020bb304f7a7253e6b64afeee0 /ui/gui_status_handler.cpp
parent5.18 (diff)
downloadFreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip
5.19
Diffstat (limited to 'ui/gui_status_handler.cpp')
-rw-r--r--ui/gui_status_handler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index db92c24c..0131af3f 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -8,6 +8,7 @@
#include <wx/wupdlock.h>
#include <wx+/shell_execute.h>
#include <wx+/button.h>
+#include <wx/app.h>
#include "msg_popup.h"
#include "main_dlg.h"
#include "exec_finished_box.h"
@@ -169,13 +170,12 @@ void CompareStatusHandler::abortThisProcess()
//########################################################################################################
-SyncStatusHandler::SyncStatusHandler(wxTopLevelWindow* parentDlg,
+SyncStatusHandler::SyncStatusHandler(wxFrame* parentDlg,
size_t lastSyncsLogFileSizeMax,
OnGuiError handleError,
const std::wstring& jobName,
const std::wstring& execWhenFinished,
std::vector<std::wstring>& execFinishedHistory) :
- parentDlg_(parentDlg),
progressDlg(createProgressDialog(*this, [this] { this->onProgressDialogTerminate(); }, *this, parentDlg, true, jobName, execWhenFinished, execFinishedHistory)),
lastSyncsLogFileSizeMax_(lastSyncsLogFileSizeMax),
handleError_(handleError),
@@ -267,7 +267,7 @@ SyncStatusHandler::~SyncStatusHandler()
//-> nicely manages dialog lifetime
while (progressDlg)
{
- updateUiNow(); //*first* refresh GUI (removing flicker) before sleeping!
+ wxTheApp->Yield(); //*first* refresh GUI (removing flicker) before sleeping!
boost::this_thread::sleep(boost::posix_time::milliseconds(UI_UPDATE_INTERVAL));
}
}
@@ -313,7 +313,7 @@ ProcessCallback::Response SyncStatusHandler::reportError(const std::wstring& err
forceUiRefresh();
bool ignoreNextErrors = false;
- switch (showErrorDlg(parentDlg_,
+ switch (showErrorDlg(progressDlg->getWindowIfVisible(),
ReturnErrorDlg::BUTTON_IGNORE | ReturnErrorDlg::BUTTON_RETRY | ReturnErrorDlg::BUTTON_CANCEL,
errorMessage,
&ignoreNextErrors))
@@ -357,7 +357,7 @@ void SyncStatusHandler::reportFatalError(const std::wstring& errorMessage)
forceUiRefresh();
bool ignoreNextErrors = false;
- switch (showFatalErrorDlg(parentDlg_,
+ switch (showFatalErrorDlg(progressDlg->getWindowIfVisible(),
ReturnFatalErrorDlg::BUTTON_IGNORE | ReturnFatalErrorDlg::BUTTON_CANCEL,
errorMessage, &ignoreNextErrors))
{
@@ -395,7 +395,7 @@ void SyncStatusHandler::reportWarning(const std::wstring& warningMessage, bool&
forceUiRefresh();
bool dontWarnAgain = false;
- switch (showWarningDlg(parentDlg_,
+ switch (showWarningDlg(progressDlg->getWindowIfVisible(),
ReturnWarningDlg::BUTTON_IGNORE | ReturnWarningDlg::BUTTON_CANCEL,
warningMessage, dontWarnAgain))
{
bgstack15