[Glade-devel] libglade usage



On Thu, 2004-01-08 at 03:41, James Henstridge wrote:

Libglade's autoconnect function looks up function names in the global 
symbol table.  By default, functions in the main executable do not 
appear there, so would not normally be visible.

The flags returned by "pkg-config --libs libglade-2.0" should include a 
linker flag to export the apps symbols for use by things like 
autoconnect() (for linux systems, the flag is -Wl,--export-dynamic).

Is the autoconnect stuff known to work across all platforms now? I seem
to remember it was uncertain initially.
(I know we didn't use it in Evolution, but I can't remember why.)

If it is reliable, are the other glade_xml_connect_* functions really
necessary any more? Why would you use them? I think this needs to be
documented better.


I think Todd's problem is the common one where libglade has already
shown the widget before the signal handlers are connected, so you never
get the signal. The solution is to set the window's 'Visible' property
to FALSE in glade, and call gtk_widget_show() on it after calling
glade_xml_signal_autoconnect(). (But why not just call a function to
initialize the window instead?)

Damon






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