diff src/protocols/sametime/sametime.c @ 12970:ec9b92104904

[gaim-migrate @ 15323] Pass the tooltip GString to the prpls. This make the prpl tooltip_text consistent with the drawing-tooltip signal callbacks. It also eliminates a little bit of duplicated code from the prpls. It's also theoretically more efficient, but I'm sure the difference is irrelevant. However, this change will allow me to kill a bunch more duplicated code. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 20 Jan 2006 20:35:18 +0000
parents aba96d7cee74
children eb64b2b26e56
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c	Fri Jan 20 17:24:54 2006 +0000
+++ b/src/protocols/sametime/sametime.c	Fri Jan 20 20:35:18 2006 +0000
@@ -3173,12 +3173,11 @@
 }
 
 
-static char *mw_prpl_tooltip_text(GaimBuddy *b, gboolean full) {
+static void mw_prpl_tooltip_text(GaimBuddy *b, GString *str, gboolean full) {
   GaimConnection *gc;
   struct mwGaimPluginData *pd;
   struct mwAwareIdBlock idb = { mwAware_USER, b->name, NULL };
 
-  GString *str;
   const char *message;
   const char *status;
   char *tmp;
@@ -3186,8 +3185,6 @@
   gc = b->account->gc;
   pd = gc->proto_data;
 
-  str = g_string_new(NULL);
-
   message = mwServiceAware_getText(pd->srvc_aware, &idb);
   status = status_text(b);
 
@@ -3211,8 +3208,6 @@
       g_string_append(str, _("\n<b>External User</b>"));
     }
   }
-
-  return g_string_free(str, FALSE);
 }