Bug in GtkCTree (gtk+ 1.2.10) or am I just misunderstanding the API?
- From: jgotts linuxsavvy com
- To: gtk-list gnome org
- Subject: Bug in GtkCTree (gtk+ 1.2.10) or am I just misunderstanding the API?
- Date: Tue, 04 Dec 2001 16:41:35 -0500
I cannot get the GtkCTree widget to work with my application. I've modified
the testgtk.c program from the source distribution to show the problem. Here
is the diff. See below for the bad output.
--- testgtk.c.orig Tue Dec 4 16:28:13 2001
+++ testgtk.c Tue Dec 4 16:36:13 2001
@@ -4546,6 +4546,8 @@
gchar buf2[60];
GtkCTreeNode *sibling;
gint i;
+ gchar *buf;
+ gint rc;
text[0] = buf1;
text[1] = buf2;
@@ -4559,6 +4561,16 @@
sibling = gtk_ctree_insert_node (ctree, parent, sibling, text, 5,
pixmap3, mask3, NULL, NULL,
TRUE, FALSE);
+ rc = gtk_ctree_node_get_text(ctree, sibling, 0, &buf);
+ if (! rc)
+ printf("GTK Bug? The first column contained no data.\n");
+ else
+ printf("First column is %s\n", buf);
+ rc = gtk_ctree_node_get_text(ctree, sibling, 1, &buf);
+ if (! rc)
+ printf("GTK Bug? The second column contained no data.\n");
+ else
+ printf("Second column is %s\n", buf);
if (parent && ctree->line_style == GTK_CTREE_LINES_TABBED)
gtk_ctree_node_set_row_style (ctree, sibling,
% ./testgtk
GTK Bug? The first column contained no data.
Second column is Item 1-8
GTK Bug? The first column contained no data.
Second column is Item 1-7
GTK Bug? The first column contained no data.
Second column is Item 1-6
GTK Bug? The first column contained no data.
Second column is Item 1-5
GTK Bug? The first column contained no data.
Second column is Item 1-4
GTK Bug? The first column contained no data.
Second column is Item 2-8
...
Please help!
John
--
John GOTTS <jgotts linuxsavvy com> http://linuxsavvy.com/staff/jgotts
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]