comparison src/protocols/msn/msn.c @ 9466:d27156c9c876

[gaim-migrate @ 10291] (21:36:44) datallah: anyway... i added "Send File" to the prpl core committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 07 Jul 2004 01:49:39 +0000
parents 997c28571364
children 7a65fdba750f
comparison
equal deleted inserted replaced
9465:8a4797a608ae 9466:d27156c9c876
352 352
353 msn_slplink_request_ft(slplink, xfer); 353 msn_slplink_request_ft(slplink, xfer);
354 } 354 }
355 355
356 static void 356 static void
357 show_send_file_cb(GaimBlistNode *node, gpointer ignored) 357 msn_send_file(GaimConnection *gc, const char *who, const char *file)
358 { 358 {
359 GaimBuddy *buddy;
360 GaimConnection *gc;
361 MsnSession *session; 359 MsnSession *session;
362 MsnSlpLink *slplink; 360 MsnSlpLink *slplink;
363 GaimXfer *xfer; 361 GaimXfer *xfer;
364 362
365 g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); 363 session = gc->proto_data;
366 364
367 buddy = (GaimBuddy *) node; 365 xfer = gaim_xfer_new(gc->account, GAIM_XFER_SEND, who);
368 366
369 gc = gaim_account_get_connection(buddy->account); 367 slplink = msn_session_get_slplink(session, who);
370 session = gc->proto_data;
371
372 xfer = gaim_xfer_new(buddy->account, GAIM_XFER_SEND, buddy->name);
373
374 slplink = msn_session_get_slplink(session, buddy->name);
375 368
376 xfer->data = slplink; 369 xfer->data = slplink;
377 370
378 gaim_xfer_set_init_fnc(xfer, t_msn_xfer_init); 371 gaim_xfer_set_init_fnc(xfer, t_msn_xfer_init);
379 372
380 gaim_xfer_request(xfer); 373 if (file)
374 gaim_xfer_request_accepted(xfer, file);
375 else
376 gaim_xfer_request(xfer);
381 } 377 }
382 378
383 static void 379 static void
384 update_buddy_icon_cb(GaimBlistNode *node, gpointer ignored) 380 update_buddy_icon_cb(GaimBlistNode *node, gpointer ignored)
385 { 381 {
537 if (g_ascii_strcasecmp(buddy->name, 533 if (g_ascii_strcasecmp(buddy->name,
538 gaim_account_get_username(buddy->account))) 534 gaim_account_get_username(buddy->account)))
539 { 535 {
540 act = gaim_blist_node_action_new(_("Initiate Chat"), 536 act = gaim_blist_node_action_new(_("Initiate Chat"),
541 initiate_chat_cb, NULL); 537 initiate_chat_cb, NULL);
542 m = g_list_append(m, act);
543
544 act = gaim_blist_node_action_new(_("Send File"),
545 show_send_file_cb, NULL);
546
547 m = g_list_append(m, act); 538 m = g_list_append(m, act);
548 539
549 act = gaim_blist_node_action_new(_("Update Buddy Icon"), 540 act = gaim_blist_node_action_new(_("Update Buddy Icon"),
550 update_buddy_icon_cb, NULL); 541 update_buddy_icon_cb, NULL);
551 542
1701 NULL, 1692 NULL,
1702 NULL, 1693 NULL,
1703 NULL, 1694 NULL,
1704 NULL, 1695 NULL,
1705 NULL, 1696 NULL,
1706 NULL 1697 NULL,
1698 NULL,
1699 msn_send_file
1707 }; 1700 };
1708 1701
1709 static GaimPluginInfo info = 1702 static GaimPluginInfo info =
1710 { 1703 {
1711 GAIM_PLUGIN_API_VERSION, /**< api_version */ 1704 GAIM_PLUGIN_API_VERSION, /**< api_version */