mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:20:47 +00:00
PopUpButtonCell correction for compile error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17663 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8d2ae95e20
commit
718622df26
3 changed files with 33 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-13 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSPopUpButtonCell.m: Corrected minor problem which
|
||||
was causing a compilation error.
|
||||
|
||||
2003-09-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSMenu.m
|
||||
|
@ -7,7 +12,8 @@
|
|||
Undid last change. Rewrote [setMenu:] to make the popup button
|
||||
cell listen to change notifications of the menu. New method
|
||||
[itemChanged:] gets called when a menu item changes. Added hack to
|
||||
[initWithCoder:] to set menu correctly and read old menu items correctly.
|
||||
[initWithCoder:] to set menu correctly and read old menu items
|
||||
correctly.
|
||||
Check in [itemAtIndex:] that the index is vaild and return nil
|
||||
otherwise.
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ static NSImage *_pbc_image[2];
|
|||
}
|
||||
else
|
||||
{
|
||||
retun nil;
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,10 +183,19 @@ static const int current_version = 1;
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
- (id) initWithIdentifier: (NSString*)identifier
|
||||
{
|
||||
[super init];
|
||||
|
||||
_customizationPaletteIsRunning = NO;
|
||||
_allowsUserCustomization = NO;
|
||||
_autosavesConfiguration = NO;
|
||||
_configurationDictionary = nil;
|
||||
_delegate = nil;
|
||||
_displayMode = NSToolbarDisplayModeDefault;
|
||||
_visible = YES;
|
||||
_items = nil;
|
||||
_visibleItems = nil;
|
||||
ASSIGN(_identifier, identifier);
|
||||
[self _loadConfig];
|
||||
|
||||
|
@ -211,12 +220,17 @@ static const int current_version = 1;
|
|||
- (void) insertItemWithItemIdentifier: (NSString *)itemIdentifier
|
||||
atIndex: (int)index
|
||||
{
|
||||
NSToolbarItem *item = [_delegate toolbar: self
|
||||
itemForItemIdentifier: itemIdentifier
|
||||
willBeInsertedIntoToolbar: YES];
|
||||
[nc postNotificationName: NSToolbarWillAddItemNotification
|
||||
object: self];
|
||||
[_items insertObject: item atIndex: index];
|
||||
NSToolbarItem *item = nil;
|
||||
NSArray *allowedItems = [_delegate toolbarAllowedItemIdentifiers: self];
|
||||
if([allowedItems containsObject: itemIdentifier])
|
||||
{
|
||||
item = [_delegate toolbar: self
|
||||
itemForItemIdentifier: itemIdentifier
|
||||
willBeInsertedIntoToolbar: YES];
|
||||
[nc postNotificationName: NSToolbarWillAddItemNotification
|
||||
object: self];
|
||||
[_items insertObject: item atIndex: index];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) isVisible
|
||||
|
@ -243,6 +257,10 @@ static const int current_version = 1;
|
|||
{
|
||||
_customizationPaletteIsRunning = [NSBundle loadNibNamed: @"GSToolbarCustomizationPalette"
|
||||
owner: self];
|
||||
if(!_customizationPaletteIsRunning)
|
||||
{
|
||||
NSLog(@"Failed to load gorm for GSToolbarCustomizationPalette");
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setAllowsUserCustomization: (BOOL)flag
|
||||
|
|
Loading…
Reference in a new issue