[Glade-users] Realize event problem

On Mon, 8 Oct 2012 12:08:30 +0900
Tristan Van Berkom <tristan.van.berkom at gmail.com> wrote:

Make sure your toplevel window defined in Glade has it's
"visible" property explicitly set to FALSE.

Otherwise it will be shown and it's contents realized before
gtk_builder_add_from_[somthing]() returns.

Hello Tristan,

As Johannes pointed out, I was confused because of pre-Glade3 issues I
had with notebooks (in C, not C++). Previously I had several run-ins
with segmentation faults because of non-realized widgets, and seem to
have read somewhere that the best solution was to glue the
initialization routines to that event.

Now, it seems that the widgets on the hidden pages are at least
instantiated, even if not realized yet. So he told me to just do the
correct ..._get_object, and indeed, it returns a correct reference,
even if the widget is not visible yet. 

Thanks for the 'visibility'-trick. It might still come in handy.


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