From 9ec57d9bec40906e8fc3c9c058a5ca5d1bee18bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sun, 2 Oct 2011 08:06:40 +0000 Subject: [PATCH] 3145: Improve image subsection selection; patch for gtk < 2.22 (by Robert Cheramy) svn: r18239 --- src/gui/editors/editmediaref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editors/editmediaref.py b/src/gui/editors/editmediaref.py index 5509035f8..124ab6f6e 100644 --- a/src/gui/editors/editmediaref.py +++ b/src/gui/editors/editmediaref.py @@ -430,7 +430,7 @@ class EditMediaRef(EditReference): self.rect_pixbuf_render = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, w, h) cm = gtk.gdk.colormap_get_system() color = cm.alloc_color(gtk.gdk.Color("blue")) - self.rect_pixmap = gtk.gdk.Pixmap(None, w, h, 24) + self.rect_pixmap = gtk.gdk.Pixmap(None, w, h, cm.get_visual().depth) self.rect_pixmap.set_colormap(cm) self.rect_gc = self.rect_pixmap.new_gc() self.rect_gc.set_foreground(color)