diff src/protocols/silc/chat.c @ 12058:d5daff460913

[gaim-migrate @ 14353] SILC whiteboard support from Pekka Riikonen. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Sat, 12 Nov 2005 23:04:44 +0000
parents 201617d49573
children 5851a9219bc7
line wrap: on
line diff
--- a/src/protocols/silc/chat.c	Sat Nov 12 23:04:12 2005 +0000
+++ b/src/protocols/silc/chat.c	Sat Nov 12 23:04:44 2005 +0000
@@ -20,6 +20,7 @@
 #include "silcincludes.h"
 #include "silcclient.h"
 #include "silcgaim.h"
+#include "wb.h"
 
 /***************************** Channel Routines ******************************/
 
@@ -832,6 +833,19 @@
 				 "+s", NULL);
 }
 
+typedef struct {
+	SilcGaim sg;
+	SilcChannelEntry channel;
+} *SilcGaimChatWb;
+
+static void
+silcgaim_chat_wb(GaimBlistNode *node, gpointer data)
+{
+	SilcGaimChatWb wb = data;
+	silcgaim_wb_init_ch(wb->sg, wb->channel);
+	silc_free(wb);
+}
+
 GList *silcgaim_chat_menu(GaimChat *chat)
 {
 	GHashTable *components = chat->components;
@@ -949,6 +963,16 @@
 		}
 	}
 
+	if (channel) {
+		SilcGaimChatWb wb;
+	        wb = silc_calloc(1, sizeof(*wb));
+        	wb->sg = sg;
+        	wb->channel = channel;
+        	act = gaim_blist_node_action_new(_("Draw On Whiteboard"),
+                                         silcgaim_chat_wb, (void *)wb, NULL);
+	        m = g_list_append(m, act);
+	}
+
 	return m;
 }