diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /ui/batch_status_handler.cpp | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'ui/batch_status_handler.cpp')
-rw-r--r-- | ui/batch_status_handler.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp index 0dfd6957..a72aab3e 100644 --- a/ui/batch_status_handler.cpp +++ b/ui/batch_status_handler.cpp @@ -8,8 +8,9 @@ #include <zen/file_handling.h> #include <zen/file_traverser.h> #include <zen/format_unit.h> -#include <wx+/app_main.h> +//#include <wx+/app_main.h> #include <wx+/shell_execute.h> +#include <wx/app.h> #include "msg_popup.h" #include "exec_finished_box.h" #include "../lib/ffs_paths.h" @@ -217,7 +218,7 @@ BatchStatusHandler::~BatchStatusHandler() } else { - if (progressDlg->getAsWindow()->IsShown()) + if (progressDlg->getWindowIfVisible()) showFinalResults = true; //execute "on completion" command (even in case of ignored errors) @@ -236,7 +237,7 @@ BatchStatusHandler::~BatchStatusHandler() if (showFinalResults) //warning: wxWindow::Show() is called within processHasFinished()! { //notify about (logical) application main window => program won't quit, but stay on this dialog - setMainWindow(progressDlg->getAsWindow()); + //setMainWindow(progressDlg->getAsWindow()); -> not required anymore since we block waiting until dialog is closed below //notify to progressDlg that current process has ended if (abortIsRequested()) @@ -257,7 +258,7 @@ BatchStatusHandler::~BatchStatusHandler() //-> 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)); } } @@ -306,7 +307,7 @@ void BatchStatusHandler::reportWarning(const std::wstring& warningMessage, bool& forceUiRefresh(); bool dontWarnAgain = false; - switch (showWarningDlg(progressDlg->getAsWindow(), + switch (showWarningDlg(progressDlg->getWindowIfVisible(), ReturnWarningDlg::BUTTON_IGNORE | ReturnWarningDlg::BUTTON_SWITCH | ReturnWarningDlg::BUTTON_CANCEL, warningMessage + L"\n\n" + _("Press \"Switch\" to resolve issues in FreeFileSync main dialog."), dontWarnAgain)) @@ -352,7 +353,7 @@ ProcessCallback::Response BatchStatusHandler::reportError(const std::wstring& er forceUiRefresh(); bool ignoreNextErrors = false; - switch (showErrorDlg(progressDlg->getAsWindow(), + switch (showErrorDlg(progressDlg->getWindowIfVisible(), ReturnErrorDlg::BUTTON_IGNORE | ReturnErrorDlg::BUTTON_RETRY | ReturnErrorDlg::BUTTON_CANCEL, errorMessage, &ignoreNextErrors)) { @@ -399,7 +400,7 @@ void BatchStatusHandler::reportFatalError(const std::wstring& errorMessage) forceUiRefresh(); bool ignoreNextErrors = false; - switch (showFatalErrorDlg(progressDlg->getAsWindow(), + switch (showFatalErrorDlg(progressDlg->getWindowIfVisible(), ReturnFatalErrorDlg::BUTTON_IGNORE | ReturnFatalErrorDlg::BUTTON_CANCEL, errorMessage, &ignoreNextErrors)) { |