Changed to use helper method.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@26097 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-02-19 01:31:42 +00:00
parent 03ec2e7792
commit 3769a607ea
2 changed files with 10 additions and 50 deletions

View file

@ -1,3 +1,8 @@
2008-02-18 20:31-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/2Controls/GormPopUpButtonEditor.m: Change to use helper
method to set up "preferred edge" correctly.
2008-02-17 12:49-EST Gregory John Casamento <greg_casamento@yahoo.com> 2008-02-17 12:49-EST Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormViewEditor.m * GormCore/GormViewEditor.m

View file

@ -64,25 +64,12 @@ Class _gormnspopupbuttonCellClass = 0;
@implementation GormNSPopUpButtonCell @implementation GormNSPopUpButtonCell
- (id) initTextCell: (NSString*) stringValue /* Overriden helper method */
pullsDown: (BOOL) pullDown - (void) _initMenu
{ {
[super _gormInitTextCell: stringValue]; NSMenu *menu = [[NSMenu allocSubstitute] initWithTitle: @""];
[self setMenu: menu];
RELEASE(menu);
_pbcFlags.pullsDown = pullDown;
_pbcFlags.usesItemFromMenu = YES;
_pbcFlags.altersStateOfSelectedItem = YES;
if ([stringValue length] > 0)
{
[self addItemWithTitle: stringValue];
}
_menu = [(id)[NSMenu allocSubstitute] initWithTitle: @""];
[_menu _setOwnedByPopUp: self];
return self;
} }
- (NSString *) className - (NSString *) className
@ -90,38 +77,6 @@ Class _gormnspopupbuttonCellClass = 0;
return @"NSPopUpButtonCell"; return @"NSPopUpButtonCell";
} }
@end @end
// @interface GormPopUpNSMenu : NSMenu
// - (BOOL)canBecomeMainWindow
// {
// return YES;
// }
// - (BOOL)canBecomeKeyWindow
// {
// return YES;
// }
// - (void) sendEvent: (NSEvent*)theEvent
// {
// NSEventType type;
// type = [theEvent type];
// if (type == NSLeftMouseDown)
// {
// NSLog(@"here");
// if (_f.is_main == YES)
// {
// NSLog(@"already main %@", [NSApp mainWindow]);
// }
// [self makeMainWindow];
// [self makeKeyWindow];
// }
// [super sendEvent: theEvent];
// }
// @end
// @implementation GormPopUpNSMenu
// @end
@interface GormPopUpButtonEditor : GormControlEditor @interface GormPopUpButtonEditor : GormControlEditor
{ {