X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/db54a5800efb727776c83cd810f40010da66c712..06e5202c4727df7295fc7a515e41f65a9c2fcdde:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index fe3024d23..11e03d0f1 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -434,7 +434,7 @@ void DolphinMainWindow::updateFilterBarAction(bool show) void DolphinMainWindow::openNewMainWindow() { - KRun::run("dolphin", KUrl::List(), this); + KRun::run("dolphin %u", KUrl::List(), this); } void DolphinMainWindow::openNewTab() @@ -545,7 +545,7 @@ void DolphinMainWindow::openInNewWindow() } if (!newWindowUrl.isEmpty()) { - KRun::run("dolphin", KUrl::List() << newWindowUrl, this); + KRun::run("dolphin %u", KUrl::List() << newWindowUrl, this); } } @@ -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(); } } @@ -1299,7 +1299,7 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, switch (command) { case DolphinContextMenu::OpenParentFolderInNewWindow: { - KRun::run("dolphin", KUrl::List() << item.url().upUrl(), this); + KRun::run("dolphin %u", KUrl::List() << item.url().upUrl(), this); break; } @@ -1704,7 +1704,7 @@ void DolphinMainWindow::setupDockWidgets() 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))); @@ -1756,13 +1756,15 @@ void DolphinMainWindow::setupDockWidgets() 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); @@ -1953,6 +1955,8 @@ void DolphinMainWindow::refreshViews() toggleSplitView(); } } + + emit settingsChanged(); } void DolphinMainWindow::clearStatusBar() @@ -2057,7 +2061,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);