[gaim-migrate @ 14740]

Fri, 09 Dec 2005 05:05:06 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Fri, 09 Dec 2005 05:05:06 +0000
changeset 12433
d2ad67babd06
parent 12432
94731909e086
child 12434
4d5a0e2f9bad

[gaim-migrate @ 14740]
Show "Away Message: (pending)" in oscar tooltips when someone is
away but we haven't auto-fetched their away message yet

src/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
--- a/src/protocols/oscar/oscar.c	Fri Dec 09 04:59:04 2005 +0000
+++ b/src/protocols/oscar/oscar.c	Fri Dec 09 05:05:06 2005 +0000
@@ -7590,11 +7590,18 @@
 		status = gaim_presence_get_active_status(presence);
 		message = gaim_status_get_attr_string(status, "message");
 
-		if (message != NULL) {
-			if (gaim_status_type_get_primitive(gaim_status_get_type(status)) == GAIM_STATUS_AVAILABLE) {
+		if (gaim_status_is_available(status))
+		{
+			if (message != NULL)
+			{
 				/* Available status messages are plain text */
 				g_string_append_printf(str, "\n<b>%s:</b> %s", _("Available Message"), message);
-			} else {
+			}
+		}
+		else
+		{
+			if (message != NULL)
+			{
 				/* Away messages are HTML */
 				gchar *tmp1, *tmp2;
 				tmp2 = gaim_markup_strip_html(message);
@@ -7605,6 +7612,10 @@
 				g_string_append_printf(str, "\n<b>%s:</b> %s", _("Away Message"), tmp2);
 				g_free(tmp2);
 			}
+			else
+			{
+				g_string_append_printf(str, "\n<b>%s:</b> %s", _("Away Message"), _("(pending)"));
+			}
 		}
 	}
 

mercurial