| 338 continue; |
338 continue; |
| 339 |
339 |
| 340 chat = find_chat_for_conversation(conv); |
340 chat = find_chat_for_conversation(conv); |
| 341 if (chat == NULL) { |
341 if (chat == NULL) { |
| 342 PurpleProtocol *protocol = purple_connection_get_protocol(gc); |
342 PurpleProtocol *protocol = purple_connection_get_protocol(gc); |
| 343 comps = purple_protocol_iface_chat_info_defaults(protocol, gc, |
343 comps = purple_protocol_chat_iface_info_defaults(protocol, gc, |
| 344 purple_conversation_get_name(conv)); |
344 purple_conversation_get_name(conv)); |
| 345 } else { |
345 } else { |
| 346 comps = purple_chat_get_components(chat); |
346 comps = purple_chat_get_components(chat); |
| 347 } |
347 } |
| 348 serv_join_chat(gc, comps); |
348 serv_join_chat(gc, comps); |
| 649 gnt_menu_add_item(GNT_MENU(sub), item); |
649 gnt_menu_add_item(GNT_MENU(sub), item); |
| 650 gnt_menuitem_set_callback(item, add_pounce_cb, ggc); |
650 gnt_menuitem_set_callback(item, add_pounce_cb, ggc); |
| 651 |
651 |
| 652 if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, send_file) && |
652 if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, send_file) && |
| 653 (!PURPLE_PROTOCOL_IMPLEMENTS(protocol, can_receive_file) || |
653 (!PURPLE_PROTOCOL_IMPLEMENTS(protocol, can_receive_file) || |
| 654 purple_protocol_iface_can_receive_file(protocol, gc, |
654 purple_protocol_xfer_iface_can_receive(protocol, gc, |
| 655 purple_conversation_get_name(ggc->active_conv)))) { |
655 purple_conversation_get_name(ggc->active_conv)))) { |
| 656 item = gnt_menuitem_new(_("Send File")); |
656 item = gnt_menuitem_new(_("Send File")); |
| 657 gnt_menu_add_item(GNT_MENU(sub), item); |
657 gnt_menu_add_item(GNT_MENU(sub), item); |
| 658 gnt_menuitem_set_callback(item, send_file_cb, ggc); |
658 gnt_menuitem_set_callback(item, send_file_cb, ggc); |
| 659 } |
659 } |
| 704 |
704 |
| 705 name = gnt_tree_get_selection_data(GNT_TREE(widget)); |
705 name = gnt_tree_get_selection_data(GNT_TREE(widget)); |
| 706 |
706 |
| 707 protocol = purple_connection_get_protocol(gc); |
707 protocol = purple_connection_get_protocol(gc); |
| 708 if (protocol) |
708 if (protocol) |
| 709 realname = purple_protocol_iface_get_cuser_real_name(protocol, gc, |
709 realname = purple_protocol_chat_iface_get_user_real_name(protocol, gc, |
| 710 purple_chat_conversation_get_id( |
710 purple_chat_conversation_get_id( |
| 711 PURPLE_CHAT_CONVERSATION(fc->active_conv)), name); |
711 PURPLE_CHAT_CONVERSATION(fc->active_conv)), name); |
| 712 |
712 |
| 713 purple_im_conversation_new(account, realname ? realname : name); |
713 purple_im_conversation_new(account, realname ? realname : name); |
| 714 g_free(realname); |
714 g_free(realname); |