From kde-core-devel Mon Sep 14 15:56:52 2009 From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Date: Mon, 14 Sep 2009 15:56:52 +0000 To: kde-core-devel Subject: Re: Mountable devices support in KDE Message-Id: X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125294386308174 2009/9/14 David Faure : > On Monday 14 September 2009, Rafał Miłecki wrote: >> 2009/9/8 Kevin Ottens : >> >> Is such a url trick acceptable to be commited to KDE (libkonq)? >> > >> > I've no say in that. More something to discuss with David. >> >> Can sb else comment on this, please? David doesn't seem to read this ML. > > Hey, how would I have posted 5889 emails to kde-core-devel since 1999 if I > wasn't subscribed to it? :-) > (statistics from kde.markmail.org) Huh, you definitely are :) > IIRC Solid has a way to find the device from the device name like /dev/sdb1, > so instead of a kioslave-specific hack, how about using /dev/sdb1 as the path > for which to show the popupmenu? "All" we need to do is to show mount/unmount > for such paths, and that seems easy to do: just modify > KDesktopFileActions::builtinServices (in kio) so that it calls > KMountPoint::currentMountPoints().findByDevice(_url.path()) when _url is a > device path rather than a .desktop file. Something like the attached patch > (untested). Thanks, I'll test this together with your patch. > Ah, but we can only recognize /dev/sdb1 if it's already mounted; otherwise > (if it's not mounted and it's not in fstab), how can we find out it's a > mountable device? Via Solid maybe? Kevin? ;) That should be easy. I believe we can just steal code from DeviceNotifier, can't we? -- Rafał