[Glade-users] Re: glade_xml_signal_autoconnect, user data and libglade

On Wed, 2004-09-08 at 11:14, Seb James wrote:
Is there a better way to refer to the radio button which would remove
the need to pass the GladeXML object in as user data? Perhaps I can use
the GtkWidget * widget argument somehow? This callback is created as a
signal from the "Next" button, so presumably the passed in widget
pointer points to the "Next" button widget?

Ok, on http://glade.gnome.org/FAQ I found an answer to this question:

on_button1_clicked  (GtkButton       *button,
                                  gpointer         user_data)
  GladeXML* xml;
  GtkWidget* entry1;

  xml = glade_get_widget_tree (GTK_WIDGET (button1));
  entry1 = glade_xml_get_widget (xml, "entry1");


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