Andre Wisplinghoff : winecfg: Enable add button when choosing lib from combobox (Libraries tabsheet).
Alexandre Julliard
julliard at winehq.org
Mon Feb 4 08:43:15 CST 2008
Module: wine
Branch: master
Commit: 9bf3355a11ddbb21d39e9ca196c1df3d8acb3196
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9bf3355a11ddbb21d39e9ca196c1df3d8acb3196
Author: Andre Wisplinghoff <andre at myhost.localdomain>
Date: Thu Jan 31 18:08:32 2008 +0100
winecfg: Enable add button when choosing lib from combobox (Libraries tabsheet).
---
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);
More information about the wine-cvs
mailing list