Mercurial > pidgin
diff src/gtkblist.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 | 03679a4db953 |
children | 7bd4dbf26c00 |
line wrap: on
line diff
--- a/src/gtkblist.c Fri Jan 20 17:24:54 2006 +0000 +++ b/src/gtkblist.c Fri Jan 20 20:35:18 2006 +0000 @@ -2698,6 +2698,7 @@ /* Offline? */ + /* FIXME: Why is this status special-cased by the core? -- rlaager */ if (!GAIM_BUDDY_IS_ONLINE(b)) { g_string_append_printf(str, _("\n<b>Status:</b> Offline")); } @@ -2705,19 +2706,7 @@ if (prpl_info && prpl_info->tooltip_text) { /* Additional text from the PRPL */ - const char *end; - tmp = prpl_info->tooltip_text(b, full); - - if (tmp && !g_utf8_validate(tmp, -1, &end)) - { - char *new = g_strndup(tmp, g_utf8_pointer_to_offset(tmp, end)); - g_free(tmp); - tmp = new; - } - - if (tmp != NULL) - g_string_append(str, tmp); - g_free(tmp); + prpl_info->tooltip_text(b, str, full); } /* These are Easter Eggs. Patches to remove them will be rejected. */