> I'm trying to understand using Glade + libglade to build UIs. As I > understand it, if I use the glade_xml_signal_autoconnect_full call, my > signal connect function will be called for every defined signal in the XML > tree I am processing. > > One of the parameters passed to my connect functions is "signal_data", > which is defined in the libglade references as "signal_data : the string > value of the signal data given in the XML file." There seems to be no way > to set this value via Glade-2. > > How do I set this? Do I have to edit the XML outside of Glade (YUK!)?
The way I'm going is to avoid using autoconnect completely and instead, manually connect the signals to the appropriate handlers, and at that time, specify the right data. One way to make this process simpler may be found in the source code for Devhelp, which uses a function with a variable argument list to take a bunch of tuples of widget names, signal names and functions to associate them to. Fixed parameters provide the name of the glade file to use, as well as the signal_data to pass to each signal handler. You can then do something like this: connect_signal_handlers("path/to/filename.glade", my_data, "my_button", "clicked", on_my_button_clicked, "your_button", "clicked", on_your_button_clicked, NULL); Perhaps glade-3 has a better way of doing this? -Jim _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list