Drag and drop contacts to the desktop, the file manager or another application

Bug #150686 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Wishlist
Mats

Bug Description

It would be nice if users could drag and drop contacts to the desktop, the file manager or another application.

To the desktop/file manager:
* create a link to xmpp:<email address hidden>?message with link name = "Contact Name"

To another application (e.g. mail client):
* Add the text "Contact Name ( xmpp:<email address hidden> )"

When this user does this with a selection of contacts, several links should be added or multiple lines should be added to the application.

When this user does this with contact group, several links should be added in a map that is created or multiple lines should be added to the application (*).

(*) So, something like:
Group Name
   Contact1 Name ( xmpp:<email address hidden> )
   Contact2 Name ( xmpp:<email address hidden> )
   Contact3 Name ( xmpp:<email address hidden> )
   Contact4 Name ( xmpp:<email address hidden> )

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → Wishlist
Revision history for this message
Mats (matsben) wrote :

First, if other applications shall have a chance to understand what they get, the format must be very "syntax free". I have therefore picked a generic format:
xmpp:<email address hidden>, xmpp:<email address hidden>, xmpp:<email address hidden>
where the JIDs are always the bare JID.
Second, there seems to be some bad interaction with the internal DnD of the TreeCtrl widget which just stops the event handlers from getting any events.
Third, one surprise was that I actually can drag a contact to the URL entry in Firefox and it actually pokes the URI handler of Coccinella without doing anything since the URI is otherwise empty.

Changed in coccinella:
status: New → In Progress
Revision history for this message
Mats (matsben) wrote :

If instead using xmpp:<email address hidden>?message and dropping it at Firefox from Coccinellas roster, it indeed pokes Coccinella and initiates a message to that user. So far so good.

Revision history for this message
Mats (matsben) wrote :

Main DnD now works. The interaction between the TreeCtrl built in DnD and system DnD is problematic, but I made it work like this: while the mouse drags things inside the roster TreeCtrl, the internal DnD is in charge, and when the mouse leaves the TreeCtrl widget control is taken over by the system DnD. It exports data as:

"xmpp:<email address hidden>, xmpp:<email address hidden>, xmpp:<email address hidden>"

which will give other applications a chance to understand what they get. Only utf-8 format at this time.

I could think of having xmpp:<email address hidden>?message to resemble mailto: uri behavior but I'm not sure. Dragging contacts to desktop as files is not implemented since I don't know how such a file would be named (suffix) r what it content shall be.

Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 150686] Re: Drag and drop contacts to the desktop, the file manager or another application

> I could think of having xmpp:<email address hidden>?message to resemble
> mailto: uri behavior but I'm not sure. Dragging contacts to desktop as
> files is not implemented since I don't know how such a file would be
> named (suffix) r what it content shall be.

On KDE such a link has a .desktop extension and is a plain text file
with this content:

[Desktop Entry]
Encoding=UTF-8
Icon=www
Type=Link
URL=http://test.com

I guess this .desktop format is standardized by freedesktop.org so it
also should be compatible with Gnome and XFCE etc.

Revision history for this message
Mats (matsben) wrote :

On Windows it seems a dropped link creates a file with suffix .URL and content

[InternetShortcut]
URL=http://coccinella.im/download

On Mac I just get an empty file with suffix .webloc How on earth does that work?

In any case it doesn't work to export plain text, even formatted as an uri, for dropping to the desktop. The desktop drop target seems to need that the source is a very particular format. This needs to be set in the drag source somehow.

Revision history for this message
Mats (matsben) wrote :

Exported as text in format: "xmpp:<email address hidden>, xmpp:<email address hidden>" etc.
Exported as file creates a platform specific URL file appended with "?message"

Changed in coccinella:
status: In Progress → Fix Committed
sander (s-devrieze)
Changed in coccinella:
milestone: none → 0.96.4
sander (s-devrieze)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.