device-automounter moved to kdereview

Albert Astals Cid aacid at kde.org
Sun Aug 9 23:10:01 BST 2009


A Diumenge, 9 d'agost de 2009, Trever Fischer va escriure:
> On Sunday 09 August 2009 4:43:43 pm Albert Astals Cid wrote:
> > A Diumenge, 9 d'agost de 2009, Trever Fischer va escriure:
> > > Hello,
> > >
> > > I've moved device-automounter out of playground and into kdereview.
> > > After the review, I hope for it to end up in kdebase/runtime/solid/.
> > > Then after that, I hope to combine it with the solid-actions-kcm to let
> > > it handle other automatic execution of actions when devices get
> > > attached.
> > >
> > > device-automounter is a small kded plugin and kcm page that adds
> > > removable media automounting to KDE. Its more than blindly automatic,
> > > since it has a little bit more logic (further describe in the SETTINGS
> > > file) to make it smarter than your average automounter, while still
> > > behaving without configuration as a naive user would expect.
> > >
> > > Everything passed krazy2all, with the exception of line 40 in
> > > kded/DeviceAutomounter.cpp because I can't remember how to get krazy2
> > > to ignore the foreach checker. My rationale for that is that using
> > > Solid::VolumeAccess::setup() requires a non-const Device, so two copy
> > > constructors is cheaper than converting from a Device to a QString udi
> > > and back. If I'm wrong, feel free to correct me/point and laugh.
> >
> > The kcm Name column is showing the udi and that's ugly, i think using
> > description() would make a betted default.
> >
> > Albert
>
> In order to retrieve the UDI, the device must be present, yes? The KCM gets
> its list of devices from the configuration file, and not solid. I could
> easily set it to show the human-friendly name if solid says the device is
> attached, but the only way I see that happening for devices not attached is
> to store that bit of data into the config file, which seems like an ugly
> hack to me.

I prefer what you call a ugly hack to showing something like

'/org/freedesktop/Hal/devices/usb_device_13fe_1d00_07760EA20082'
'/org/freedesktop/Hal/devices/usb_device_13fe_1d00_07760EA20082_if0'
'/org/freedesktop/Hal/devices/volume_uuid_0036_A680'
'/org/freedesktop/Hal/devices/storage_serial__USB_DISK_2_0_07760EA20082_0_0'

Because i'm sure my father won't recognise any as the usb key i just inserted.

On a separate note, you should try to fix sizing of the view, the "Always 
Automount" column is BIG when it's the Name column that should be the one with 
most space available.

Albert




More information about the kde-core-devel mailing list