mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Display context menu in the history tree to show related commits
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This commit is contained in:
committed by
Pieter de Bie
parent
d04362ba82
commit
d973dc5ba7
@@ -41,6 +41,7 @@
|
||||
- (IBAction) toggleQuickView: sender;
|
||||
- (IBAction) openSelectedFile: sender;
|
||||
- (void) updateQuicklookForce: (BOOL) force;
|
||||
- (void) showCommitsFromTree:(id) sender;
|
||||
|
||||
- (void) copyCommitInfo;
|
||||
|
||||
|
||||
@@ -218,4 +218,16 @@
|
||||
return menu;
|
||||
}
|
||||
|
||||
- (void) showCommitsFromTree:(id) sender
|
||||
{
|
||||
// TODO: Enable this from webview as well!
|
||||
|
||||
NSMutableArray *filePaths = [NSMutableArray arrayWithObjects:@"HEAD", @"--", NULL];
|
||||
for (PBGitTree *tree in [treeController selectedObjects])
|
||||
[filePaths addObject:[tree fullPath]];
|
||||
PBGitRevSpecifier *revSpec = [[PBGitRevSpecifier alloc] initWithParameters:filePaths];
|
||||
|
||||
repository.currentBranch = [repository addBranch:revSpec];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+60
-5
@@ -2,12 +2,13 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">9G55</string>
|
||||
<string key="IBDocument.SystemVersion">9J61</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">677</string>
|
||||
<string key="IBDocument.AppKitVersion">949.43</string>
|
||||
<string key="IBDocument.AppKitVersion">949.46</string>
|
||||
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="275"/>
|
||||
<integer value="237"/>
|
||||
<integer value="27"/>
|
||||
</object>
|
||||
@@ -345,6 +346,7 @@
|
||||
<object class="NSMutableArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>Apple HTML pasteboard type</string>
|
||||
<string>Apple PDF pasteboard type</string>
|
||||
<string>Apple PICT pasteboard type</string>
|
||||
<string>Apple URL pasteboard type</string>
|
||||
<string>Apple Web Archive pasteboard type</string>
|
||||
@@ -355,6 +357,7 @@
|
||||
<string>NeXT Rich Text Format v1.0 pasteboard type</string>
|
||||
<string>NeXT TIFF v4.0 pasteboard type</string>
|
||||
<string>WebURLsWithTitlesPboardType</string>
|
||||
<string>public.png</string>
|
||||
<string>public.url</string>
|
||||
<string>public.url-name</string>
|
||||
</object>
|
||||
@@ -1515,6 +1518,20 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenu" id="500542810">
|
||||
<string key="NSTitle"/>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="661418857">
|
||||
<reference key="NSMenu" ref="500542810"/>
|
||||
<string key="NSTitle">Commits touching paths</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="908677745"/>
|
||||
<reference key="NSMixedImage" ref="746375230"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
@@ -2105,6 +2122,22 @@
|
||||
</object>
|
||||
<int key="connectionID">274</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">showCommitsFromTree:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="661418857"/>
|
||||
</object>
|
||||
<int key="connectionID">281</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">menu</string>
|
||||
<reference key="source" ref="216928480"/>
|
||||
<reference key="destination" ref="500542810"/>
|
||||
</object>
|
||||
<int key="connectionID">282</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
@@ -2735,6 +2768,20 @@
|
||||
<reference key="object" ref="217429948"/>
|
||||
<reference key="parent" ref="27300806"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">276</int>
|
||||
<reference key="object" ref="500542810"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="661418857"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1002"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">275</int>
|
||||
<reference key="object" ref="661418857"/>
|
||||
<reference key="parent" ref="500542810"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
@@ -2814,6 +2861,9 @@
|
||||
<string>27.ImportedFromIB2</string>
|
||||
<string>272.IBPluginDependency</string>
|
||||
<string>273.IBPluginDependency</string>
|
||||
<string>275.IBPluginDependency</string>
|
||||
<string>276.IBEditorWindowLastContentRect</string>
|
||||
<string>276.IBPluginDependency</string>
|
||||
<string>28.IBPluginDependency</string>
|
||||
<string>28.IBShouldRemoveOnLegacySave</string>
|
||||
<string>29.IBPluginDependency</string>
|
||||
@@ -2945,6 +2995,9 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{126, 715}, {223, 23}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
@@ -2978,7 +3031,7 @@
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{321, 79}, {852, 432}}</string>
|
||||
<string>{{59, 317}, {852, 432}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -3013,7 +3066,7 @@
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">274</int>
|
||||
<int key="maxID">282</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@@ -3032,7 +3085,7 @@
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>PBGitHistoryController</string>
|
||||
<string>id</string>
|
||||
<string>PBWebHistoryController</string>
|
||||
<string>WebView</string>
|
||||
</object>
|
||||
</object>
|
||||
@@ -3053,6 +3106,7 @@
|
||||
<string>setDetailedView:</string>
|
||||
<string>setRawView:</string>
|
||||
<string>setTreeView:</string>
|
||||
<string>showCommitsFromTree:</string>
|
||||
<string>toggleQuickView:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
@@ -3063,6 +3117,7 @@
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
|
||||
Reference in New Issue
Block a user