This is my menu:
static GtkItemFactoryEntry menu_items[] = {
{ "/_File",NULL,NULL,0,"<Branch>" },
{ "/File/_New Game",NULL,new_game,0,"<StockItem>", GTK_STOCK_NEW },
{ "/File/sep1", NULL,NULL,0,"<Separator>" },
{ "/File/_Quit",NULL,gtk_main_quit,0,"<StockItem>", GTK_STOCK_QUIT },
{ "/_Network",NULL,NULL,0,"<Branch>" },
{ "/Network/_Host Game",NULL,NULL,0,"<Item>" },
{ "/Network/_Connect",NULL,NULL,0,"<Item>" },
{ "/_Settings",NULL,NULL,0,"<Branch>" },
{ "/Settings/Colors",NULL,NULL,0,"<Item>" },
{ "/Settings/AI",NULL,NULL,0,"<Item>" },
};
The problem is new_game, which is:
static void new_game(GtkWidget *w, gpointer data)
{
g_message("Starting new single player game\n");
// start a new single player game
}
And I'm getting the following error:
menu.h:35: error: invalid conversion from `void (*)(GtkWidget*, void*)' to `
void (*)()'
So I went to gtk.org/tutorial to see if they had any example code and I found
this.
I copy/pasted the code from that page thinking I would be able to figure out what I was doing wrong but noooo, that code gives me the same error. Other than that everything works fine. Any ideas?