comparison 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
comparison
equal deleted inserted replaced
12057:68c18dd8a316 12058:d5daff460913
18 */ 18 */
19 19
20 #include "silcincludes.h" 20 #include "silcincludes.h"
21 #include "silcclient.h" 21 #include "silcclient.h"
22 #include "silcgaim.h" 22 #include "silcgaim.h"
23 #include "wb.h"
23 24
24 /***************************** Channel Routines ******************************/ 25 /***************************** Channel Routines ******************************/
25 26
26 GList *silcgaim_chat_info(GaimConnection *gc) 27 GList *silcgaim_chat_info(GaimConnection *gc)
27 { 28 {
830 silc_client_command_call(sg->client, sg->conn, NULL, "CMODE", 831 silc_client_command_call(sg->client, sg->conn, NULL, "CMODE",
831 g_hash_table_lookup(chat->components, "channel"), 832 g_hash_table_lookup(chat->components, "channel"),
832 "+s", NULL); 833 "+s", NULL);
833 } 834 }
834 835
836 typedef struct {
837 SilcGaim sg;
838 SilcChannelEntry channel;
839 } *SilcGaimChatWb;
840
841 static void
842 silcgaim_chat_wb(GaimBlistNode *node, gpointer data)
843 {
844 SilcGaimChatWb wb = data;
845 silcgaim_wb_init_ch(wb->sg, wb->channel);
846 silc_free(wb);
847 }
848
835 GList *silcgaim_chat_menu(GaimChat *chat) 849 GList *silcgaim_chat_menu(GaimChat *chat)
836 { 850 {
837 GHashTable *components = chat->components; 851 GHashTable *components = chat->components;
838 GaimConnection *gc = gaim_account_get_connection(chat->account); 852 GaimConnection *gc = gaim_account_get_connection(chat->account);
839 SilcGaim sg = gc->proto_data; 853 SilcGaim sg = gc->proto_data;
945 act = gaim_blist_node_action_new(_("Set Secret Channel"), 959 act = gaim_blist_node_action_new(_("Set Secret Channel"),
946 silcgaim_chat_setsecret, 960 silcgaim_chat_setsecret,
947 NULL, NULL); 961 NULL, NULL);
948 m = g_list_append(m, act); 962 m = g_list_append(m, act);
949 } 963 }
964 }
965
966 if (channel) {
967 SilcGaimChatWb wb;
968 wb = silc_calloc(1, sizeof(*wb));
969 wb->sg = sg;
970 wb->channel = channel;
971 act = gaim_blist_node_action_new(_("Draw On Whiteboard"),
972 silcgaim_chat_wb, (void *)wb, NULL);
973 m = g_list_append(m, act);
950 } 974 }
951 975
952 return m; 976 return m;
953 } 977 }
954 978