Browse Source

Make sure to use default file manager when opening medias from kdesktop icons.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/136/head
Michele Calgaro 5 months ago
parent
commit
6cfa9a1253
Signed by: MicheleC <michele.calgaro@yahoo.it> GPG Key ID: 2A75B7CA8ADED5CF
1 changed files with 1 additions and 12 deletions
  1. +1
    -12
      libkonq/tdefileivi.cc

+ 1
- 12
libkonq/tdefileivi.cc View File

@@ -386,18 +386,7 @@ void KFileIVI::returnPressed()
if ( static_cast<KonqIconViewWidget*>(iconView())->isDesktop() ) {
KURL url = m_fileitem->url();
if (url.protocol() == "media") {
// The user reasonably expects to be placed within the media:/ tree
// when opening a media device from the desktop
KService::Ptr service = KService::serviceByDesktopName("konqueror");
if (service) {
// HACK
// There doesn't seem to be a way to prevent KRun from resolving the URL to its
// local path, so simpy launch Konqueror with the correct arguments instead...
KRun::runCommand("konqueror " + url.url(), "konqueror", service->icon());
}
else {
(void) new KRun( url, m_fileitem->mode(), m_fileitem->isLocalFile() );
}
(void) new KRun( url, m_fileitem->mode(), m_fileitem->isLocalFile() );
}
else {
// When clicking on a link to e.g. $HOME from the desktop, we want to open $HOME


Loading…
Cancel
Save