Languages are inserted backward

Language in language is selected automatically
Dialog caption is no longer dialog :)


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@801 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-28 22:38:14 +00:00
parent 57957761ed
commit 79ddaab554
2 changed files with 13 additions and 5 deletions

View file

@ -35,6 +35,7 @@ enum
INST_INSTDIR, // $INSTDIR
INST_OUTDIR, // $OUTDIR
INST_EXEDIR, // $EXEDIR
INST_LANG, // $LANGUAGE
__INST_LAST
};
@ -61,12 +62,19 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
int i;
switch (uMsg) {
case WM_INITDIALOG:
for (i = 0; i < langs_num; i++) {
for (i = langs_num - 1; i >= 0; i--) {
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)langs[i].name);
if (popstring(temp))
SetDlgItemText(hwndDlg, IDC_TEXT, temp);
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_APPICON, STM_SETICON, (LPARAM)LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(103)), 0);
}
if (!popstring(temp))
SetDlgItemText(hwndDlg, IDC_TEXT, temp);
if (!popstring(temp))
SetWindowText(hwndDlg, temp);
SendDlgItemMessage(hwndDlg, IDC_APPICON, STM_SETICON, (LPARAM)LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(103)), 0);
for (i = 0; i < langs_num; i++) {
if (!lstrcmp(langs[i].id, getuservariable(INST_LANG))) {
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, i, 0);
break;
}
}
ShowWindow(hwndDlg, SW_SHOW);
break;

Binary file not shown.