Review Request: Dropping Remote URLs onto Plasma

Sebastian Kügler sebas at kde.org
Sat Aug 8 04:41:10 CEST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1240/
-----------------------------------------------------------

Review request for Plasma.


Summary
-------

This is a working prototype of the remote content dropping onto Plasma. 

The idea is that you drop a file from a webpage, or basically a URL onto Plasma and Plasma creates a suitable applet to display this URL. For example an image frame for picture, or a previewer for pdf files. Downloading the data itself (and possibly saving it) is left to the applets. The mimetype needs to be retrieved as it cannot be determined from the URL.

The code pathes I've changed or added are, roughly:
- "something" is dropped onto Plasma
- if it's a remote URL, we don't know the mimetype of the object behind the URL yet
- a KIO::TransferJob is used to retrieve the mimetype asynchronously, and will call back
- we open a QMenu that says "Fetching file type..."
- If the user closes the menu while the mimetype is being retrieved, we will open a new one
- When the TransferJob calls back, and we have our mimetype, we offer a list of applets suitable for this kind of content
- If the user chooses to create an applet, we put the transfer job on hold to make it available for recycling by the applet
- If the user dismisses the offering, we kill the job

The UI is something that we'll need to tackle next. The QMenu isn't really suited for this, but it works.
Something else we need to think about at some point is how we can choose an applet based on a URL, so we can offer applets to browse specific URLs (akonadi:/, folderviews for sftp:/, the comic applet for xkcd.com, etc.) This should provide a solid first step, however.

Another part is making the applets that offer a certain mimetype actually understand URLs and load remote mime-types. Some do that nicely already. 


Diffs
-----

  trunk/KDE/kdelibs/plasma/containment.h 1007367 
  trunk/KDE/kdelibs/plasma/containment.cpp 1007367 
  trunk/KDE/kdelibs/plasma/private/containment_p.h 1007367 

Diff: http://reviewboard.kde.org/r/1240/diff


Testing
-------

dropped all sorts of remote content. Found a crasher in the raster graphicssystem somewhere deep in Qt's drawPixmap (all works fine with the default, image system). Basically, it seems to work fine for http URLs and for example files on sftp:/ remove hosts is good enough for others to give it a whirl.


Thanks,

Sebastian



More information about the Plasma-devel mailing list