Highlight mountpoints with an (un)mount icon - NEED TO CHANGE TO THE FILE:/ KIOSLAVE
Stephan Kulow
coolo at kde.org
Wed Sep 17 12:41:26 BST 2008
Am Montag 15 September 2008 schrieb Gerold Jens Wucherpfennig:
> Hi, I'd like to make a small change to the FILE:/ kioslave.
> Folders which are mountpoints should get a new mimetype
> either inode/x-unmounted-mountpoint or inode/x-mounted-mountpoint,
> based on whether filesystems are mounted there at the moment.
> Both mime-types will be sub-types of inode/directory.
>
> THIS WILL HAVE TO BE DONE...
> 1.The files /etc/fstab and /etc/mtab should be monitored for changes
> 2a. If /etc/fstab changes, rebuild the array fstab_mountpoints to
> which the mountpoints are written.
> 2b. If /etc/mtab changes, rebuild the array mtab_mountpoints to
> which the mounted mountpoints are written.
> 3. For every folder in a folder-view, check if its path is in
> mtab_mountpoints.
> If it is, then the mime-type is inode/x-mounted-mountpoint.
> If it is not, then check if its path is in fstab_mountpoints.
> If it is, the mime-type is inode/x-unmounted-mountpoint.
> Else the mime-type remains inode/directory.
>
> The new mime-types can be associated new icons and
> a menue to mount the filesystem at that mountpoint etc.
>
> Unfortuatelly I need some help to do the changes in the source code...
I think this is the wrong place. The file:/ slave should be foremost
fast IMO. And watching files in a slave is wrong too. If an application
wants to highlight mount points, it should use more highlevel slaves
or do it itself.
Greetings, Stephan
More information about the kde-core-devel
mailing list