cvs server: Diffing .
Index: NSMenuItemCell.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSMenuItemCell.m,v
retrieving revision 1.26
diff -u -r1.26 NSMenuItemCell.m
--- NSMenuItemCell.m	17 Dec 2001 16:51:50 -0000	1.26
+++ NSMenuItemCell.m	11 Feb 2002 05:49:42 -0000
@@ -48,13 +48,20 @@
 static Class	colorClass = 0;		/* Cache color class.	*/
 static NSImage	*arrowImage = nil;	/* Cache arrow image.	*/
 static NSImage	*arrowImageH = nil;
-
+static SEL	drawTitleSel;
+static IMP	drawTitleImp;
+static SEL	drawKeyEqSel;
+static IMP	drawKeyEqImp;
 
 + (void) initialize
 {
   if (self == [NSMenuItemCell class])
     {
       [self setVersion: 1];
+      drawTitleSel = @selector(drawTitleWithFrame:inView:);
+      drawTitleImp = [self instanceMethodForSelector: drawTitleSel];
+      drawKeyEqSel = @selector(drawKeyEquivalentWithFrame:inView:);
+      drawKeyEqImp = [self instanceMethodForSelector: drawKeyEqSel];
       colorClass = [NSColor class];
       arrowImage = [[NSImage imageNamed: @"common_3DArrowRight"] copy];
       arrowImageH = [[NSImage imageNamed: @"common_3DArrowRightH"] copy];
@@ -613,11 +620,11 @@
 
   // Draw the title
   if (_titleWidth > 0)
-    [self drawTitleWithFrame: cellFrame inView: controlView];
+    (*drawTitleImp)(self, drawTitleSel, cellFrame, controlView);
 
   // Draw the key equivalent
   if (_keyEquivalentWidth > 0)
-    [self drawKeyEquivalentWithFrame: cellFrame inView: controlView];
+    (*drawKeyEqImp)(self, drawKeyEqSel, cellFrame, controlView);
 
   [controlView unlockFocus];
   _backgroundColor = nil;
Index: NSMenuView.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSMenuView.m,v
retrieving revision 1.54
diff -u -r1.54 NSMenuView.m
--- NSMenuView.m	23 Jan 2002 16:32:20 -0000	1.54
+++ NSMenuView.m	11 Feb 2002 05:49:44 -0000
@@ -751,9 +751,13 @@
       NSMenuItemCell *aCell;
 
       aRect = [self rectOfItemAtIndex: i];
-      // FIXME: Should check if rect overlapps aRect
-      aCell = [_itemCells objectAtIndex: i];
-      [aCell drawWithFrame: aRect inView: self];
+
+      if (NSIntersectsRect(rect, aRect) == YES)
+        {
+          // FIXME: Should check if rect overlapps aRect
+          aCell = [_itemCells objectAtIndex: i];
+          [aCell drawWithFrame: aRect inView: self];
+        }
     }
 }
 
