return "no languages available" when combo box is empty of any reason, like no language with matching codepage
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5083 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
91fc282157
commit
bfeb923c89
1 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,12 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
selected_language = langs[i].name;
|
||||
}
|
||||
}
|
||||
// empty list box?
|
||||
if (SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCOUNT, 0, 0) == 0) {
|
||||
pushstring("no languages available");
|
||||
EndDialog(hwndDlg, 0);
|
||||
break;
|
||||
}
|
||||
// select the current language
|
||||
if (selected_language)
|
||||
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) selected_language);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue