[Glade-devel] [glade-3] Adding a GtkTreeView crashes it



--- Damon Chaplin <damon karuna uklinux net> wrote:

If I add a GtkTreeView in glade-3 it crashes (well,
maybe just a
critical warning).

It happens because glade_widget_apply_properties()
is called to set the
defaults, which results in a call to
gtk_tree_view_set_headers_clickable(). But that
complains about no model
being set.

I see two possibilities to fix that.

The first one, is to disable the properties that make
it crash (either by putting <Property
Id="headers_clickable" Disabled="True"/>, either by
putting its setter and getter to ignore).

The second one is to add a new PreCreate function that
sets a model for the tree (it still doesn't exist any
PreCreate function, so the code that parses this part
of the xml should be modified to add a new PreCreate
tag).

The second option has the benefit of making it
possible  to have an example tree that can be edited
in glade.

I tried adding a post-create function which creates
a simple model for
the treeview, but the post-create function is called
after the
apply_properties() call, so that won't work. And
reordering them causes
other problems.

So I don't know how to fix it. Any ideas?
Why is glade_widget_apply_properties() needed when
creating the widget?

To synchronize the glade vision of properties' values,
and the real properties' values.

If you change the default value of a property in the
xml file of a widget, glade's GladeProperty will be
created with this default value, but you still have to
set the property in the widget itself.

PostCreate functions assume that these values are
synchronized.

Cheers,


=====
Joaquin Cuenca Abela
e98cuenc at yahoo dot com


        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 




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