[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Mountable devices support in KDE
From: Rafał Miłecki <zajec5 () gmail ! com>
Date: 2009-09-17 13:47:57
Message-ID: b170af450909170647x665677f9idf676aac2816cd98 () mail ! gmail ! com
[Download RAW message or body]
2009/9/14 David Faure <faure@kde.org>:
> 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).
>
> 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? ;)
> + if (KDesktopFile::isDesktopFile(path)) {
It only checks if file name matches *.desktop. And KDE generates
desktop files without .desktop in name.
> + if (mp) {
> + return path;
> + }
We expect deviceForUrl(...) to return device (/dev/...) not path
(/home/x/Desktop/harddrive).
Moreover KDesktopFileActions::builtinServices is never called, because
of condition in kfileitemactions.cpp:
> if (isSingleLocal && d->m_props.mimeType() == "application/x-desktop") { // .desktop file
I understand your patch was not supposed to work, was not testes. Just
pointed that to explain why I made changes in my version.
I'll clean my patch and attach it soon.
One question:
It's very important IMO to backport this (un)mount work to KDE 4.3.
This KDE is used by openSUSE 11.2 (and KUbuntu 9.10 I guess) so
hopefully they will still able to update it and provide working
(un)mount for they distros.
Do you agree on that? Do I have permission to backport upcoming patches to 4.3?
--
Rafał
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic