mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Use PBGitRef for other refs
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<string key="IBDocument.HIToolboxVersion">352.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="3"/>
|
||||
<integer value="48"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -73,9 +73,10 @@
|
||||
<reference key="NSToolbarItemPaletteLabel" ref="904399424"/>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<object class="NSSearchField" key="NSToolbarItemView" id="212418890">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">265</int>
|
||||
<string key="NSFrame">{{0, 14}, {183, 22}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSearchFieldCell" key="NSCell" id="902542524">
|
||||
<int key="NSCellFlags">343014976</int>
|
||||
@@ -171,9 +172,10 @@
|
||||
<string key="NSToolbarItemPaletteLabel">Branch</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<object class="NSPopUpButton" key="NSToolbarItemView" id="147646927">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{0, 14}, {134, 26}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSPopUpButtonCell" key="NSCell" id="638300054">
|
||||
<int key="NSCellFlags">-2076049856</int>
|
||||
@@ -281,9 +283,10 @@
|
||||
<string key="NSToolbarItemPaletteLabel">View selector</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<object class="NSSegmentedControl" key="NSToolbarItemView" id="1040507102">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{0, 14}, {114, 23}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSegmentedCell" key="NSCell" id="989754672">
|
||||
<int key="NSCellFlags">67239424</int>
|
||||
@@ -1761,6 +1764,23 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<bool key="NSFilterRestrictsInsertion">YES</bool>
|
||||
<bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
|
||||
</object>
|
||||
<object class="NSArrayController" id="1002608377">
|
||||
<object class="NSMutableArray" key="NSDeclaredKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>branches.refs</string>
|
||||
<string>refs</string>
|
||||
<string>ref</string>
|
||||
<string>value</string>
|
||||
<string>shortName</string>
|
||||
</object>
|
||||
<bool key="NSEditable">YES</bool>
|
||||
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
|
||||
<bool key="NSAvoidsEmptySelection">YES</bool>
|
||||
<bool key="NSPreservesSelection">YES</bool>
|
||||
<bool key="NSSelectsInsertedObjects">YES</bool>
|
||||
<bool key="NSFilterRestrictsInsertion">YES</bool>
|
||||
<bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
@@ -2054,68 +2074,6 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
</object>
|
||||
<int key="connectionID">108</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">contentValues: repository.branches</string>
|
||||
<reference key="source" ref="147646927"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector" id="342300198">
|
||||
<reference key="NSSource" ref="147646927"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">contentValues: repository.branches</string>
|
||||
<string key="NSBinding">contentValues</string>
|
||||
<string key="NSKeyPath">repository.branches</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">118</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">selectedValue: repository.currentBranch</string>
|
||||
<reference key="source" ref="147646927"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="147646927"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">selectedValue: repository.currentBranch</string>
|
||||
<string key="NSBinding">selectedValue</string>
|
||||
<string key="NSKeyPath">repository.currentBranch</string>
|
||||
<object class="NSDictionary" key="NSOptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSAllowsEditingMultipleValuesSelection</string>
|
||||
<string>NSAlwaysPresentsApplicationModalAlerts</string>
|
||||
<string>NSConditionallySetsEnabled</string>
|
||||
<string>NSConditionallySetsHidden</string>
|
||||
<string>NSMultipleValuesPlaceholder</string>
|
||||
<string>NSNoSelectionPlaceholder</string>
|
||||
<string>NSNotApplicablePlaceholder</string>
|
||||
<string>NSNullPlaceholder</string>
|
||||
<string>NSRaisesForNotApplicableKeys</string>
|
||||
<string>NSValidatesImmediately</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="9"/>
|
||||
<reference ref="8"/>
|
||||
<reference ref="9"/>
|
||||
<reference ref="8"/>
|
||||
<object class="NSNull" id="4"/>
|
||||
<reference ref="4"/>
|
||||
<reference ref="4"/>
|
||||
<string>Not on branch</string>
|
||||
<reference ref="9"/>
|
||||
<reference ref="8"/>
|
||||
</object>
|
||||
</object>
|
||||
<reference key="NSPreviousConnector" ref="342300198"/>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">120</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
@@ -2229,6 +2187,59 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
</object>
|
||||
<int key="connectionID">133</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">contentArray: repository.branches</string>
|
||||
<reference key="source" ref="1002608377"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="1002608377"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">contentArray: repository.branches</string>
|
||||
<string key="NSBinding">contentArray</string>
|
||||
<string key="NSKeyPath">repository.branches</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">171</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">contentValues: arrangedObjects.shortName</string>
|
||||
<reference key="source" ref="147646927"/>
|
||||
<reference key="destination" ref="1002608377"/>
|
||||
<object class="NSNibBindingConnector" key="connector" id="757765970">
|
||||
<reference key="NSSource" ref="147646927"/>
|
||||
<reference key="NSDestination" ref="1002608377"/>
|
||||
<string key="NSLabel">contentValues: arrangedObjects.shortName</string>
|
||||
<string key="NSBinding">contentValues</string>
|
||||
<string key="NSKeyPath">arrangedObjects.shortName</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">209</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">selectedValue: repository.currentBranch</string>
|
||||
<reference key="source" ref="147646927"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="147646927"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">selectedValue: repository.currentBranch</string>
|
||||
<string key="NSBinding">selectedValue</string>
|
||||
<string key="NSKeyPath">repository.currentBranch</string>
|
||||
<object class="NSDictionary" key="NSOptions">
|
||||
<string key="NS.key.0">NSNullPlaceholder</string>
|
||||
<string key="NS.object.0">Not on branch</string>
|
||||
</object>
|
||||
<reference key="NSPreviousConnector" ref="757765970"/>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">210</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
@@ -2764,6 +2775,12 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string key="objectName">CommitsController</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">169</int>
|
||||
<reference key="object" ref="1002608377"/>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string key="objectName">BranchesController</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
@@ -2785,6 +2802,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<string>15.IBViewIntegration.shadowOffsetHeight</string>
|
||||
<string>15.IBViewIntegration.shadowOffsetWidth</string>
|
||||
<string>15.ImportedFromIB2</string>
|
||||
<string>169.IBPluginDependency</string>
|
||||
<string>17.IBPluginDependency</string>
|
||||
<string>17.ImportedFromIB2</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
@@ -2841,6 +2859,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<string>6.IBPluginDependency</string>
|
||||
<string>60.IBPluginDependency</string>
|
||||
<string>61.IBPluginDependency</string>
|
||||
<string>62.IBEditorWindowLastContentRect</string>
|
||||
<string>62.IBPluginDependency</string>
|
||||
<string>62.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>63.IBPluginDependency</string>
|
||||
@@ -2883,6 +2902,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<reference ref="8"/>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
@@ -2913,7 +2933,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<string>PBQLOutlineView</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{429, 794}, {616, 0}}</string>
|
||||
<string>{{429, 567}, {616, 227}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{132, 614}, {616, 0}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -2938,6 +2958,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{725, 616}, {134, 63}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{848, 458}, {116, 63}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -2975,7 +2996,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">133</int>
|
||||
<int key="maxID">210</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@@ -2988,6 +3009,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>openSelectedFile:</string>
|
||||
<string>refresh:</string>
|
||||
<string>setDetailedView:</string>
|
||||
<string>setRawView:</string>
|
||||
<string>setTreeView:</string>
|
||||
@@ -3000,6 +3022,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
|
||||
+4
-5
@@ -12,6 +12,7 @@
|
||||
|
||||
#import "NSFileHandleExt.h"
|
||||
#import "PBEasyPipe.h"
|
||||
#import "PBGitRef.h"
|
||||
|
||||
NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
|
||||
@@ -147,7 +148,7 @@ static NSString* gitPath;
|
||||
NSMutableArray* newBranches = [NSMutableArray array];
|
||||
for (NSString* line in lines) {
|
||||
NSArray* components = [line componentsSeparatedByString:@" "];
|
||||
NSString* ref = [components objectAtIndex:0];
|
||||
PBGitRef* ref = [PBGitRef refFromString:[components objectAtIndex:0]];
|
||||
NSString* type = [components objectAtIndex:1];
|
||||
NSString* sha;
|
||||
if ([type isEqualToString:@"tag"] && [components count] == 4)
|
||||
@@ -155,10 +156,8 @@ static NSString* gitPath;
|
||||
else
|
||||
sha = [components objectAtIndex:2];
|
||||
|
||||
if ([ref length] > 11 && [[ref substringToIndex:11] isEqualToString:@"refs/heads/"]) {
|
||||
NSString* branch = [ref substringFromIndex:11];
|
||||
[newBranches addObject: branch];
|
||||
}
|
||||
if ([[ref type] isEqualToString:@"head"])
|
||||
[newBranches addObject: ref];
|
||||
|
||||
NSMutableArray* curRefs;
|
||||
if (curRefs = [newRefs objectForKey:sha])
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@
|
||||
|
||||
int index;
|
||||
for (index = 0; index < [cellInfo.refs count]; ++index) {
|
||||
PBGitRef* ref = [PBGitRef refFromString:[cellInfo.refs objectAtIndex:index]];
|
||||
PBGitRef* ref = [cellInfo.refs objectAtIndex:index];
|
||||
|
||||
NSMutableDictionary* attributes = [self attributesForRefLabelSelected:[self isHighlighted]];
|
||||
NSSize refSize = [[ref shortName] sizeWithAttributes:attributes];
|
||||
|
||||
Reference in New Issue
Block a user