diff src/blist.c @ 10662:54ac161a876e

[gaim-migrate @ 12199] Plugins can now add submenus to the right-click menu of a blist node by passing a GList of actions to gaim_blist_node_action_new. I'm thinking about making GaimBlistNodeActions more like plugin prefs so that plugins can create radio and check menu items as well. We'll see if I can do that and not make it ugly/suck. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 07 Mar 2005 02:19:09 +0000
parents 54f7939df8e3
children a4ae4fb7f939
line wrap: on
line diff
--- a/src/blist.c	Mon Mar 07 01:25:05 2005 +0000
+++ b/src/blist.c	Mon Mar 07 02:19:09 2005 +0000
@@ -2460,11 +2460,12 @@
 	return gaim_value_get_string(value);
 }
 
-GList *gaim_blist_node_get_extended_menu(GaimBlistNode *n)
+GList *
+gaim_blist_node_get_extended_menu(GaimBlistNode *n)
 {
 	GList *menu = NULL;
 
-	g_return_val_if_fail(n, NULL);
+	g_return_val_if_fail(n != NULL, NULL);
 
 	gaim_signal_emit(gaim_blist_get_handle(),
 			"blist-node-extended-menu",
@@ -2474,13 +2475,14 @@
 
 GaimBlistNodeAction *
 gaim_blist_node_action_new(char *label,
-			   void (*callback)(GaimBlistNode *, gpointer),
-			   gpointer data)
+                           void (*callback)(GaimBlistNode *, gpointer),
+                           gpointer data, GList *children)
 {
 	GaimBlistNodeAction *act = g_new0(GaimBlistNodeAction, 1);
 	act->label = label;
 	act->callback = callback;
 	act->data = data;
+	act->children = children;
 	return act;
 }