On Sun, Jun 12, 2005 at 12:02:29AM +0200, Marc Pavot wrote: > And an other solution, easier to implement in my opinion : > > Change the behaviour of the renderer in the function > "rb_property_view_covertree_visible_changed_cb". Is it possible to change a cell renderer's fixed size after you've already started to display the column? I'm trying this: static void rb_property_view_covertree_visible_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, GtkTreeView *treeview) { GtkTreeViewColumn *column; gboolean hidden; int size; GList *list; GList *elem; column = gtk_tree_view_get_column (treeview, 1); hidden = eel_gconf_get_boolean (CONF_COVER_TREE_HIDDEN); size = hidden ? 0 : TREE_COVER_SIZE; gtk_tree_view_column_set_visible (column, !hidden); list = gtk_tree_view_column_get_cell_renderers (column); for (elem = list; elem != NULL; elem = g_list_next (elem)) { g_message ("DEBUG: setting cell renderer size to %d", size); gtk_cell_renderer_set_fixed_size (GTK_CELL_RENDERER (elem->data), size, size); } g_list_free (list); } According to the debugging output (which I'll delete once I get it working), this sets the fixed size to 0 when hiding the column and to TREE_COVER_SIZE (a.k.a. 70) when showing it. There doesn't seem to be any change in behavior. Am I missing something in my implementation, or am I completely on the wrong track?
Attachment:
signature.asc
Description: Digital signature