Merge branch 'refs/heads/hide_sidebar_and_commits_list'

This commit is contained in:
German Laullon
2011-03-05 00:29:12 -08:00
8 changed files with 206 additions and 13 deletions
+162 -10
View File
@@ -2,17 +2,17 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">804</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<string key="IBDocument.SystemVersion">10J567</string>
<string key="IBDocument.InterfaceBuilderVersion">788</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">462.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">804</string>
<string key="NS.object.0">788</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="5"/>
<integer value="367"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -58,6 +58,7 @@
<string>41FA1145-D953-446F-B6DF-0230885AB433</string>
<string>7A8FEE7B-B273-4AF3-8A22-53A9DAF786FA</string>
<string>B15C57F2-985F-4446-9A29-34C76DBA9042</string>
<string>D43D38AE-6110-463C-8514-FC8ACC0F327C</string>
<string>FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>NSToolbarSeparatorItem</string>
@@ -92,9 +93,10 @@
<string key="NSToolbarItemPaletteLabel">Clone Repository To</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSButton" key="NSToolbarItemView" id="703553818">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{38, 14}, {40, 25}}</string>
<reference key="NSSuperview"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="64590231">
<int key="NSCellFlags">-2080244224</int>
@@ -137,9 +139,10 @@
<string key="NSToolbarItemPaletteLabel">Refresh</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSButton" key="NSToolbarItemView" id="438380428">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{8, 14}, {32, 25}}</string>
<reference key="NSSuperview"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="604536609">
<int key="NSCellFlags">-2080244224</int>
@@ -170,6 +173,67 @@
<bool key="NSToolbarIsUserRemovable">YES</bool>
<int key="NSToolbarItemVisibilityPriority">0</int>
</object>
<object class="NSToolbarItem" id="121507526">
<object class="NSMutableString" key="NSToolbarItemIdentifier">
<characters key="NS.bytes">D43D38AE-6110-463C-8514-FC8ACC0F327C</characters>
</object>
<string key="NSToolbarItemLabel">View</string>
<string key="NSToolbarItemPaletteLabel">View</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSSegmentedControl" key="NSToolbarItemView" id="371591001">
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{0, 14}, {94, 25}}</string>
<reference key="NSSuperview"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSegmentedCell" key="NSCell" id="399933706">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">16</int>
</object>
<reference key="NSControlView" ref="371591001"/>
<object class="NSMutableArray" key="NSSegmentImages">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSSegmentItem">
<double key="NSSegmentItemWidth">44</double>
<object class="NSCustomResource" key="NSSegmentItemImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">sidebar_Template</string>
</object>
<string key="NSSegmentItemLabel"/>
<bool key="NSSegmentItemSelected">YES</bool>
<int key="NSSegmentItemImageScaling">2</int>
</object>
<object class="NSSegmentItem">
<double key="NSSegmentItemWidth">43</double>
<object class="NSCustomResource" key="NSSegmentItemImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">list_Template</string>
</object>
<string key="NSSegmentItemLabel"/>
<int key="NSSegmentItemTag">1</int>
<bool key="NSSegmentItemSelected">YES</bool>
<int key="NSSegmentItemImageScaling">0</int>
</object>
</object>
<int key="NSTrackingMode">1</int>
<int key="NSSegmentStyle">2</int>
</object>
</object>
<nil key="NSToolbarItemImage"/>
<nil key="NSToolbarItemTarget"/>
<nil key="NSToolbarItemAction"/>
<string key="NSToolbarItemMinSize">{94, 25}</string>
<string key="NSToolbarItemMaxSize">{94, 25}</string>
<bool key="NSToolbarItemEnabled">YES</bool>
<bool key="NSToolbarItemAutovalidates">YES</bool>
<int key="NSToolbarItemTag">0</int>
<bool key="NSToolbarIsUserRemovable">YES</bool>
<int key="NSToolbarItemVisibilityPriority">0</int>
</object>
<object class="NSToolbarItem" id="684497462">
<object class="NSMutableString" key="NSToolbarItemIdentifier">
<characters key="NS.bytes">FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC</characters>
@@ -287,11 +351,14 @@
<reference ref="430741773"/>
<reference ref="136647420"/>
<reference ref="442829492"/>
<reference ref="121507526"/>
</object>
<object class="NSMutableArray" key="NSToolbarIBDefaultItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="79199737"/>
<reference ref="442829492"/>
<reference ref="121507526"/>
<reference ref="430741773"/>
<reference ref="286515344"/>
<reference ref="684497462"/>
</object>
@@ -520,6 +587,14 @@
</object>
<int key="connectionID">419</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">changeLayout:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="121507526"/>
</object>
<int key="connectionID">423</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -603,6 +678,7 @@
<reference ref="684497462"/>
<reference ref="894083033"/>
<reference ref="79199737"/>
<reference ref="121507526"/>
</object>
<reference key="parent" ref="491121796"/>
</object>
@@ -719,6 +795,29 @@
<reference key="parent" ref="120427370"/>
<string key="objectName">Content SplitView</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">422</int>
<reference key="object" ref="121507526"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="371591001"/>
</object>
<reference key="parent" ref="1033396020"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">420</int>
<reference key="object" ref="371591001"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="399933706"/>
</object>
<reference key="parent" ref="121507526"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">421</int>
<reference key="object" ref="399933706"/>
<reference key="parent" ref="371591001"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -757,6 +856,12 @@
<string>415.IBPluginDependency</string>
<string>416.IBPluginDependency</string>
<string>417.IBPluginDependency</string>
<string>420.IBPluginDependency</string>
<string>420.IBSegmentedControlTracker.RoundRobinState</string>
<string>420.IBSegmentedControlTracker.WasGrowing</string>
<string>421.IBPluginDependency</string>
<string>421.IBSegmentedControlInspectorSelectedSegmentMetadataKey</string>
<string>422.toolbarItem.selectable</string>
<string>5.IBPluginDependency</string>
<string>5.ImportedFromIB2</string>
</object>
@@ -779,7 +884,7 @@
<bytes key="NSTransformStruct">AUM5AAAAAAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{347, 1169}, {616, 0}}</string>
<string>{{207, 573}, {616, 227}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -801,6 +906,12 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="0"/>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="0"/>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
</object>
</object>
@@ -820,7 +931,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">419</int>
<int key="maxID">423</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -832,6 +943,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">PBGitWindowController</string>
<string key="superclassName">NSWindowController</string>
@@ -839,6 +957,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>changeLayout:</string>
<string>cloneTo:</string>
<string>openInTerminal:</string>
<string>refresh:</string>
@@ -854,12 +973,14 @@
<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>changeLayout:</string>
<string>cloneTo:</string>
<string>openInTerminal:</string>
<string>refresh:</string>
@@ -869,6 +990,10 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">changeLayout:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">cloneTo:</string>
<string key="candidateClassName">id</string>
@@ -1349,6 +1474,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">
@@ -1456,6 +1588,22 @@
<string key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSSegmentedCell</string>
<string key="superclassName">NSActionCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSSegmentedCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSSegmentedControl</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSSegmentedControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSSplitView</string>
<string key="superclassName">NSView</string>
@@ -1587,6 +1735,8 @@
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
<string>NSRefreshTemplate</string>
<string>list_Template</string>
<string>sidebar_Template</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1594,6 +1744,8 @@
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{10, 12}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
</object>
</object>
</data>
+8
View File
@@ -60,6 +60,8 @@
31460CD4124185BA00B90AED /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 31460CAF124185BA00B90AED /* ReadMe.txt */; };
31460CD5124185BA00B90AED /* Source Code License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 31460CB0124185BA00B90AED /* Source Code License.rtf */; };
31460CD6124185BA00B90AED /* TODO in Resources */ = {isa = PBXBuildFile; fileRef = 31460CB1124185BA00B90AED /* TODO */; };
316E7202131EE9C600AFBB36 /* list_Template.png in Resources */ = {isa = PBXBuildFile; fileRef = 316E7200131EE9C600AFBB36 /* list_Template.png */; };
316E7203131EE9C600AFBB36 /* sidebar_Template.png in Resources */ = {isa = PBXBuildFile; fileRef = 316E7201131EE9C600AFBB36 /* sidebar_Template.png */; };
31DAA7ED1317737100463846 /* gitx_l_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 31DAA7EC1317737100463846 /* gitx_l_pub.pem */; };
3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; };
3BC07F4D0ED5A5C5009A7768 /* CommitViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4B0ED5A5C5009A7768 /* CommitViewTemplate.png */; };
@@ -347,6 +349,8 @@
31460CAF124185BA00B90AED /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
31460CB0124185BA00B90AED /* Source Code License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "Source Code License.rtf"; sourceTree = "<group>"; };
31460CB1124185BA00B90AED /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = "<group>"; };
316E7200131EE9C600AFBB36 /* list_Template.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = list_Template.png; sourceTree = "<group>"; };
316E7201131EE9C600AFBB36 /* sidebar_Template.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sidebar_Template.png; sourceTree = "<group>"; };
31DAA7EC1317737100463846 /* gitx_l_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gitx_l_pub.pem; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* GitX_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitX_Prefix.pch; sourceTree = "<group>"; };
3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HistoryViewTemplate.png; path = Images/HistoryViewTemplate.png; sourceTree = "<group>"; };
@@ -813,6 +817,8 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
316E7200131EE9C600AFBB36 /* list_Template.png */,
316E7201131EE9C600AFBB36 /* sidebar_Template.png */,
21025C1012947AB200D87200 /* sourceListAction.png */,
21025C1112947AB200D87200 /* sourceListActionOver.png */,
02B41A5F123E307F00DFC531 /* PBCommitHookFailedSheet.xib */,
@@ -1428,6 +1434,8 @@
212A49AD12A31350009DAFAD /* ignored_file.png in Resources */,
212A49AF12A3135C009DAFAD /* modified_file.png in Resources */,
31DAA7ED1317737100463846 /* gitx_l_pub.pem in Resources */,
316E7202131EE9C600AFBB36 /* list_Template.png in Resources */,
316E7203131EE9C600AFBB36 /* sidebar_Template.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
+1
View File
@@ -57,6 +57,7 @@
}
@property (readonly) NSTreeController* treeController;
@property (readonly) PBCollapsibleSplitView *historySplitView;
@property (assign) int selectedCommitDetailsIndex;
@property (retain) PBGitCommit *webCommit;
@property (retain) PBGitTree* gitTree;
+1
View File
@@ -48,6 +48,7 @@
@synthesize searchController;
@synthesize commitList;
@synthesize treeController;
@synthesize historySplitView;
- (void)awakeFromNib
{
+5
View File
@@ -9,6 +9,9 @@
#import <Cocoa/Cocoa.h>
#import "PBGitRepository.h"
#define kGitSplitViewMinWidth 150.0f
#define kGitSplitViewMaxWidth 300.0f
@class PBViewController, PBGitSidebarController, PBGitCommitController;
@interface PBGitWindowController : NSWindowController {
@@ -39,6 +42,7 @@
- (void)showMessageSheet:(NSString *)messageText infoText:(NSString *)infoText;
- (void)showErrorSheet:(NSError *)error;
- (void)showErrorSheetTitle:(NSString *)title message:(NSString *)message arguments:(NSArray *)arguments output:(NSString *)output;
- (void)collapseSplitView:(NSSplitView *)sp show:(BOOL)show;
- (IBAction) showCommitView:(id)sender;
- (IBAction) showHistoryView:(id)sender;
@@ -46,6 +50,7 @@
- (IBAction) openInTerminal:(id)sender;
- (IBAction) cloneTo:(id)sender;
- (IBAction) refresh:(id)sender;
- (IBAction) changeLayout:(id)sender;
- (void)setHistorySearch:(NSString *)searchString mode:(NSInteger)mode;
+29 -3
View File
@@ -215,14 +215,40 @@
[sidebarController setHistorySearch:searchString mode:mode];
}
- (IBAction) changeLayout:(id)sender{
NSLog(@"selectedSegment=%ld (%d)",[sender selectedSegment],[sender isSelectedForSegment:[sender selectedSegment]]);
NSSplitView *sp=nil;
switch ([sender selectedSegment]) {
case 0:
sp=splitView;
break;
case 1:
sp=[[sidebarController historyViewController] historySplitView];
break;
}
NSLog(@"sp=%@",sp);
if(sp!=nil) {
[self collapseSplitView:sp show:[sender isSelectedForSegment:[sender selectedSegment]]];
}
}
- (void)collapseSplitView:(NSSplitView *)sp show:(BOOL)show{
NSView *clipview = [[sp subviews] objectAtIndex:0];
NSRect clipFrame = [clipview frame];
if ([sp isVertical]) {
clipFrame.size.width = kGitSplitViewMinWidth * show;
}else{
clipFrame.size.height = kGitSplitViewMinWidth * show;
}
[[clipview animator] setFrame:clipFrame];
[sp adjustSubviews];
}
#pragma mark -
#pragma mark SplitView Delegates
#define kGitSplitViewMinWidth 150.0f
#define kGitSplitViewMaxWidth 300.0f
#pragma mark min/max widths while moving the divider
- (CGFloat)splitView:(NSSplitView *)view constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B