Blame: fix incorrect parent windows for the progress dialog Previously, Blame always used GetExplorerHwnd() [1] as the parent window for the progress dialog. This is incorrect when Blame is invoked from the "Log Messages" or "Repository Browser" dialogs, where the dialogs themselves should be the parent windows. [1] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/TortoiseProc/Blame.cpp#l217 Index: src/TortoiseProc/Blame.cpp =================================================================== --- src/TortoiseProc/Blame.cpp (revision 29768) +++ src/TortoiseProc/Blame.cpp (working copy) @@ -181,7 +181,8 @@ return m_bCancelled; } -CString CBlame::BlameToTempFile(const CTSVNPath& path, const SVNRev& startRev, const SVNRev& endRev, SVNRev pegRev, +CString CBlame::BlameToTempFile(HWND hParent, + const CTSVNPath& path, const SVNRev& startRev, const SVNRev& endRev, SVNRev pegRev, const CString& options, BOOL includeMerge, BOOL showProgress, BOOL ignoreMimeType) { @@ -214,7 +215,7 @@ m_progressDlg.SetShowProgressBar(TRUE); if (showProgress) { - m_progressDlg.ShowModeless(CWnd::FromHandle(GetExplorerHWND())); + m_progressDlg.ShowModeless(CWnd::FromHandle(hParent)); } m_progressDlg.FormatNonPathLine(1, IDS_BLAME_PROGRESSINFO); m_progressDlg.FormatNonPathLine(2, IDS_BLAME_PROGRESSINFOSTART); Index: src/TortoiseProc/Blame.h =================================================================== --- src/TortoiseProc/Blame.h (revision 29768) +++ src/TortoiseProc/Blame.h (working copy) @@ -49,7 +49,7 @@ * \param path the path to the file to determine the required information * \return The path to the temporary file or an empty string in case of an error. */ - CString BlameToTempFile(const CTSVNPath& path, const SVNRev& startRev, const SVNRev& endRev, SVNRev pegRev, const CString& options, BOOL includeMerge, BOOL showProgress, BOOL ignoreMimeType); + CString BlameToTempFile(HWND hParent, const CTSVNPath& path, const SVNRev& startRev, const SVNRev& endRev, SVNRev pegRev, const CString& options, BOOL includeMerge, BOOL showProgress, BOOL ignoreMimeType); bool BlameToFile(const CTSVNPath& path, const SVNRev& startRev, const SVNRev& endRev, SVNRev peg, const CTSVNPath& toFile, const CString& options, BOOL ignoreMimeType, BOOL includeMerge); void SetAndClearProgressInfo(CProgressDlg* pProgressDlg, int infoLine, bool bShowProgressBar = false) Index: src/TortoiseProc/Commands/BlameCommand.cpp =================================================================== --- src/TortoiseProc/Commands/BlameCommand.cpp (revision 29768) +++ src/TortoiseProc/Commands/BlameCommand.cpp (working copy) @@ -70,7 +70,8 @@ if (bShowDialog) options = SVN::GetOptionsString(!!dlg.m_bIgnoreEOL, dlg.m_ignoreSpaces); - tempFile = blame.BlameToTempFile(cmdLinePath, dlg.m_startRev, dlg.m_endRev, + tempFile = blame.BlameToTempFile(GetExplorerHWND(), + cmdLinePath, dlg.m_startRev, dlg.m_endRev, cmdLinePath.IsUrl() ? SVNRev() : SVNRev::REV_WC, options, dlg.m_bIncludeMerge, TRUE, TRUE); if (tempFile.IsEmpty()) Index: src/TortoiseProc/LogDialog/LogDlg.cpp =================================================================== --- src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29768) +++ src/TortoiseProc/LogDialog/LogDlg.cpp (working copy) @@ -6223,8 +6223,9 @@ OnOutOfScope(this->EnableWindow(TRUE); this->SetFocus()); CBlame blame; - CString tempFile = blame.BlameToTempFile(m_path, startRev, endRev, m_pegRev, - options, includeMerge, TRUE, TRUE); + CString tempFile = blame.BlameToTempFile(m_hWnd, + m_path, startRev, endRev, m_pegRev, + options, includeMerge, TRUE, TRUE); if (!tempFile.IsEmpty()) { if (textViewer) @@ -7878,8 +7879,9 @@ this->EnableWindow(FALSE); OnOutOfScope(this->EnableWindow(TRUE); this->SetFocus()); CBlame blame; - CString tempFile = blame.BlameToTempFile(CTSVNPath(pCmi->fileUrl), startRev, - endRev, pegRev, options, includeMerge, TRUE, TRUE); + CString tempFile = blame.BlameToTempFile(m_hWnd, + CTSVNPath(pCmi->fileUrl), startRev, + endRev, pegRev, options, includeMerge, TRUE, TRUE); if (!tempFile.IsEmpty()) { if (textView) Index: src/TortoiseProc/RepositoryBrowser.cpp =================================================================== --- src/TortoiseProc/RepositoryBrowser.cpp (revision 29768) +++ src/TortoiseProc/RepositoryBrowser.cpp (working copy) @@ -4292,7 +4292,7 @@ CString tempfile; const CTSVNPath& path = selection.GetURLEscaped(0, 0); - tempfile = blame.BlameToTempFile(path, dlg.m_startRev, dlg.m_endRev, dlg.m_pegRev, SVN::GetOptionsString(!!dlg.m_bIgnoreEOL, dlg.m_ignoreSpaces), dlg.m_bIncludeMerge, TRUE, TRUE); + tempfile = blame.BlameToTempFile(m_hWnd, path, dlg.m_startRev, dlg.m_endRev, dlg.m_pegRev, SVN::GetOptionsString(!!dlg.m_bIgnoreEOL, dlg.m_ignoreSpaces), dlg.m_bIncludeMerge, TRUE, TRUE); if (!tempfile.IsEmpty()) { if (dlg.m_bTextView)