diff options
Diffstat (limited to 'src/Main')
-rw-r--r-- | src/Main/FatalErrorHandler.cpp | 4 | ||||
-rw-r--r-- | src/Main/GraphicUserInterface.cpp | 74 | ||||
-rw-r--r-- | src/Main/GraphicUserInterface.h | 2 |
3 files changed, 46 insertions, 34 deletions
diff --git a/src/Main/FatalErrorHandler.cpp b/src/Main/FatalErrorHandler.cpp index 37a10e73..28587630 100644 --- a/src/Main/FatalErrorHandler.cpp +++ b/src/Main/FatalErrorHandler.cpp @@ -63,19 +63,19 @@ namespace VeraCrypt #endif wstringstream vars; vars << L"cpus=" << wxThread::GetCPUCount(); vars << L"&cksum=" << hex << FatalErrorHandler::GetAppChecksum() << dec; vars << L"&err=" << signalInfo->si_signo; vars << L"&addr=" << hex << faultingInstructionAddress << dec; vars << FatalErrorHandler::GetCallStack (16); - wxString url = Gui->GetHomepageLinkURL (L"err-report", true, vars.str()); + wxString url = Gui->GetHomepageLinkURL (L"err-report", vars.str()); url.Replace (L"=0x", L"="); url.Replace (L"=0X0x", L"=0x"); url.Replace (L"=0X", L"=0x"); wxString msg = L"A critical error has occurred and VeraCrypt must be terminated. If this is caused by a bug in VeraCrypt, we would like to fix it. To help us, you can send us an automatically generated error report containing the following items:\n\n- Program version\n- Operating system version\n- Hardware architecture\n- Checksum of VeraCrypt executable\n- Error category\n- Error address\n"; #if wxUSE_STACKWALKER == 1 msg += L"- VeraCrypt call stack\n"; #endif msg += L"\nIf you select 'Yes', the following URL (which contains the entire error report) will be opened in your default Internet browser.\n\n"; @@ -206,19 +206,19 @@ namespace VeraCrypt vars << L"cpus=" << wxThread::GetCPUCount(); vars << wxString::Format (L"&cksum=%x", GetAppChecksum()); vars << L"&exception=" << exName; vars << L"&exlocation=" << exPos; vars << FatalErrorHandler::GetCallStack (16); vars.Replace (L"::", L"."); vars.Replace (L":", L"."); - wxString url = Gui->GetHomepageLinkURL (L"err-report", true, vars); + wxString url = Gui->GetHomepageLinkURL (L"err-report", vars); url.Replace (L"=0x", L"="); url.Replace (L"=0X0x", L"=0x"); url.Replace (L"=0X", L"=0x"); wxString msg = L"An unhandled exception has occurred and VeraCrypt must be terminated. If this is caused by a bug in VeraCrypt, we would like to fix it. To help us, you can send us an automatically generated error report containing the following items:\n\n- Program version\n- Operating system version\n- Hardware architecture\n- Checksum of VeraCrypt executable\n- Error description\n- Error location\n"; #if wxUSE_STACKWALKER == 1 msg += L"- VeraCrypt call stack\n"; #endif msg += L"\nIf you select 'Yes', the following URL (which contains the entire error report) will be opened in your default Internet browser.\n\n"; diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index a5687a71..f69a2413 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1081,148 +1081,160 @@ namespace VeraCrypt { if (wxExecute (fileType->GetOpenCommand (document.GetFullPath())) != 0) return; } catch (TimeOut&) { } } #endif } - wxString GraphicUserInterface::GetHomepageLinkURL (const wxString &linkId, bool secure, const wxString &extraVars) const + wxString GraphicUserInterface::GetHomepageLinkURL (const wxString &linkId, const wxString &extraVars) const { - wxString url = wxString (StringConverter::ToWide (secure ? TC_APPLINK_SECURE : TC_APPLINK)); + wxString url = wxString (TC_APPLINK); + bool buildUrl = true; if (linkId == L"donate") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Donation#VeraCryptDonation"; + url = L"Donation.html"; } else if (linkId == L"main") { - url = wxString (StringConverter::ToWide (TC_HOMEPAGE)); + url = wxString (TC_HOMEPAGE); + buildUrl = false; } else if (linkId == L"localizations") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Language%20Packs"; + url = L"Language%20Packs.html"; } else if (linkId == L"beginnerstutorial" || linkId == L"tutorial") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Beginner%27s%20Tutorial"; + url = L"Beginner%27s%20Tutorial.html"; } else if (linkId == L"releasenotes" || linkId == L"history") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Release%20Notes"; + url = L"Release%20Notes.html"; } else if (linkId == L"hwacceleration") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Hardware%20Acceleration"; + url = L"Hardware%20Acceleration.html"; } else if (linkId == L"parallelization") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Parallelization"; + url = L"Parallelization.html"; } else if (linkId == L"help") { - url = L"https://veracrypt.codeplex.com/documentation"; + url = L"Documentation.html"; } else if (linkId == L"keyfiles") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Keyfiles"; + url = L"Keyfiles.html"; } else if (linkId == L"introcontainer") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Creating%20New%20Volumes"; + url = L"Creating%20New%20Volumes.html"; } else if (linkId == L"introsysenc") { - url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption"; + url = L"System%20Encryption.html"; } else if (linkId == L"hiddensysenc") { - url = L"https://veracrypt.codeplex.com/wikipage?title=VeraCrypt%20Hidden%20Operating%20System"; + url = L"VeraCrypt%20Hidden%20Operating%20System.html"; } else if (linkId == L"sysencprogressinfo") { - url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption"; + url = L"System%20Encryption.html"; } else if (linkId == L"hiddenvolume") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Hidden%20Volume"; + url = L"Hidden%20Volume.html"; } else if (linkId == L"aes") { - url = L"https://veracrypt.codeplex.com/wikipage?title=AES"; + url = L"AES.html"; } else if (linkId == L"serpent") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Serpent"; + url = L"Serpent.html"; } else if (linkId == L"twofish") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Twofish"; + url = L"Twofish.html"; } else if (linkId == L"camellia") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Camellia"; + url = L"Camellia.html"; } else if (linkId == L"kuznyechik") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Kuznyechik"; + url = L"Kuznyechik.html"; } else if (linkId == L"cascades") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Cascades"; + url = L"Cascades.html"; } else if (linkId == L"hashalgorithms") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Hash%20Algorithms"; + url = L"Hash%20Algorithms.html"; } else if (linkId == L"isoburning") { url = L"https://cdburnerxp.se/en/home"; + buildUrl = false; } else if (linkId == L"sysfavorites") { - url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Favorite%20Volumes"; + url = L"System%20Favorite%20Volumes.html"; } else if (linkId == L"favorites") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Favorite%20Volumes"; + url = L"Favorite%20Volumes.html"; } else if (linkId == L"hiddenvolprotection") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Protection%20of%20Hidden%20Volumes"; + url = L"Protection%20of%20Hidden%20Volumes.html"; } else if (linkId == L"faq") { - url = L"https://veracrypt.codeplex.com/wikipage?title=FAQ"; + url = L"FAQ.html"; } else if (linkId == L"downloads") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Downloads"; + url = L"Downloads.html"; } else if (linkId == L"news") { - url = L"https://veracrypt.codeplex.com/wikipage?title=News"; + url = L"News.html"; } else if (linkId == L"contact") { - url = L"https://veracrypt.codeplex.com/wikipage?title=Contact"; + url = L"Contact.html"; + } + else + { + buildUrl = false; + } + + if (buildUrl) + { + url = L"https://www.veracrypt.fr/en/" + url; } return url; } void GraphicUserInterface::OpenHomepageLink (wxWindow *parent, const wxString &linkId, const wxString &extraVars) { wxString url; BeginInteractiveBusyState (parent); - wxLaunchDefaultBrowser (GetHomepageLinkURL (linkId, false, extraVars), wxBROWSER_NEW_WINDOW); + wxLaunchDefaultBrowser (GetHomepageLinkURL (linkId, extraVars), wxBROWSER_NEW_WINDOW); Thread::Sleep (200); EndInteractiveBusyState (parent); } void GraphicUserInterface::OpenOnlineHelp (wxWindow *parent) { OpenHomepageLink (parent, L"help"); } diff --git a/src/Main/GraphicUserInterface.h b/src/Main/GraphicUserInterface.h index a7056f08..38f34201 100644 --- a/src/Main/GraphicUserInterface.h +++ b/src/Main/GraphicUserInterface.h @@ -47,19 +47,19 @@ namespace VeraCrypt virtual void EndBusyState () const { wxEndBusyCursor(); } virtual void EndInteractiveBusyState (wxWindow *window) const; virtual void ExportSecurityTokenKeyfile () const { ThrowTextModeRequired(); } virtual wxTopLevelWindow *GetActiveWindow () const; virtual shared_ptr <GetStringFunctor> GetAdminPasswordRequestHandler (); virtual int GetCharHeight (wxWindow *window) const; virtual int GetCharWidth (wxWindow *window) const; virtual int GetDefaultBorderSize () const { return 5; } virtual wxFont GetDefaultBoldFont (wxWindow *window) const; - virtual wxString GetHomepageLinkURL (const wxString &linkId, bool secure = false, const wxString &extraVars = wxEmptyString) const; + virtual wxString GetHomepageLinkURL (const wxString &linkId, const wxString &extraVars = wxEmptyString) const; virtual wxFrame *GetMainFrame () const { return mMainFrame; } virtual int GetScrollbarWidth (wxWindow *window, bool noScrollBar = false) const; virtual list <long> GetListCtrlSelectedItems (wxListCtrl *listCtrl) const; virtual wxString GetListCtrlSubItemText (wxListCtrl *listCtrl, long itemIndex, int columnIndex) const; virtual void ImportSecurityTokenKeyfiles () const { ThrowTextModeRequired(); } virtual void InitSecurityTokenLibrary () const; virtual void InsertToListCtrl (wxListCtrl *listCtrl, long itemIndex, const vector <wstring> &itemFields, int imageIndex = -1, void *itemDataPtr = nullptr) const; virtual bool IsInBackgroundMode () const { return BackgroundMode; } virtual bool IsTheOnlyTopLevelWindow (const wxWindow *window) const; |