Matthew Barnes ([info]mbarnes) wrote,
@ 2009-04-15 11:27:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
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



(20 comments) - (Post a new comment)


(Anonymous)
2009-04-15 07:53 pm UTC (link)
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.

(Reply to this)

Looks amazing
[info]darwinsurvivor.myopenid.com
2009-04-15 08:08 pm UTC (link)
This looks amazing. Any idea when it will be ready for general use?

(Reply to this) (Thread)

Re: Looks amazing
[info]mbarnes
2009-04-15 08:19 pm UTC (link)
Thanks! Patch is posted on the bug I linked to. Barring any serious problems it may even make 2.27.1 (April 27).

(Reply to this) (Parent)

Superb!
[info]philip.withnall.myopenid.com
2009-04-15 08:25 pm UTC (link)
Keep up the good work. :D

(Reply to this)


[info]nohatmatt
2009-04-15 09:30 pm UTC (link)
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?

(Reply to this) (Thread)


(Anonymous)
2009-04-15 09:43 pm UTC (link)
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.

(Reply to this) (Parent)(Thread)


[info]mbarnes
2009-04-15 09:44 pm UTC (link)
Oops. Forgot to log in before posting that.

(Reply to this) (Parent)(Thread)


[info]nohatmatt
2009-04-15 09:59 pm UTC (link)
Aaah okay then, I'll go with that.

(Reply to this) (Parent)


[info]vadi.myopenid.com
2009-04-16 12:03 am UTC (link)
That's hot. Definitely will give Evolution a try when this comes by a Ubuntu release.

Gmails lack of progress bars annoys me :)

(Reply to this)

open all
(Anonymous)
2009-04-16 06:57 am UTC (link)
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?

(Reply to this)

icon preview
(Anonymous)
2009-04-16 10:04 am UTC (link)
what about image preview in the incoming attachement icon view? (and not just the stock icon)

(Reply to this)

not-downloading per default?
[info]mcepl
2009-04-16 10:34 am UTC (link)
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?

(Reply to this) (Thread)

Re: not-downloading per default?
(Anonymous)
2009-04-16 12:14 pm UTC (link)
Thunderbird doesn't do that - it downloads the whole message for every message. I've looked at the packet logs :-\

(Reply to this) (Parent)(Thread)

Re: not-downloading per default?
[info]mcepl
2009-04-17 11:05 pm UTC (link)
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.

(Reply to this) (Parent)

Remove Attachments
(Anonymous)
2009-04-16 07:18 pm UTC (link)
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

(Reply to this) (Thread)

Re: Remove Attachments
(Anonymous)
2009-11-18 01:49 am UTC (link)
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 ...

(Reply to this) (Parent)(Thread)

Re: Remove Attachments
[info]mbarnes
2009-11-18 02:06 am UTC (link)
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.

(Reply to this) (Parent)(Thread)

Re: Remove Attachments
(Anonymous)
2009-11-18 05:18 am UTC (link)
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 ...

(Reply to this) (Parent)

Re: Remove Attachments
(Anonymous)
2009-11-18 05:25 am UTC (link)
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.

(Reply to this) (Parent)(Thread)

Re: Remove Attachments
[info]mbarnes
2009-11-18 01:58 pm UTC (link)
Thanks! Yeah, the spaghetti code is now nice neat ravioli. :)

(Reply to this) (Parent)


(20 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…