Activate add button when chosing lib from combobox
Andre Wisplinghoff
andre at myhost.localdomain
Thu Jan 31 11:08:32 CST 2008
---
programs/winecfg/libraries.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index 8e4e46b..aa0a161 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -408,10 +408,14 @@ static void init_libsheet(HWND dialog)
static void on_add_combo_change(HWND dialog)
{
char buffer[1024];
+ int sel, len;
SendDlgItemMessage(dialog, IDC_DLLCOMBO, WM_GETTEXT, sizeof(buffer), (LPARAM) buffer);
+ /* if lib was chosen from combobox, we reveive an empty buffer, check manually */
+ sel=SendDlgItemMessage(dialog, IDC_DLLCOMBO, CB_GETCURSEL, 0, 0);
+ len=SendDlgItemMessage(dialog, IDC_DLLCOMBO, CB_GETLBTEXTLEN, sel, 0);
- if (strlen(buffer))
+ if (strlen(buffer)>0 || len>0)
enable(IDC_DLLS_ADDDLL)
else
disable(IDC_DLLS_ADDDLL);
--
1.5.3.7
--------------070402030002040103080806--
More information about the wine-patches
mailing list