break;
case KDialog::No:
// Close only the current tab
- closeTab();
+ closeTab();
default:
event->ignore();
return;
// openNewTab() needs to be called only tabCount - 1 times
if (i != tabCount - 1) {
- openNewTab();
+ openNewTab();
}
}
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()));
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*)));
connect(foldersPanel, SIGNAL(folderActivated(KUrl)),
this, SLOT(changeUrl(KUrl)));
connect(foldersPanel, SIGNAL(folderMiddleClicked(KUrl)),
- this, SLOT(openNewActivatedTab(KUrl)));
+ this, SLOT(openNewTab(KUrl)));
connect(foldersPanel, SIGNAL(errorMessage(QString)),
this, SLOT(slotPanelErrorMessage(QString)));
connect(placesPanel, SIGNAL(placeActivated(KUrl)),
this, SLOT(changeUrl(KUrl)));
connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)),
- this, SLOT(openNewActivatedTab(KUrl)));
+ this, SLOT(openNewTab(KUrl)));
connect(placesPanel, SIGNAL(errorMessage(QString)),
this, SLOT(slotPanelErrorMessage(QString)));
connect(this, SIGNAL(urlChanged(KUrl)),
placesPanel, SLOT(setUrl(KUrl)));
connect(placesDock, SIGNAL(visibilityChanged(bool)),
this, SLOT(slotPlacesPanelVisibilityChanged(bool)));
+ connect(this, SIGNAL(settingsChanged()),
+ placesPanel, SLOT(readSettings()));
// Add actions into the "Panels" menu
KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this);
toggleSplitView();
}
}
+
+ emit settingsChanged();
}
void DolphinMainWindow::clearStatusBar()
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<int>() << newWidth << newWidth);