Mercurial > hg > easyhg
diff src/mainwindow.cpp @ 648:b55466f7b8bf
Adjust text when closing something that is only a single sprout of a branch -- and don't warn when closing a sprout of the default branch (it's not the same thing as closing the default branch)
author | Chris Cannam |
---|---|
date | Thu, 24 Jan 2013 14:02:50 +0000 |
parents | a03264984ef8 |
children | a16d0d70b1ee |
line wrap: on
line diff
--- a/src/mainwindow.cpp Mon Jan 21 10:22:44 2013 +0000 +++ b/src/mainwindow.cpp Thu Jan 24 14:02:50 2013 +0000 @@ -571,14 +571,22 @@ QString defaultWarning; + bool haveSprouts = (m_hgMergeAct->isEnabled()); + QString branchText; if (m_currentBranch == "" || m_currentBranch == "default") { branchText = tr("the default branch"); - defaultWarning = tr("<p><b>Warning:</b> you are asking to close the default branch. This is not usually a good idea!</p>"); + if (!haveSprouts) { + defaultWarning = tr("<p><b>Warning:</b> you are asking to close the default branch. This is not usually a good idea!</p>"); + } } else { branchText = tr("branch \"%1\"").arg(m_currentBranch); } + if (haveSprouts) { + branchText = tr("a sub-branch of %1").arg(branchText); + } + if (ConfirmCommentDialog::confirmAndGetLongComment (this, cf,