Re: Cannot get realize() events on GtkViewport created by libglade



On Mon, 2007-07-23 at 12:34 -0500, david hagood gmail com wrote:
[...]
If your toplevel widget is visible=True in the glade file then
it will be shown by the time glade_xml_new() returns, so all
the realize handlers have already run before ever connecting
to the signal... if you hide the toplevel and do gtk_window_present()
yourself then you'll be able to get the signal.
However, I am hooking the events during the construction of the widgets,
by using glade_xml_signal_autoconnect_full with my own handler function,
so I would think this would allow the events to be hooked as the widget is
constructed but before it is realized - is that not the case?

No thats not the case:

   glade_xml_new(); <-- this constructs the whole gui, if "visible" is
   TRUE on the toplevel (and children), then all your widgets are
   realized once this function returns.

   glade_xml_signal_autoconnect(); <-- must be called on a GladeXML
   object, you cant create a GladeXML object without constructing the
   gui.

Although its fine to go reparenting widgets directly after
glade_xml_new(), the widgets are constructed and ready.
(probably less overhead to do it here while the backend resources
are still unalocated).


Ok so here is your custom widget catalog for glade
 <snip> I'll try this. Thanks

BTW: I had been directed to try asking questions in IRC, but when I went
there things seemed pretty dead - either that or I wasn't doing something
wrong (this is my first time using IRC).

Yeah I said come by during the _week_ ! :D I'm around monday through
wednesday and usually people are around thursday and friday...

Cheers,
                   -Tristan





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