Colorized Svn Diffs in Sparrow

For a year now, I’ve had mail forwarded from my work email to my personal so that I could check mail in only once place. With some vacation on the way and not wanting to have thousands of messages keeping me from efficiently checking personal mail via my phone while computerless for a week, I decided to split the accounts back up. But I don’t want to have to check two accounts for mail on a daily basis, so I wanted to use a mail client. I had been using Sparrow to check mail on my phone and liked it quite a bit. This morning, I downloaded the app for my computer and also gave Thunderbird (which I used for years) another quick spin.

Well, I’ve become such a junkie for the Gmail way of doing things that using Thunderbird’s just not tenable. It feels like I’m using a TRS-80 or something, and the lack of threading by default (maybe you can get an extension to handle it) made me cringe. Sparrow provides a much nicer user experience and handles the threading beautifully, but it doesn’t do anything smart for colorizing svn diffs, which I’ve written about before as a problem with the default Gmail experience.

I decided to see if I could fix this, and it turns out that you can. Just go into /Applications/Sparrow.app/Contents/Resources/conversation.css on your Mac and add these lines to the bottom of the file:

ins { background-color: #cfc; text-decoration: none; }
del { background-color: #fcc; text-decoration: none; }

Then restart Sparrow. You’ll have lovely green and pinkish diff lines rather than impossible-to-read underlined text. Of course, I don’t imagine this’ll survive any software updates (or at least any that touch the css file — I’m not sure whether Sparrow does partial/differential updates or not), so chances are that this’d need to be reapplied after any update, hence my storing the fix here for my future reference.

UPDATE: I tried this fix with the free version of Sparrow. Since I like the software so much, I decided to help fund it by paying the $9.99 to support it. A nice side-benefit of paying is that the ads that appear in the free version to support it go away. Unfortunately, so does the ability to hack the CSS. When I modify the CSS in the paid version, it crashes on startup. I guess there’s some kind of checksumming going on or something. So for now, I’m back to using the free version with the svn diff colorization and an ad. I’m happy still to have supported development on the project but do wish I could use the premium version with my custom CSS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s