* Do not try to list non-listable URLs.
svn path=/trunk/KDE/kdebase/apps/; revision=
1054300
infoDock->setObjectName("infoDock");
infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
Panel* infoPanel = new InformationPanel(infoDock);
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();
infoDock->setWidget(infoPanel);
QAction* infoAction = infoDock->toggleViewAction();
+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();
QString DolphinMainWindow::squeezedText(const QString& text) const
{
const QFontMetrics fm = fontMetrics();
*/
void showSearchOptions();
*/
void showSearchOptions();
+ /**
+ * If the URL can be listed open it in the current view, otherwise
+ * run it through KRun.
+ */
+ void handleUrl(const KUrl& url);
+
private:
DolphinMainWindow(int id);
void init();
private:
DolphinMainWindow(int id);
void init();
QString tabProperty(const QString& property, int tabIndex) const;
/**
QString tabProperty(const QString& property, int tabIndex) const;
/**
- * Sets the window caption to url.fileName() if this is non-empty,
+ * Sets the window caption to url.fileName() if this is non-empty,
* "/" if the URL is "file:///", and url.protocol() otherwise.
*/
void setUrlAsCaption(const KUrl& url);
* "/" if the URL is "file:///", and url.protocol() otherwise.
*/
void setUrlAsCaption(const KUrl& url);
*/
void configureSettings();
*/
void configureSettings();
+signals:
+ void urlActivated( const KUrl& url );
+
protected:
/** @see QObject::eventFilter() */
virtual bool eventFilter(QObject* obj, QEvent* event);
protected:
/** @see QObject::eventFilter() */
virtual bool eventFilter(QObject* obj, QEvent* event);