changeset 12953:397dc3344563

[gaim-migrate @ 15306] I don't use Sametime, so I don't know if this is correct, but I'm hoping to bring the tooltip a little more in line with the other protocols. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 19 Jan 2006 19:37:37 +0000
parents 30d6ebea36e2
children aba96d7cee74
files src/protocols/sametime/sametime.c
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c	Thu Jan 19 18:39:10 2006 +0000
+++ b/src/protocols/sametime/sametime.c	Thu Jan 19 19:37:37 2006 +0000
@@ -3179,28 +3179,33 @@
   struct mwAwareIdBlock idb = { mwAware_USER, b->name, NULL };
 
   GString *str;
-  const char *tmp;
+  const char *message;
+  char *tmp = NULL;
+  const char *status;
 
   gc = b->account->gc;
   pd = gc->proto_data;
 
   str = g_string_new(NULL);
 
-  tmp = mwServiceAware_getText(pd->srvc_aware, &idb);
-  if(tmp) {
-    tmp = g_markup_escape_text(tmp, -1);
-    g_string_append_printf(str, _("\n<b>%s</b>: %s"), status_text(b), tmp);
-    g_free((char *) tmp);
-
-  } else {
-    g_string_append_printf(str, _("\n<b>Status</b>: %s"), status_text(b));
+  message = mwServiceAware_getText(pd->srvc_aware, &idb);
+  status = status_text(b);
+
+  if(message != NULL && gaim_utf8_strcasecmp(status, message)) {
+    tmp = g_markup_escape_text(message, -1);
+  }
+
+  g_string_append_printf(str, _("\n<b>Status:</b> %s"), status);
+  if(tmp != NULL) {
+    g_string_append_printf(str, _("\n<b>Message:</b> %s"), tmp);
+    g_free(tmp);
   }
 
   if(full) {
     tmp = user_supports_text(pd->srvc_aware, b->name);
     if(tmp) {
-      g_string_append_printf(str, _("\n<b>Supports</b>: %s"), tmp);
-      g_free((char *) tmp);
+      g_string_append_printf(str, _("\n<b>Supports:</b> %s"), tmp);
+      g_free(tmp);
     }
 
     if(buddy_is_external(b)) {