From 80446c69e79aecf4dcb3db53b3af62c2ab3f0334 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 28 Mar 2018 23:14:58 +0200 Subject: [PATCH] Pass right parameters to LaunchPAgent Regression of commit aab7202fbed2d4920160c6021812fe133297ee38. Signed-off-by: Sven Strickroth --- src/TortoiseProc/AppUtils.cpp | 10 +++++----- src/TortoiseProc/BrowseRefsDlg.cpp | 2 +- src/TortoiseProc/SyncDlg.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index 1665f28a3..c356ec0ad 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -2288,7 +2288,7 @@ int CAppUtils::SaveCommitUnicodeFile(const CString& filename, CString &message) bool DoPull(HWND hWnd, const CString& url, bool bAutoLoad, BOOL bFetchTags, bool bNoFF, bool bFFonly, bool bSquash, bool bNoCommit, int* nDepth, BOOL bPrune, const CString& remoteBranchName, bool showPush, bool showStashPop, bool bUnrelated) { if (bAutoLoad) - CAppUtils::LaunchPAgent(hWnd, &url); + CAppUtils::LaunchPAgent(hWnd, nullptr, &url); CGitHash hashOld; if (g_Git.GetHash(hashOld, L"HEAD")) @@ -2526,10 +2526,10 @@ static bool DoFetch(HWND hWnd, const CString& url, const bool fetchAllRemotes, c g_Git.GetRemoteList(list); for (const auto& remote : list) - CAppUtils::LaunchPAgent(hWnd, &remote); + CAppUtils::LaunchPAgent(hWnd, nullptr, &remote); } else - CAppUtils::LaunchPAgent(hWnd, &url); + CAppUtils::LaunchPAgent(hWnd, nullptr, &url); } CString upstream = L"FETCH_HEAD"; @@ -2763,7 +2763,7 @@ bool CAppUtils::DoPush(HWND hWnd, bool autoloadKey, bool pack, bool tags, bool a for (unsigned int i = 0; i < remotesList.size(); ++i) { if (autoloadKey) - CAppUtils::LaunchPAgent(hWnd, &remotesList[i]); + CAppUtils::LaunchPAgent(hWnd, nullptr, &remotesList[i]); CString cmd; if (allBranches) @@ -3811,7 +3811,7 @@ bool CAppUtils::DeleteRef(CWnd* parent, const CString& ref) CString remoteName = shortname.Left(shortname.Find(L'/')); shortname = shortname.Mid(shortname.Find(L'/') + 1); if (CAppUtils::IsSSHPutty()) - CAppUtils::LaunchPAgent(parent->GetSafeHwnd(), &remoteName); + CAppUtils::LaunchPAgent(parent->GetSafeHwnd(), nullptr, &remoteName); CSysProgressDlg sysProgressDlg; sysProgressDlg.SetTitle(CString(MAKEINTRESOURCE(IDS_APPNAME))); diff --git a/src/TortoiseProc/BrowseRefsDlg.cpp b/src/TortoiseProc/BrowseRefsDlg.cpp index 7524720e8..3283edaea 100644 --- a/src/TortoiseProc/BrowseRefsDlg.cpp +++ b/src/TortoiseProc/BrowseRefsDlg.cpp @@ -771,7 +771,7 @@ bool CBrowseRefsDlg::DoDeleteRef(CString completeRefName) return false; if (CAppUtils::IsSSHPutty()) - CAppUtils::LaunchPAgent(nullptr, &remoteName); + CAppUtils::LaunchPAgent(this->GetSafeHwnd(), nullptr, &remoteName); CSysProgressDlg sysProgressDlg; sysProgressDlg.SetTitle(CString(MAKEINTRESOURCE(IDS_APPNAME))); diff --git a/src/TortoiseProc/SyncDlg.cpp b/src/TortoiseProc/SyncDlg.cpp index c8e297439..dfe778f74 100644 --- a/src/TortoiseProc/SyncDlg.cpp +++ b/src/TortoiseProc/SyncDlg.cpp @@ -227,7 +227,7 @@ void CSyncDlg::OnBnClickedButtonPull() if (m_bAutoLoadPuttyKey && CurrentEntry != 4) // CurrentEntry (Remote Update) handles this on its own) { - CAppUtils::LaunchPAgent(nullptr, &m_strURL); + CAppUtils::LaunchPAgent(this->GetSafeHwnd(), nullptr, &m_strURL); } if (g_Git.GetMapHashToFriendName(m_oldHashMap)) @@ -411,7 +411,7 @@ void CSyncDlg::OnBnClickedButtonPull() if (m_bAutoLoadPuttyKey) { for (size_t i = 0; i < m_remotelist.size(); ++i) - CAppUtils::LaunchPAgent(nullptr, &m_remotelist[i]); + CAppUtils::LaunchPAgent(this->GetSafeHwnd(), nullptr, &m_remotelist[i]); } m_CurrentCmd = GIT_COMMAND_REMOTE; @@ -716,7 +716,7 @@ void CSyncDlg::OnBnClickedButtonPush() if(this->m_bAutoLoadPuttyKey) { - CAppUtils::LaunchPAgent(nullptr, &m_strURL); + CAppUtils::LaunchPAgent(this->GetSafeHwnd(), nullptr, &m_strURL); } m_pThread = AfxBeginThread(ProgressThreadEntry, this, THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED); -- 2.11.4.GIT