diff pidgin/gtkblist.c @ 15524:84b3ab83df35

Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
author Sean Egan <seanegan@gmail.com>
date Sun, 04 Feb 2007 02:31:04 +0000
parents 535f002e7b0f
children 82e3cff11243
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat Feb 03 23:32:43 2007 +0000
+++ b/pidgin/gtkblist.c	Sun Feb 04 02:31:04 2007 +0000
@@ -2977,6 +2977,10 @@
 	const char *name = NULL;
 	char *filename, *path;
 	GdkPixbuf *ret;
+	GaimPresence *p;
+
+
+
 	if(GAIM_BLIST_NODE_IS_CONTACT(node)) {
 		if(!gtknode->contact_expanded) {
 			buddy = gaim_contact_get_priority_buddy((GaimContact*)node);
@@ -2995,7 +2999,17 @@
 	
 	if (!gaim_privacy_check(buddy->account, gaim_buddy_get_name(buddy))) {
 		path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emblems", "16", "blocked.png", NULL);
-		return gdk_pixbuf_new_from_file(path, NULL);	
+		ret = gdk_pixbuf_new_from_file(path, NULL);
+		g_free(path);
+		return ret;
+	}
+	
+	p = gaim_buddy_get_presence(buddy);
+	if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_MOBILE)) {
+		path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emblems", "16", "mobile.png", NULL);
+		ret = gdk_pixbuf_new_from_file(path, NULL);
+		g_free(path);
+		return ret;	
 	}
 
 	prpl = gaim_find_prpl(gaim_account_get_protocol_id(buddy->account));