Permalink
Browse files

Added progress bar and progress status

  • Loading branch information...
mikejswork committed Apr 1, 2012
1 parent dfd4dae commit 4a6a93621ac0dcad6939406c97f5bf14eac9d3db
Showing with 100 additions and 4 deletions.
  1. +3 −0 gimple/AppDelegate.h
  2. +11 −0 gimple/AppDelegate.m
  3. +1 −1 gimple/Git.h
  4. +85 −3 gimple/en.lproj/MainMenu.xib
View
@@ -13,6 +13,9 @@
@interface AppDelegate : NSObject <NSApplicationDelegate, GitSyncDelegate>{
IBOutlet NSTextField* reposPathTextField;
IBOutlet NSTextField* workingOnTextField;
+ IBOutlet NSProgressIndicator* progressBar;
+ IBOutlet NSTextField* progressStatus;
+
Git* git;
}
View
@@ -31,6 +31,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
git = [[[Git alloc] initWithRepositoryPath:[reposPathTextField stringValue]] autorelease];
git.syncDelegate = self;
+ git.progressDelegate = self;
}
- (IBAction)updateRepositoryPath:(id)sender{
@@ -76,4 +77,14 @@ -(void) syncConflicts:(NSArray*)conflicts
NSLog(@"conflicted:%@", conflicts);
}
+-(void) setProgress:(NSNumber*)progress
+{
+ progressBar.doubleValue = [progress doubleValue];
+}
+
+-(void) setStatus:(NSString*)status
+{
+ progressStatus.stringValue = status;
+}
+
@end
View
@@ -10,7 +10,7 @@
@protocol GitProgressDelegate <NSObject>
--(void) setProgress:(float)progress;
+-(void) setProgress:(NSNumber*)progress;
-(void) setStatus:(NSString*)status;
@end
@@ -17,6 +17,7 @@
<string>NSMenuItem</string>
<string>NSTextField</string>
<string>NSTextFieldCell</string>
+ <string>NSProgressIndicator</string>
<string>NSButtonCell</string>
<string>NSButton</string>
<string>NSCustomObject</string>
@@ -386,7 +387,7 @@
<string key="NSFrame">{{133, 82}, {189, 137}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
+ <reference key="NSNextKeyView" ref="749509752"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="347818302">
<int key="NSCellFlags">-2080244224</int>
@@ -485,13 +486,45 @@
<reference key="NSTextColor" ref="16429531"/>
</object>
</object>
+ <object class="NSProgressIndicator" id="749509752">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">1292</int>
+ <object class="NSPSMatrix" key="NSDrawMatrix"/>
+ <string key="NSFrame">{{131, 27}, {193, 20}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:2352</string>
+ <int key="NSpiFlags">16392</int>
+ <double key="NSMaxValue">100</double>
+ </object>
+ <object class="NSTextField" id="850835884">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{133, 54}, {189, 22}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:903</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="660792076">
+ <int key="NSCellFlags">-1804468671</int>
+ <int key="NSCellFlags2">272630784</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="288721686"/>
+ <string key="NSCellIdentifier">_NS:903</string>
+ <reference key="NSControlView" ref="850835884"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <reference key="NSBackgroundColor" ref="748852161"/>
+ <reference key="NSTextColor" ref="16429531"/>
+ </object>
+ </object>
</array>
<string key="NSFrameSize">{480, 360}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="642684859"/>
</object>
- <string key="NSScreenRect">{{0, 0}, {1366, 746}}</string>
+ <string key="NSScreenRect">{{0, 0}, {1366, 768}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
@@ -672,6 +705,22 @@
</object>
<int key="connectionID">562</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">progressBar</string>
+ <reference key="source" ref="976324537"/>
+ <reference key="destination" ref="749509752"/>
+ </object>
+ <int key="connectionID">564</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">progressStatus</string>
+ <reference key="source" ref="976324537"/>
+ <reference key="destination" ref="850835884"/>
+ </object>
+ <int key="connectionID">567</int>
+ </object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -943,6 +992,8 @@
<reference ref="642684859"/>
<reference ref="643991805"/>
<reference ref="998498976"/>
+ <reference ref="749509752"/>
+ <reference ref="850835884"/>
</array>
<reference key="parent" ref="972006081"/>
</object>
@@ -1029,6 +1080,24 @@
<reference key="object" ref="997299532"/>
<reference key="parent" ref="998498976"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">563</int>
+ <reference key="object" ref="749509752"/>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">565</int>
+ <reference key="object" ref="850835884"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="660792076"/>
+ </array>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">566</int>
+ <reference key="object" ref="660792076"/>
+ <reference key="parent" ref="850835884"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -1077,6 +1146,9 @@
<string key="558.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="559.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="563.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="565.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="566.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1091,19 +1163,29 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">562</int>
+ <int key="maxID">567</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">AppDelegate</string>
<string key="superclassName">NSObject</string>
<dictionary class="NSMutableDictionary" key="outlets">
+ <string key="progressBar">NSProgressIndicator</string>
+ <string key="progressStatus">NSTextField</string>
<string key="reposPathTextField">NSTextField</string>
<string key="window">NSWindow</string>
<string key="workingOnTextField">NSTextField</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="progressBar">
+ <string key="name">progressBar</string>
+ <string key="candidateClassName">NSProgressIndicator</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="progressStatus">
+ <string key="name">progressStatus</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
<object class="IBToOneOutletInfo" key="reposPathTextField">
<string key="name">reposPathTextField</string>
<string key="candidateClassName">NSTextField</string>

0 comments on commit 4a6a936

Please sign in to comment.