After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 551464 - Paste files into composer as attachments
Paste files into composer as attachments
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.22.x (obsolete)
Other All
: Normal minor
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[composer] evolution[attachm...
: 247558 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-09 06:34 UTC by Nick Jenkins
Modified: 2009-12-03 22:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Nick Jenkins 2008-09-09 06:34:23 UTC
Currently adding attachments to emails does work in very user-friendly way, and it would be nice to be able to copy and paste file attachments into draft emails, as you can do in Outlook and other graphical email clients.

Other information:
Steps to reproduce:
* Right-click on two PNG files on my desktop.
* Choose "copy".
* In Evolution 2.22.3.1, I go File -> New -> Mail Message.
* Click in the message body to make it active, and go Edit -> Paste.
* The path (as text) to the two files is pasted. Instead it would be preferable to have the two files added as attachments to the email.

Other info: Running Ubuntu 8.04.1, with the gnome desktop, and running Nautilus 2.22.3.
Comment 1 Kandepu Prasad 2008-09-09 06:57:25 UTC
You can do that using "send-to" option when you right-click on the files on your desktop/anywhere. Did you try that? Will that not be sufficient?
Comment 2 Matthew Barnes 2008-09-09 10:32:15 UTC
Drag and drop should also work correctly.
Comment 3 Jeffrey Stedfast 2008-09-09 15:45:10 UTC
you need to drop on the attachment area of the composer window, or, as the submitted noted, it will just linkify the uri.
Comment 4 Nick Jenkins 2008-09-10 01:14:37 UTC
Right-click on file -> "Send-to" works, but it's not as powerful as copy-paste, because it starts a new email, whereas when I typically realize I need to add an attachment half-way through writing an email.

Drag-and-drop also works, it's more powerful than "send to", because it can be added after a message has been started; but it is less powerful that copy-paste, because you have to navigate to the file, unmaximize and arrange the windows so that you can see both the email window and the file manager window at once, and then drag-and-drop the file (without prematurely releasing, otherwise you'll move the file so some unexpected location), until it's over the email message, and then release.

With copy-paste however, you can have a maximized file window, right click on a file->copy (or go ctrl-c), alt-tab to the right email, and go edit->paste (or ctrl-v). It's the most powerful of all three methods, because it's easy to understand, easy to do, quick to do, it's hard to get wrong, and you can do it mid-email.

Let me put it this way: I'm trying out Evolution after 10 years of Outlook, and Outlook supported all 3 of these methods (drag-and-drop, right-click send-to, and copy-paste) - but the method I consistently used and kept coming back to for sending attachments (and I tend to send and receive a lot of attachments) was copy-paste - simply because it's the most powerful and user-friendly method (at least for me).
Comment 5 Nick Jenkins 2008-09-10 01:28:34 UTC
Sorry, just one more quick follow up comment: I'm not sure why anyone would want the file path to be inserted when they do a copy-paste of a file into an email. Surely what the user wanted (99.9% of the time) was for the file to be inserted as an attachment? I guess it's conceptually possible that someone somewhere might actually want a file path to be inserted mid-email, using this method, but honestly it seems somewhat unlikely, and rather rare. Wouldn't the natural assumption be that the file would added to the email, as an attachment? So just in terms of actual behavior compared to the user's mental model of expected behavior, what Evolution is doing at the moment feels wrong to me, and adding an attachment seems like what the user would expect to happen.
Comment 6 Jeffrey Stedfast 2008-09-10 17:37:30 UTC
What happens is that nautilus gives the composer a URL drop type and so the composer just copies the link into the text since the editor can accept urls (it can't accept files).

I forget all the details of drag&drop negotiations, but if the gtkhtml editor doesn't already do it, maybe it could check the url and see if it is a file:// - if so, not accept the drop and let the drag&drop signals propagate to the parent widget (the composer) which could then accept it.
Comment 7 Matthew Barnes 2009-12-03 05:56:23 UTC
*** Bug 247558 has been marked as a duplicate of this bug. ***
Comment 8 Matthew Barnes 2009-12-03 06:17:08 UTC
I agree with Nick's rationale and I think we can do this fairly easily.

Interesting to note Nautilus' tooltip for Copy is "Prepare the selected files to be copied with a Paste command", so pasting the file -- not the file's URI -- would be the expected behavior, I'd say.

I believe Nautilus will copy its selection to the clipboard as a "text/uri-list" target type, and GtkHtml's editor API allows Evolution to intercept Paste commands.  So Evolution can just check for that target type and defer to GtkHtml if it's anything else.  In fact I think we might already be doing that for images in HTML mode -- they get pasted as inline images in the message body.  That might complicate things a bit, actually, but should still be doable.

I'm past due for another round of composer bugs so I'll see if I can knock this off.
Comment 10 Nick Jenkins 2009-12-03 22:32:57 UTC
Yay! That's fantastic, thank you! Very much looking forward to using this.