[3/3] winecfg: Make the library add button default when appropriate
André Hentschel
nerv at dawncrow.de
Thu Jul 21 16:02:37 CDT 2011
---
programs/winecfg/libraries.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index e402b4e..08c5de7 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -420,9 +420,15 @@ static void on_add_combo_change(HWND dialog)
len=SendDlgItemMessage(dialog, IDC_DLLCOMBO, CB_GETLBTEXTLEN, sel, 0);
if (strlen(buffer)>0 || len>0)
+ {
enable(IDC_DLLS_ADDDLL)
+ SendMessage(dialog, DM_SETDEFID, (WPARAM)IDC_DLLS_ADDDLL, 0);
+ }
else
+ {
+ SendMessage(dialog, DM_SETDEFID, 0, 0);
disable(IDC_DLLS_ADDDLL);
+ }
}
static void set_dllmode(HWND dialog, DWORD id)
@@ -490,6 +496,7 @@ static void on_add_click(HWND dialog)
}
SendDlgItemMessage(dialog, IDC_DLLCOMBO, WM_SETTEXT, 0, (LPARAM) "");
+ SendMessage(dialog, DM_SETDEFID, 0, 0);
disable(IDC_DLLS_ADDDLL);
WINE_TRACE("Adding %s as native, builtin\n", buffer);
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list