From 1d4cfd16fd5ceb8f37400d4890807e3c56619971 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 9 Oct 2007 21:10:17 +0000 Subject: column view fixes: * assure that the history does not get messed up when changing the focus to an existing column * fix issue that the status bar does not get updated when the focus is changed between the columns svn path=/trunk/KDE/kdebase/apps/; revision=723519 --- src/dolphinview.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/dolphinview.cpp') diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 51dbb708c..8361ceb06 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -88,8 +88,16 @@ DolphinView::DolphinView(QWidget* parent, m_controller = new DolphinController(this); m_controller->setUrl(url); + + // Receiver of the DolphinView signal 'urlChanged()' don't need + // to care whether the internal controller changed the URL already or whether + // the controller just requested an URL change and will be updated later. + // In both cases the URL has been changed: connect(m_controller, SIGNAL(urlChanged(const KUrl&)), this, SIGNAL(urlChanged(const KUrl&))); + connect(m_controller, SIGNAL(requestUrlChange(const KUrl&)), + this, SIGNAL(urlChanged(const KUrl&))); + connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)), this, SLOT(openContextMenu(const QPoint&))); connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&, const QModelIndex&, QWidget*)), @@ -466,18 +474,11 @@ void DolphinView::updateView(const KUrl& url, const KUrl& rootUrl) return; } - const bool restoreColumnView = !rootUrl.isEmpty() - && !rootUrl.equals(url, KUrl::CompareWithoutTrailingSlash) - && rootUrl.isParentOf(url); - m_controller->setUrl(url); // emits urlChanged, which we forward - if (restoreColumnView) { + if (!rootUrl.isEmpty() && rootUrl.isParentOf(url)) { applyViewProperties(rootUrl); loadDirectory(rootUrl); - // Restoring the column view relies on the URL-history. It might be possible - // that the view properties have been changed or deleted in the meantime, so - // it cannot be asserted that really a column view has been created: if (itemView() == m_columnView) { m_columnView->setRootUrl(rootUrl); m_columnView->showColumn(url); -- cgit v1.3