changeset 1285:f8557a227369

[gaim-migrate @ 1295] Connect the dots, la la la la committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 15 Dec 2000 02:13:44 +0000
parents ea91dbf089db
children cfa8aa50df83
files plugins/msn/msn.c plugins/msn/pixmaps/Makefile.am plugins/msn/pixmaps/msn_away.xpm
diffstat 3 files changed, 145 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/msn/msn.c	Fri Dec 15 01:31:35 2000 +0000
+++ b/plugins/msn/msn.c	Fri Dec 15 02:13:44 2000 +0000
@@ -39,6 +39,7 @@
 #include "md5.h"
 
 #include "pixmaps/msn_online.xpm"
+#include "pixmaps/msn_away.xpm"
 
 #define MSN_BUF_LEN 4096
 
@@ -338,44 +339,40 @@
 	}
 
 	if (strcasecmp(resps[0], "FLN") == 0) {
-		serv_got_update(gc, resps[1], 0, 0, 0, 0, MSN_OFFLINE, 0);
+		serv_got_update(gc, resps[1], 0, 0, 0, 0, 0, 0);
 	}
 
-	if (strcasecmp(resps[0], "ILN") == 0) {
+	/* Check buddy update status */
+	if ( (strcasecmp(resps[0], "NLN") == 0) || (strcasecmp(resps[0], "ILN") == 0)) {
 		int status;
+		int query;
 
-		if (!strcasecmp(resps[2], "NLN"))
-			status = MSN_ONLINE;
-		else if (!strcasecmp(resps[2], "BSY"))
-			status = MSN_BUSY;
-		else if (!strcasecmp(resps[2], "IDL"))
-			status = MSN_IDLE;
-		else if (!strcasecmp(resps[2], "BRB"))
-			status = MSN_BRB;
-		else if (!strcasecmp(resps[2], "AWY"))
-			status = MSN_AWAY;
-		else if (!strcasecmp(resps[2], "PHN"))
-			status = MSN_PHONE;
-		else if (!strcasecmp(resps[2], "LUN"))
-			status = MSN_LUNCH;
+		if (strcasecmp(resps[0], "NLN") == 0) 
+			query = 1;
 		else
-			status = MSN_ONLINE;
+			query = 2;
+		
+		if (!strcasecmp(resps[query], "NLN"))
+			status = UC_NORMAL;
+		else if (!strcasecmp(resps[query], "BSY"))
+			status = UC_NORMAL | (MSN_BUSY << 5);
+		else if (!strcasecmp(resps[query], "IDL"))
+			status = UC_NORMAL | (MSN_IDLE << 5);
+		else if (!strcasecmp(resps[query], "BRB"))
+			status = UC_NORMAL | (MSN_BRB << 5);
+		else if (!strcasecmp(resps[query], "AWY"))
+			status = UC_UNAVAILABLE;
+		else if (!strcasecmp(resps[query], "PHN"))
+			status = UC_NORMAL | (MSN_PHONE << 5);
+		else if (!strcasecmp(resps[query], "LUN"))
+			status = UC_NORMAL | (MSN_LUNCH << 5);
+		else
+			status = UC_NORMAL;
 
-		serv_got_update(gc, resps[3], 1, 0, 0, 0, status, 0);
+		serv_got_update(gc, resps[query+1], 1, 0, 0, 0, status, 0);
 
 		g_strfreev(resps);
 		return;
-
-	}
-
-	/* Check buddy update status */
-	if (strcasecmp(resps[0], "NLN") == 0) {
-		/* FIXME: We currently dont care if they are busy,
-		 * idle, brb, away, phone, our out to lunch. This will
-		 * be supported eventually (BSY,IDL,BRB,AWY,PHN,LUN) 
-		 * respectively */
-
-		serv_got_update(gc, resps[2], 1, 0, 0, 0, MSN_ONLINE, 0);
 	}
 
 	/* Check to see if we have an incoming buddylist */
@@ -809,8 +806,14 @@
 
 }
 
