From 0633d12180f004c4ca4f3452b09255799a7ac34f Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Tue, 29 Nov 2016 12:34:37 +0100 Subject: [PATCH] Add hint for recently used commit messages Signed-off-by: Sven Strickroth --- Languages/Tortoise.pot | 4 ++++ src/Resources/TortoiseProcENG.rc | 1 + src/TortoiseProc/CommitDlg.cpp | 9 ++++++++- src/TortoiseProc/resource.h | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 273d2f34f..2cb795b0b 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -5269,6 +5269,10 @@ msgstr "" msgid "Hint" msgstr "" +#. Resource IDs: (IDS_HINTLASTMESSAGES) +msgid "Hint: Recently used commit messages are available using the context menu of the text field." +msgstr "" + #. Resource IDs: (16519) msgid "Hint: select the context menu, change the page to 'Commands' and drag the toolbar buttons into the menu window." msgstr "" diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 3668f63b8..3b1a2b8f6 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -4847,6 +4847,7 @@ BEGIN IDS_ERR_GITCALLFAILED "Calling git.exe failed (exit code: %d). Please check the git.exe path." IDS_GITEXEFILEFILTER "git.exe|git.exe||" IDS_REALLYCANCEL "Are you sure you want to cancel?" + IDS_HINTLASTMESSAGES "Hint: Recently used commit messages are available using the context menu of the text field." END #endif // English (U.S.) resources diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index 2c80f9acc..d4eb51b7a 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -1462,7 +1462,14 @@ void CCommitDlg::SetDlgTitle() void CCommitDlg::OnCancel() { - if (CMessageBox::ShowCheck(GetSafeHwnd(), IDS_REALLYCANCEL, IDS_APPNAME, MB_ICONQUESTION | MB_DEFBUTTON2 | MB_YESNO, L"CommitAskBeforeCancel", IDS_MSGBOX_DONOTSHOWAGAIN) == IDNO) + CString tmp; + tmp.LoadString(IDS_REALLYCANCEL); + tmp.AppendChar(L'\n'); + tmp.AppendChar(L'\n'); + tmp.Append(CString(MAKEINTRESOURCE(IDS_HINTLASTMESSAGES))); + CString dontaskagain; + dontaskagain.LoadString(IDS_MSGBOX_DONOTSHOWAGAIN); + if (CMessageBox::ShowCheck(GetSafeHwnd(), tmp, L"TortoiseGit", MB_ICONQUESTION | MB_DEFBUTTON2 | MB_YESNO, L"CommitAskBeforeCancel", dontaskagain) == IDNO) return; m_bCancelled = true; diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index 07bed9400..9ce6d7604 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -1318,6 +1318,7 @@ #define IDC_CHECK_DIR 1626 #define IDS_REALLYCANCEL 1626 #define IDC_RADIO_CLEAN_ALL 1627 +#define IDS_HINTLASTMESSAGES 1627 #define IDC_RADIO_CLEAN_NO 1628 #define IDC_RADIO_CLEAN_IGNORE 1629 #define IDC_GROUP_CLEAN_TYPE 1630 -- 2.11.4.GIT