winecfg: Use correct notification for drive selection change

Vitaliy Margolen wine-patch at kievinfo.com
Wed Oct 19 13:52:32 CDT 2005


This way you can use all the selection methods to select drive, not just mouse
click.

Vitaliy Margolen

changelog:
  winecfg/driveui.c
  - Use correct notification for drive selection change
-------------- next part --------------
Index: programs/winecfg/driveui.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/driveui.c,v
retrieving revision 1.21
diff -u -p -r1.21 driveui.c
--- programs/winecfg/driveui.c	18 Oct 2005 12:02:51 -0000	1.21
+++ programs/winecfg/driveui.c	19 Oct 2005 18:50:50 -0000
@@ -837,13 +837,14 @@ DriveDlgProc (HWND dialog, UINT msg, WPA
                     break;
                 case PSN_SETACTIVE:
                     break;
-            }
-
-            switch (((LPNMITEMACTIVATE)lParam)->hdr.code)
-            {
-                case NM_CLICK:
+                case LVN_ITEMCHANGED:
+                {
+                    LPNMLISTVIEW lpnm = (LPNMLISTVIEW)lParam;
+                    if (!(lpnm->uOldState & LVIS_SELECTED) &&
+                         (lpnm->uNewState & LVIS_SELECTED))
                     update_controls(dialog);
                     break;
+                }
             }
             break;
     }


More information about the wine-patches mailing list