Skip to content
Snippets Groups Projects
Commit 5795a1f1 authored by George Nachman's avatar George Nachman
Browse files

Allow insertions into the beginning of the tabview control

parent 87781b6c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -506,7 +506,7 @@
 
#pragma mark -
#pragma mark Functionality
- (void)addTabViewItem:(NSTabViewItem *)item
- (void)addTabViewItem:(NSTabViewItem *)item atIndex:(NSUInteger)i
{
// create cell
PSMTabBarCell *cell = [[PSMTabBarCell alloc] initWithControlView:self];
Loading
Loading
@@ -514,7 +514,7 @@
[cell setModifierString:[self _modifierString]];
 
// add to collection
[_cells addObject:cell];
[_cells insertObject:cell atIndex:i];
 
// bind it up
[self bindPropertiesForCell:cell andTabViewItem:item];
Loading
Loading
@@ -523,6 +523,11 @@
//[self update];
}
 
- (void)addTabViewItem:(NSTabViewItem *)item
{
[self addTabViewItem:item atIndex:[_cells count]];
}
- (void)disconnectItem:(NSObjectController*)item fromCell:(PSMTabBarCell*)cell
{
if ([item respondsToSelector:@selector(isProcessing)]) {
Loading
Loading
@@ -1881,10 +1886,12 @@
NSMutableArray *cellItems = [self representedTabViewItems];
NSEnumerator *ex = [tabItems objectEnumerator];
NSTabViewItem *item;
int i = 0;
while ( (item = [ex nextObject]) ) {
if (![cellItems containsObject:item]) {
[self addTabViewItem:item];
[self addTabViewItem:item atIndex:i];
}
i++;
}
 
// pass along for other delegate responses
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment