comparison libpurple/protocols/yahoo/yahoo_profile.c @ 16375:391a79778f89

Rework the buddy icon subsystem to use the imgstore subsystem, and modify the imgstore subsystem to not require IDs for everything.
author Richard Laager <rlaager@wiktel.com>
date Tue, 24 Apr 2007 03:57:07 +0000
parents 32c366eeeb99
children 24bbd7e46bfe
comparison
equal deleted inserted replaced
16374:2a19bbc743ed 16375:391a79778f89
1020 1020
1021 purple_debug_info("yahoo", "Error getting %s: %s\n", 1021 purple_debug_info("yahoo", "Error getting %s: %s\n",
1022 photo_url_text, url_text); 1022 photo_url_text, url_text);
1023 } else { 1023 } else {
1024 purple_debug_info("yahoo", "%s is %d bytes\n", photo_url_text, len); 1024 purple_debug_info("yahoo", "%s is %d bytes\n", photo_url_text, len);
1025 id = purple_imgstore_add(url_text, len, NULL); 1025 id = purple_imgstore_add_with_id(url_text, len, NULL);
1026 1026
1027 tmp = g_strdup_printf("<img id=\"%d\"><br>", id); 1027 tmp = g_strdup_printf("<img id=\"%d\"><br>", id);
1028 purple_notify_user_info_add_pair(user_info, NULL, tmp); 1028 purple_notify_user_info_add_pair(user_info, NULL, tmp);
1029 g_free(tmp); 1029 g_free(tmp);
1030 } 1030 }
1232 1232
1233 #if PHOTO_SUPPORT 1233 #if PHOTO_SUPPORT
1234 g_free(photo_url_text); 1234 g_free(photo_url_text);
1235 g_free(info2_data); 1235 g_free(info2_data);
1236 if (id != -1) 1236 if (id != -1)
1237 purple_imgstore_unref(id); 1237 purple_imgstore_unref_by_id(id);
1238 #endif 1238 #endif
1239 } 1239 }
1240 1240
1241 void yahoo_get_info(PurpleConnection *gc, const char *name) 1241 void yahoo_get_info(PurpleConnection *gc, const char *name)
1242 { 1242 {