Mercurial > pidgin
diff src/protocols/oscar/oscar.c @ 7091:7b31e3e22f59
[gaim-migrate @ 7656]
Replace %n, %t and %d in away messages in both the tooltip and the
notification window.
Also recognize an odd capability for Robot101 :-)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 01 Oct 2003 01:37:59 +0000 |
parents | 3100a6e03644 |
children | 3650612c7daa |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Tue Sep 30 23:35:25 2003 +0000 +++ b/src/protocols/oscar/oscar.c Wed Oct 01 01:37:59 2003 +0000 @@ -3131,7 +3131,7 @@ static int gaim_parse_userinfo(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; GString *text; - char *info_utf8 = NULL, *away_utf8 = NULL; + gchar *info_utf8 = NULL, *away_utf8 = NULL, *final = NULL; va_list ap; aim_userinfo_t *userinfo; @@ -3174,8 +3174,10 @@ } } - gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, text->str, NULL, NULL); + final = away_subs(text->str, gaim_connection_get_display_name(gc)); g_string_free(text, TRUE); + gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, final, NULL, NULL); + g_free(final); return 1; } @@ -5412,14 +5414,16 @@ if ((userinfo != NULL) && (userinfo->flags & AIM_FLAG_AWAY) && (userinfo->away_len > 0) && (userinfo->away != NULL) && (userinfo->away_encoding != NULL)) { gchar *away_utf8 = oscar_encoding_to_utf8(userinfo->away_encoding, userinfo->away, userinfo->away_len); if (away_utf8 != NULL) { - gchar *withcr, *nohtml; - withcr = gaim_strreplace(away_utf8, "<BR>", "\n"); - nohtml = strip_html(withcr); - g_free(withcr); + gchar *tmp1, *tmp2; + tmp1 = gaim_strreplace(away_utf8, "<BR>", "\n"); + tmp2 = strip_html(tmp1); + g_free(tmp1); + tmp1 = away_subs(tmp2, gaim_connection_get_display_name(gc)); + g_free(tmp2); tmp = ret; - ret = g_strconcat(tmp, _("<b>Away Message:</b> "), nohtml, "\n", NULL); + ret = g_strconcat(tmp, _("<b>Away Message:</b> "), tmp1, "\n", NULL); free(tmp); - g_free(nohtml); + g_free(tmp1); g_free(away_utf8); } }