void DolphinMainWindow::updateNewMenu()
{
m_newMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->showHiddenFiles());
- m_newMenu->slotCheckUpToDate();
+ m_newMenu->checkUpToDate();
m_newMenu->setPopupFiles(activeViewContainer()->url());
}
}
}
+void DolphinMainWindow::tabDropEvent(int tab, QDropEvent* event)
+{
+ const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
+ if (!urls.isEmpty() && tab != -1) {
+ const ViewTab& viewTab = m_viewTab[tab];
+ const KUrl destPath = viewTab.isPrimaryViewActive ? viewTab.primaryView->url() : viewTab.secondaryView->url();
+ DragAndDropHelper::instance().dropUrls(KFileItem(), destPath, event, m_tabBar);
+ }
+}
+
void DolphinMainWindow::slotCaptionStatFinished(KJob* job)
{
m_captionStatJob = 0;
this, SLOT(closeTab(int)));
connect(m_tabBar, SIGNAL(tabMoved(int, int)),
this, SLOT(slotTabMoved(int, int)));
+ connect(m_tabBar, SIGNAL(receivedDropEvent(int, QDropEvent*)),
+ this, SLOT(tabDropEvent(int, QDropEvent*)));
m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open
this, SLOT(updateHistory()));
connect(navigator, SIGNAL(editableStateChanged(bool)),
this, SLOT(slotEditableStateChanged(bool)));
+ connect(navigator, SIGNAL(tabRequested(const KUrl&)),
+ this, SLOT(openNewTab(KUrl)));
}
void DolphinMainWindow::updateSplitAction()