X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/20332788152516f83eb4861fcb2bac7a68667be7..b1c9b5126d:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index f623d5eba..697fba85f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -907,6 +907,8 @@ void DolphinMainWindow::init() this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&))); connect(m_tabBar, SIGNAL(wheelDelta(int)), this, SLOT(slotWheelMoved(int))); + connect(m_tabBar, SIGNAL(mouseMiddleClick(int)), + this, SLOT(closeTab(int))); m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open @@ -1004,7 +1006,7 @@ void DolphinMainWindow::setupActions() KAction* newTab = actionCollection()->addAction("new_tab"); newTab->setIcon(KIcon("tab-new")); newTab->setText(i18nc("@action:inmenu File", "New Tab")); - newTab->setShortcut(KShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_N, Qt::CTRL | Qt::Key_T)); + newTab->setShortcut(KShortcut(Qt::CTRL | Qt::Key_T, Qt::CTRL | Qt::SHIFT | Qt::Key_N)); connect(newTab, SIGNAL(triggered()), this, SLOT(openNewTab())); QAction* closeTab = actionCollection()->addAction("close_tab"); @@ -1343,6 +1345,10 @@ QString DolphinMainWindow::tabName(const KUrl& url) const name = url.fileName(); if (name.isEmpty()) { name = url.protocol(); + } else { + // Make sure that a '&' inside the directory name is displayed correctly + // and not misinterpreted as a keyboard shortcut in QTabBar::setTabText() + name.replace('&', "&&"); } } return name;