« July 2009 | Main | September 2009 »

August 30, 2009

De-evilising Adium windows

Some developers seem to think that people can’t use a mouse, probably because of their own inability to use one. Therefore they develop features to help us poor crippled users deal with our handicap. That’s very nice of them, except it’s annoying as Hell and insulting.

In particular, I’m talking about the ‘feature’ where, when you move a window close to a screen edge, it sticks to it like a steel stretcher to an MRI. It’s all very nice when that’s what you want to do but first, that’s almost never my case, second when it is, I’m able to do it without help, thank you very much, and third, it makes it almost impossible to position a window a few pixels away from the edge of the screen, which I like to do because it leaves me an access to the desktop.

So we are dealing with a feature designed to help you with something that is not very difficult in the first place, while rendering another, usually simple task very hard to achieve. It’s like replacing the staircase in a building with an elevator that only goes to the third floor. You can still reach the first floor but you have to take the elevator to the third, make a rope out of your neighbour’s bedsheets and climb down the window. And it’s not like the third floor was hard to reach before.

A good rant is no fun without pointing fingers. Here I’m especially talking about Twitterrific and Adium. I don’t use the former anymore (partly for this reason but mostly because of its utter uselessness when it comes to following discussions) and have switched to Tweetie, but I still use Adium regularly. I tried reporting the issue, years ago, suggesting to make it optional, but the developers looked down on me, saying they didn’t want to bloat the preferences with such details. Right, from the makers of an application that has preferences to turn off window shadows or to choose whether tooltips are displayed when in the background.

Granted, you can disable screen edge sticking by holding I don’t know which modifier while you drag the window, but since the feature is useless and annoying, why not make it kick in only when you jump through enough hoops to deserve it, instead of when you’re quietly minding your own business, repositioning your windows like you’ve always done for the past twenty-five years?

Last week I finally got around to patching Adium to get rid of this nonsense. The regular windows are made evil by making them of class AIDockingWindow, which is defined in the AIUtilities framework. AIBorderlessWindow, in the same framework, takes care of evilising the contact list when it’s made border-less. I could have changed the class in Interface Builder, but still would have needed to patch the code for the border-less window, and patching a nib is less robust than patching a source file.

To fix Adium for your own use, please:

  • Download the patch. It was made for Adium 1.3.8 but it will likely work for a few future releases;
  • Download and unpack the Adium sources (Yes, the current release must be downloaded from the Previous Releases page. Just remember we’re dealing with open source people);
  • Apply the patch with patch -p1 < adium-NoDockingWindow-1.3.8.patch from within the adium-1.3.x folder;
  • Build Adium:

    cd Release
    make
    

(Near the end there is some GUI scripting going on to tweak the disk image, better stop working at that moment.)

  • Adium can be found in the Adium_1.3.x-NDW.dmg disk image in Release/build/.
  • Optional: if you use foamee, get me a coffee:

    @ioucoffee @oscherler for de-evilising Adium windows.

    Thanks.

Hope this helps.

Update (5.11.2009): Patching the Makefile too now, updating the instructions.

August 27, 2009

Safari bug report

How to get past Apple’s profanity filters (just in case they have any) in Safari bug reports:

[Edited version in case you have filters. I trust you’ll get the gist of the original.]

When I copy code from a <pre> tag, Safari inserts artificial (they’re not in the page source) non breaking spaces where lines are indented.

[all capitals]This is the most [mean word for “not very wise”] thing to do [lots of exclamation marks][/all capitals] because usually, you have code inside <pre> tags. And compilers and interpreters don’t like it when spaces are replaced by non-breaking spaces, and it gives rise to errors you can’t easily see the origin of, and it’s incredibly [expression that pictures private properties reduced in powder].

I should write a filter that does this automatically.

August 25, 2009

Photography: Buskers Festival

Buskers Festival

I’ve added to my gallery the pictures from the Buskers Festival in Neuchâtel on August 15th, 2009. I love that AF Nikkor 50mm f/1.4D.

Do not meddle in the affairs of Coding Ninjas, for they are subtle and quick to anger.