Add Close/Close Others/Close All items to editor list's context menu

Move the context menu actions from the "Open Documents" pane to the
editor manager and use these for both the open documents pane and the
editor combo box in the editor tool bar.

Change-Id: If2a8cb4cf0498c78bd06053919b3cb74692b7cd8
Reviewed-on: http://codereview.qt.nokia.com/2973
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
Eike Ziller
2011-08-15 15:21:02 +02:00
parent bd2aff72db
commit d636140ea4
4 changed files with 54 additions and 29 deletions

View File

@@ -289,8 +289,10 @@ void EditorToolBar::listContextMenu(QPoint pos)
if (fileName.isEmpty())
return;
QMenu menu;
menu.addAction(tr("Copy Full Path to Clipboard"));
if (menu.exec(d->m_editorList->mapToGlobal(pos))) {
QAction *copyPath = menu.addAction(tr("Copy Full Path to Clipboard"));
EditorManager::instance()->addCloseEditorActions(&menu, index);
QAction *result = menu.exec(d->m_editorList->mapToGlobal(pos));
if (result == copyPath) {
QApplication::clipboard()->setText(QDir::toNativeSeparators(fileName));
}
}