Mercurial > pidgin.yaz
diff src/protocols/gg/gg.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 | c0f68043854a |
children | 263c2db78f77 |
line wrap: on
line diff
--- a/src/protocols/gg/gg.c Fri Jan 20 17:24:54 2006 +0000 +++ b/src/protocols/gg/gg.c Fri Jan 20 20:35:18 2006 +0000 @@ -1383,12 +1383,11 @@ } /* }}} */ -/* static char *ggp_tooltip_text(GaimBuddy *b, gboolean full) {{{ */ -static char *ggp_tooltip_text(GaimBuddy *b, gboolean full) +/* static void ggp_tooltip_text(GaimBuddy *b, GString *str, gboolean full) {{{ */ +static void ggp_tooltip_text(GaimBuddy *b, GString *str, gboolean full) { GaimStatus *status; char *text; - gchar *ret; const char *msg, *name; status = gaim_presence_get_active_status(gaim_buddy_get_presence(b)); @@ -1400,16 +1399,14 @@ text = g_markup_escape_text(tmp, -1); g_free(tmp); - ret = g_strdup_printf("\n<b>%s:</b> %s: %s", - _("Status"), name, text); + g_string_append_printf(str, "\n<b>%s:</b> %s: %s", + _("Status"), name, text); g_free(text); } else { - ret = g_strdup_printf("\n<b>%s:</b> %s", - _("Status"), name); + g_string_append_printf(str, "\n<b>%s:</b> %s", + _("Status"), name); } - - return ret; } /* }}} */