summaryrefslogtreecommitdiff
path: root/ui/msg_popup.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:17:51 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:17:51 +0200
commit237aedc590b58c0e69d7dfcac92b5f767b7c004a (patch)
tree83f361a82ba483f2daf83b677e8685cd953812d9 /ui/msg_popup.cpp
parent4.5 (diff)
downloadFreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.gz
FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.bz2
FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.zip
4.6
Diffstat (limited to 'ui/msg_popup.cpp')
-rw-r--r--ui/msg_popup.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp
index a59c77ef..e5540082 100644
--- a/ui/msg_popup.cpp
+++ b/ui/msg_popup.cpp
@@ -16,7 +16,10 @@ using namespace zen;
class ErrorDlg : public ErrorDlgGenerated
{
public:
- ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxString& messageText, bool& ignoreNextErrors);
+ ErrorDlg(wxWindow* parentWindow,
+ int activeButtons,
+ const wxString& messageText,
+ bool* ignoreNextErrors);
private:
void OnClose(wxCloseEvent& event);
@@ -24,11 +27,11 @@ private:
void OnRetry(wxCommandEvent& event);
void OnAbort(wxCommandEvent& event);
- bool& ignoreErrors;
+ bool* ignoreErrors;
};
-ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxString& messageText, bool& ignoreNextErrors) :
+ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxString& messageText, bool* ignoreNextErrors) :
ErrorDlgGenerated(parentWindow),
ignoreErrors(ignoreNextErrors)
{
@@ -38,7 +41,11 @@ ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxStri
m_bitmap10->SetBitmap(GlobalResources::getImage(wxT("error")));
m_textCtrl8->SetValue(messageText);
- m_checkBoxIgnoreErrors->SetValue(ignoreNextErrors);
+
+ if (ignoreNextErrors)
+ m_checkBoxIgnoreErrors->SetValue(*ignoreNextErrors);
+ else
+ m_checkBoxIgnoreErrors->Hide();
if (~activeButtons & ReturnErrorDlg::BUTTON_IGNORE)
{
@@ -70,26 +77,26 @@ void ErrorDlg::OnClose(wxCloseEvent& event)
void ErrorDlg::OnIgnore(wxCommandEvent& event)
{
- ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
+ if (ignoreErrors) *ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
EndModal(ReturnErrorDlg::BUTTON_IGNORE);
}
void ErrorDlg::OnRetry(wxCommandEvent& event)
{
- ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
+ if (ignoreErrors) *ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
EndModal(ReturnErrorDlg::BUTTON_RETRY);
}
void ErrorDlg::OnAbort(wxCommandEvent& event)
{
- ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
+ if (ignoreErrors) *ignoreErrors = m_checkBoxIgnoreErrors->GetValue();
EndModal(ReturnErrorDlg::BUTTON_ABORT);
}
-ReturnErrorDlg::ButtonPressed zen::showErrorDlg(int activeButtons, const wxString& messageText, bool& ignoreNextErrors)
+ReturnErrorDlg::ButtonPressed zen::showErrorDlg(int activeButtons, const wxString& messageText, bool* ignoreNextErrors)
{
ErrorDlg errorDlg(NULL, activeButtons, messageText, ignoreNextErrors);
errorDlg.Raise();
bgstack15