Mercurial > pidgin.yaz
diff src/protocols/bonjour/bonjour.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 | 82e918444965 |
children | 6332531e14a7 |
line wrap: on
line diff
--- a/src/protocols/bonjour/bonjour.c Fri Jan 20 17:24:54 2006 +0000 +++ b/src/protocols/bonjour/bonjour.c Fri Jan 20 20:35:18 2006 +0000 @@ -306,10 +306,9 @@ return NULL; } -static char * -bonjour_tooltip_text(GaimBuddy *buddy, gboolean full) +static void +bonjour_tooltip_text(GaimBuddy *buddy, GString *str, gboolean full) { - GString *ret; GaimPresence *presence; GaimStatus *status; const char *status_description; @@ -326,12 +325,9 @@ else status_description = gaim_status_get_name(status); - ret = g_string_new(""); - g_string_append_printf(ret, _("\n<b>Status:</b> %s"), status_description); + g_string_append_printf(str, _("\n<b>Status:</b> %s"), status_description); if (message != NULL) - g_string_append_printf(ret, _("\n<b>Message:</b> %s"), message); - - return g_string_free(ret, FALSE); + g_string_append_printf(str, _("\n<b>Message:</b> %s"), message); } static gboolean