Comment 115 for bug 381017

Revision history for this message
Nick Booker (nmbooker) wrote :

A solution might be to implement the Xdnd Direct Save (XDS) protocol:

 http://freedesktop.org/wiki/Specifications/XDS

Doing the job via XDS means Thunderbird can keep control of the saving process, can react and do extra things if a file of the same name already exists (e.g. prompt the user for a different filename and allow them to cancel), and it doesn't have to create a temporary file to pass to the file manager via a uri link.

The following file managers, at least, support XdndDirectSave0 as drop targets:
 * Nautilus
 * Thunar
 * xfdesktop4
 * rox-filer

I imagine dolphin in KDE4 would support it too.

The file-roller code ( apt-get source file-roller ) and 'gtksavebox.c' in ROX-CLib ( http://sourceforge.net/projects/rox/files/ROX-CLib/2.1.10/ ) are examples of how to to it in C. I can be more specific on request.

In response to comment 88 (by karlt), explicit support isn't needed in GDK: see the source code examples I link to above.