When I invoke get_column_pixtext() on the first column of
a GtkCTree, I get the following message on stderr:

Gdk-CRITICAL **: file gdkwindow.c: line 716: assertion `window != NULL'
failed.

The apparent reason is that the tree returns both a NULL pixmap mask
and a NULL pixmap.  (Yet you must use ...get_pixtext() to get the
text of the first column, because of the cell type.)

gtkmodule's _wrap_gtk_ctree_node_get_pixtext() already checks for
a NULL pixmap mask.  The attached context diff makes it also check
for a NULL pixmap, before attempting to create a PyGdkWindow for
it.

The context diff was created against pygtk 0.6.1, and was 
tested under IRIX 6.5.

-- 
Mitch Chapman
[EMAIL PROTECTED]
*** gtkmodule.c.orig    Wed Jun 23 18:40:25 1999
--- gtkmodule.c Wed Jun 23 18:42:26 1999
***************
*** 5451,5457 ****
  }
  
  static PyObject *_wrap_gtk_ctree_node_get_pixtext(PyObject *self, PyObject *args) {
!   PyObject *ctree, *node, *mask;
    int col;
    guint8 spacing;
    char *text;
--- 5451,5457 ----
  }
  
  static PyObject *_wrap_gtk_ctree_node_get_pixtext(PyObject *self, PyObject *args) {
!   PyObject *ctree, *node, *mask, *pixmap;
    int col;
    guint8 spacing;
    char *text;
***************
*** 5473,5480 ****
      Py_INCREF(Py_None);
      mask = Py_None;
    }
    return Py_BuildValue("(siOO)", text, (int)spacing,
!                      PyGdkWindow_New(p), mask);
  }
  
  static PyObject *_wrap_gtk_ctree_get_node_info(PyObject *self, PyObject *args) {
--- 5473,5487 ----
      Py_INCREF(Py_None);
      mask = Py_None;
    }
+ 
+   if (p)
+     pixmap = PyGdkWindow_New(p);
+   else {
+     Py_INCREF(Py_None);
+     pixmap = Py_None;
+   }
    return Py_BuildValue("(siOO)", text, (int)spacing,
!                      pixmap, mask);
  }
  
  static PyObject *_wrap_gtk_ctree_get_node_info(PyObject *self, PyObject *args) {

Reply via email to