slight menu fix

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

 



Hi all,

some program was using "&File\t", the '\t' denoting a tab.
Tabs are only valid in popup menus, though, so Wine wasn't removing
the improper \t from display.
(resulting in an ugly "nondisplayable char" square char in the menu bar)

- only allow tabs in popup menus, and make sure to never display them

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Determining best CVS host...
Using CVSROOT :pserver:cvs@rhlx01.fht-esslingen.de:/home/wine
Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.141
diff -u -r1.141 menu.c
--- controls/menu.c	17 May 2002 02:55:48 -0000	1.141
+++ controls/menu.c	19 May 2002 21:04:46 -0000
@@ -1374,16 +1374,13 @@
 	{
 	    rect.left += MENU_BAR_ITEMS_SPACE / 2;
 	    rect.right -= MENU_BAR_ITEMS_SPACE / 2;
-	    i = strlenW( lpitem->text );
-	}
-	else
-	{
-	    for (i = 0; lpitem->text[i]; i++)
-		if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
-		    break;
 	}
 
-	if( !(TWEAK_WineLook == WIN31_LOOK) && (lpitem->fState & MF_GRAYED))
+	for (i = 0; lpitem->text[i]; i++)
+	    if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
+	        break;
+
+	if( (TWEAK_WineLook != WIN31_LOOK) && (lpitem->fState & MF_GRAYED))
 	{
 	    if (!(lpitem->fState & MF_HILITE) )
 	    {
@@ -1398,7 +1395,8 @@
 	DrawTextW( hdc, lpitem->text, i, &rect, uFormat);
 
 	/* paint the shortcut text */
-	if (lpitem->text[i])  /* There's a tab or flush-right char */
+	if ( (!menuBar) &&
+		lpitem->text[i])  /* There's a tab or flush-right char */
 	{
 	    if (lpitem->text[i] == '\t')
 	    {

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

  Powered by Linux