Re: problem with gtk_tree_view_set_fixed_height_mode()
- From: Stefan Kost <ensonic hora-obscura de>
- To: "Brian J. Tarricone" <bjt23 cornell edu>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: problem with gtk_tree_view_set_fixed_height_mode()
- Date: Wed, 05 Oct 2005 09:05:44 +0200
Hi Brian,
Brian J. Tarricone wrote:
On 10/4/2005 5:07 AM, Stefan Kost wrote:
Brian J. Tarricone schrieb:
Hi all,
I'm trying to use GtkTreeView's fixed height mode for a playlist that
can hold thousands of items, but I'm having a bit of trouble. All I
seem to get is:
Gtk-CRITICAL **: gtk_tree_view_insert_column: assertion
`gtk_tree_view_column_get_sizing (column) == GTK_TREE_VIEW_COLUMN_FIXED'
failed
I've tried gtk_cell_renderer_text_set_fixed_height_from_font() (I have
three columns, all text renderers), but no help there; I still get the
above critical message.
This works for me:
gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1);
if((tree_col=gtk_tree_view_column_new_with_attributes(_("Pos."),renderer,
"text",SEQUENCE_TABLE_POS,
"foreground-set",SEQUENCE_TABLE_TICK_FG_SET,
NULL))
) {
g_object_set(tree_col,
"sizing",GTK_TREE_VIEW_COLUMN_FIXED,
"fixed-width",40,
NULL);
col_index=
gtk_tree_view_append_column(self->priv->sequence_table,tree_col);
}
else GST_WARNING("can't create treeview column");
I was initially using gtk_tree_view_insert_column_with_attributes() and
got lots of assertions too. In this case it seems to be required to
create the column, set the fixed-width and append (or insert) it.
That sounds kinda icky. Where are you getting the value of '40' for the
'fixed-width' parameter? Just making it up?
Yeah, unfortuately. Thats why I was suspecting a bug there too. But when I
brought up the issue I got no replies :(
http://mail.gnome.org/archives/gtk-app-devel-list/2005-February/msg00101.html
Unfortunately, I *can't* use fixed-width columns, as the user needs to
be free to resize the containing window (and the treeview should resize
to match, with the middle column growing or shrinking as necessary). I
still don't understand why GtkTreeView requires a fixed *width* column
in order to enable fixed *height* mode.
That was exactly what I was complaining about. Maybe we should file a bug.
http://bugzilla.gnome.org/buglist.cgi?short_desc_type=allwordssubstr&short_desc=fixed&product=gtk%2B&component=GtkTreeView&long_desc_type=allwordssubstr&long_desc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=anywords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=
shown that nothing like that has been files before.
Stefan
-brian
Stefan
If I set the sizing of each column to GTK_TREE_VIEW_COLUMN_FIXED, I get
4500 blank rows, and only the middle column header is visible (probably
because I set its 'expand' property to TRUE). Not too useful.
I'm not understanding why fixed height mode has anything to do with the
sizing mode, since (according to the docs[1]), the sizing mode is only
used to determine the _width_ of the cell, not the height.
Can someone enlighten me here?
Thanks,
Brian
[1] "The sizing method the column uses to determine its *width*. Please
note that GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views,
and can make columns appear choppy." (emphasis mine)
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]