mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
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:
parent
43f024d2d7
commit
9bb6a7ddc6
3 changed files with 33 additions and 11 deletions
|
@ -1,3 +1,11 @@
|
|||
2000-10-21 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
||||
* Source/NSTabView.m: ([-dealloc:]) updated.
|
||||
([-removeTabViewItem:]) updated to not crash
|
||||
when a tabViewItem which had been the
|
||||
selected tab is dealloc'ed.
|
||||
* Source/NSTabViewItem.m: ([-dealloc:]) implemented.
|
||||
|
||||
2000-10-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSClipView.m: ([-viewFrameChanged:]) fix test for when to
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -15,6 +15,15 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
TEST_RELEASE(item_ident);
|
||||
RELEASE(item_label);
|
||||
RELEASE(item_view);
|
||||
RELEASE(item_color);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// Set identifier.
|
||||
|
||||
- (void)setIdentifier:(id)identifier
|
||||
|
@ -61,7 +70,7 @@
|
|||
- (void)setView:(NSView *)view
|
||||
{
|
||||
if (item_view)
|
||||
RELEASE(item_view);
|
||||
TEST_RELEASE(item_view);
|
||||
|
||||
ASSIGN(item_view, view);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue