diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:09:24 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:09:24 +0200 |
commit | b5f042a6c132c1b97cf03c4615bab966c23f57d2 (patch) | |
tree | 1cb057a0ffd51264bb3c9807e2133505ce312eb1 /ui/check_version.cpp | |
parent | 3.11 (diff) | |
download | FreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.tar.gz FreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.tar.bz2 FreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.zip |
3.12
Diffstat (limited to 'ui/check_version.cpp')
-rw-r--r-- | ui/check_version.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/ui/check_version.cpp b/ui/check_version.cpp index d9f892d9..cd1d4c48 100644 --- a/ui/check_version.cpp +++ b/ui/check_version.cpp @@ -95,15 +95,8 @@ bool newerVersionExists(const wxString& onlineVersion) if (online.empty() || online[0] == 0) //onlineVersion may be "This website has been moved..." In this case better check for an update return true; - current.resize(std::max(current.size(), online.size())); - online. resize(std::max(current.size(), online.size())); - - typedef std::vector<size_t>::const_iterator VerIter; - const std::pair<VerIter, VerIter> mm = std::mismatch (current.begin(), current.end(), - online.begin()); - - return mm.first == current.end() ? false : //both versions match - *mm.first < *mm.second; + return std::lexicographical_compare(current.begin(), current.end(), + online.begin(), online.end()); } @@ -120,7 +113,7 @@ void ffs3::checkForUpdateNow() { const int rv = wxMessageBox(wxString(_("A newer version of FreeFileSync is available:")) + wxT(" v") + onlineVersion + wxT(". ") + _("Download now?"), _("Information"), wxYES_NO | wxICON_QUESTION); if (rv == wxYES) - wxLaunchDefaultBrowser(wxT("http://sourceforge.net/project/showfiles.php?group_id=234430")); + wxLaunchDefaultBrowser(wxT("http://sourceforge.net/projects/freefilesync/files/")); } else wxMessageBox(_("FreeFileSync is up to date!"), _("Information"), wxICON_INFORMATION); @@ -139,7 +132,7 @@ void ffs3::checkForUpdatePeriodically(long& lastUpdateCheck) if (lastUpdateCheck == 0) { QuestionDlg* const messageDlg = new QuestionDlg(NULL, - QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_CANCEL, + QuestionDlg::BUTTON_YES | QuestionDlg::BUTTON_NO, wxString(_("Do you want FreeFileSync to automatically check for updates every week?")) + wxT("\n") + _("(Requires an Internet connection!)")); @@ -166,7 +159,7 @@ void ffs3::checkForUpdatePeriodically(long& lastUpdateCheck) { const int rv = wxMessageBox(wxString(_("A newer version of FreeFileSync is available:")) + wxT(" v") + onlineVersion + wxT(". ") + _("Download now?"), _("Information"), wxYES_NO | wxICON_QUESTION); if (rv == wxYES) - wxLaunchDefaultBrowser(wxT("http://sourceforge.net/project/showfiles.php?group_id=234430")); + wxLaunchDefaultBrowser(wxT("http://sourceforge.net/projects/freefilesync/files/")); } } } |