Mercurial > hg > easyhg
diff uncommitteditem.cpp @ 311:4811eb34e819 new-branches-with-status-outside-tabs
Add Start New Branch and Cancel New Branch to uncommitted item menu; add branch name to Commit dialog
author | Chris Cannam |
---|---|
date | Tue, 01 Mar 2011 14:22:29 +0000 |
parents | be483734bde5 |
children |
line wrap: on
line diff
--- a/uncommitteditem.cpp Mon Feb 28 14:24:14 2011 +0000 +++ b/uncommitteditem.cpp Tue Mar 01 14:22:29 2011 +0000 @@ -29,7 +29,8 @@ #include <QWidgetAction> UncommittedItem::UncommittedItem() : - m_showBranch(false), m_column(0), m_row(0), m_wide(false) + m_showBranch(false), m_isNewBranch(false), + m_column(0), m_row(0), m_wide(false) { m_font = QFont(); m_font.setPixelSize(11); @@ -87,6 +88,14 @@ QAction *revert = menu->addAction(tr("Revert...")); connect(revert, SIGNAL(triggered()), this, SIGNAL(revert())); + menu->addSeparator(); + + QAction *branch = menu->addAction(tr("Start new branch...")); + connect(branch, SIGNAL(triggered()), this, SIGNAL(newBranch())); + QAction *nobranch = menu->addAction(tr("Cancel new branch")); + nobranch->setEnabled(m_isNewBranch); + connect(nobranch, SIGNAL(triggered()), this, SIGNAL(noBranch())); + menu->exec(QCursor::pos()); ungrabMouse();