mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
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:
parent
4eae71e19a
commit
9d0808bae8
2 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue