[Glade-users] How to get user data specified in signals page?
Damon Chaplin
damon@ximian.com
Mon, 07 May 2001 13:03:10 -0400
yosizawa@cij.co.jp wrote:
>
> Hello,
> I want to get user data in callback function when menu-item is selected.
> And so,I made sub-menu item by glade 0.5.9, and specified a date in signals page of Properties.(The date was in the list box of signals page.)
> But I can't get user date in callback function - I always get 0 .
> And the code of interface.c is this,
>
> tatic GnomeUIInfo area_menu_uiinfo[] =
> {
> {
> GNOME_APP_UI_ITEM, N_("adjust"),
> NULL,
> on_adjust_area_activate, NULL, NULL,
> GNOME_APP_PIXMAP_NONE, NULL,
> 0, 0, NULL
> },
>
> Please could you teach me how I get user data specified in signals page?
There is no way to pass user data to menu item callbacks in GNOME apps
created in Glade.
I'd suggest using the gtk_object_set_data()/get_data() functions to attach
the data to the toplevel window, and retrieve it in the signal handlers.
Damon