mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 15:30:18 +00:00
23d5c01a3d
This is far from perfect, but at least you can use it to navigate the stuff a bit now :)
26 lines
471 B
Objective-C
26 lines
471 B
Objective-C
//
|
|
// NSOutlineViewExit.m
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 9/9/09.
|
|
// Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import "NSOutlineViewExt.h"
|
|
|
|
|
|
@implementation NSOutlineView (PBExpandParents)
|
|
|
|
- (void)PBExpandItem:(id)item expandParents:(BOOL)expand
|
|
{
|
|
NSMutableArray *parents = [NSMutableArray array];
|
|
while (item) {
|
|
[parents insertObject:item atIndex:0];
|
|
item = [item parent];
|
|
}
|
|
|
|
for (id p in parents)
|
|
[self expandItem:p];
|
|
}
|
|
@end
|