-static char **msn_list_icon(int status)
+static char **msn_list_icon(int uc)
 {
+	if (uc == UC_UNAVAILABLE)
+		return msn_away_xpm;
+	else if (uc == UC_NORMAL)
+		return msn_online_xpm;
+
+	/* Our default online icon */
 	return msn_online_xpm;
 }
 
--- a/plugins/msn/pixmaps/Makefile.am	Fri Dec 15 01:31:35 2000 +0000
+++ b/plugins/msn/pixmaps/Makefile.am	Fri Dec 15 02:13:44 2000 +0000
@@ -1,3 +1,4 @@
-EXTRA_DIST =	msn_online.xpm
+EXTRA_DIST =	msn_online.xpm	\
+		msn_away.xpm
 
-pixmapdir = $(datadir)/pixmaps
+pixmapdir = $(datadir)/pixmaps 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/msn/pixmaps/msn_away.xpm	Fri Dec 15 02:13:44 2000 +0000
@@ -0,0 +1,109 @@
+/* XPM */
+static char *msn_away_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"12 12 91 1",
+"  c Gray0",
+". c #193273",
+"X c #1b3777",
+"o c #293a61",
+"O c #2d4553",
+"+ c #3a5356",
+"@ c #36586d",
+"# c #3e5764",
+"$ c #3c5475",
+"% c #306b74",
+"& c #3a617a",
+"* c #7f402e",
+"= c Gray25",
+"- c Gray26",
+"; c #425163",
+": c #46667c",
+"> c #506c73",
+", c #567d7a",
+"< c #617550",
+"1 c #60736e",
+"2 c #627469",
+"3 c #65756a",
+"4 c #114092",
+"5 c #1f4ba7",
+"6 c #2d5489",
+"7 c #325286",
+"8 c #365988",
+"9 c #3e5584",
+"0 c #3b578b",
+"q c #3b588e",
+"w c #385a99",
+"e c #3a5d98",
+"r c #3f6aa3",
+"t c #3261bf",
+"y c #3d72a2",
+"u c #3874be",
+"i c #225ac5",
+"p c #2f60cf",
+"a c #3f7ac5",
+"s c #496988",
+"d c #54758a",
+"f c #5f7e8e",
+"g c #7e8676",
+"h c #788e7a",
+"j c #749474",
+"k c #4e9e80",
+"l c #5f809e",
+"z c #5a81a7",
+"x c #5d86a7",
+"c c #63b895",
+"v c #77a0af",
+"b c #7aa4a7",
+"n c #69a5c1",
+"m c #7cc5b8",
+"M c #9b2f00",
+"N c #95370b",
+"B c #873720",
+"V c #b1743d",
+"C c #9e6f58",
+"Z c #af7058",
+"A c #b77750",
+"S c #d7512a",
+"D c #d7532c",
+"F c #d85630",
+"G c #dc6846",
+"H c #d97f63",
+"J c #829f6d",
+"K c #90b87f",
+"L c #b89766",
+"P c #dd886f",
+"I c #909090",
+"U c #8bab8f",
+"Y c #88a99e",
+"T c #b7b7b7",
+"R c #9bce90",
+"E c #99c2bd",
+"W c #b0c696",
+"Q c #abeabe",
+"! c #e79780",
+"~ c #e4a488",
+"^ c #f0beaf",
+"/ c #f2c6b9",
+"( c #f6d6cd",
+") c #ede7e5",
+"_ c #efefef",
+"` c Gray94",
+"' c #fcf4f1",
+"] c #f9f9f9",
+"[ c Gray98",
+"{ c Gray100",
+"} c None",
+/* pixels */
+"}}}}}}J<g}}}",
+"}}}}}RWhO;}}",
+"}}}}cQExw.}}",
+"}}}}kmnap5}}",
+"}}}},%yti4}}",
+"}}}}}+@70}}}",
+"}G!BPVKj2}}}",
+"D({=)~LU>#}}",
+"F]_=`^AYf$&}",
+"FT=I]^Zbl9r6",
+"S/{{'HCvzqeu",
+"}1*MN3ds8Xo:"
+};