Item Factory Callback



I am getting this error when I try and compile. I am using c++. It seems
that I have everything defined like it is in the Item Factory Example in the
GTK+ 2.0 Tutprial. Any suggestions?

error: invalid conversion from `void (*)(void*, unsigned int,
  GtkWidget*)' to `void (*)()'


Here is my GtkItemFactoryEntry:

static GtkItemFactoryEntry menu_items[] = {
 { "/_Options", NULL, NULL, 0, "<Branch>" },
 { "/Options/_Auto Ack", "<control>A", changeAutoAck, 1,
  "<CheckItem>" },
 { "/Options/sep1", NULL, NULL, 0, "<Separator>" },
  { "/_Quit", "<CTRL>Q", gtk_main_quit, 0,
  "<StockItem>", GTK_STOCK_QUIT },
};

Here is the prototype for changeAutoAck in my h file:

static void changeAutoAck( gpointer callback_data,
  guint callback_action, GtkWidget *menu_item);

And here is my changeAutoAck function method definition in my cpp file:

void TMSG_Gui::changeAutoAck( gpointer callback_data,
  guint callback_action, GtkWidget *menu_item)
{
ms_auto_ack = 1; //Private member variable
}

Thanks in advance
Leon



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