[Kde-hardware-devel] Three device actions with the same name, and one of them being broken

Ben Cooksley sourtooth at gmail.com
Sat Aug 29 01:40:12 CEST 2009


2009/8/29 Kevin Ottens <ervin at kde.org>:
> On Sunday 23 August 2009 12:01:11 Ben Cooksley wrote:
>> On my trunk system I have found that we have three device files:
>>
>> solid_camera.desktop
>> solid_audiocd.desktop
>> test-predicate-openinwindow.desktop
>>
>> And all have the same icon ( that of Dolphin's ) and the same name
>> "Open In File Manager"
>
> Which is OK since they are mutually exclusive, so only one of those is
> displayed to the user for a given device.
>
>> This has caused understandable confusion with users of the Device
>> Actions KCM module.
>
> I see only two possibilities here:
>  1) Working around the problem by changing the label of those actions to make
> them more explicit, like "Open Audio CD in File Manager"... but I honestly
> don't like it much, it's "just" a workaround after all;
>  2) Find a way to provide more information in the Device Actions KCM Module.
> Like for instance hinting at which devices the actions are supposed to apply.
> This could be extracted from the predicate I guess?

Probably the best way to do it.
Extracting it from the predicate would be possible, except predicates
are a total pain to parse, and doing it manually with QString is
probably very slow.

I was never able to figure out how Solid itself parsed them. It
appears that some of the new generation of predicates are not
supported by the Device Actions KCM either which I'd like to fix.

Perhaps a X-KDE-Solid-Devices property which specifies what types of
devices it affects?

>
>> In addition, the file solid_camera.desktop contains an invalid predicate.
>
> Which predicate is it? I guess it comes from kdegraphics and I don't have it.
> The one shipped by Digikam (which opens with digikam) seems right, so maybe
> this one could be borrowed.

Its predicate is "[ Camera.supportedDrivers == 'gphoto' ]"
It likely does come with KDEGraphics, as that is one of the modules I
install from trunk.

>
> Regards.
> --
> Kévin 'ervin' Ottens, http://ervin.ipsquad.net
> "Ni le maître sans disciple, Ni le disciple sans maître,
> Ne font reculer l'ignorance."
>
> _______________________________________________
> Kde-hardware-devel mailing list
> Kde-hardware-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-hardware-devel
>
>

Regards,
Ben Cooksley


More information about the Kde-hardware-devel mailing list