GenomeHello....



Hi:

I have a problem with GnomeHello example: I need pass arguments to my
callback function in:


----- menus.c ----------------

extern GtkWidget *w;  /* because is declared in other source code file
*/

   ......
   ......

static GnomeUIInfo toolbar [] = {
  GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new hello"),
				nothing_cb, GNOME_STOCK_PIXMAP_NEW),

  GNOMEUIINFO_SEPARATOR,

  GNOMEUIINFO_ITEM_STOCK (N_("Prev"), N_("Previous hello"),
				nothing_cb,  GNOME_STOCK_PIXMAP_BACK),

  GNOMEUIINFO_ITEM_STOCK (N_("Next"), N_("Next hello"), 
			             my_callback,  GNOME_STOCK_PIXMAP_FORWARD),

  GNOMEUIINFO_END
};
   
 .......
 ...... .

void my_callback (GtkWidget *w){

  /* work with my "w" wigdet */ 
  .....

}



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