Resent: fix for bug #24

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this patch seems to have got lost.

ImageList_Remove when called to remove all images on an empty ImageList
returns TRUE. Checked with the ControlSpy on Windows 98SE (MSDN wasn't
helpfull in this case).

License: LGPL, X11
Changelog:
    - Michael Stefaniuc <mstefani@redhat.com>
      ImageList_Remove returns TRUE when removing all images
      of an empty ImageList

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: imagelist.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v
retrieving revision 1.53
diff -u -r1.53 imagelist.c
--- imagelist.c	31 May 2002 23:25:44 -0000	1.53
+++ imagelist.c	15 Jul 2002 19:36:55 -0000
@@ -2292,6 +2292,8 @@
     HDC     hdcSrc, hdcDst;
     INT     cxNew, nCount;
 
+    TRACE("(himl=%p i=%d)\n", himl, i);
+
     if (himl == NULL) {
         ERR("Invalid image list handle!\n");
         return FALSE;
@@ -2302,14 +2304,13 @@
         return FALSE;
     }
 
-    if (himl->cCurImage == 0) {
-        ERR("image list is already empty!\n");
-        return FALSE;
-    }
-
     if (i == -1) {
         /* remove all */
-        TRACE("remove all!\n");
+	if (himl->cCurImage == 0) {
+	    /* remove all on empty ImageList is allowed */
+	    TRACE("remove all on empty ImageList!\n");
+	    return TRUE;
+	}
 
         himl->cMaxImage = himl->cInitial + himl->cGrow;
         himl->cCurImage = 0;

Attachment: pgp00015.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux