Yeah, not all of it does. This cleans it up.

Thanks,

/Ulrich

On Thu, Sep 09, 2004 at 02:39:13PM +0100, Robert Shearman wrote:
> That read-only check looks completely bogus to me as the code below 
> already checks for ES_READONLY.
Index: dlls/user/edit.c
===================================================================
RCS file: /home/wine/wine/dlls/user/edit.c,v
retrieving revision 1.1
diff -u -r1.1 edit.c
--- dlls/user/edit.c    31 Aug 2004 01:10:08 -0000      1.1
+++ dlls/user/edit.c    9 Sep 2004 14:42:25 -0000
@@ -3602,10 +3602,6 @@
 {
         BOOL control;
 
-       /* Protect read-only edit control from modification */
-       if(es->style & ES_READONLY)
-           return;
-
        control = GetKeyState(VK_CONTROL) & 0x8000;
 
        switch (c) {
@@ -3647,10 +3643,12 @@
                SendMessageW(es->hwndSelf, WM_COPY, 0, 0);
                break;
        case 0x16: /* ^V */
-               SendMessageW(es->hwndSelf, WM_PASTE, 0, 0);
+               if (!(es->style & ES_READONLY))
+                   SendMessageW(es->hwndSelf, WM_PASTE, 0, 0);
                break;
        case 0x18: /* ^X */
-               SendMessageW(es->hwndSelf, WM_CUT, 0, 0);
+               if (!(es->style & ES_READONLY))
+                   SendMessageW(es->hwndSelf, WM_CUT, 0, 0);
                break;
 
        default:

Reply via email to