Re: many buttons, one handler with gtkbuilder
- From: Tristan Van Berkom <tvb gnome org>
- To: "Peter F. Patel-Schneider" <pfps verizon net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: many buttons, one handler with gtkbuilder
- Date: Mon, 19 Jan 2009 21:52:37 -0500
On Mon, Jan 19, 2009 at 6:25 PM, Peter F. Patel-Schneider
<pfps verizon net> wrote:
Hi:
I have an application where I have many buttons (20-30) that all do the
almost "same" thing. I would like to have this done without having to have
different handlers for each button.
It seems to me that the easiest way to do this is to have "user-data" on
each button widget that differentiates between the different buttons.
However, I can't figure out how to do this easily, even when
post-processing the .ui file.
Does anyone know how to get gtkbuilder (and/or glade) to put such
differentiating data into button widgets? It seems like such an obvious
thing to do.
Currently glade/libglade/gtkbuilder all only let you set an object as
user data, otherwise, in my experience I usually avoid using
the autoconnect feature all together, and setup signal connections
after loading the glade file (liblade offered a convenient
glade_xml_signal_connect (), which
would be easy to duplicate around gtkbuilder calls).
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]