removed GSCloseButton. createButton now uses setRefusesFirstResponder

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16185 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2003-03-17 13:07:43 +00:00
parent 1cd6c7f2b7
commit feda9ed5e0

View file

@ -53,16 +53,10 @@
/* A menu's title is an instance of this class */
@class NSButton;
@interface GSCloseButton : NSButton
{
}
@end
@interface NSMenuWindowTitleView : NSView
{
NSMenu *menu;
GSCloseButton *button;
NSButton *button;
}
- (void) addCloseButton;
@ -1533,7 +1527,12 @@ _addLeftBorderOffsetToRect(NSRect aRect, BOOL isHorizontal)
(_frame.size.height - imageSize.height) / 2},
{ imageSize.height, imageSize.width } };
button = [[GSCloseButton alloc] initWithFrame: rect];
button = [[NSButton alloc] initWithFrame: rect];
[button setRefusesFirstResponder: YES];
[button setButtonType: NSMomentaryChangeButton];
[button setImagePosition: NSImageOnly];
[button setBordered: NO];
[button setAutoresizingMask: NSViewMinXMargin];
[button setImage: closeImage];
[button setAlternateImage: closeHImage];
[button setTarget: menu];
@ -1569,22 +1568,3 @@ _addLeftBorderOffsetToRect(NSRect aRect, BOOL isHorizontal)
@end /* NSMenuWindowTitleView */
@implementation GSCloseButton
- (id) initWithFrame: (NSRect) rect
{
self = [super initWithFrame: rect];
[self setButtonType: NSMomentaryChangeButton];
[self setImagePosition: NSImageOnly];
[self setBordered: NO];
[self setAutoresizingMask: NSViewMinXMargin];
return self;
}
- (BOOL) acceptsFirstResponder
{
return NO;
}
@end