dropped URL handling in containment, was: Re: How to get Akonadi notes onto Plasma?

Sebastian Kügler sebas at kde.org
Tue Oct 27 16:30:52 CET 2009


On Monday 26 October 2009 00:39:14 Sebastian Kügler wrote:
> In 4.4, you can drag and drop URLs onto Plasma, and it will try to find the
>  mimetype  using KIO and offer an applet based on that (the URL is passed
>  as argument to the applet), the applet defines in its .desktop file which
>  mimetype it accepts. I'm not sure if the mimetype of a note (text/html?
>  text/plain) will tell you "this is an akonadi note, that's something we
>  haven't solved yet). As a kludge, I have just special-cased dropped
>  akonadi:/ URLs in kdelibs/plasma/containment.cpp to add an email applet.
>  That's not committed to KDE SVN though, if you want I can try to find that
>  small patch.

Thought about this a bit. How about we add an entry to the applet's .desktop file, 
called URLPatterns (or something like this). This is orthogonal to the mimetypes the 
applet supports. We could then make containment list the applets that have one of the 
globs matching the URL.

For the email applet to be able to recognize akonadi URLs. this would look like (in 
it's plugin .desktop file):

X-Plasma-URLPattern=akonadi:/*

Other usecases are specific protocols, think of man:/ adding a webview pointing at 
the manpage. Selkie could use this to decide wether or not to offer a Selkie Plasmoid 
for a given URL (for example X-Plasma-URLPattern=http://gitorious for a gitorious 
selkie), I'm sure you can come up with more use cases...

Is this something I should pursue? It sounds simple enough ...
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list