┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2009-05-17 19:57:07 +0000
committerFrank Reininghaus <[email protected]>2009-05-17 19:57:07 +0000
commit07ad9b3726d8d16041cd8bc6b394eaa784c063b1 (patch)
tree9303cbfd6851073c67eebf71ef41fa9141f0387e /src/panels
parent85a86ee2f0a8b55576f7a7a4f015a22349a53b09 (diff)
Update the directory of the Terminal Panel if the current URL is not a
"file:" URL, but is nevertheless local (e.g., "desktop:"). This fix is also applied to the new "Open external Terminal" action which will be in KDE 4.3. BUG: 167810 svn path=/trunk/KDE/kdebase/apps/; revision=969265
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/terminal/terminalpanel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index ae5e45f09..8ee46d7a4 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -23,6 +23,7 @@
#include <kde_terminal_interface_v2.h>
#include <kparts/part.h>
#include <kshell.h>
+#include <kio/netaccess.h>
#include <QBoxLayout>
#include <QShowEvent>
@@ -57,12 +58,13 @@ void TerminalPanel::setUrl(const KUrl& url)
}
Panel::setUrl(url);
+ KUrl mostLocalUrl = KIO::NetAccess::mostLocalUrl(url, 0);
const bool sendInput = (m_terminal != 0)
&& (m_terminal->foregroundProcessId() == -1)
&& isVisible()
- && url.isLocalFile();
+ && mostLocalUrl.isLocalFile();
if (sendInput) {
- m_terminal->sendInput("cd " + KShell::quoteArg(url.toLocalFile()) + '\n');
+ m_terminal->sendInput("cd " + KShell::quoteArg(mostLocalUrl.toLocalFile()) + '\n');
}
}