Re: GtkTreeView possibilities to set text propertys on individual columns



On ons, 21 feb 2001 16:43:33 jrb redhat com wrote:
> Mikael Hermansson <mikeh bahnhof se> writes:
---- CLIP --------
> >   gtk_tree_store_set (app->model, &iter, 0,"column 1", 1,"column 2", 2,
> > "column 3", -1)   /* don't pass last argument */
> > 
> > With this code I get a warning passing NULL to gdk_color_parse should
> we
> > really 
> > take this as an error/warning?  How about just set it to default
> property
> > if you 
> > don't pass all arguments to tree_store_set?
> 
> hrm.  I guess it could do that, but it feels unclean somehow.  I don't
> know what other properties in GTK+ do if you set them to NULL.  Tim?
> 

I was wrong here because it wasn't tree_store_set() instead this happens
when
calling gtk_tree_store_append example:

  gtk_tree_view_column_new_with_attributes ("Source/Binary file", cell,
"foreground",0, "text", 1, NULL);
  gtk_tree_view_column_new_with_attributes ("Linenum", cell, "text", 2,
NULL);
  gtk_tree_view_column_new_with_attributes ("Message", cell, "text", 3,
NULL);

Now after calling: gtk_tree_store_append() you get a warning about passing
NULL to gdk_color_parse
it seems like the "foreground" property is initiated to NULL instead of
setting it to default color when 
creating the new "treeitem".

Greats:

M.H.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]