pidgin/gtkutils.c

branch
soc.2013.gobjectification.plugins
changeset 36633
2dcb81a189bd
parent 36626
18fc361b3704
child 36637
9b0109ae118d
equal deleted inserted replaced
36632:1f0650e7b1b5 36633:2dcb81a189bd
554 const char *protoname = NULL; 554 const char *protoname = NULL;
555 char *tmp; 555 char *tmp;
556 char *filename = NULL; 556 char *filename = NULL;
557 GdkPixbuf *pixbuf; 557 GdkPixbuf *pixbuf;
558 558
559 if (protocol->list_icon == NULL) 559 if (!PURPLE_PROTOCOL_IMPLEMENTS(protocol, list_icon))
560 return NULL; 560 return NULL;
561 561
562 protoname = purple_protocol_iface_list_icon(protocol, account, NULL); 562 protoname = purple_protocol_iface_list_icon(protocol, account, NULL);
563 if (protoname == NULL) 563 if (protoname == NULL)
564 return NULL; 564 return NULL;
915 pidgin_retrieve_user_info(conn, name); 915 pidgin_retrieve_user_info(conn, name);
916 return; 916 return;
917 } 917 }
918 918
919 protocol = purple_connection_get_protocol(conn); 919 protocol = purple_connection_get_protocol(conn);
920 if (protocol != NULL && protocol->get_cb_real_name) 920 if (protocol != NULL)
921 who = purple_protocol_iface_get_cb_real_name(protocol, conn, chat, name); 921 who = purple_protocol_iface_get_cb_real_name(protocol, conn, chat, name);
922 if (protocol == NULL || protocol->get_cb_info == NULL) { 922
923 pidgin_retrieve_user_info(conn, who ? who : name); 923 pidgin_retrieve_user_info(conn, who ? who : name);
924 g_free(who);
925 return;
926 }
927
928 show_retrieveing_info(conn, who ? who : name);
929 purple_protocol_iface_get_cb_info(protocol, conn, chat, name);
930 g_free(who); 924 g_free(who);
931 } 925 }
932 926
933 gboolean 927 gboolean
934 pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, 928 pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts,
1490 protocol = purple_connection_get_protocol(gc); 1484 protocol = purple_connection_get_protocol(gc);
1491 1485
1492 if (protocol && purple_protocol_get_options(protocol) & OPT_PROTO_IM_IMAGE) 1486 if (protocol && purple_protocol_get_options(protocol) & OPT_PROTO_IM_IMAGE)
1493 im = TRUE; 1487 im = TRUE;
1494 1488
1495 if (protocol && protocol->can_receive_file) 1489 if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, can_receive_file))
1496 ft = purple_protocol_iface_can_receive_file(protocol, gc, who); 1490 ft = purple_protocol_iface_can_receive_file(protocol, gc, who);
1497 else if (protocol && protocol->send_file) 1491 else if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, send_file))
1498 ft = TRUE; 1492 ft = TRUE;
1499 1493
1500 if (im && ft) 1494 if (im && ft)
1501 purple_request_choice(NULL, NULL, 1495 purple_request_choice(NULL, NULL,
1502 _("You have dragged an image"), 1496 _("You have dragged an image"),

mercurial