summaryrefslogtreecommitdiff
path: root/ui/checkVersion.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:04:59 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:04:59 +0200
commitf570e2f2685aa43aa518c2f8578391c1847cddbe (patch)
treeb9376b3a7e807c5e0c4cf3d5615c14034d9675d6 /ui/checkVersion.cpp
parent3.2 (diff)
downloadFreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.gz
FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.bz2
FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.zip
3.3
Diffstat (limited to 'ui/checkVersion.cpp')
-rw-r--r--ui/checkVersion.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/ui/checkVersion.cpp b/ui/checkVersion.cpp
index 2fb57ec6..9ecb8876 100644
--- a/ui/checkVersion.cpp
+++ b/ui/checkVersion.cpp
@@ -1,12 +1,12 @@
#include "checkVersion.h"
-
+#include <wx/msgdlg.h>
#include <wx/protocol/http.h>
#include <wx/sstream.h>
#include "../version/version.h"
-#include <wx/msgdlg.h>
#include <wx/utils.h>
#include <wx/timer.h>
#include "../shared/globalFunctions.h"
+#include "smallDialogs.h"
class CloseConnectionOnExit
@@ -112,9 +112,15 @@ void FreeFileSync::checkForUpdatePeriodically(long& lastUpdateCheck)
{
if (lastUpdateCheck == 0)
{
- const int rv = wxMessageBox(_("Do you want FreeFileSync to automatically check for updates every week?"), _("Information"), wxYES_NO | wxICON_QUESTION);
- if (rv == wxYES)
- {
+ QuestionDlg* const messageDlg = new QuestionDlg(NULL,
+ QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL,
+ wxString(_("Do you want FreeFileSync to automatically check for updates every week?")) + wxT("\n") +
+ _("(Requires an Internet connection!)"));
+
+ const bool checkRegularly = messageDlg->ShowModal() == QuestionDlg::BUTTON_YES;
+ messageDlg->Destroy();
+ if (checkRegularly)
+ {
lastUpdateCheck = 123; //some old date (few seconds after 1970)
checkForUpdatePeriodically(lastUpdateCheck); //check for updates now
@@ -140,6 +146,3 @@ void FreeFileSync::checkForUpdatePeriodically(long& lastUpdateCheck)
}
}
-
-
-
bgstack15