If buddy doesn't have a picture, display no icon, instead of the "no photo" icon that MySpaceIM soc.2007.msimprpl

Thu, 23 Aug 2007 06:10:21 +0000

author
Jeff Connelly <jeff2@soc.pidgin.im>
date
Thu, 23 Aug 2007 06:10:21 +0000
branch
soc.2007.msimprpl
changeset 19529
e64a036833ed
parent 19528
158870ab9228
child 19530
6ced4ef3e757

If buddy doesn't have a picture, display no icon, instead of the "no photo" icon that MySpaceIM
provides.

libpurple/protocols/myspace/myspace.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/myspace/myspace.c	Thu Aug 23 06:02:54 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Thu Aug 23 06:10:21 2007 +0000
@@ -2703,6 +2703,15 @@
 		const gchar *previous_url;
 
 		user->image_url = g_strdup(value_str);
+
+		/* Instead of showing 'no photo' picture, show nothing. */
+		if (!strcmp(user->image_url, "http://x.myspace.com/images/no_pic.gif"))
+		{
+			purple_buddy_icons_set_for_user(user->buddy->account,
+				user->buddy->name,
+				NULL, 0, NULL);
+			return;
+		}
 		
 		previous_url = purple_buddy_icons_get_checksum_for_user(user->buddy);
 

mercurial