diff options
Diffstat (limited to 'src/Setup')
-rw-r--r-- | src/Setup/Setup.c | 15 | ||||
-rw-r--r-- | src/Setup/Setup.rc | 17 |
2 files changed, 23 insertions, 9 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index 986bc122..3c638364 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -2414,10 +2414,15 @@ static void UpdateSelectLanguageDialog (HWND hwndDlg) HWND hLangList = GetDlgItem (hwndDlg, IDC_LANGUAGES_LIST); LPARAM nIndex = SendMessage (hLangList, CB_GETCURSEL, 0, 0); int resourceid = (int) SendMessage (hLangList, CB_GETITEMDATA, nIndex, 0); + BOOL bVal; LoadLanguageFromResource (resourceid, TRUE, TRUE); + bVal = LocalizationActive; + LocalizationActive = TRUE; LocalizeDialog (hwndDlg, "IDD_INSTL_DLG"); + InvalidateRect (hwndDlg, NULL, FALSE); + LocalizationActive = bVal; } BOOL CALLBACK SelectLanguageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -2660,7 +2665,15 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz { if (!bDevm && !LocalizationActive && (nCurrentOS >= WIN_VISTA)) { - DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTALL_LANGUAGE), NULL, (DLGPROC) SelectLanguageDialogProc, (LPARAM) 0 ); + BOOL bHasPreferredLanguage = (strlen (GetPreferredLangId ()) > 0)? TRUE : FALSE; + if ((IDCANCEL == DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_INSTALL_LANGUAGE), NULL, (DLGPROC) SelectLanguageDialogProc, (LPARAM) 0 )) + && !bHasPreferredLanguage + ) + { + // Language dialog cancelled by user: exit the installer + FinalizeApp (); + exit (1); + } } /* Create the main dialog for install */ diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc index 5e8a16aa..3323f9f0 100644 --- a/src/Setup/Setup.rc +++ b/src/Setup/Setup.rc @@ -205,18 +205,19 @@ BEGIN PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14 END -IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 213, 87 +IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 214, 75 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "VeraCrypt Setup Wizard" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "OK",IDOK,102,66,50,14 - PUSHBUTTON "Cancel",IDCANCEL,156,66,50,14 - ICON 501,IDC_STATIC,10,10,32,32 - LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,157,26 - COMBOBOX IDC_LANGUAGES_LIST,42,44,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,102,54,50,14 + PUSHBUTTON "Cancel",IDCANCEL,157,54,50,14 + ICON IDI_SETUP,IDC_STATIC,10,10,32,32 + LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,158,17 + COMBOBOX IDC_LANGUAGES_LIST,42,36,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END + ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -334,9 +335,9 @@ BEGIN IDD_INSTALL_LANGUAGE, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 206 + RIGHTMARGIN, 207 TOPMARGIN, 7 - BOTTOMMARGIN, 80 + BOTTOMMARGIN, 68 END END #endif // APSTUDIO_INVOKED |