mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: fix language selected in the installer not used by "Create Volume" wizard until reboot or exiting VeraCrypt main process.
This commit is contained in:
@@ -2877,6 +2877,9 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
|||||||
char langId[6];
|
char langId[6];
|
||||||
InitCommonControlsPtr InitCommonControlsFn = NULL;
|
InitCommonControlsPtr InitCommonControlsFn = NULL;
|
||||||
wchar_t modPath[MAX_PATH];
|
wchar_t modPath[MAX_PATH];
|
||||||
|
#ifndef SETUP
|
||||||
|
BOOL bLanguageSetInSetup = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath));
|
GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath));
|
||||||
|
|
||||||
@@ -3046,6 +3049,7 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
|||||||
if (0 < WideCharToMultiByte (CP_ACP, 0, uiLang, -1, langId, sizeof (langId), NULL, NULL))
|
if (0 < WideCharToMultiByte (CP_ACP, 0, uiLang, -1, langId, sizeof (langId), NULL, NULL))
|
||||||
{
|
{
|
||||||
SetPreferredLangId (langId);
|
SetPreferredLangId (langId);
|
||||||
|
bLanguageSetInSetup = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3073,6 +3077,11 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
|||||||
LoadLanguageFile ();
|
LoadLanguageFile ();
|
||||||
|
|
||||||
#ifndef SETUP
|
#ifndef SETUP
|
||||||
|
// Save language to XML configuration file if it has been selected in the setup
|
||||||
|
// so that other VeraCrypt programs will pick it up
|
||||||
|
if (bLanguageSetInSetup)
|
||||||
|
SaveSettings (NULL);
|
||||||
|
|
||||||
// UAC elevation moniker cannot be used in portable mode.
|
// UAC elevation moniker cannot be used in portable mode.
|
||||||
// A new instance of the application must be created with elevated privileges.
|
// A new instance of the application must be created with elevated privileges.
|
||||||
if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())
|
if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ static void LoadSettings (HWND hwndDlg)
|
|||||||
LoadSettingsAndCheckModified (hwndDlg, FALSE, NULL, NULL);
|
LoadSettingsAndCheckModified (hwndDlg, FALSE, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SaveSettings (HWND hwndDlg)
|
void SaveSettings (HWND hwndDlg)
|
||||||
{
|
{
|
||||||
WaitCursor ();
|
WaitCursor ();
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ enum timer_ids
|
|||||||
|
|
||||||
static void localcleanup ( void );
|
static void localcleanup ( void );
|
||||||
static void LoadSettings ( HWND hwndDlg );
|
static void LoadSettings ( HWND hwndDlg );
|
||||||
static void SaveSettings ( HWND hwndDlg );
|
void SaveSettings ( HWND hwndDlg );
|
||||||
static void EndMainDlg ( HWND hwndDlg );
|
static void EndMainDlg ( HWND hwndDlg );
|
||||||
void ComboSelChangeEA ( HWND hwndDlg );
|
void ComboSelChangeEA ( HWND hwndDlg );
|
||||||
static void VerifySizeAndUpdate ( HWND hwndDlg , BOOL bUpdate );
|
static void VerifySizeAndUpdate ( HWND hwndDlg , BOOL bUpdate );
|
||||||
|
|||||||
Reference in New Issue
Block a user