Category Archives: hacking

this is what goes around; and this.. this is what comes around

It used to be that no applications would compile for 64-bit architectures, because everyone was trying to cram pointers into ints. Today I had the opposite. The head of some code I'm working on wouldn't compile in a 32-bit environment, … Continue reading

Posted in c, hacking, programming | Comments Off

Melbourne Tram Tracker for the N900

So Collabora's robotic and non-robotic overlords very graciously bought everyone on staff an N900 for Christmas. In my opinion, it's actually a very nice phone (although possibly a little on the large side); but the let down is there just … Continue reading

Posted in hacking, maemo, melbourne, python, tramtracker | Comments Off

a threaded processing queue in PyGTK

I'm currently writing a PyGTK client that needs to make network requests using a library that doesn't integrate with the GLib mainloop (python-suds), so I found myself wanting to be able to make network requests without blocking the mainloop, and … Continue reading

Posted in example code, hacking, maemo, python, threading | Comments Off

GTK+ is crushing my spirit

I want a widget that is the combination of GtkComboBoxEntry and GtkEntryCompletion that can display a tree of options in a nice, indented way without the expanders (but with the rows expanded). Basically, a search box with a drop-down and … Continue reading

Posted in gtk, hacking, life, photos, rain | Comments Off

Useful python trick of the day: dict.get()

How often in Python have you written something like: d[k] if k in d else "Default" Admittedly this has gotten a lot shorter since the inclusion of ternary operators in Python, but did you know that Python provides a get … Continue reading

Posted in hacking, programming, python | Comments Off

status update on Clutter-GTK

Some time ago I wrote about my work on Clutter-GTK. Well, I finally got around to rebasing this branch so it could be merged and ebassi merged it for me last night. There are still bugs in the code that … Continue reading

Posted in clutter, clutter-gtk, hacking, work | Comments Off

decorator factory for dbus-python methods

This is a crazy idea I had; that I want to share with people. When you're implementing an object in dbus-python, you decorate your published method calls like this: class ExampleObserver(dbus.service.Object): … @dbus.service.method(dbus_interface=telepathy.interfaces.CLIENT_OBSERVER, in_signature='ooa(oa{sv})oaoa{sv}', out_signature='') def ObserveChannels(self, account, connection, channels, … Continue reading

Posted in hacking, python, telepathy, work | Comments Off

streaming to Airtunes (Airport Express) with PulseAudio

So, being back in Australia, the sun is shining, I'm sat on my sofa and I can't help but feel like I'm on summer holidays. So I want to crank some Uh Huh Her on the stereo. We have an … Continue reading

Posted in airport express, airtunes, audio, hacking, pulseaudio, ubuntu | Comments Off

Upgrading to Ubuntu Karmic

Upgraded to Ubuntu Karmic pre-release today on my Thinkpad X200s. Had two issues: machine wouldn't prompt for the key to unencrypt the hard disk so it didn't boot. This seems to be Launchpad bug 446591. I followed this fix. forgot … Continue reading

Posted in hacking, karmic, laptop, ubuntu | Comments Off

and now for something from the school of pure evil (setting a background on a GtkTextView)

This is something that comes up from time to time, someone wants to set some attractive background on a GtkTextView. Well, unfortunately for you, the theme engine isn't able to help you here because GtkTextView never calls gtk_paint_box() or friends. … Continue reading

Posted in gtk, hacking, hotel, kludge | Comments Off