Overlay icons in Dolphin and Konqueror

Frank Reininghaus frank78ac at googlemail.com
Thu Jul 24 18:52:34 BST 2014


Hi Olivier,

2014-07-23 13:07 GMT+02:00 Olivier Goffart:
> On Thursday 17 July 2014 19:55:23 Olivier Goffart wrote:
>> On Friday 04 July 2014 10:51:16 Olivier Goffart wrote:
>> > Hi,
>> >
>> > I am working with the ownCloud sync client. One of the feature we would
>> > like to have is to display overlay icons in the file managers. The icons
>> > should display the synchronization state, and more importantly the fact
>> > that folders are shared.
>> >
>> > As far as I could see, there is no interface in Konqueror or Dolphin to
>> > show arbitrary overlay icon.
>> > I am aware of KVersionControlPlugin (and we already have such a plugin),
>> > but it's interface is too limited, as only some possibilities are
>> > available, but we would like to display any kind of icons.
>> >
>> > I am then going to implement such interface.
>> > Where should it go?
>> > in a new KFileOverlayIconPlugin class?
>> > Should id go in kio (next KAbstractFileItemActionPlugin)?
>> > Or should it go in lib/konq next to KVersionControlPlugin?
>> >
>> > For the implementation, I believe I can base myself on the
>> > KVersionControlPlugin but returning an QIcon instead of state.
>>
>> Thanks Frank and David for your answer.
>>
>> I drafted some (working) work in progress. The patch is attached.
>> The prototype owncloud plugin is also attached (but the communication
>> protocol is not set in stone and is going to be only released in the next
>> version of the client)
>> So I can have feedback if I'm going in the right direction.
>>
>> I guess I'm too late with this to go into KDE SC 4.14?
>> So my next question is weather there would be another version of Dolphin
>> based on kdelibs, or if I should just go for the frameworks branch.
>>
>> (For some reason, the "shared" icon is suddenly a very important feature for
>> owncloud, and they would like to have it ASAP for the users now that
>> Owncloud 7 (the server) was released)
>>
>> > Please reply to all, I am not subscribed.
>
> Hi,
>
> Sorry to insist. I would like to have feedback on the patch to know if i'm
> going in the right direction.

I was either away or busy at work most of the time last week. Sorry
for not replying earlier.

You might have got some feedback from David though if you had kept him
in the CC list though (re-added now - David: the mail containing the
suggested patches is at
http://lists.kde.org/?l=kfm-devel&m=140561974628961&w=2 ).

Some things that I noticed:

1. Unlike the version control plugins, the ownCloud plugin cannot be
disabled by the user. I don't know if this is a big issue though,
considering that the version control plugins will always do some work
(like look for a .git folder when changing the URL of the view) when
enabled, whereas your new plugin will not use many resources if there
is no ownCloud activity, right?

2. The plugin's overlaysChanged signal has a "QStringList overlays"
argument, but this argument is not used anywhere AFAICS.

3. Unlike the version control plugins, the plugin does not watch a
particular folder, but notifies the view of all changes in all
folders. I'm wondering if this might lead to performance problems if
many files are changed at the same time, and a signal is emitted for
every single one of them, and each signal is received by all views
that are open in split views or multiple tabs?

Comments from others are also welcome - I'm not extremely familiar
with the version control code (which is slightly related) myself, and
I might be away for a couple more days starting from tomorrow and not
be able to answer mails.

> Also, in which branch should it go?

It has not been decided yet if the next Dolphin version will be based
on Qt4 or Qt5. One of the reasons is that it's not known yet what the
plans of some of our runtime dependencies (like Konsole, which
provides the Terminal Panel) are, see my mail to kde-core-devel about
this issue for details:

http://lists.kde.org/?t=140594216200002&r=1&w=2

The question if such a class could be added to the Qt4/kdelibs 4.x
version of lib/konq should be answered by David (I can imagine that he
would prefer to see feature additions to KIO only in frameworks).

Regards,
Frank




More information about the kfm-devel mailing list