diff src/protocols/silc/silc.c @ 9030:7ab20f829190

[gaim-migrate @ 9806] Siege updated the code for creating right-click menu's for buddies, chats, groups, etc. It uses more stuff from the blist API and less stuff from multi.h. It also combines the code for right-click menus for chats, buddies, etc. (all types of blist nodes). So PRPLs and plugins can easily add right-click menu options to anything in the buddy list in a clean way. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 23 May 2004 17:27:45 +0000
parents 85caba2f820a
children 095731b5e4f6
line wrap: on
line diff
--- a/src/protocols/silc/silc.c	Sun May 23 08:06:38 2004 +0000
+++ b/src/protocols/silc/silc.c	Sun May 23 17:27:45 2004 +0000
@@ -880,6 +880,20 @@
 }
 
 
+GList *silcgaim_blist_node_menu(GaimBlistNode *node) {
+	/* split this single menu building function back into the two
+	   original: one for buddies and one for chats */
+
+	if(GAIM_BLIST_NODE_IS_CHAT(node)) {
+		return silcgaim_chat_menu((GaimChar *) node);
+	} else if(GAIM_BLIST_NODE_IS_BUDDY(node)) {
+		return silcgaim_buddy_menu((GaimBuddy *) node);
+	} else {
+		return_val_if_reached(NULL);
+	}	
+}
+
+
 /************************** Plugin Initialization ****************************/
 
 static GaimPluginPrefFrame *
@@ -949,7 +963,7 @@
 	silcgaim_status_text,
 	silcgaim_tooltip_text,
 	silcgaim_away_states,
-	silcgaim_buddy_menu,
+	silcgaim_blist_node_menu,
 	silcgaim_chat_info,
 	silcgaim_login,
 	silcgaim_close,
@@ -993,8 +1007,7 @@
 	NULL,
 	silcgaim_roomlist_get_list,
 	silcgaim_roomlist_cancel,
-	NULL,
-	silcgaim_chat_menu
+	NULL
 };
 
 static GaimPluginInfo info =