From c9726fd862fb47d46f4f83fd63c6aba2dba2154f Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 5 Feb 2017 10:41:02 +0100 Subject: [PATCH] Fixed issue #2909: Commit window unclosable after clicking "No" and "do not ask again" Signed-off-by: Sven Strickroth --- src/Changelog.txt | 8 +++++++- src/TortoiseProc/CommitDlg.cpp | 3 +++ src/Utils/MiscUI/MessageBox.h | 5 +++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index ad1b20b5d..74ce7f609 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -1,4 +1,10 @@ -= Release 2.4.0 = += Release 2.5.0 = +Released: unreleased + +== Bug Fixes == +Fixed issue #2909: Commit window unclosable after clicking "No" and "do not ask again" + += Release 2.4.0 = Released: 2017-01-31 == Major change == diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index c771874c1..7d2b96e19 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -1468,7 +1468,10 @@ void CCommitDlg::OnCancel() CString dontaskagain; dontaskagain.LoadString(IDS_MSGBOX_DONOTSHOWAGAIN); if (CMessageBox::ShowCheck(GetSafeHwnd(), tmp, L"TortoiseGit", MB_ICONQUESTION | MB_DEFBUTTON2 | MB_YESNO, L"CommitAskBeforeCancel", dontaskagain) == IDNO) + { + CMessageBox::SetRegistryValue(L"CommitAskBeforeCancel", IDYES); return; + } m_bCancelled = true; m_pathwatcher.Stop(); diff --git a/src/Utils/MiscUI/MessageBox.h b/src/Utils/MiscUI/MessageBox.h index 1350381a3..068cc6852 100644 --- a/src/Utils/MiscUI/MessageBox.h +++ b/src/Utils/MiscUI/MessageBox.h @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2013-2016 - TortoiseGit +// Copyright (C) 2013-2017 - TortoiseGit // Copyright (C) 2003-2008 - TortoiseSVN // This program is free software; you can redistribute it and/or @@ -372,13 +372,14 @@ public: */ static bool RemoveRegistryKey(LPCTSTR lpRegistry); -protected: /** * Stores the value in the registry * \param sValue the value name * \param value DWORD to store */ static void SetRegistryValue(const CString& sValue, DWORD value); + +protected: /** * Shows the modal dialog * \param pWnd handle to the parent window or nullptr -- 2.11.4.GIT