History view shows file's icons

This commit is contained in:
Tomasz Krasnyk
2010-11-27 17:25:27 +01:00
parent 17a4935f66
commit 9de4b4cfbd
2 changed files with 50 additions and 29 deletions
+14
View File
@@ -24,6 +24,7 @@
#define QLPreviewPanel NSClassFromString(@"QLPreviewPanel")
#import "PBQLTextView.h"
#import "PBSourceViewCell.h"
#define kHistorySelectedDetailIndexKey @"PBHistorySelectedDetailIndex"
#define kHistoryDetailViewIndex 0
@@ -83,8 +84,10 @@
bottomColor:[NSColor colorWithCalibratedHue:0.579 saturation:0.119 brightness:0.765 alpha:1.000]];
//[scopeBarView setTopShade:207/255.0 bottomShade:180/255.0];
[self updateBranchFilterMatrix];
[super awakeFromNib];
[fileBrowser setDelegate:self];
}
- (void)updateKeys
@@ -755,4 +758,15 @@
return iconRect;
}
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(PBSourceViewCell *)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
PBGitTree *object = [item representedObject];
NSString *workingDirectory = [[repository workingDirectory] stringByAppendingString:@"/"];
NSString *path = [workingDirectory stringByAppendingPathComponent:[object fullPath]];
NSImage *image = [workspace iconForFile:path];
[image setSize:NSMakeSize(15, 15)];
[cell setImage:image];
}
@end
+36 -29
View File
@@ -3,7 +3,7 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">788</string>
<string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
@@ -15,8 +15,8 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>788</string>
<string>788</string>
<string>823</string>
<string>823</string>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
@@ -29,13 +29,8 @@
<string>com.apple.WebKitIBPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -517,7 +512,7 @@
<integer value="1"/>
</object>
</object>
<string key="NS.format">MMMM d, yyyy h:mm a</string>
<string key="NS.format">d MMMM yyyy HH:mm</string>
<bool key="NS.natural">NO</bool>
</object>
<reference key="NSControlView" ref="254268962"/>
@@ -2159,7 +2154,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -2776,6 +2773,7 @@
<string>16.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>18.IBPluginDependency</string>
<string>19.CustomClassName</string>
<string>19.IBPluginDependency</string>
<string>2.CustomClassName</string>
<string>2.IBEditorWindowLastContentRect</string>
@@ -2893,6 +2891,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>PBIconAndTextCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>PBCollapsibleSplitView</string>
<string>{{312, 577}, {852, 384}}</string>
@@ -3127,6 +3126,13 @@
<string key="minorKey">NSApplication+GitXScripting.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">View/CellTrackingRect.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSOutlineView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -3556,9 +3562,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>selectBasicSearch:</string>
<string>selectPickaxeSearch:</string>
<string>selectRegexSearch:</string>
<string>selectSearchMode:</string>
<string>stepperPressed:</string>
<string>updateSearch:</string>
</object>
@@ -3567,32 +3571,20 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>selectBasicSearch:</string>
<string>selectPickaxeSearch:</string>
<string>selectRegexSearch:</string>
<string>selectSearchMode:</string>
<string>stepperPressed:</string>
<string>updateSearch:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">selectBasicSearch:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">selectPickaxeSearch:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">selectRegexSearch:</string>
<string key="name">selectSearchMode:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
@@ -3670,6 +3662,14 @@
<string key="minorKey">PBHistorySearchController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PBIconAndTextCell</string>
<string key="superclassName">NSTextFieldCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">PBIconAndTextCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PBNiceSplitView</string>
<string key="superclassName">NSSplitView</string>
@@ -4464,6 +4464,13 @@
<string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">ScriptingBridge.framework/Headers/SBApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">