Mercurial > pidgin
changeset 9244:e67b8cd33c6c
[gaim-migrate @ 10043]
A patch from Tom Samstag to show "Info for somebody" in
the buddy info results for AIM and ICQ.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 09 Jun 2004 03:40:33 +0000 |
parents | a9151be6fe1a |
children | 9b138ebf9ca8 |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Wed Jun 09 01:54:59 2004 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jun 09 03:40:33 2004 +0000 @@ -3792,18 +3792,21 @@ switch(reason) { case 0x0003: { /* Reply from an ICQ status message request */ - char *status_msg = oscar_icqstatus(state); - char *dialog_msg, **splitmsg; + char *title, *statusmsg, **splitmsg, *dialogmsg; + + title = g_strdup_printf(_("Info for %s"), who); /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ + statusmsg = oscar_icqstatus(state); splitmsg = g_strsplit(msg, "\r\n", 0); - - dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<HR>%s"), who, status_msg, g_strjoinv("<BR>", splitmsg)); - gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, dialog_msg, NULL, NULL); - - g_free(status_msg); - g_free(dialog_msg); + dialogmsg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<HR>%s"), who, statusmsg, g_strjoinv("<BR>", splitmsg)); + g_free(statusmsg); g_strfreev(splitmsg); + + gaim_notify_formatted(gc, title, _("Buddy Information"), NULL, dialogmsg, NULL, NULL); + + g_free(title); + g_free(dialogmsg); } break; default: { @@ -3965,7 +3968,7 @@ GaimConnection *gc = sess->aux_data; GaimAccount *account = gaim_connection_get_account(gc); GString *str; - gchar *tmp = NULL, *info_utf8 = NULL, *away_utf8 = NULL; + gchar *tmp = NULL, *info_utf8 = NULL, *away_utf8 = NULL, *title = NULL; va_list ap; aim_userinfo_t *userinfo; @@ -4015,7 +4018,9 @@ tmp = gaim_str_sub_away_formatters(str->str, gaim_account_get_username(account)); g_string_free(str, TRUE); - gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, tmp, NULL, NULL); + title = g_strdup_printf(_("Info for %s"), userinfo->sn); + gaim_notify_formatted(gc, title, _("Buddy Information"), NULL, tmp, NULL, NULL); + g_free(title); g_free(tmp); return 1;