diff options
| author | Sebastian Trueg <[email protected]> | 2009-11-25 20:53:37 +0000 |
|---|---|---|
| committer | Sebastian Trueg <[email protected]> | 2009-11-25 20:53:37 +0000 |
| commit | d324e790d62c8a341abd06e845f8fe8d64aa8ef3 (patch) | |
| tree | 6f3a675cba11e6d5543875e06ba720742a6563a3 /src/dolphinmainwindow.cpp | |
| parent | 482fea3ec69a7fff321281050968426c38edc3bc (diff) | |
* Fixed execution of links in the metadata widget.
* Do not try to list non-listable URLs.
svn path=/trunk/KDE/kdebase/apps/; revision=1054300
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 6e2b81390..ebc8dc268 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1370,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(); @@ -1660,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(); |
