changeset 21139:0df8263c21b8

show the idle status on tooltip as well, Fixes #3744
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 04 Nov 2007 21:55:35 +0000
parents 3ee4d335247d
children 226adc219892 846e6800d956
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Sun Nov 04 19:29:26 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Sun Nov 04 21:55:35 2007 +0000
@@ -580,14 +580,20 @@
 		psm = purple_status_get_attr_string(status, "message");
 		currentmedia = purple_status_get_attr_string(status, PURPLE_TUNE_FULL);
 
-		if (!purple_presence_is_available(presence)) {
+		if (!purple_status_is_available(status)) {
 			name = purple_status_get_name(status);
 		} else {
 			name = NULL;
 		}
 
 		if (name != NULL && *name) {
-			char *tmp2 = g_markup_escape_text(name, -1);
+			char *tmp2;
+
+			if (purple_presence_is_idle(presence)) {
+				tmp2 = g_markup_printf_escaped("%s/%s", name, _("Idle"));
+			} else {
+				tmp2 = g_markup_escape_text(name, -1);
+			}
 
 			if (psm != NULL && *psm) {
 				tmp = g_markup_escape_text(psm, -1);
@@ -601,8 +607,20 @@
 		} else {
 			if (psm != NULL && *psm) {
 				tmp = g_markup_escape_text(psm, -1);
-				purple_notify_user_info_add_pair(user_info, _("Status"), tmp);
+				if (purple_presence_is_idle(presence)) {
+					purple_notify_user_info_add_pair(user_info, _("Idle"), tmp);
+				} else {
+					purple_notify_user_info_add_pair(user_info, _("Status"), tmp);
+				}
 				g_free(tmp);
+			} else {
+				if (purple_presence_is_idle(presence)) {
+					purple_notify_user_info_add_pair(user_info, _("Status"),
+						_("Idle"));
+				} else {
+					purple_notify_user_info_add_pair(user_info, _("Status"),
+						purple_status_get_name(status));
+				}
 			}
 		}