Dolphin plugin for ownCloud

Frank Reininghaus frank78ac at googlemail.com
Sun Nov 4 10:04:09 GMT 2012


Hi Dominik,

thanks for your message!

2012/11/2 Dominik Schmidt:
> Hey kfm-devel,
>
>
> since last weekend I've been working on ownCloud integration in Dolphin i.e.
> see the sync status of a folder and to add a "Get Public Share Link" context
> menu for files.
>
> My first approach was to implement a KVersionControlPlugin2 of which the
> results can be seen here: (highly inspired by Thomas Richard's
> dolphin-box-plugin)
>
> https://github.com/dschmidt/dolphin-plugin-owncloud/
>
> It's by no means perfect and still WIP especially because the SocketApi in
> the ownCloud client is neither complete nor merged to master yet.. (if you
> want to test it, you need the socketapi_clean branch of
> github:owncloud/mirall and for that the cloud-branch of attica).
>
> Any comments are highly appreciated tho! (good or bad, code review, feature
> requests whatever :))

You have the following in the constructor:

m_owncloudSocket->connectToServer(m_socketPath);

Isn't that a potentially expensive operation? I'm asking because that
code will be executed even if the user does not use ownCloud at all.

> Working on this I noticed the version control plugin is rather limited and
> not really suited for syncing plugins. Are there any other APIs that I could
> use?

I'm afraid that KVersionControlPlugin2 and
KAbstractFileItemActionPlugin are the only APIs that there are at the
moment.

> This is what I couldn't realize with KVersionControlPlugin2:
>
> 1.) Show an icon for ~/ownCloud/ when looking at ~.
> (e.g., basically for any tracked folder). The version control plugin can
> only show icons for subfolders of the "top level tracked folder".

Yes, it seems that this is not possible.

> 2.) Add a context menu outside of the tracked folder for something like
> "sync this folder to ownCloud". Normal service menus are only mime-type
> dependent and I cant chose to not show that menu entry if a file is already
> tracked by the client.

Hm, the "Activities" submenu in the context menu does something
similar ("Link to/Unlink from current activity"). That doesn't work
here though, but maybe one has to create some activities to make it
work (makes me wonder if we should really have that in the context
menu by default, but that's a different question).

So I think that it might be possible with
KAbstractFileItemActionPlugin, but we really want to prevent any kind
of expensive operation when opening the context menu.

> 3.) Show custom icons. (?)
> I would like to add a custom overlay to icons with my own sync icons because
> the version control icons arent perfect fits for syncing and hard to
> understand by users.

Yes, it seems that this is not possible at the moment. I don't know
what the best approach to resolve this would be because I've never had
anything to do with the version control stuff, but maybe someone else
has an idea?

Best regards
Frank




More information about the kfm-devel mailing list