31 Aug 2006 company   » (Master)

Selection Fun

Do you know this: You select some text with the mouse and after you did this you wonder why you missed the last or the first letter?
I asked some people around me and they have that problem. Today I got annoyed enough to venture into the deep world of selecting text to figure out what the reason for this could be.

So I started my journey by looking into the GtkEntry source code. And the first thing I found where two things I didn't know. The first is a workaround for this problem: You can shift-click to extend the selection.
The second: If you start selecting with a double-click (triple-click), you'll only select full words (lines).

And I found out what the problem is: When selecting text, you don't select letters, you select gaps. What does that mean? If you click on a letter, Gtk selects the closest gap for you. So if you click on the left half of the letter, the gap in front of the letter is taken, if you click on the right half, the gap on the right is taken. If you want to try: The best letter is an "m", at least with Vera. So, go, enter "mmmmm" in your location bar and try it. :)

This seemed like an obvious usability issue to me, so I thought that other toolkits would get it right. And then I found - for the first time ever - that everyone: Gtk, Qt, XUL, Gecko and Windows, they all behave the same. This got me thinking: Are you actually supposed to select gaps? I mean, it's very likely that I am wrong and the rest of the world is right and not vice versa. But actually, all the people I asked said they knew that problem.

So I'm currently a little lost. Should I really file bugs with literally everyone or did I miss something? I've filed a bug with Gtk, but I'm wondering if I it's really wrong and I should file bugs with Qt, Mozilla, Abiword, ...?!

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!