Re: How to create special toolbar buttons



On Tue, Jun 20, 2000 at 11:35:11AM -0500, Chema Celorio wrote:
> 
> Why do you need to add different int values
> in the user_data fields ?
> 
> Chema
> 

Because the original poster wrote:

> Jan Dittberner wrote:
...
> > 
> > I want to create a list of toolbar buttons with
> > a common callback function and different int values
> > as the user_data field. I tried this:
...
> > and the callback function now should switch based
> > on the user_data field. I called GPOINTER_TO_INT(data),
> > but it seems to be a pointer (to my app object I guess)


This way, you can reduce the number of functions used by funnelling
all menu callbacks through a common routine.

I don't see why this can't be done, unless user_data is being
overwritten (e.g., by calling gnome_app_create_menus_with_data()).
--andy





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