Why I Love Libglade

The family computer in the living room (of the house that I am now moving out of) was recently converted to an Ubuntu machine. For about the last three years I have been trying different ways to keep it running smoothly. The last configuration was Windows 2000 with a limited account and a software firewall, but even on dial-up, the spyware and the worms got to it.

This computer is mainly used by my younger sister and younger brother for homework and surfing the internet. The three most used programs are Word, MSN, and Limewire. So I thought this would be a perfect use case for Ubuntu — and it is. It’s working flawlessly so far, even with sleep, but that’s because it has apm not acpi.

Anyway I’m not here to tell you my Ubuntu success story since everyone knows how it ends; the computer never has to be reinstalled or rebooted ever again!

I’m here to tell you about why I love libglade. Everyone knows how it is good for creating GUIs, even though the interface sucks, and how it takes a lot of the work out of programming. But in my case it was the XML that saved the day since it is easily readable to humans and does not need to be compiled.

The above is a screenshot of gnome-ppp when it is connecting (like I said the computer uses dial-up). My younger sister will sit at the computer and think, “Oh, ‘Log’ as in ‘Log-on'”, and will click the log button. But instead it brings up a window showing the log of all the modem commands sent during the connect process. Now she is confused, and we don’t want the user to ever be confused.

For some reason she can’t remember not to click on this button. So I opened up the glade file using this command:

gedit `locate gnome-ppp.glade`

I then searched for the gtkButton with the text “_Log”, edited, saved, and voila!

This particular program has instantly become much more usable for her — something that could never be done on Windows or MacOSX. Score for open source!

  1. says:

    Mac OS applications built with .nib files have similarly capabilities but yes, that’s pretty cool.

  2. says:

    You have been able to do this on a Mac since the beginning in 1984. The notion of resource files actually originates with the Mac.

    (okay, so they are not separate files in the original Mac OS; they are “resource forks” of the application file.)

  1. There are no trackbacks for this post yet.