Incrementally implementing NSToolbar/NSToolbarItem

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15318 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2002-12-22 16:14:00 +00:00
parent 4eae71e19a
commit 9d0808bae8
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2002-12-22 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSToolbar.m: Added some of the code needed to add/remove
toolbar items.
2002-12-10 Adam Fedor <fedor@gnu.org>
* Source/NSView.m ([NSView -lockFocusInRect:]): Check for window iff

View file

@ -204,8 +204,14 @@ static const int current_version = 1;
- (void) insertItemWithItemIdentifier: (NSString *)itemIdentifier
atIndex: (int)index
atIndex: (int)index
{
NSToolbarItem *item = [_delegate toolbar: self
itemForItemIdentifier: itemIdentifier
willBeInsertedIntoToolbar: YES];
[nc postNotificationName: NSToolbarWillAddItemNotification
object: self];
[_items insertObject: item atIndex: index];
}
- (BOOL) isVisible
@ -220,6 +226,12 @@ static const int current_version = 1;
- (void) removeItemAtIndex: (int)index
{
id obj = [_items objectAtIndex: index];
[_items removeObjectAtIndex: index];
[_visibleItems removeObject: obj];
[nc postNotificationName: NSToolbarDidRemoveItemNotification
object: self];
}
- (void) runCustomizationPalette: (id)sender