src/protocols/yahoo/yahoo.c

changeset 9466
b6425eab60ca
parent 9410
651e6af9e3c0
child 9475
8c8d4ac992a6
equal deleted inserted replaced
9465:652dcd45db7d 9466:b6425eab60ca
2664 2664
2665 yahoo_chat_goto(gc, buddy->name); 2665 yahoo_chat_goto(gc, buddy->name);
2666 } 2666 }
2667 2667
2668 2668
2669 static void yahoo_ask_send_file_menu(GaimBlistNode *node, gpointer data)
2670 {
2671 GaimBuddy *buddy;
2672 GaimConnection *gc;
2673
2674 g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node));
2675
2676 buddy = (GaimBuddy *) node;
2677 gc = gaim_account_get_connection(buddy->account);
2678
2679 yahoo_ask_send_file(gc, buddy->name);
2680 }
2681
2682
2683 static GList *yahoo_buddy_menu(GaimBuddy *buddy) 2669 static GList *yahoo_buddy_menu(GaimBuddy *buddy)
2684 { 2670 {
2685 GList *m = NULL; 2671 GList *m = NULL;
2686 GaimBlistNodeAction *act; 2672 GaimBlistNodeAction *act;
2687 2673
2709 m = g_list_append(m, act); 2695 m = g_list_append(m, act);
2710 } 2696 }
2711 2697
2712 act = gaim_blist_node_action_new(_("Initiate Conference"), 2698 act = gaim_blist_node_action_new(_("Initiate Conference"),
2713 yahoo_initiate_conference, NULL); 2699 yahoo_initiate_conference, NULL);
2714 m = g_list_append(m, act);
2715
2716 /* FIXME: remove this when the ui does it for us. */
2717 act = gaim_blist_node_action_new(_("Send File"),
2718 yahoo_ask_send_file_menu, NULL);
2719 m = g_list_append(m, act); 2700 m = g_list_append(m, act);
2720 2701
2721 if (yahoo_friend_get_game(f)) { 2702 if (yahoo_friend_get_game(f)) {
2722 const char *game = yahoo_friend_get_game(f); 2703 const char *game = yahoo_friend_get_game(f);
2723 char *room; 2704 char *room;
3229 yahoo_send_packet(yd, pkt); 3210 yahoo_send_packet(yd, pkt);
3230 yahoo_packet_free(pkt); 3211 yahoo_packet_free(pkt);
3231 g_free(gpn); 3212 g_free(gpn);
3232 g_free(gpo); 3213 g_free(gpo);
3233 } 3214 }
3234
3235 #if 0
3236 static gboolean yahoo_has_send_file(GaimConnection *gc, const char *who)
3237 {
3238 return TRUE;
3239 }
3240 #endif
3241 3215
3242 static GaimPlugin *my_protocol = NULL; 3216 static GaimPlugin *my_protocol = NULL;
3243 3217
3244 static GaimPluginProtocolInfo prpl_info = 3218 static GaimPluginProtocolInfo prpl_info =
3245 { 3219 {
3291 NULL, /* convo_closed */ 3265 NULL, /* convo_closed */
3292 NULL, /* normalize */ 3266 NULL, /* normalize */
3293 yahoo_set_buddy_icon, 3267 yahoo_set_buddy_icon,
3294 NULL, /* void (*remove_group)(GaimConnection *gc, const char *group);*/ 3268 NULL, /* void (*remove_group)(GaimConnection *gc, const char *group);*/
3295 NULL, /* char *(*get_cb_real_name)(GaimConnection *gc, int id, const char *who); */ 3269 NULL, /* char *(*get_cb_real_name)(GaimConnection *gc, int id, const char *who); */
3296 #if 0
3297 yahoo_ask_send_file,
3298 yahoo_send_file,
3299 yahoo_has_send_file,
3300 #endif
3301 NULL, 3270 NULL,
3302 NULL, 3271 NULL,
3303 yahoo_roomlist_get_list, 3272 yahoo_roomlist_get_list,
3304 yahoo_roomlist_cancel, 3273 yahoo_roomlist_cancel,
3305 yahoo_roomlist_expand_category 3274 yahoo_roomlist_expand_category,
3275 NULL,
3276 yahoo_send_file
3306 }; 3277 };
3307 3278
3308 static GaimPluginInfo info = 3279 static GaimPluginInfo info =
3309 { 3280 {
3310 GAIM_PLUGIN_API_VERSION, /**< api_version */ 3281 GAIM_PLUGIN_API_VERSION, /**< api_version */

mercurial