On Aug 12, 2009, at 00:39, michaelcbr...@msn.com wrote:
Thinking this was another casting issue, I tried casting the type for
the callback to PurpleCallback, since that looks like the correct type
in libpurple's source code, but I still get the same error that
there's
too many arguments:
((PurpleCallback)menu_action->callback)((PurpleBlistNode *)buddy);
It doesn't look like it's documented anywhere, but the function
prototype that you want to be matching is:
void callback(PurpleBlistNode*, gpointer cb_data)
See, for example, gtkutils.c:menu_action_cb:
static void
menu_action_cb(GtkMenuItem *item, gpointer object)
{
gpointer data;
void (*callback)(gpointer, gpointer);
callback = g_object_get_data(G_OBJECT(item), "purplecallback");
data = g_object_get_data(G_OBJECT(item), "purplecallbackdata");
if (callback)
callback(object, data);
}
(in your case, you'd have (PurpleBlistNode*)buddy and menu_action->data)
~Paul
_______________________________________________
Support@pidgin.im mailing list
Want to unsubscribe? Use this link:
http://pidgin.im/cgi-bin/mailman/listinfo/support