From d0630aab27e99f5e184d41ea21f9a8dc02e1c86c Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Tue, 10 Jun 2014 08:06:30 +0800 Subject: [PATCH] To avoid carelessly clicked column header context menu, ask user to confirm reset columns Signed-off-by: Sup Yut Sum --- Languages/Tortoise.pot | 4 ++++ src/Git/GitStatusListCtrl.h | 4 +++- src/Resources/LoglistCommonResource.h | 1 + src/Resources/TortoiseLoglistCommon.rc2 | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index a48fa59f3..51737863d 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -1876,6 +1876,10 @@ msgstr "" msgid "Arbitrary &URL:" msgstr "" +#. Resource IDs: (1258) +msgid "Are you sure to reset columns?" +msgstr "" + #. Resource IDs: (68) msgid "Are you sure you want to abort the rebase process?" msgstr "" diff --git a/src/Git/GitStatusListCtrl.h b/src/Git/GitStatusListCtrl.h index 16a775d81..9f5298c7c 100644 --- a/src/Git/GitStatusListCtrl.h +++ b/src/Git/GitStatusListCtrl.h @@ -348,7 +348,9 @@ public: } else if (cmd == columnCount+2) { - ResetColumns (m_dwDefaultColumns); + temp.LoadString(IDS_CONFIRMRESETCOLUMNORDER); + if (MessageBox(pWnd->m_hWnd, temp, _T("TortoiseGit"), MB_YESNO | MB_ICONQUESTION) == IDYES) + ResetColumns (m_dwDefaultColumns); } } } diff --git a/src/Resources/LoglistCommonResource.h b/src/Resources/LoglistCommonResource.h index 070264686..d060f18ea 100644 --- a/src/Resources/LoglistCommonResource.h +++ b/src/Resources/LoglistCommonResource.h @@ -135,3 +135,4 @@ #define IDS_LOG_POPUP_EXPORT 20117 #define IDS_LOG_POPUP_REVERTTOPARENT 20118 +#define IDS_CONFIRMRESETCOLUMNORDER 20119 diff --git a/src/Resources/TortoiseLoglistCommon.rc2 b/src/Resources/TortoiseLoglistCommon.rc2 index 2ad667392..4830137a2 100644 --- a/src/Resources/TortoiseLoglistCommon.rc2 +++ b/src/Resources/TortoiseLoglistCommon.rc2 @@ -148,6 +148,7 @@ BEGIN IDS_STATUSLIST_SHOWGROUPS "Group changelists" IDS_STATUSLIST_REMOVEUNUSEDPROPS "Shorten property list" IDS_STATUSLIST_RESETCOLUMNORDER "Reset columns" + IDS_CONFIRMRESETCOLUMNORDER "Are you sure to reset columns?" IDS_LOG_POPUP_LOG "Show log..." END -- 2.11.4.GIT