Activities protocol

Sebastian Trüg trueg at kde.org
Wed Jul 14 10:58:44 CEST 2010


Hi Ivan,

On 07/13/2010 03:13 PM, Ivan Čukić wrote:
> 1. The ActivityManager (KDED module) now accepts application name/id
> when the application notifies it that it has opened a document (or any
> other type of resource that has an url)
> 
> If the name is not specified, KWindowInfo is used to try and get it.

So applications need to notify it about opening a doc manually? I am
asking because I started implementing the exact same thing and we should
really not duplicate code.

The idea on my end is to create nuao:DesktopEvent instances which link
to the opened file and the application opening it. For the latter the
ontology is not stable yet. This is something we should fix as soon as
possible so that we can encode applications properly.

> The reason for this is to make it possible to keep track of recently
> opened resources (and all the stats/rating stuff Lukas is working on)
> on a per-application basis.
> 
> KActivityConsumer uses QCoreApplication::applicationName() for this,
> so it is done 'behind a curtain'.
> 
> 2. Does anyone have objections in automatically linking a resource
> (that the application reports is opened) with the current activity?
> From my point of view, it is something that should be done.

This is how I think it should be done: rather than linking the file
directly to the activity you should link the desktop event to the
activity. That way the information is exact and can later be used to
suggest the link between file and activity to the user.

Cheers,
Sebastian


More information about the Plasma-devel mailing list