From: Nathan Kinsinger <[email protected]>

---
 PBGitCommitController.h |    1 +
 PBGitCommitController.m |    6 ++++++
 PBGitCommitView.xib     |   12 +++++++++++-
 3 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/PBGitCommitController.h b/PBGitCommitController.h
index f29f884..8cda41e 100644
--- a/PBGitCommitController.h
+++ b/PBGitCommitController.h
@@ -19,6 +19,7 @@
        IBOutlet NSTextView *commitMessageView;
        IBOutlet NSArrayController *unstagedFilesController;
        IBOutlet NSArrayController *cachedFilesController;
+       IBOutlet NSButton *commitButton;
 
        IBOutlet PBGitIndexController *indexController;
        IBOutlet PBWebChangesController *webController;
diff --git a/PBGitCommitController.m b/PBGitCommitController.m
index 6a77348..c8b5f55 100644
--- a/PBGitCommitController.m
+++ b/PBGitCommitController.m
@@ -177,6 +177,12 @@ - (void)indexChanged:(NSNotification *)notification
 {
        [cachedFilesController rearrangeObjects];
        [unstagedFilesController rearrangeObjects];
+    if ([[cachedFilesController arrangedObjects] count]) {
+        [commitButton setEnabled:YES];
+    } else {
+        [commitButton setEnabled:NO];
+    }
+
 }
 
 - (void)indexOperationFailed:(NSNotification *)notification
diff --git a/PBGitCommitView.xib b/PBGitCommitView.xib
index 5b8021f..7d0e8a7 100644
--- a/PBGitCommitView.xib
+++ b/PBGitCommitView.xib
@@ -1202,6 +1202,14 @@
                                        </object>
                                        <int key="connectionID">283</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" 
key="connection">
+                                               <string 
key="label">commitButton</string>
+                                               <reference key="source" 
ref="1001"/>
+                                               <reference key="destination" 
ref="792511503"/>
+                                       </object>
+                                       <int key="connectionID">307</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
@@ -1663,7 +1671,7 @@
                                </object>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">283</int>
+                       <int key="maxID">307</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <object class="NSMutableArray" 
key="referencedPartialClassDescriptions">
@@ -1707,6 +1715,7 @@
                                                <object class="NSMutableArray" 
key="dict.sortedKeys">
                                                        <bool 
key="EncodedWithXMLCoder">YES</bool>
                                                        
<string>cachedFilesController</string>
+                                                       
<string>commitButton</string>
                                                        
<string>commitMessageView</string>
                                                        
<string>indexController</string>
                                                        
<string>unstagedFilesController</string>
@@ -1715,6 +1724,7 @@
                                                <object class="NSMutableArray" 
key="dict.values">
                                                        <bool 
key="EncodedWithXMLCoder">YES</bool>
                                                        
<string>NSArrayController</string>
+                                                       
<string>NSButton</string>
                                                        
<string>NSTextView</string>
                                                        
<string>PBGitIndexController</string>
                                                        
<string>NSArrayController</string>
-- 
1.7.0.3

To unsubscribe from this group, send email to gitx+unsubscribegooglegroups.com 
or reply to this email with the words "REMOVE ME" as the subject.

Reply via email to