| 1450 buddy_icon_set_cb(const char *filename, PidginStatusBox *box) |
1450 buddy_icon_set_cb(const char *filename, PidginStatusBox *box) |
| 1451 { |
1451 { |
| 1452 PurpleStoredImage *img = NULL; |
1452 PurpleStoredImage *img = NULL; |
| 1453 |
1453 |
| 1454 if (box->account) { |
1454 if (box->account) { |
| 1455 PurplePlugin *plug = purple_find_prpl(purple_account_get_protocol_id(box->account)); |
1455 PurplePlugin *plug = purple_find_protocol_info(purple_account_get_protocol_id(box->account)); |
| 1456 if (plug) { |
1456 if (plug) { |
| 1457 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); |
1457 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); |
| 1458 if (prplinfo && prplinfo->icon_spec.format) { |
1458 if (prplinfo && prplinfo->icon_spec.format) { |
| 1459 gpointer data = NULL; |
1459 gpointer data = NULL; |
| 1460 size_t len = 0; |
1460 size_t len = 0; |
| 1475 } |
1475 } |
| 1476 } else { |
1476 } else { |
| 1477 GList *accounts; |
1477 GList *accounts; |
| 1478 for (accounts = purple_accounts_get_all(); accounts != NULL; accounts = accounts->next) { |
1478 for (accounts = purple_accounts_get_all(); accounts != NULL; accounts = accounts->next) { |
| 1479 PurpleAccount *account = accounts->data; |
1479 PurpleAccount *account = accounts->data; |
| 1480 PurplePlugin *plug = purple_find_prpl(purple_account_get_protocol_id(account)); |
1480 PurplePlugin *plug = purple_find_protocol_info(purple_account_get_protocol_id(account)); |
| 1481 if (plug) { |
1481 if (plug) { |
| 1482 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); |
1482 PurplePluginProtocolInfo *prplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(plug); |
| 1483 if (prplinfo != NULL && |
1483 if (prplinfo != NULL && |
| 1484 purple_account_get_bool(account, "use-global-buddyicon", TRUE) && |
1484 purple_account_get_bool(account, "use-global-buddyicon", TRUE) && |
| 1485 prplinfo->icon_spec.format) { |
1485 prplinfo->icon_spec.format) { |