X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/61813e0df76f050dfa8de8e3f2220566b4013dec..233a08164f79d9909693c5de438f856467ad5b76:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index df73804dc..ebc8dc268 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1118,8 +1118,10 @@ void DolphinMainWindow::init() m_searchBox->show(); connect(m_searchBox, SIGNAL(requestSearchOptions()), this, SLOT(showSearchOptions())); +#ifdef HAVE_NEPOMUK connect(m_searchBox, SIGNAL(searchTextChanged(QString)), m_searchOptionsConfigurator, SLOT(setCustomSearchQuery(QString))); +#endif stateChanged("new_file"); @@ -1368,7 +1370,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(); @@ -1658,6 +1660,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();