Mercurial > pidgin.yaz
diff src/protocols/jabber/jabber.c @ 8591:f96795b786d2
[gaim-migrate @ 9342]
Alright, I had to get my tooltip construction deuglification on.
I removed the \n between the core's tooltip and the prpl's tooltip.
prpl's should PREpend a \n to each line they add to the tooltip
instead of APpending. This way you don't have to worry about
removing trailing newline... it makes a lot more sense to me.
I also changed oscar and trepia to use g_strings instead of
g_strdup_printf and g_strconcat. G strings are sexy.
And I apologize to the translators for changing some strings
(separated some html and some text).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 06 Apr 2004 02:28:01 +0000 |
parents | 72a0759a37a2 |
children | 7024b595b6ae |
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c Tue Apr 06 01:19:51 2004 +0000 +++ b/src/protocols/jabber/jabber.c Tue Apr 06 02:28:01 2004 +0000 @@ -895,7 +895,6 @@ JabberBuddy *jb = jabber_buddy_find(b->account->gc->proto_data, b->name, FALSE); GString *ret = g_string_new(""); - char *r = NULL; if(jb) { JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, NULL); @@ -915,7 +914,7 @@ else sub = _("None"); } - g_string_append_printf(ret, "<b>%s:</b> %s\n", _("Subscription"), sub); + g_string_append_printf(ret, "\n<b>%s:</b> %s", _("Subscription"), sub); if(jbr) { char *text = NULL; @@ -926,7 +925,7 @@ g_free(stripped); } - g_string_append_printf(ret, "<b>%s:</b> %s%s%s\n", + g_string_append_printf(ret, "\n<b>%s:</b> %s%s%s", _("Status"), jabber_get_state_string(jbr->state), text ? ": " : "", @@ -934,20 +933,12 @@ if(text) g_free(text); } else if(!GAIM_BUDDY_IS_ONLINE(b) && jb->error_msg) { - g_string_append_printf(ret, "<b>%s:</b> %s\n", + g_string_append_printf(ret, "\n<b>%s:</b> %s", _("Error"), jb->error_msg); } } - if(ret->len > 0) { - g_string_truncate(ret, ret->len-1); - r = ret->str; - g_string_free(ret, FALSE); - } else { - g_string_free(ret, TRUE); - } - - return r; + return g_string_free(ret, FALSE); } static GList *jabber_away_states(GaimConnection *gc)