Re: GtkBuilder



On 2011-03-13 16:23, Craig Bakalian <craigbakalian verizon net> wrote:
Hi,

I am slowly moving my application to gtk+-3.0.  The biggest step is
moving away from GladeXML to GtkBuilder.  The casting is hard work.
But, it appears that gtk_builder_connect_signals  isn't connecting
signals from my GtkBuilder file.  What is up with this?

Do I have to use gtk_builder_connect_signals_full?  That is even more
hard work!

Did you read the documentation for gtk_builder_connect_signals(), and follow the advice about compiling and linking against gmodule-export-2.0?

http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html#gtk-builder-connect-signals

For instance, if you are using pkg-config, add gmodule-export-2.0 to your PKG_CHECK_MODULES call:

PKG_CHECK_MODULES([DEPS], [gtk+-3.0 gmodule-export-2.0])

Note that if you are building your application for Windows, you must add G_MODULE_EXPORT to the declaration of signal callbacks. As this is a no-op on Linux and other Unices, it is good practice to declare every signal callback like this, even if you only plan to build for Linux.

Is anybody out there having difficulty making the transition to gtk3 on
ubuntu 11.04 like I am having?

GtkBuilder has been in GTK+ 2 since 2.12, so I do not think that this is a new problem.

--
http://amigadave.com/ | davidk openismus com



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