winecfg: Add library override instead of closing winecfg when pressing Enter.
Based on a patch by Hugh McMaster.
This commit is contained in:
parent
6aa793e269
commit
317fc7aaf8
|
@ -421,9 +421,15 @@ static void on_add_combo_change(HWND dialog)
|
|||
len=SendDlgItemMessageW(dialog, IDC_DLLCOMBO, CB_GETLBTEXTLEN, sel, 0);
|
||||
|
||||
if (buffer[0] || len>0)
|
||||
{
|
||||
enable(IDC_DLLS_ADDDLL)
|
||||
SendMessageW(GetParent(dialog), DM_SETDEFID, IDC_DLLS_ADDDLL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
disable(IDC_DLLS_ADDDLL);
|
||||
SendMessageW(GetParent(dialog), DM_SETDEFID, IDOK, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void set_dllmode(HWND dialog, DWORD id)
|
||||
|
@ -492,7 +498,8 @@ static void on_add_click(HWND dialog)
|
|||
|
||||
SendDlgItemMessageW(dialog, IDC_DLLCOMBO, WM_SETTEXT, 0, (LPARAM)emptyW);
|
||||
disable(IDC_DLLS_ADDDLL);
|
||||
|
||||
SendMessageW(GetParent(dialog), DM_SETDEFID, IDOK, 0);
|
||||
|
||||
WINE_TRACE("Adding %s as native, builtin\n", buffer);
|
||||
|
||||
SendMessageW(GetParent(dialog), PSM_CHANGED, 0, 0);
|
||||
|
@ -605,18 +612,18 @@ LibrariesDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
case WM_COMMAND:
|
||||
switch(HIWORD(wParam)) {
|
||||
|
||||
/* FIXME: when the user hits enter in the DLL combo box we should invoke the add
|
||||
* add button, rather than the propsheet OK button. But I don't know how to do that!
|
||||
*/
|
||||
|
||||
case CBN_EDITCHANGE:
|
||||
if(LOWORD(wParam) == IDC_DLLCOMBO)
|
||||
{
|
||||
on_add_combo_change(hDlg);
|
||||
break;
|
||||
}
|
||||
|
||||
if (LOWORD(wParam) == IDC_DLLCOMBO)
|
||||
on_add_combo_change(hDlg);
|
||||
break;
|
||||
case CBN_SETFOCUS:
|
||||
if (LOWORD(wParam) == IDC_DLLCOMBO)
|
||||
on_add_combo_change(hDlg);
|
||||
break;
|
||||
case CBN_KILLFOCUS:
|
||||
if (LOWORD(wParam) == IDC_DLLCOMBO)
|
||||
SendMessageW(GetParent(hDlg), DM_SETDEFID, IDOK, 0);
|
||||
break;
|
||||
case BN_CLICKED:
|
||||
switch(LOWORD(wParam)) {
|
||||
case IDC_DLLS_ADDDLL:
|
||||
|
|
Loading…
Reference in New Issue