X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5592947ec2f733c3052cbcf510e214c9880bb669..fdfdcd1a05dff5824a42303af99193c2a2f33469:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 6e2b81390..5e08a9e2e 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1011,8 +1011,8 @@ void DolphinMainWindow::slotTestCanDecode(const QDragMoveEvent* event, bool& can void DolphinMainWindow::searchItems() { #ifdef HAVE_NEPOMUK - const KUrl nepomukUrl = m_searchOptionsConfigurator->nepomukUrl(); - m_activeViewContainer->setUrl(nepomukUrl); + const KUrl nepomukSearchUrl = m_searchOptionsConfigurator->nepomukSearchUrl(); + m_activeViewContainer->setUrl(nepomukSearchUrl); #endif } @@ -1074,6 +1074,7 @@ void DolphinMainWindow::init() m_searchOptionsConfigurator->hide(); connect(m_searchOptionsConfigurator, SIGNAL(searchOptionsChanged()), this, SLOT(searchItems())); + connect(this, SIGNAL(urlChanged(KUrl)), m_searchOptionsConfigurator, SLOT(setDirectory(KUrl))); #endif m_tabBar = new KTabBar(this); @@ -1370,7 +1371,7 @@ void DolphinMainWindow::setupDockWidgets() infoDock->setObjectName("infoDock"); infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); Panel* infoPanel = new InformationPanel(infoDock); - connect(infoPanel, SIGNAL(urlActivated(KUrl)), activeViewContainer(), SLOT(setUrl(KUrl))); + connect(infoPanel, SIGNAL(urlActivated(KUrl)), this, SLOT(handleUrl(KUrl))); infoDock->setWidget(infoPanel); QAction* infoAction = infoDock->toggleViewAction(); @@ -1660,6 +1661,16 @@ void DolphinMainWindow::setUrlAsCaption(const KUrl& url) setCaption(caption); } +void DolphinMainWindow::handleUrl(const KUrl& url) +{ + if (KProtocolManager::supportsListing(url)) { + activeViewContainer()->setUrl(url); + } + else { + new KRun(url, this); + } +} + QString DolphinMainWindow::squeezedText(const QString& text) const { const QFontMetrics fm = fontMetrics();