comparison src/changesetitem.cpp @ 514:306a62fe851e

Add "Close branch" menu option. Is currently available in some cases where it should not be, and using it exposes the fact that the chain of marked-closed changesets is not yet right in grapher.
author Chris Cannam
date Tue, 18 Oct 2011 16:50:05 +0100
parents c623ce6b3104
children 000f13faa089
comparison
equal deleted inserted replaced
513:ddc7238fc3b0 514:306a62fe851e
195 195
196 QAction *branch = menu->addAction(tr("Start new branch...")); 196 QAction *branch = menu->addAction(tr("Start new branch..."));
197 branch->setEnabled(m_current); 197 branch->setEnabled(m_current);
198 connect(branch, SIGNAL(triggered()), this, SLOT(newBranchActivated())); 198 connect(branch, SIGNAL(triggered()), this, SLOT(newBranchActivated()));
199 199
200 QAction *closebranch = menu->addAction(tr("Close branch..."));
201 closebranch->setEnabled(m_current);
202 connect(closebranch, SIGNAL(triggered()), this, SLOT(closeBranchActivated()));
203
200 QAction *tag = menu->addAction(tr("Add tag...")); 204 QAction *tag = menu->addAction(tr("Add tag..."));
201 connect(tag, SIGNAL(triggered()), this, SLOT(tagActivated())); 205 connect(tag, SIGNAL(triggered()), this, SLOT(tagActivated()));
202 206
203 ungrabMouse(); 207 ungrabMouse();
204 208
238 void ChangesetItem::updateActivated() { emit updateTo(getId()); } 242 void ChangesetItem::updateActivated() { emit updateTo(getId()); }
239 void ChangesetItem::diffToCurrentActivated() { emit diffToCurrent(getId()); } 243 void ChangesetItem::diffToCurrentActivated() { emit diffToCurrent(getId()); }
240 void ChangesetItem::mergeActivated() { emit mergeFrom(getId()); } 244 void ChangesetItem::mergeActivated() { emit mergeFrom(getId()); }
241 void ChangesetItem::tagActivated() { emit tag(getId()); } 245 void ChangesetItem::tagActivated() { emit tag(getId()); }
242 void ChangesetItem::newBranchActivated() { emit newBranch(getId()); } 246 void ChangesetItem::newBranchActivated() { emit newBranch(getId()); }
247 void ChangesetItem::closeBranchActivated() { emit closeBranch(getId()); }
243 248
244 void 249 void
245 ChangesetItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *) 250 ChangesetItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *)
246 { 251 {
247 if (isClosingCommit() || isMerge()) { 252 if (isClosingCommit() || isMerge()) {