Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo.c @ 11800:32bac0647037
[gaim-migrate @ 14091]
Patch from Peter Lawler that adds a blist menu option for the whiteboard/doodle feature and also cleaned up the call of the whiteboard, so it's a little more generic. With a tweak from me.
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Mon, 24 Oct 2005 20:56:12 +0000 |
parents | 11e95968c9ff |
children | 81806e9241be |
comparison
equal
deleted
inserted
replaced
11799:a3c28707ef4d | 11800:32bac0647037 |
---|---|
707 } | 707 } |
708 | 708 |
709 // Check for the Doodle IMV | 709 // Check for the Doodle IMV |
710 if( !strcmp( imv, "doodle;11" ) ) | 710 if( !strcmp( imv, "doodle;11" ) ) |
711 { | 711 { |
712 if (!yahoo_privacy_check(gc, im->from)) { | |
713 gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from); | |
714 return; | |
715 } | |
712 GaimWhiteboard *wb; | 716 GaimWhiteboard *wb; |
713 | 717 |
714 g_print( "'doodle;11' found in chat packet\n" ); | 718 g_print( "'doodle;11' found in chat packet\n" ); |
715 | 719 |
716 wb = gaim_whiteboard_get_session( gc->account, im->from ); | 720 wb = gaim_whiteboard_get_session( gc->account, im->from ); |
2856 } | 2860 } |
2857 | 2861 |
2858 return m; | 2862 return m; |
2859 } | 2863 } |
2860 | 2864 |
2865 static void yahoo_doodle_blist_node(GaimBlistNode *node, gpointer data) | |
2866 { | |
2867 GaimBuddy *b = (GaimBuddy *)node; | |
2868 GaimConnection *gc = b->account->gc; | |
2869 | |
2870 yahoo_doodle_initiate(gc, b->name); | |
2871 } | |
2872 | |
2861 static GList *yahoo_buddy_menu(GaimBuddy *buddy) | 2873 static GList *yahoo_buddy_menu(GaimBuddy *buddy) |
2862 { | 2874 { |
2863 GList *m = NULL; | 2875 GList *m = NULL; |
2864 GaimBlistNodeAction *act; | 2876 GaimBlistNodeAction *act; |
2865 | 2877 |
2911 } | 2923 } |
2912 | 2924 |
2913 if (f) { | 2925 if (f) { |
2914 act = gaim_blist_node_action_new(_("Stealth Settings"), | 2926 act = gaim_blist_node_action_new(_("Stealth Settings"), |
2915 NULL, NULL, build_stealth_submenu(f, gc)); | 2927 NULL, NULL, build_stealth_submenu(f, gc)); |
2928 m = g_list_append(m, act); | |
2929 } | |
2930 | |
2931 if (f) { | |
2932 act = gaim_blist_node_action_new(_("Start Doodling"), | |
2933 yahoo_doodle_blist_node, NULL, NULL); | |
2916 m = g_list_append(m, act); | 2934 m = g_list_append(m, act); |
2917 } | 2935 } |
2918 | 2936 |
2919 return m; | 2937 return m; |
2920 } | 2938 } |