diff src/protocols/gg/gg.c @ 12919:248b8b39c671

[gaim-migrate @ 15272] Replace GaimBlistNodeAction with the more generic GaimMenuAction, this is in preparation for letting the chat room user list have extensible menus like the blist entries do. (I know it's not exactly the prettiest, and the callback isn't exactly type-safe, when we eventually gobjectify everything we can get some safety back by using (GObject, gpointer) but that's for later.) I'm planning to look into merging GaimPluginActions into GaimMenuActions as well. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 17 Jan 2006 23:22:19 +0000
parents f49d49444c68
children 82e918444965
line wrap: on
line diff
--- a/src/protocols/gg/gg.c	Tue Jan 17 19:28:45 2006 +0000
+++ b/src/protocols/gg/gg.c	Tue Jan 17 23:22:19 2006 +0000
@@ -1463,25 +1463,28 @@
 /* static GList *ggp_blist_node_menu(GaimBlistNode *node) {{{ */
 static GList *ggp_blist_node_menu(GaimBlistNode *node)
 {
-	GaimBlistNodeAction *act;
+	GaimMenuAction *act;
 	GList *m = NULL;
 
 	if (!GAIM_BLIST_NODE_IS_BUDDY(node))
 		return NULL;
 
-	act = gaim_blist_node_action_new(_("Add to chat"),
-					 ggp_bmenu_add_to_chat, NULL, NULL);
+	act = gaim_menu_action_new(_("Add to chat"),
+	                           GAIM_CALLBACK(ggp_bmenu_add_to_chat),
+	                           NULL, NULL);
 	m = g_list_append(m, act);
 
 	/* Using a blist node boolean here is also wrong.
 	 * Once the Block and Unblock actions are added to the core,
 	 * this will have to go. -- rlaager */
 	if (gaim_blist_node_get_bool(node, "blocked")) {
-		act = gaim_blist_node_action_new(_("Unblock"),
-						 ggp_bmenu_block, NULL, NULL);
+		act = gaim_menu_action_new(_("Unblock"),
+		                           GAIM_CALLBACK(ggp_bmenu_block),
+		                           NULL, NULL);
 	} else {
-		act = gaim_blist_node_action_new(_("Block"),
-						 ggp_bmenu_block, NULL, NULL);
+		act = gaim_menu_action_new(_("Block"),
+		                           GAIM_CALLBACK(ggp_bmenu_block),
+		                           NULL, NULL);
 	}
 	m = g_list_append(m, act);