# HG changeset patch # User Chris Cannam # Date 1359036170 0 # Node ID b55466f7b8bfef09b05fc6561ee094faf15ec809 # Parent a03264984ef887e23dbe54e8a6cdb2f08365a7e7 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) diff -r a03264984ef8 -r b55466f7b8bf src/mainwindow.cpp --- 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("

Warning: you are asking to close the default branch. This is not usually a good idea!

"); + if (!haveSprouts) { + defaultWarning = tr("

Warning: you are asking to close the default branch. This is not usually a good idea!

"); + } } else { branchText = tr("branch \"%1\"").arg(m_currentBranch); } + if (haveSprouts) { + branchText = tr("a sub-branch of %1").arg(branchText); + } + if (ConfirmCommentDialog::confirmAndGetLongComment (this, cf,