Re: Apparent deficiency in GtkBuilder signal connections and grouped widgets



Check out the first(widget pointer) parameter in the event handler.

gtk_widget_get_name(widget) will give you the name of the widget.

Yu
On Sun, 2009-04-05 at 10:07 -0600, Michael Torrie wrote:
> I am writing to the devel list after first posting to the regular list
> about using GtkBuilder and grouped widgets like a group of radio
> buttons.  The only post that really spoke to my problem mentioned that
> there really isn't a way with GtkBuilder to deal nicely with groups of
> widgets like radio buttons in a group way.  There's no easy way to have
> one callback for an event for the whole group of radio buttons.
> 
> I can easy do this by connecting callbacks manually and supplying a
> "user-data" parameter to specify an arbitrary id to differentiate the
> radio buttons.  If I use the user-data field with GtkBuilder it tries to
> use that to look up a widget in the tree, which isn't what is wanted.
> 
> This seems like an obvious deficiency in GtkBuilder.  As GtkBuilder is
> being pushed as a central component of Gtk, I ask if this deficiency
> will be addressed in some manner in the API, or if it already is, how
> should programmers developing in GTK connect the events from grouped
> widgets in a sane way?
> 
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list



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