mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
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:
parent
03ec2e7792
commit
3769a607ea
2 changed files with 10 additions and 50 deletions
|
@ -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>
|
||||
|
||||
* GormCore/GormViewEditor.m
|
||||
|
|
|
@ -64,25 +64,12 @@ Class _gormnspopupbuttonCellClass = 0;
|
|||
|
||||
@implementation GormNSPopUpButtonCell
|
||||
|
||||
- (id) initTextCell: (NSString*) stringValue
|
||||
pullsDown: (BOOL) pullDown
|
||||
/* Overriden helper method */
|
||||
- (void) _initMenu
|
||||
{
|
||||
[super _gormInitTextCell: stringValue];
|
||||
|
||||
|
||||
_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;
|
||||
NSMenu *menu = [[NSMenu allocSubstitute] initWithTitle: @""];
|
||||
[self setMenu: menu];
|
||||
RELEASE(menu);
|
||||
}
|
||||
|
||||
- (NSString *) className
|
||||
|
@ -90,38 +77,6 @@ Class _gormnspopupbuttonCellClass = 0;
|
|||
return @"NSPopUpButtonCell";
|
||||
}
|
||||
@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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue