# HG changeset patch # User Luke Schierer # Date 1096253448 0 # Node ID 4b4975b2b1d5d4e0774894ddf6d52fcc2a0277b0 # Parent b6178d85d132ea2b989f5c679a1c6961643101d6 [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 diff -r b6178d85d132 -r 4b4975b2b1d5 COPYRIGHT --- 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 diff -r b6178d85d132 -r 4b4975b2b1d5 pixmaps/status/default/Makefile.am --- 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 diff -r b6178d85d132 -r 4b4975b2b1d5 src/protocols/msn/msn.c --- 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%s: %s"), _("Has you"), - (user->list_op & (1 << MSN_LIST_RL)) ? - _("Yes") : _("No")); + if (user) + { + g_string_append_printf(s, _("\n%s: %s"), _("Has you"), + (user->list_op & (1 << MSN_LIST_RL)) ? + _("Yes") : _("No")); + + g_string_append_printf(s, _("\n%s: %s"), _("Blocked"), + (user->list_op & (1 << MSN_LIST_BL)) ? + _("Yes") : _("No")); + } + return g_string_free(s, FALSE); }