Mercurial > pidgin
comparison libpurple/protocols/msn/msn.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 | 4fc51a87ce42 |
comparison
equal
deleted
inserted
replaced
16374:2a19bbc743ed | 16375:391a79778f89 |
---|---|
1867 } | 1867 } |
1868 else | 1868 else |
1869 { | 1869 { |
1870 char buf[1024]; | 1870 char buf[1024]; |
1871 purple_debug_info("msn", "%s is %d bytes\n", photo_url_text, len); | 1871 purple_debug_info("msn", "%s is %d bytes\n", photo_url_text, len); |
1872 id = purple_imgstore_add(url_text, len, NULL); | 1872 id = purple_imgstore_add_with_id(url_text, len, NULL); |
1873 g_snprintf(buf, sizeof(buf), "<img id=\"%d\"><br>", id); | 1873 g_snprintf(buf, sizeof(buf), "<img id=\"%d\"><br>", id); |
1874 purple_notify_user_info_prepend_pair(user_info, NULL, buf); | 1874 purple_notify_user_info_prepend_pair(user_info, NULL, buf); |
1875 } | 1875 } |
1876 } | 1876 } |
1877 | 1877 |
1886 g_free(info_data); | 1886 g_free(info_data); |
1887 #if PHOTO_SUPPORT | 1887 #if PHOTO_SUPPORT |
1888 g_free(photo_url_text); | 1888 g_free(photo_url_text); |
1889 g_free(info2_data); | 1889 g_free(info2_data); |
1890 if (id != -1) | 1890 if (id != -1) |
1891 purple_imgstore_unref(id); | 1891 purple_imgstore_unref_by_id(id); |
1892 #endif | 1892 #endif |
1893 } | 1893 } |
1894 | 1894 |
1895 static void | 1895 static void |
1896 msn_get_info(PurpleConnection *gc, const char *name) | 1896 msn_get_info(PurpleConnection *gc, const char *name) |