From 02ebe11b88e56184b4d834c010d26cc1314e534c Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 31 May 2014 11:42:02 +0200 Subject: [PATCH] Fixed issue #2096: Allow to disable blue text-label about git.exe execution timings on progress dialog Signed-off-by: Sven Strickroth --- Languages/Tortoise.pot | 4 ++++ src/Changelog.txt | 1 + src/Resources/TortoiseProcENG.rc | 2 ++ src/TortoiseProc/ProgressDlg.cpp | 10 ++++++++-- src/TortoiseProc/Settings/SetDialogs2.cpp | 8 +++++++- src/TortoiseProc/Settings/SetDialogs2.h | 4 +++- src/TortoiseProc/resource.h | 1 + 7 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index c900b837a..3c98be9e6 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -8213,6 +8213,10 @@ msgstr "" msgid "Show file name" msgstr "" +#. Resource IDs: (1782) +msgid "Show git.exe execution timings and timestamp" +msgstr "" + #. Resource IDs: (1264) msgid "Show i&gnored files" msgstr "" diff --git a/src/Changelog.txt b/src/Changelog.txt index eeba9f6b3..b275e2166 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -11,6 +11,7 @@ Released: Unreleased * Fixed issue #2144: TortoiseGit should support configuring pushurl for remotes * Fixed issue #2155: Make "Delete Remote Tags..." more discoverable * Fixed issue #2164: allow Commit from Log > Working dir changes of selected files + * Fixed issue #2096: Allow to disable blue text-label about git.exe execution timings on progress dialog == Bug Fixes == * Fixed issue #2158: TortoiseGit sometimes crashes when doing Sync > Pull diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index f846698fe..1a681d58d 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -724,6 +724,8 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,60,141,10 CONTROL "Hide unchanged refs in Ref Compare List",IDC_REFCOMPAREHIDEUNCHANGED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,73,193,10 + CONTROL "Show git.exe execution timings and timestamp",IDC_PROGRESSDLG_SHOW_TIMES, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,87,193,10 GROUPBOX "Commit",IDC_COMMITGROUP,7,121,287,103 CONTROL "&Use auto-completion of file paths and keywords",IDC_AUTOCOMPLETION, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,133,271,10 diff --git a/src/TortoiseProc/ProgressDlg.cpp b/src/TortoiseProc/ProgressDlg.cpp index 9162e0c75..127f7e824 100644 --- a/src/TortoiseProc/ProgressDlg.cpp +++ b/src/TortoiseProc/ProgressDlg.cpp @@ -392,7 +392,10 @@ LRESULT CProgressDlg::OnProgressUpdateUI(WPARAM wParam,LPARAM lParam) CString log; log.Format(IDS_PROC_PROGRESS_GITUNCLEANEXIT, m_GitStatus); CString err; - err.Format(_T("\r\n\r\n%s (%lu ms @ %s)\r\n"), log, tickSpent, strEndTime); + if (CRegDWORD(_T("Software\\TortoiseGit\\ShowGitexeTimings"), TRUE)) + err.Format(_T("\r\n\r\n%s (%lu ms @ %s)\r\n"), log, tickSpent, strEndTime); + else + err.Format(_T("\r\n\r\n%s\r\n"), log); InsertColorText(this->m_Log, err, RGB(255,0,0)); CSoundUtils::PlayTGitError(); } @@ -402,7 +405,10 @@ LRESULT CProgressDlg::OnProgressUpdateUI(WPARAM wParam,LPARAM lParam) CString temp; temp.LoadString(IDS_SUCCESS); CString log; - log.Format(_T("\r\n%s (%lu ms @ %s)\r\n"), temp, tickSpent, strEndTime); + if (CRegDWORD(_T("Software\\TortoiseGit\\ShowGitexeTimings"), TRUE)) + log.Format(_T("\r\n%s (%lu ms @ %s)\r\n"), temp, tickSpent, strEndTime); + else + log.Format(_T("\r\n%s\r\n"), temp); InsertColorText(this->m_Log, log, RGB(0,0,255)); this->DialogEnableWindow(IDCANCEL,FALSE); } diff --git a/src/TortoiseProc/Settings/SetDialogs2.cpp b/src/TortoiseProc/Settings/SetDialogs2.cpp index c66a4ecab..4d4d0ed9a 100644 --- a/src/TortoiseProc/Settings/SetDialogs2.cpp +++ b/src/TortoiseProc/Settings/SetDialogs2.cpp @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2013 - TortoiseGit +// Copyright (C) 2008-2014 - TortoiseGit // Copyright (C) 2003-2008 - TortoiseSVN // This program is free software; you can redistribute it and/or @@ -36,6 +36,7 @@ CSetDialogs2::CSetDialogs2() , m_dwAutocompletionTimeout(0) , m_dwMaxHistory(25) , m_bAutoSelect(TRUE) + , m_bShowGitexeTimings(TRUE) { m_regAutoCloseGitProgress = CRegDWORD(_T("Software\\TortoiseGit\\AutoCloseGitProgress")); m_regUseRecycleBin = CRegDWORD(_T("Software\\TortoiseGit\\RevertWithRecycleBin"), TRUE); @@ -55,6 +56,8 @@ CSetDialogs2::CSetDialogs2() m_bAutoSelect = (BOOL)(DWORD)m_regAutoSelect; m_regStripCommentedLines = CRegDWORD(_T("Software\\TortoiseGit\\StripCommentedLines"), FALSE); m_bStripCommentedLines = (BOOL)(DWORD)m_regStripCommentedLines; + m_regShowGitexeTimings = CRegDWORD(_T("Software\\TortoiseGit\\ShowGitexeTimings"), TRUE); + m_bShowGitexeTimings = (BOOL)(DWORD)m_regShowGitexeTimings; } CSetDialogs2::~CSetDialogs2() @@ -76,6 +79,7 @@ void CSetDialogs2::DoDataExchange(CDataExchange* pDX) DDV_MinMaxUInt(pDX, m_dwMaxHistory, 1, 100); DDX_Check(pDX, IDC_SELECTFILESONCOMMIT, m_bAutoSelect); DDX_Check(pDX, IDC_STRIPCOMMENTEDLINES, m_bStripCommentedLines); + DDX_Check(pDX, IDC_PROGRESSDLG_SHOW_TIMES, m_bShowGitexeTimings); } BEGIN_MESSAGE_MAP(CSetDialogs2, ISettingsPropPage) @@ -89,6 +93,7 @@ BEGIN_MESSAGE_MAP(CSetDialogs2, ISettingsPropPage) ON_EN_CHANGE(IDC_MAXHISTORY, OnChange) ON_BN_CLICKED(IDC_SELECTFILESONCOMMIT, OnChange) ON_BN_CLICKED(IDC_STRIPCOMMENTEDLINES, OnChange) + ON_BN_CLICKED(IDC_PROGRESSDLG_SHOW_TIMES, OnChange) END_MESSAGE_MAP() // CSetDialogs2 message handlers @@ -157,6 +162,7 @@ BOOL CSetDialogs2::OnApply() Store (m_dwMaxHistory, m_regMaxHistory); Store (m_bAutoSelect, m_regAutoSelect); Store (m_bStripCommentedLines, m_regStripCommentedLines); + Store(m_bShowGitexeTimings, m_regShowGitexeTimings); SetModified(FALSE); return ISettingsPropPage::OnApply(); diff --git a/src/TortoiseProc/Settings/SetDialogs2.h b/src/TortoiseProc/Settings/SetDialogs2.h index d805915df..08b5577f2 100644 --- a/src/TortoiseProc/Settings/SetDialogs2.h +++ b/src/TortoiseProc/Settings/SetDialogs2.h @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2011-2013 - TortoiseGit +// Copyright (C) 2011-2014 - TortoiseGit // Copyright (C) 2003-2008, 2013 - TortoiseSVN // This program is free software; you can redistribute it and/or @@ -75,4 +75,6 @@ private: BOOL m_bAutoSelect; CRegDWORD m_regStripCommentedLines; BOOL m_bStripCommentedLines; + CRegDWORD m_regShowGitexeTimings; + BOOL m_bShowGitexeTimings; }; diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index 77c0c6a60..9b432105b 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -1450,6 +1450,7 @@ #define IDC_CHECK_INHERIT_KEYID 1782 #define IDC_CHECK_INHERIT_ICONPATH 1782 #define IDC_CHECK_INHERIT_BTMSG 1782 +#define IDC_PROGRESSDLG_SHOW_TIMES 1782 #define IDC_CHECK_INHERIT_BTLABEL 1783 #define IDC_CURRENTBRANCH 1784 #define IDC_CHECK_PRUNEALL 1785 -- 2.11.4.GIT