Overlay icons in KFileItem
todd rme
toddrme2178 at gmail.com
Fri Feb 4 15:14:24 GMT 2011
On Fri, Feb 4, 2011 at 4:53 AM, David Faure <faure at kde.org> wrote:
> On Sunday 26 December 2010, Alex Fiestas wrote:
>> Hi there
>>
>> I'd like to add an overlay bluetooth icon for those folders and files
>> which are being shared trhogh bluetooth. I have been looking around and
>> so far I've
>> saw 2 ways of doing it:
>>
>> 1-Modify KFileItem and adding it (just like we do with samba share)
>> 2-Implementing a Control Version plugin.
>>
>> Neither option seems optimal to me, with the first I will have to wait
>> until 4.7 and the second is not designed (althought it seems flexible
>> enough) to do
>> what I intent to do.
>
> I had a look, and I don't really have a better idea. Overlays can come from
> kioslaves, but I presume you're talking about file:/, and modifying kio_file
> wouldn't be much better.
>
> If you modify KFileItem, how will you implement that, given that the
> information about sharing is probably in extragear?
>
> In fact one solution would be "modify KFileItem to use (global) plugins for
> determining overlays". Sounds over-engineered, but it's already better than
> calling a binary from KFileItem::overlays() :-)
> This isn't mimetype based or protocol based, so we would just call all
> available plugins in turn, and let them return additional overlays for the
> overlay list. We would only load the plugins the very first time (intenral
> singleton), so it should be fast afterwards, if all plugins can figure out
> quickly what to do.
>
> You'll still have to wait for kdelibs-4.7, but at least it will be a nice and
> extensible solution for future similar needs.
>
> PS: I don't know control version plugins, other than that they exist, so I
> can't advise on these, but it does sound strange -- and it wouldn't work in
> KFileDialog, right?
There have been a lot of requests for users to be able to set custom
icon overlays. So a solution that would also make this easier is
probably desirable, although I don't know what it would entail.
More information about the kfm-devel
mailing list