passing data to a callback

I'm rewriting a game I'm working on from only GTK, GDK and GLIB to
some Gnome functions as well and I got a little problem with the
menu bar...
Before I used the ItemFactory to create a gtk menubar
and I could just say
and I could pass data to all the menu items... I got a big struct that
contains all the data I need in the game, and I want some of the menu
items to be able to print data from that struct... 
	N_("Print Cycle Counter"), N_("Prints the CYCLE_CNT variable"),
	print_cycle_cnt, <MY POINTER TO DATA>, NULL,
	GNOME_APP_PIXMAP_FILENAME, "./images/menu_cyclecnt.xpm",
	NULL, (GdkModifierType)0, NULL
and now that I try to
construct something similar with Gnome it doesn't work,
because it tells me the user_data field isn't constant...
how do I solve this problem?

(I don't want to make the data static, I think that's ugly,
 I want to pass it to all the functions that need it.)


--      | |

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