The previous patch is OK for the git version. In the current debian version, the Pixmap constructor is appealed twice with the bad colordepth.
New patch for the debian version. -- Étienne Loks
--- facttree.py.origin 2010-07-20 17:23:41.161856511 +0200 +++ facttree.py 2010-07-20 17:22:39.490354401 +0200 @@ -45,6 +45,18 @@ else: cell.set_property("stock_id", "gtk-edit") +def get_colordepth(): + depth = 24 + screen = gtk.gdk.screen_get_default() + if not screen: + return depth + visual = screen.get_system_visual() + if not visual: + return depth + return visual.depth + +COLOR_DEPTH = get_colordepth() + class FactTree(gtk.TreeView): __gsignals__ = { "edit-clicked": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, )), @@ -89,7 +101,7 @@ self.box = None - pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) + pixmap = gtk.gdk.Pixmap(None, 10, 10, COLOR_DEPTH) _test_context = pixmap.cairo_create() self._test_layout = _test_context.create_layout() font = pango.FontDescription(gtk.Style().font_desc.to_string()) @@ -454,7 +466,7 @@ return None fact = self.data - pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) + pixmap = gtk.gdk.Pixmap(None, 10, 10, COLOR_DEPTH) context = pixmap.cairo_create() layout = context.create_layout()