Mercurial > hg > xemacs-beta
diff lwlib/xlwmenu.c @ 195:a2f645c6b9f8 r20-3b24
Import from CVS: tag r20-3b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:59:05 +0200 |
parents | f53b5ca2e663 |
children | acd284d43ca1 |
line wrap: on
line diff
--- a/lwlib/xlwmenu.c Mon Aug 13 09:58:32 2007 +0200 +++ b/lwlib/xlwmenu.c Mon Aug 13 09:59:05 2007 +0200 @@ -431,20 +431,8 @@ return width; #else # ifdef USE_XFONTSET - int i, s=0, w=0; - for (i=0; string[i]; ++i) { - if (string[i]=='%' && string[i+1]=='_') { - XmbTextExtents(mw->menu.font_set, &string[s], i-s, &ri, &rl); - w += rl.width; - s = i + 2; - ++i; - } - } - if (string[s]) { - XmbTextExtents(mw->menu.font_set, &string[s], i-s, &ri, &rl); - w += rl.width; - } - return w; + XmbTextExtents(mw->menu.font_set, newchars, j, &ri, &rl); + return rl.width; # else /* ! USE_XFONTSET */ XTextExtents (mw->menu.font, newchars, j, &drop, &drop, &drop, &xcs); return xcs.width; @@ -837,11 +825,9 @@ return 0; XmbDrawString ( XtDisplay (mw), window, mw->menu.font_set, gc, - x, y + mw->menu.font_ascent, &string[start], i-s - ); + x, y + mw->menu.font_ascent, &string[start], end - start); XmbTextExtents ( - mw->menu.font_set, &string[start], end - start, &ri, &rl - ); + mw->menu.font_set, &string[start], end - start, &ri, &rl); return rl.width; # else XCharStruct xcs;