diff options
author | Michele Calgaro <[email protected]> | 2021-02-23 21:54:12 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-02-24 11:00:27 +0900 |
commit | ad3cef031b88e1c889a129f569ff5eafe1947d06 (patch) | |
tree | 9c89a707320ac005a6cff4b49772cf79e4b84fe6 | |
parent | 75204ade2daef3f72d96671439e7e26cc118f4ae (diff) | |
download | tdebase-ad3cef031b88e1c889a129f569ff5eafe1947d06.tar.gz tdebase-ad3cef031b88e1c889a129f569ff5eafe1947d06.zip |
tdeioslave media: made 'Open Medium System Folder' action available for unmounted medium too.
The action is now also available in the notification dialog that opens up when a medium is inserted.
Fixed action support for mount path containing spaces.
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 12 | ||||
-rw-r--r-- | tdeioslave/media/services/media_realfolder.desktop | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index 8d1e33c82..159f5140a 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -289,9 +289,17 @@ void MountHelper::safeRemoval(const Medium &medium) void MountHelper::openRealFolder(const Medium &medium) { - if (!medium.mountPoint().isEmpty()) + Medium &m = const_cast<Medium&>(medium); + if (!m.isMounted()) { - system((TQString("kfmclient exec file://") + medium.mountPoint()).local8Bit()); + // If the medium is not mounted, try mounting it first + mount(m); + m = findMedium(m.deviceNode()); + } + + if (m.isMounted()) + { + system((TQString("kfmclient exec 'file://") + m.mountPoint()).local8Bit() + "'"); } else { diff --git a/tdeioslave/media/services/media_realfolder.desktop b/tdeioslave/media/services/media_realfolder.desktop index 450a15189..a89066c53 100644 --- a/tdeioslave/media/services/media_realfolder.desktop +++ b/tdeioslave/media/services/media_realfolder.desktop @@ -1,8 +1,8 @@ [Desktop Entry] -X-TDE-ServiceTypes=media/bluray_mounted,media/camera_mounted,media/cdrom_mounted,media/cd-r_mounted,media/cd-rw_mounted,media/dvd_mounted,media/floppy5_mounted,media/floppy_mounted,media/hdd_mounted,media/nfs_mounted,media/smb_mounted,media/removable_mounted,media/zip_mounted +X-TDE-ServiceTypes=media/bluray_mounted,media/bluray_unmounted,media/camera_mounted,media/camera_unmounted,media/cdrom_mounted,media/cdrom_unmounted,media/cd-r_mounted,media/cd-r_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/floppy5_mounted,media/floppy5_unmounted,media/floppy_mounted,media/floppy_unmounted,media/hdd_mounted,media/hdd_unmounted,media/nfs_mounted,media/nfs_unmounted,media/removable_mounted,media/removable_unmounted,media/smb_mounted,media/smb_unmounted,media/zip_mounted,media/zip_unmounted,media/audiocd,media/blurayvideo,media/dvdvideo,media/svcd,media/vcd Actions=MediaRealFolder X-TDE-Priority=TopLevel -X-TDE-MediaNotifierHide=true +X-TDE-MediaNotifierHide=false [Desktop Action MediaRealFolder] Exec=tdeio_media_mounthelper -f %u |