You are viewing mbarnes

Evolution Attachment Rewrite

Today I finished a rewrite of Evolution's attachment handling code. What was supposed to be a short detour from a much larger ongoing project (more on that later) ballooned into a month-long overhaul. I had already sketched out plans for a rewrite a year ago. This was just preparation meeting opportunity.

The goals of the rewrite were primarily internal code cleanup, but there's some UI bling too:

  • Attachment handling code is currently scattered throughout Evolution, with lots of duplication. The rewrite collects everything in one place.

  • Migrate from GnomeIconList (deprecated) to GtkIconView, with a custom GtkTreeModel specifically for attachments. And throw in a GtkTreeView option just for kicks.

  • Better utilize GIO for file operations, thumbnails, emblems, etc. Abstract away the distinction between local and remote files. Stop using threads, and make sure all blocking calls are asynchronous.

  • Migrate the attachment popup menus to GtkUIManager.

  • Kill off a couple frivolous attachment-related plugins and support the functionality directly. We ship way too many plugins as it is and I'm gradually killing off the silly ones.

  • Make the whole thing extensible, to help resolve some cyclic dependencies within the application. The mailer now handles the mail-related parts, the calendar handles the calendar-related parts, and so on.


Here's a few screenshots. The first two show off the new icon and list views when composing email, and demonstrate simultaneously loading from or saving to remote stores (I used some big audio files here for better illustration of the progress bars). Both file operations are cancellable. The third screenshot shows off the attachment UI for received emails.


Icon View


List View


Received Attachments

Comments

(Anonymous)

nice. glad to see solid work going into evolution. its been feeling a bit neglected (at least for my usage patterns) for a long time.

Looks amazing

This looks amazing. Any idea when it will be ready for general use?

Re: Looks amazing

Thanks! Patch is posted on the bug I linked to. Barring any serious problems it may even make 2.27.1 (April 27).

Superb!

Keep up the good work. :D
The only thing that doesn't really seem right is how the received message has an attachment view before the body, but also the attachment action buttons after it. Might this not be a good opportunity to tidy that up a bit?

(Anonymous)

That top part is hidden by default; it's just a little more discoverable now. I think it's mainly there for users that are more comfortable with drag-and-drop than dealing with the file system. Show them a file chooser dialog and they're totally lost. So we offer alternatives.
Oops. Forgot to log in before posting that.
Aaah okay then, I'll go with that.
That's hot. Definitely will give Evolution a try when this comes by a Ubuntu release.

Gmails lack of progress bars annoys me :)

(Anonymous)

open all

what about an "open all" near the "save all" button?
Let's say that you receive a mail with 6 pdf attached and you want to open them all...now you have to click on each of them, evince steals your focus, you go back to evo, and click on the next one...what do you think?

(Anonymous)

icon preview

what about image preview in the incoming attachement icon view? (and not just the stock icon)

not-downloading per default?

I am not sure about one thing in how Evolution works with attachments in IMAP messages. One of the promises of IMAP (http://imap.org/about/whatisIMAP.html) was ability NOT to download attachments with every message and download them only on request. AFAIK only Thunderbird currently does that. Or does Evolution as well?

(Anonymous)

Re: not-downloading per default?

Thunderbird doesn't do that - it downloads the whole message for every message. I've looked at the packet logs :-\

Re: not-downloading per default?

Hmm, then it is either configuration option or it is something which got lost on the way from Netscape Mail (which was able to do it for sure) to the current Thunderbird.

(Anonymous)

Remove Attachments

Great work, looks very promising!!! What about a funtion to remove attachments from a mail to save diskspace? Take a look at http://www.neeneenee.de/evo/#3

(Anonymous)

Re: Remove Attachments

Yes, definitely, an option to delete all attachments on a per-message, or per-folder basis is essential. I've been looking around for a plugin to do this, and am thinking of writing a shell script to do this on the mbox files which Evolution uses.
I've been through Eudora and Thunderbird over the last 12 years and have all my email for that period in around 250Mb. The only way I can do this is to delete attachments as I archive messages from current to my archive folder, retaining just the text. In Eudora it was easy to strip attachments. In Thunderbird it required a plugin which was pretty flaky but eventually got there. This is the final thing stopping me from jumping ship to Evolution ...

Re: Remove Attachments

There's this, but it might be out-of-date now:
http://people.debian.org.tw/~chihchun/2006/10/23/remove-attachments-plugin-for-evolution-001/

Bringing it back to life would be a nice little software project for someone.

(Anonymous)

Re: Remove Attachments

Ooh yes ... and it seems to have been updated last year as well ....

http://people.debian.org.tw/~chihchun/2008/05/23/remove-attachments-evolution-plugin-002/

Initial attempt to install via the .deb package failed (me, ubuntu), but I notice there's a PPA package available. But wait ... when I try to install the software it threatens to remove evolution itself ... something wrong here .... mutter mutter ...

(Anonymous)

Re: Remove Attachments

By the way, I got so caught up in my 'attachment removing' rant that I forgot to congratulate you on a job well done. The new interface looks great, and I'm always a big fan of tidying up code. I'm not a programmer myself, but I've worked on enough software development projects to know the horror of spaghetti code.

Re: Remove Attachments

Thanks! Yeah, the spaghetti code is now nice neat ravioli. :)

June 2012

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
Powered by LiveJournal.com