Mercurial > pidgin.yaz
changeset 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 | 04f9f7440bc3 |
children | f89146deac3d |
files | src/protocols/oscar/aim.h src/protocols/oscar/locate.c src/protocols/oscar/oscar.c |
diffstat | 3 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h Tue Sep 30 23:35:25 2003 +0000 +++ b/src/protocols/oscar/aim.h Wed Oct 01 01:37:59 2003 +0000 @@ -1031,10 +1031,8 @@ #define AIM_CAPS_HIPTOP 0x00100000 #define AIM_CAPS_SECUREIM 0x00200000 #define AIM_CAPS_SMS 0x00400000 -#define AIM_CAPS_APPLESOMETHIN1 0x00800000 -#define AIM_CAPS_APPLESOMETHIN2 0x01000000 -#define AIM_CAPS_APPLESOMETHIN3 0x02000000 -#define AIM_CAPS_LAST 0x04000000 +#define AIM_CAPS_GENERICUNKNOWN 0x00800000 +#define AIM_CAPS_LAST 0x01000000 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1
--- a/src/protocols/oscar/locate.c Tue Sep 30 23:35:25 2003 +0000 +++ b/src/protocols/oscar/locate.c Wed Oct 01 01:37:59 2003 +0000 @@ -47,15 +47,15 @@ {0x09, 0x46, 0x01, 0xff, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, - {AIM_CAPS_APPLESOMETHIN1, + {AIM_CAPS_GENERICUNKNOWN, {0x09, 0x46, 0xf0, 0x03, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, - {AIM_CAPS_APPLESOMETHIN2, + {AIM_CAPS_GENERICUNKNOWN, {0x09, 0x46, 0xf0, 0x04, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, - {AIM_CAPS_APPLESOMETHIN3, + {AIM_CAPS_GENERICUNKNOWN, {0x09, 0x46, 0xf0, 0x05, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, @@ -156,10 +156,10 @@ {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}, - /* supposed to be ICQRTF? - {AIM_CAPS_TRILLUNKNOWN, + /* This is added by the servers and it only shows up for ourselves... */ + {AIM_CAPS_GENERICUNKNOWN, {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, - 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x09}}, */ + 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x09}}, {AIM_CAPS_APINFO, {0xaa, 0x4a, 0x32, 0xb5, 0xf8, 0x84, 0x48, 0xc6,
--- 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); } }