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

RE: itemfactory question





> -----Original Message-----
> From: Valéry Febvre [mailto:vfebvre@easter-eggs.com]
> Sent: Thursday, February 24, 2000 6:15 PM
> To: gtk-app-devel-list@redhat.com
> Subject: Re: itemfactory question
> 
> 
> "Poletti, Don" wrote:
> > 
> > I am using the itemfactory to make menus and I am having to 
> problems.
> > 
> > 1) What is the prototype for the callback. The header file has three
> > different
> > ones and none seem to work. If its not obvious I'm refering 
> to the third
> > entry
> > in itemFactoryEntry which is the what gets called when selected
> > 
> > 2) The itemfactoryEntry does not seem to have any way to 
> provide gpointer
> > data.
> > Is there a way?
> 
> For the prototype callback, I use always:
> 
> void menu_callback(gpointer cb_data, guint action, GtkWidget * w)
> {
>   switch (action)
>     {
>     case ABOUT:
> 	...
>       break;
>     case EXIT:
>       gtk_main_quit();
>       break;
> 	...
>     }
> }
> 
> 

This example implies that there is one call back per menu, but the
itemFactoryEntry allows a callback to be specified on each item? 
Are you saying I can only specify a call back on the menu?



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