more NSTab* related fixed

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7887 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Michael Silva 2000-10-23 07:42:34 +00:00
parent 43f024d2d7
commit 9bb6a7ddc6
3 changed files with 33 additions and 11 deletions

View file

@ -44,13 +44,21 @@
// setup variables
tab_items = [NSMutableArray new];
tab_font = RETAIN([NSFont systemFontOfSize: 0]);
ASSIGN (tab_items, [NSMutableArray array]);
ASSIGN (tab_font, [NSFont systemFontOfSize: 0]);
tab_selected = nil;
return self;
}
- (void) dealloc
{
RELEASE(tab_items);
TEST_RELEASE(tab_selected);
RELEASE(tab_font);
[super dealloc];
}
// tab management.
- (void) addTabViewItem: (NSTabViewItem*)tabViewItem
@ -85,6 +93,11 @@
if (i == NSNotFound)
return;
if ([tabViewItem isEqual: tab_selected])
{
tab_selected = nil;
}
[tab_items removeObjectAtIndex: i];
if ([tab_delegate respondsToSelector:
@ -688,12 +701,4 @@
return self;
}
- (void) dealloc
{
RELEASE(tab_items);
RELEASE(tab_font);
[super dealloc];
}
@end