X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/e280e7f68c021bfbd7be0689721f7aa1f955aa92..5d4d73ff0829f206f9cd44023afc1a2f12cc6096:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3bf3b3f55..8ed31dea4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -617,7 +617,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) break; case KDialog::No: // Close only the current tab - closeTab(); + closeTab(); default: event->ignore(); return; @@ -683,7 +683,7 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group) // openNewTab() needs to be called only tabCount - 1 times if (i != tabCount - 1) { - openNewTab(); + openNewTab(); } } @@ -1276,7 +1276,8 @@ void DolphinMainWindow::tabDropEvent(int tab, QDropEvent* event) const ViewTab& viewTab = m_viewTab[tab]; const DolphinView* view = viewTab.isPrimaryViewActive ? viewTab.primaryView->view() : viewTab.secondaryView->view(); - const QString error = DragAndDropHelper::dropUrls(view->rootItem(), view->url(), event); + QString error; + DragAndDropHelper::dropUrls(view->rootItem(), view->url(), event, error); if (!error.isEmpty()) { activeViewContainer()->showMessage(error, DolphinViewContainer::Error); } @@ -1484,6 +1485,7 @@ void DolphinMainWindow::setupActions() KMenu* menu = m_newFileMenu->menu(); menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New")); menu->setIcon(KIcon("document-new")); + m_newFileMenu->setDelayed(false); connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateNewMenu())); @@ -1577,6 +1579,7 @@ void DolphinMainWindow::setupActions() m_recentTabsMenu = new KActionMenu(i18n("Recently Closed Tabs"), this); m_recentTabsMenu->setIcon(KIcon("edit-undo")); + m_recentTabsMenu->setDelayed(false); actionCollection()->addAction("closed_tabs", m_recentTabsMenu); connect(m_recentTabsMenu->menu(), SIGNAL(triggered(QAction*)), this, SLOT(restoreClosedTab(QAction*))); @@ -2061,7 +2064,13 @@ void DolphinMainWindow::createSecondaryView(int tabIndex) const int newWidth = (viewTab.primaryView->width() - splitter->handleWidth()) / 2; const DolphinView* view = viewTab.primaryView->view(); - viewTab.secondaryView = createViewContainer(view->url(), 0); + // The final parent of the new view container will be set by adding it + // to the splitter. However, we must make sure that the DolphinMainWindow + // is a parent of the view container already when it is constructed + // because this enables the container's KFileItemModel to assign its + // dir lister to the right main window. The dir lister can then cache + // authentication data. + viewTab.secondaryView = createViewContainer(view->url(), this); splitter->addWidget(viewTab.secondaryView); splitter->setSizes(QList() << newWidth << newWidth);