From e17b454c39d7556f2d676d424496e3f68b7f16fe Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Sun, 13 Sep 2009 16:15:23 +0200 Subject: [PATCH] CommitController: Make commit message editable after commit failed --- PBGitCommitController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PBGitCommitController.m b/PBGitCommitController.m index c0af324..a6200dc 100644 --- a/PBGitCommitController.m +++ b/PBGitCommitController.m @@ -126,9 +126,9 @@ [unstagedFilesController setSelectionIndexes:[NSIndexSet indexSet]]; self.busy = YES; + [commitMessageView setEditable:NO]; [index commitWithMessage:commitMessage]; - [commitMessageView setEditable:NO]; } @@ -145,9 +145,9 @@ - (void)commitFinished:(NSNotification *)notification { + [commitMessageView setEditable:YES]; [commitMessageView setString:@""]; [webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]]; - [commitMessageView setEditable:YES]; } - (void)commitFailed:(NSNotification *)notification @@ -155,6 +155,7 @@ self.busy = NO; NSString *reason = [[notification userInfo] objectForKey:@"description"]; self.status = [@"Commit failed: " stringByAppendingString:reason]; + [commitMessageView setEditable:YES]; [[repository windowController] showMessageSheet:@"Commit failed" infoText:reason]; }