VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
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 /src/Common
parentbf13f88ffaef175bb6ff13beca30f76ed12bac6e (diff)
downloadVeraCrypt-0ef137c0a4005eca6de49e754cab136e052a6496.zip
VeraCrypt-0ef137c0a4005eca6de49e754cab136e052a6496.tar.gz
Windows: Correctly open online help when selected in menu. Remove unused parameters to function AppLink.
Diffstat (limited to 'src/Common')
-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
4 files changed, 17 insertions, 11 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;
}