changeset 10063:4b4975b2b1d5

[gaim-migrate @ 11038] this lets you see who you have blocked and who doesn't have you on your list as emblems for msn. it looks like its extendable to the other protocols? thanks to Fernando Herrera for this. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 27 Sep 2004 02:50:48 +0000
parents b6178d85d132
children 467144765989
files COPYRIGHT pixmaps/status/default/Makefile.am src/protocols/msn/msn.c
diffstat 3 files changed, 35 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sun Sep 26 16:17:09 2004 +0000
+++ b/COPYRIGHT	Mon Sep 27 02:50:48 2004 +0000
@@ -67,10 +67,11 @@
 Michael Golden
 Ryan C. Gordon
 Christian Hammond
-Benjamin Herrenschmidt
 Andy Harrison
 G. Sumner Hayes
 Mike Heffner
+Benjamin Herrenschmidt
+Fernando Herrera
 Casey Ho
 Iain Holmes
 Karsten Huneycutt
--- a/pixmaps/status/default/Makefile.am	Sun Sep 26 16:17:09 2004 +0000
+++ b/pixmaps/status/default/Makefile.am	Mon Sep 27 02:50:48 2004 +0000
@@ -36,7 +36,9 @@
 	voice.png \
 	wireless.png \
 	yahoo.png \
-	zephyr.png
+	zephyr.png \
+	blocked.png \
+	nr.png
 
 gaimstatuspixdir = $(datadir)/pixmaps/gaim/status/default
 
--- a/src/protocols/msn/msn.c	Sun Sep 26 16:17:09 2004 +0000
+++ b/src/protocols/msn/msn.c	Mon Sep 27 02:50:48 2004 +0000
@@ -394,13 +394,30 @@
 	MsnUser *user;
 	GaimPresence *presence;
 	const char *emblems[4] = { NULL, NULL, NULL, NULL };
-	int i = 0;
+	int i = 1;
 
 	user = b->proto_data;
 	presence = gaim_buddy_get_presence(b);
 
+	if (user == NULL)
+	{
+		emblems[0] = "offline";
+	}
+	else
+	{
+		if (!(user->list_op & (1 << MSN_LIST_RL)))
+			emblems[0] = "nr";
+		if (user->list_op & (1 << MSN_LIST_BL))
+			emblems[i++] = "blocked";
+		if (user->mobile)
+			emblems[i++] = "wireless";
+	}
+
 	if (!gaim_presence_is_online(presence))
-		emblems[i++] = "offline";
+	{
+		if (emblems[0] == NULL)
+			emblems[0] = "offline";
+	}
 	else if (gaim_presence_is_status_active(presence, "busy") ||
 			 gaim_presence_is_status_active(presence, "phone"))
 		emblems[i++] = "occupied";
@@ -408,13 +425,6 @@
 			 gaim_presence_is_idle(presence))
 		emblems[i++] = "away";
 
-	if (user == NULL)
-	{
-		emblems[0] = "offline";
-	}
-	else if (user->mobile)
-		emblems[i++] = "wireless";
-
 	*se = emblems[0];
 	*sw = emblems[1];
 	*nw = emblems[2];
@@ -456,9 +466,17 @@
 							   _("Idle") : gaim_status_get_name(status));
 	}
 
-	g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Has you"),
-						   (user->list_op & (1 << MSN_LIST_RL)) ?
-						   _("Yes") : _("No"));
+	if (user)
+	{
+		g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Has you"),
+							   (user->list_op & (1 << MSN_LIST_RL)) ?
+							   _("Yes") : _("No"));
+
+		g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Blocked"),
+							   (user->list_op & (1 << MSN_LIST_BL)) ?
+							   _("Yes") : _("No"));
+	}
+
 
 	return g_string_free(s, FALSE);
 }