mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Show tabview properly
This commit is contained in:
parent
d41635855f
commit
e96106c295
2 changed files with 10 additions and 8 deletions
|
@ -181,11 +181,6 @@
|
|||
[tv setTabViewType: NSTopTabsBezelBorder];
|
||||
}
|
||||
}
|
||||
if ([coder containsValueForKey: @"NSTabViewItems"])
|
||||
{
|
||||
NSArray *items = [coder decodeObjectForKey: @"NSTabViewItems"];
|
||||
[self setTabViewItems: items];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -86,10 +86,17 @@
|
|||
|
||||
+ (instancetype) tabViewItemWithViewController: (NSViewController *)vc
|
||||
{
|
||||
NSTabViewItem *item = [[NSTabViewItem alloc] init];
|
||||
NSTabViewItem *item = AUTORELEASE([[NSTabViewItem alloc] init]);
|
||||
if ([vc title] == nil || [[vc title] isEqualToString: @""])
|
||||
{
|
||||
NSString *className = [vc className];
|
||||
[item setLabel: className];
|
||||
}
|
||||
else
|
||||
{
|
||||
[item setLabel: [vc title]];
|
||||
}
|
||||
[item setViewController: vc];
|
||||
[item setLabel: [vc title]];
|
||||
AUTORELEASE(item);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue