controls/menu.c patch

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

 



ChangeLog entry:
*controls/menu.c:
Chris Morgan <cmorgan@alum.wpi.edu>
Remove ERR() if menu entry isn't of type MF_STRING as some applications set 
flags of MT_SEPARATOR and erroneous errors are produced.  Add a couple of 
comments.


Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.151
diff -u -r1.151 menu.c
--- controls/menu.c	31 Oct 2002 01:04:41 -0000	1.151
+++ controls/menu.c	3 Nov 2002 22:17:13 -0000
@@ -1891,6 +1891,8 @@
  *
  * Parse a standard menu resource and add items to the menu.
  * Return a pointer to the end of the resource.
+ *
+ * NOTE: flags is equivalent to the mtOption field
  */
 static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
 {
@@ -1906,8 +1908,6 @@
             id = GET_WORD(res);
             res += sizeof(WORD);
         }
-        if (!IS_STRING_ITEM(flags))
-            ERR("not a string item %04x\n", flags );
         str = res;
         if (!unicode) res += strlen(str) + 1;
         else res += (strlenW((LPCWSTR)str) + 1) * sizeof(WCHAR);
@@ -4192,7 +4192,7 @@
     TRACE("%p, ver %d\n", template, version );
     switch (version)
     {
-      case 0:
+      case 0: /* standard format is version of 0 */
 	offset = GET_WORD(p);
 	p += sizeof(WORD) + offset;
 	if (!(hMenu = CreateMenu())) return 0;
@@ -4202,7 +4202,7 @@
 	    return 0;
 	  }
 	return hMenu;
-      case 1:
+      case 1: /* extended format is version of 1 */
 	offset = GET_WORD(p);
 	p += sizeof(WORD) + offset;
 	if (!(hMenu = CreateMenu())) return 0;

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

  Powered by Linux