VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-04 23:31:27 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-04 23:41:47 (GMT)
commit0ef137c0a4005eca6de49e754cab136e052a6496 (patch)
tree2a9167ab7690c389e01723f4e7fcf9a6bfa1b10b
parentbf13f88ffaef175bb6ff13beca30f76ed12bac6e (diff)
downloadVeraCrypt-0ef137c0a4005eca6de49e754cab136e052a6496.zip
VeraCrypt-0ef137c0a4005eca6de49e754cab136e052a6496.tar.gz
Windows: Correctly open online help when selected in menu. Remove unused parameters to function AppLink.
-rw-r--r--src/Common/Dlgcode.c22
-rw-r--r--src/Common/Dlgcode.h2
-rw-r--r--src/Common/Keyfiles.c2
-rw-r--r--src/Common/Language.c2
-rw-r--r--src/Format/Tcformat.c32
-rw-r--r--src/Mount/Favorites.cpp2
-rw-r--r--src/Mount/Mount.c26
-rw-r--r--src/Setup/Wizard.c10
8 files changed, 50 insertions, 48 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 11b17b1..eea34b8 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -1268,7 +1268,7 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
if (lw == IDC_HOMEPAGE)
{
- Applink ("main", TRUE, "");
+ Applink ("main");
return 1;
}
@@ -2546,7 +2546,7 @@ void DoPostInstallTasks (HWND hwndDlg)
if (FileExists (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL)))
{
if (AskYesNo ("AFTER_INSTALL_TUTORIAL", hwndDlg) == IDYES)
- Applink ("beginnerstutorial", TRUE, "");
+ Applink ("beginnerstutorial");
bDone = TRUE;
}
@@ -2554,7 +2554,7 @@ void DoPostInstallTasks (HWND hwndDlg)
if (FileExists (GetConfigPath (TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES)))
{
if (AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES", hwndDlg) == IDYES)
- Applink ("releasenotes", TRUE, "");
+ Applink ("releasenotes");
bDone = TRUE;
}
@@ -5729,12 +5729,12 @@ BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case IDC_HW_AES_LABEL_LINK:
- Applink ("hwacceleration", TRUE, "");
+ Applink ("hwacceleration");
return 1;
case IDC_PARALLELIZATION_LABEL_LINK:
- Applink ("parallelization", TRUE, "");
+ Applink ("parallelization");
return 1;
case IDCLOSE:
@@ -10038,7 +10038,8 @@ void OpenPageHelp (HWND hwndDlg, int nPage)
if (r == ERROR_FILE_NOT_FOUND)
{
- OpenOnlineHelp ();
+ // Open local HTML help. It will fallback to online help if not found.
+ Applink ("help");
return;
}
}
@@ -10053,7 +10054,7 @@ void OpenPageHelp (HWND hwndDlg, int nPage)
void OpenOnlineHelp ()
{
- Applink ("help", TRUE, "");
+ Applink ("onlinehelp");
}
@@ -10395,7 +10396,7 @@ std::wstring GetWindowsEdition ()
extern wchar_t InstallationPath[TC_MAX_PATH];
#endif
-void Applink (char *dest, BOOL bSendOS, char *extraOutput)
+void Applink (const char *dest)
{
wchar_t url [MAX_URL_LENGTH] = {0};
wchar_t page[TC_MAX_PATH] = {0};
@@ -10444,6 +10445,11 @@ void Applink (char *dest, BOOL bSendOS, char *extraOutput)
{
StringCbCopyW (page, sizeof (page),L"Documentation.html");
}
+ else if (strcmp(dest, "onlinehelp") == 0)
+ {
+ StringCbCopyW (url, sizeof (url),L"https://www.veracrypt.fr/en/Documentation.html");
+ buildUrl = FALSE;
+ }
else if (strcmp(dest, "keyfiles") == 0)
{
StringCbCopyW (page, sizeof (page),L"Keyfiles.html");
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index 110c8de..75196f8 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -450,7 +450,7 @@ BOOL IsServerOS ();
BOOL IsHiddenOSRunning (void);
BOOL EnableWow64FsRedirection (BOOL enable);
BOOL RestartComputer (BOOL bShutdown);
-void Applink (char *dest, BOOL bSendOS, char *extraOutput);
+void Applink (const char *dest);
wchar_t *RelativePath2Absolute (wchar_t *szFileName);
void HandleDriveNotReadyError (HWND hwnd);
BOOL CALLBACK CloseTCWindowsEnum( HWND hwnd, LPARAM lParam);
diff --git a/src/Common/Keyfiles.c b/src/Common/Keyfiles.c
index 96e1cd7..f69ea4f 100644
--- a/src/Common/Keyfiles.c
+++ b/src/Common/Keyfiles.c
@@ -617,7 +617,7 @@ BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
if (lw == IDC_LINK_KEYFILES_INFO)
{
- Applink ("keyfiles", TRUE, "");
+ Applink ("keyfiles");
return 1;
}
diff --git a/src/Common/Language.c b/src/Common/Language.c
index cb0178d..9df6e2a 100644
--- a/src/Common/Language.c
+++ b/src/Common/Language.c
@@ -539,7 +539,7 @@ BOOL CALLBACK LanguageDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
else
tmpstr[0] = 0;
- Applink ("localizations", TRUE, tmpstr);
+ Applink ("localizations");
return 1;
}
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 900b023..e7acdc6 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -5231,11 +5231,11 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
case IDC_MORE_INFO_ON_CONTAINERS:
- Applink ("introcontainer", TRUE, "");
+ Applink ("introcontainer");
return 1;
case IDC_MORE_INFO_ON_SYS_ENCRYPTION:
- Applink ("introsysenc", TRUE, "");
+ Applink ("introsysenc");
return 1;
}
}
@@ -5257,14 +5257,14 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
case IDC_HIDDEN_SYSENC_INFO_LINK:
- Applink ("hiddensysenc", TRUE, "");
+ Applink ("hiddensysenc");
return 1;
}
}
if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE && lw == IDC_HIDDEN_SYSENC_INFO_LINK)
{
- Applink ("hiddensysenc", TRUE, "");
+ Applink ("hiddensysenc");
return 1;
}
@@ -5387,7 +5387,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
break;
case IDC_MORE_INFO_SYS_ENCRYPTION:
- Applink ("sysencprogressinfo", TRUE, "");
+ Applink ("sysencprogressinfo");
return 1;
}
}
@@ -5478,7 +5478,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDC_HIDDEN_VOL_HELP && nCurPageNo == VOLUME_TYPE_PAGE)
{
- Applink ("hiddenvolume", TRUE, "");
+ Applink ("hiddenvolume");
return 1;
}
@@ -5530,32 +5530,32 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EAGetName (name, nIndex, 0);
if (wcscmp (name, L"AES") == 0)
- Applink ("aes", FALSE, "");
+ Applink ("aes");
else if (wcscmp (name, L"Serpent") == 0)
- Applink ("serpent", FALSE, "");
+ Applink ("serpent");
else if (wcscmp (name, L"Twofish") == 0)
- Applink ("twofish", FALSE, "");
+ Applink ("twofish");
else if (wcscmp (name, L"GOST89") == 0)
- Applink ("gost89", FALSE, "");
+ Applink ("gost89");
else if (wcscmp (name, L"Kuznyechik") == 0)
- Applink ("kuznyechik", FALSE, "");
+ Applink ("kuznyechik");
else if (wcscmp (name, L"Camellia") == 0)
- Applink ("camellia", FALSE, "");
+ Applink ("camellia");
else if (EAGetCipherCount (nIndex) > 1)
- Applink ("cascades", TRUE, "");
+ Applink ("cascades");
return 1;
}
if (lw == IDC_LINK_HASH_INFO && nCurPageNo == CIPHER_PAGE)
{
- Applink ("hashalgorithms", TRUE, "");
+ Applink ("hashalgorithms");
return 1;
}
if (lw == IDC_LINK_PIM_INFO && nCurPageNo == PIM_PAGE)
{
- Applink ("pim", TRUE, "");
+ Applink ("pim");
return 1;
}
@@ -5959,7 +5959,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (IsWindowsIsoBurnerAvailable())
LaunchWindowsIsoBurner (hwndDlg, szRescueDiskISO);
else
- Applink ("isoburning", TRUE, "");
+ Applink ("isoburning");
return 1;
}
diff --git a/src/Mount/Favorites.cpp b/src/Mount/Favorites.cpp
index ee34272..171873f 100644
--- a/src/Mount/Favorites.cpp
+++ b/src/Mount/Favorites.cpp
@@ -382,7 +382,7 @@ namespace VeraCrypt
return 1;
case IDC_FAVORITES_HELP_LINK:
- Applink (SystemFavoritesMode ? "sysfavorites" : "favorites", TRUE, "");
+ Applink (SystemFavoritesMode ? "sysfavorites" : "favorites");
return 1;
case IDC_SHOW_PIM:
HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PIM, IDC_PIM, 0);
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index f55b758..eca25c8 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -3491,7 +3491,7 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (lw == IDC_LINK_HIDVOL_PROTECTION_INFO)
{
- Applink ("hiddenvolprotection", TRUE, "");
+ Applink ("hiddenvolprotection");
}
if (lw == IDCANCEL)
@@ -7271,7 +7271,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else if (sel == IDM_HOMEPAGE_SYSTRAY)
{
- Applink ("home", TRUE, "");
+ Applink ("home");
}
else if (sel == IDCANCEL)
{
@@ -7898,7 +7898,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDM_DONATE)
{
- Applink ("donate", TRUE, "");
+ Applink ("donate");
return 1;
}
@@ -7910,17 +7910,17 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDM_WEBSITE)
{
- Applink ("website", TRUE, "");
+ Applink ("website");
return 1;
}
else if (lw == IDM_HOMEPAGE)
{
- Applink ("homepage", TRUE, "");
+ Applink ("homepage");
return 1;
}
else if (lw == IDM_ONLINE_TUTORIAL)
{
- Applink ("tutorial", TRUE, "");
+ Applink ("tutorial");
return 1;
}
else if (lw == IDM_ONLINE_HELP)
@@ -7930,27 +7930,27 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else if (lw == IDM_FAQ)
{
- Applink ("faq", TRUE, "");
+ Applink ("faq");
return 1;
}
else if (lw == IDM_TC_DOWNLOADS)
{
- Applink ("downloads", TRUE, "");
+ Applink ("downloads");
return 1;
}
else if (lw == IDM_NEWS)
{
- Applink ("news", TRUE, "");
+ Applink ("news");
return 1;
}
else if (lw == IDM_VERSION_HISTORY)
{
- Applink ("history", TRUE, "");
+ Applink ("history");
return 1;
}
else if (lw == IDM_CONTACT)
{
- Applink ("contact", FALSE, "");
+ Applink ("contact");
return 1;
}
@@ -10652,11 +10652,11 @@ static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM
return 1;
case IDC_MORE_INFO_ON_HW_ACCELERATION:
- Applink ("hwacceleration", TRUE, "");
+ Applink ("hwacceleration");
return 1;
case IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION:
- Applink ("parallelization", TRUE, "");
+ Applink ("parallelization");
return 1;
}
diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c
index f6bb70a..89be71a 100644
--- a/src/Setup/Wizard.c
+++ b/src/Setup/Wizard.c
@@ -682,11 +682,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
case IDC_DONATE:
{
- char tmpstr [200];
-
- StringCbPrintfA (tmpstr, sizeof(tmpstr), "&ref=%d", DonColorSchemeId);
-
- Applink ("donate", FALSE, tmpstr);
+ Applink ("donate");
}
return 1;
}
@@ -1160,7 +1156,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (bPromptReleaseNotes
&& AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES", hwndDlg) == IDYES)
{
- Applink ("releasenotes", TRUE, "");
+ Applink ("releasenotes");
}
bPromptReleaseNotes = FALSE;
@@ -1168,7 +1164,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (bPromptTutorial
&& AskYesNo ("AFTER_INSTALL_TUTORIAL", hwndDlg) == IDYES)
{
- Applink ("beginnerstutorial", TRUE, "");
+ Applink ("beginnerstutorial");
}
bPromptTutorial = FALSE;