Hi, Here is a rather large patch that makes some changes to NSMenu* and NSPopUpButton*. Basically it allows one to use images in popupbuttons once again and it removes many redisplays which were causing the menus and popups to be quite painful on slow machines (bonus: the windows menu should display a little better both as a tornoff and as a regular menu.) Finally, it also includes a change to NSTabView which addresses a bug noted on discuss-gnustep.
There are still issues, but I believe this patch is some improvement (it makes things nicer on my slow machine. :)) ChangeLog: * Source/NSApplication.m: (-changeWindowsItem:) If the item in question already exists we abort further processing. * Source/NSMenu.m: (-itemChanged:) Mark the menuitemcell that has changed for redisplay (thus allowing us to only redisplay the item changed as opposed to the entire view.) (-sizeToFit) Alot of reformulation to suppress multiple redisplays. (-_popUpButtonCell) Allow access to the popupbuttoncell privately. * Source/NSMenuItemCell.m: Moved drawing of popupbutton icon here. Also, reallow use of NSImages in an NSPopUpButton. (-imageRectForBounds:) Remove popupbutton code. (-drawImageWithFrame:) Dim image if item is not enabled. (-_drawPopUpIconWithFrame:) New method to draw popupbutton icons. (-drawInteriorWithFrame:) Draw popupbutton icon if needed. * Source/NSMenuView.m: (-sizeToFit) Check for popupbutton to remove additional 1 pixel. * Source/NSPopUpButtonCell.m: reformulate drawing. (-drawWithFrame:) Have the menuRepresentation fetch us the NSMenuItemCell for the selectedItem and draw it. (-drawInteriorWithFrame:) Remove all code save for NSDottedRect drawing. * Source/NSTabView.m: (-mouseDown:) new method to fix problems with NSSplitView interaction. (-hitTest:) removed. Cheers! Michael __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com
NSPop-NSMenu-fixes.patch
Description: NSPop-NSMenu-fixes.patch