From a12360284cef2f19ef670b8db587a1b02201cea2 Mon Sep 17 00:00:00 2001 From: Johan 't Hart Date: Fri, 5 Jun 2009 01:03:20 +0200 Subject: [PATCH] Commit: Made user able to push after successful commit --- src/TortoiseProc/CommitDlg.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index fb5a5d0..0dbf8e6 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -34,6 +34,7 @@ #include "UnicodeUtils.h" #include "ProgressDlg.h" #include "ShellUpdater.h" +#include "Commands/PushCommand.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -501,13 +502,20 @@ void CCommitDlg::OnOK() progress.m_GitCmd=cmd; progress.m_bShowCommand = FALSE; // don't show the commit command progress.m_PreText = out; // show any output already generated in log window - progress.DoModal(); + progress.m_changeAbortButtonOnSuccessTo = "Push"; + DWORD userResponse = progress.DoModal(); if(progress.m_GitStatus) { bCloseCommitDlg = false; this->Refresh(); } + else if(userResponse == IDCANCEL) + { + //User pressed 'Push' button after successful commit. + PushCommand cmdPush; + cmdPush.Execute(); + } CFile::Remove(tempfile); }else -- 2.11.0