Skip to content

Commit

Permalink
Add a bottom content border/toolbar to the repository window
Browse files Browse the repository at this point in the history
    - add an action menu for the selected ref in the source view
    - add Add Remote, Fetch, Pull and Push buttons to the bottom bar
        - Add Remote icon by Nathan Kinsinger
        - Fetch, Pull and Push icons are modified versions of André Berg's icons (from 4396081) made a bit smaller to fit in the UI better.
    - move the status message for both the history view and the commit/stage view
        - all PBViewControllers now have status and isBusy properties and can use those to put a message in the bottom bar when they are the active content controller of the window
  • Loading branch information
brotherbard committed Mar 14, 2010
1 parent 2321ec8 commit 1b41171
Show file tree
Hide file tree
Showing 20 changed files with 832 additions and 306 deletions.
291 changes: 227 additions & 64 deletions English.lproj/RepositoryWindow.xib

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions GitX.xcodeproj/project.pbxproj
Expand Up @@ -52,6 +52,9 @@
D8083E03111FA33700337480 /* PBCloneRepositoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = D8083E02111FA33700337480 /* PBCloneRepositoryPanel.m */; };
D828A40D1127B18700F09D11 /* PBSourceViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D828A40C1127B18700F09D11 /* PBSourceViewCell.m */; };
D828A4111127B1C400F09D11 /* PBSourceViewBadge.m in Sources */ = {isa = PBXBuildFile; fileRef = D828A4101127B1C400F09D11 /* PBSourceViewBadge.m */; };
D828A5F21128AE7200F09D11 /* FetchTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = D828A5EF1128AE7200F09D11 /* FetchTemplate.png */; };
D828A5F31128AE7200F09D11 /* PullTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = D828A5F01128AE7200F09D11 /* PullTemplate.png */; };
D828A5F41128AE7200F09D11 /* PushTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = D828A5F11128AE7200F09D11 /* PushTemplate.png */; };
D8357535112640F100DE249D /* PBRemoteProgressSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8C1B77110E875CF009B7F8B /* PBRemoteProgressSheet.xib */; };
D854948610D5C01B0083B917 /* PBCreateBranchSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = D854948510D5C01B0083B917 /* PBCreateBranchSheet.m */; };
D85810551127476E007F254B /* StageView.png in Resources */ = {isa = PBXBuildFile; fileRef = D85810541127476E007F254B /* StageView.png */; };
Expand All @@ -71,6 +74,7 @@
D8FDDA6E114335E8005647F6 /* PBGitSVRemoteItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA65114335E8005647F6 /* PBGitSVRemoteItem.m */; };
D8FDDA6F114335E8005647F6 /* PBGitSVStageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA67114335E8005647F6 /* PBGitSVStageItem.m */; };
D8FDDA70114335E8005647F6 /* PBGitSVTagItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */; };
D8FDDBF41143F318005647F6 /* AddRemote.png in Resources */ = {isa = PBXBuildFile; fileRef = D8FDDBF31143F318005647F6 /* AddRemote.png */; };
EB2A734A0FEE3F09006601CF /* PBCollapsibleSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = EB2A73490FEE3F09006601CF /* PBCollapsibleSplitView.m */; };
F50A411F0EBB874C00208746 /* mainSplitterBar.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F50A411D0EBB874C00208746 /* mainSplitterBar.tiff */; };
F50A41200EBB874C00208746 /* mainSplitterDimple.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F50A411E0EBB874C00208746 /* mainSplitterDimple.tiff */; };
Expand Down Expand Up @@ -254,6 +258,9 @@
D828A40C1127B18700F09D11 /* PBSourceViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBSourceViewCell.m; sourceTree = "<group>"; };
D828A40F1127B1C400F09D11 /* PBSourceViewBadge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewBadge.h; sourceTree = "<group>"; };
D828A4101127B1C400F09D11 /* PBSourceViewBadge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBSourceViewBadge.m; sourceTree = "<group>"; };
D828A5EF1128AE7200F09D11 /* FetchTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FetchTemplate.png; path = Images/FetchTemplate.png; sourceTree = "<group>"; };
D828A5F01128AE7200F09D11 /* PullTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PullTemplate.png; path = Images/PullTemplate.png; sourceTree = "<group>"; };
D828A5F11128AE7200F09D11 /* PushTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PushTemplate.png; path = Images/PushTemplate.png; sourceTree = "<group>"; };
D854948410D5C01B0083B917 /* PBCreateBranchSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCreateBranchSheet.h; sourceTree = "<group>"; };
D854948510D5C01B0083B917 /* PBCreateBranchSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCreateBranchSheet.m; sourceTree = "<group>"; };
D854949310D5C3E20083B917 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCreateBranchSheet.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -285,6 +292,7 @@
D8FDDA68114335E8005647F6 /* PBGitSVTagItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVTagItem.h; sourceTree = "<group>"; };
D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVTagItem.m; sourceTree = "<group>"; };
D8FDDA7311433634005647F6 /* PBSourceViewItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewItems.h; sourceTree = "<group>"; };
D8FDDBF31143F318005647F6 /* AddRemote.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AddRemote.png; path = Images/AddRemote.png; sourceTree = "<group>"; };
EB2A73480FEE3F09006601CF /* PBCollapsibleSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCollapsibleSplitView.h; sourceTree = "<group>"; };
EB2A73490FEE3F09006601CF /* PBCollapsibleSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCollapsibleSplitView.m; sourceTree = "<group>"; };
F50A411D0EBB874C00208746 /* mainSplitterBar.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = mainSplitterBar.tiff; path = Images/mainSplitterBar.tiff; sourceTree = "<group>"; };
Expand Down Expand Up @@ -507,6 +515,10 @@
D858108111274D28007F254B /* RemoteBranch.png */,
D858108211274D28007F254B /* Tag.png */,
D85810541127476E007F254B /* StageView.png */,
D8FDDBF31143F318005647F6 /* AddRemote.png */,
D828A5EF1128AE7200F09D11 /* FetchTemplate.png */,
D828A5F01128AE7200F09D11 /* PullTemplate.png */,
D828A5F11128AE7200F09D11 /* PushTemplate.png */,
3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */,
3BC07F4B0ED5A5C5009A7768 /* CommitViewTemplate.png */,
F56ADDD70ED19F9E002AC78F /* AddBranchTemplate.png */,
Expand Down Expand Up @@ -993,6 +1005,10 @@
D858108311274D28007F254B /* Branch.png in Resources */,
D858108411274D28007F254B /* RemoteBranch.png in Resources */,
D858108511274D28007F254B /* Tag.png in Resources */,
D828A5F21128AE7200F09D11 /* FetchTemplate.png in Resources */,
D828A5F31128AE7200F09D11 /* PullTemplate.png in Resources */,
D828A5F41128AE7200F09D11 /* PushTemplate.png in Resources */,
D8FDDBF41143F318005647F6 /* AddRemote.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file added Images/AddRemote.acorn
Binary file not shown.
Binary file added Images/AddRemote.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/FetchTemplate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/PullTemplate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/PushTemplate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions PBGitCommitController.h
Expand Up @@ -23,14 +23,9 @@

IBOutlet PBGitIndexController *indexController;
IBOutlet PBWebChangesController *webController;

NSString *status;
BOOL busy;
}

@property(copy) NSString *status;
@property(readonly) PBGitIndex *index;
@property(assign) BOOL busy;

- (IBAction) refresh:(id) sender;
- (IBAction) commit:(id) sender;
Expand Down
10 changes: 5 additions & 5 deletions PBGitCommitController.m
Expand Up @@ -24,7 +24,7 @@ - (void)indexOperationFailed:(NSNotification *)notification;

@implementation PBGitCommitController

@synthesize status, index, busy;
@synthesize index;

- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller
{
Expand Down Expand Up @@ -93,7 +93,7 @@ - (IBAction)signOff:(id)sender

- (void) refresh:(id) sender
{
self.busy = YES;
self.isBusy = YES;
self.status = @"Refreshing index…";
[index refresh];

Expand Down Expand Up @@ -127,7 +127,7 @@ - (IBAction) commit:(id) sender
[cachedFilesController setSelectionIndexes:[NSIndexSet indexSet]];
[unstagedFilesController setSelectionIndexes:[NSIndexSet indexSet]];

self.busy = YES;
self.isBusy = YES;
[commitMessageView setEditable:NO];

[index commitWithMessage:commitMessage];
Expand All @@ -137,7 +137,7 @@ - (IBAction) commit:(id) sender
# pragma mark PBGitIndex Notification handling
- (void)refreshFinished:(NSNotification *)notification
{
self.busy = NO;
self.isBusy = NO;
self.status = @"Index refresh finished";
}

Expand All @@ -155,7 +155,7 @@ - (void)commitFinished:(NSNotification *)notification

- (void)commitFailed:(NSNotification *)notification
{
self.busy = NO;
self.isBusy = NO;
NSString *reason = [[notification userInfo] objectForKey:@"description"];
self.status = [@"Commit failed: " stringByAppendingString:reason];
[commitMessageView setEditable:YES];
Expand Down
147 changes: 14 additions & 133 deletions PBGitCommitView.xib
Expand Up @@ -87,38 +87,6 @@
<int key="NSTitlePosition">0</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="NSTextField" id="1073221655">
<reference key="NSNextResponder" ref="750704519"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{27, 8}, {305, 17}}</string>
<reference key="NSSuperview" ref="750704519"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1003368966">
<int key="NSCellFlags">67239488</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Ready to commit</string>
<reference key="NSSupport" ref="554612341"/>
<reference key="NSControlView" ref="1073221655"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor" id="500580906">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="132492410">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor" id="123758511">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSSplitView" id="812432808">
<reference key="NSNextResponder" ref="750704519"/>
<int key="NSvFlags">274</int>
Expand Down Expand Up @@ -235,7 +203,10 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">headerTextColor</string>
<reference key="NSColor" ref="123758511"/>
<object class="NSColor" key="NSColor" id="123758511">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="45690317">
Expand All @@ -248,9 +219,17 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlBackgroundColor</string>
<reference key="NSColor" ref="500580906"/>
<object class="NSColor" key="NSColor" id="500580906">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="132492410">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<reference key="NSColor" ref="123758511"/>
</object>
<reference key="NSTextColor" ref="132492410"/>
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
Expand Down Expand Up @@ -741,16 +720,6 @@
<reference key="NSSuperview" ref="750704519"/>
<string key="NSAutosaveName">CommitViewSplitView</string>
</object>
<object class="NSProgressIndicator" id="221814497">
<reference key="NSNextResponder" ref="750704519"/>
<int key="NSvFlags">1316</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
<string key="NSFrame">{{6, 8}, {16, 16}}</string>
<reference key="NSSuperview" ref="750704519"/>
<int key="NSpiFlags">28938</int>
<double key="NSMinValue">16</double>
<double key="NSMaxValue">100</double>
</object>
</object>
<string key="NSFrameSize">{852, 432}</string>
<reference key="NSSuperview"/>
Expand Down Expand Up @@ -908,38 +877,6 @@
</object>
<int key="connectionID">213</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: status</string>
<reference key="source" ref="1073221655"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1073221655"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">value: status</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">status</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">216</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">animate: busy</string>
<reference key="source" ref="221814497"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="221814497"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">animate: busy</string>
<string key="NSBinding">animate</string>
<string key="NSKeyPath">busy</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">222</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">webController</string>
Expand Down Expand Up @@ -1150,8 +1087,6 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="812432808"/>
<reference ref="221814497"/>
<reference ref="1073221655"/>
<reference ref="471472652"/>
</object>
<reference key="parent" ref="0"/>
Expand Down Expand Up @@ -1179,21 +1114,6 @@
<reference key="parent" ref="0"/>
<string key="objectName">Diff Controller</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="1073221655"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1003368966"/>
</object>
<reference key="parent" ref="750704519"/>
<string key="objectName">Status label</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="1003368966"/>
<reference key="parent" ref="1073221655"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">186</int>
<reference key="object" ref="812432808"/>
Expand Down Expand Up @@ -1378,11 +1298,6 @@
<reference key="object" ref="39450212"/>
<reference key="parent" ref="79177434"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">217</int>
<reference key="object" ref="221814497"/>
<reference key="parent" ref="750704519"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">247</int>
<reference key="object" ref="18874447"/>
Expand Down Expand Up @@ -1448,18 +1363,15 @@
<string>164.IBPluginDependency</string>
<string>186.CustomClassName</string>
<string>186.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>206.IBPluginDependency</string>
<string>207.IBPluginDependency</string>
<string>208.IBPluginDependency</string>
<string>209.IBPluginDependency</string>
<string>217.IBPluginDependency</string>
<string>247.IBPluginDependency</string>
<string>248.IBPluginDependency</string>
<string>278.IBPluginDependency</string>
<string>279.IBPluginDependency</string>
<string>308.IBPluginDependency</string>
<string>42.IBPluginDependency</string>
<string>45.IBPluginDependency</string>
<string>46.IBPluginDependency</string>
<string>47.IBPluginDependency</string>
Expand Down Expand Up @@ -1509,9 +1421,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>PBFileChangesTableView</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down Expand Up @@ -1664,10 +1573,6 @@
<object class="IBPartialClassDescription">
<string key="className">PBViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">viewToolbar</string>
<string key="NS.object.0">NSToolbar</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">PBViewController.h</string>
Expand Down Expand Up @@ -2189,14 +2094,6 @@
<string key="minorKey">AppKit.framework/Headers/NSObjectController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSProgressIndicator</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSProgressIndicator.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
Expand Down Expand Up @@ -2257,14 +2154,6 @@
<string key="minorKey">AppKit.framework/Headers/NSText.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTextField</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSTextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTextFieldCell</string>
<string key="superclassName">NSActionCell</string>
Expand All @@ -2281,14 +2170,6 @@
<string key="minorKey">AppKit.framework/Headers/NSTextView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSToolbar</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSUserDefaultsController</string>
<string key="superclassName">NSController</string>
Expand Down

0 comments on commit 1b41171

Please sign in to comment.