]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Make Qt 4.5's new "move tab" feature work in Dolphin. Up to now, tabs could be moved...
[dolphin.git] / src / dolphinmainwindow.cpp
index e60d7662e5486e80443e3fbed7424c2f95b78b64..ba3ae27873ea1acd256b0ad6168dc750fc211e06 100644 (file)
@@ -960,6 +960,12 @@ void DolphinMainWindow::searchItems(const KUrl& url)
     m_activeViewContainer->setUrl(url);
 }
 
+void DolphinMainWindow::slotTabMoved(int from, int to)
+{
+    m_viewTab.move(from, to);
+    m_tabIndex = m_tabBar->currentIndex();
+}
+
 void DolphinMainWindow::init()
 {
     DolphinSettings& settings = DolphinSettings::instance();
@@ -1016,6 +1022,8 @@ void DolphinMainWindow::init()
            this, SLOT(slotWheelMoved(int)));
     connect(m_tabBar, SIGNAL(mouseMiddleClick(int)),
             this, SLOT(closeTab(int)));
+    connect(m_tabBar, SIGNAL(tabMoved(int, int)),
+            this, SLOT(slotTabMoved(int, int)));
 
     m_tabBar->blockSignals(true);  // signals get unblocked after at least 2 tabs are open