Mercurial > pidgin.yaz
changeset 32362:57d43a9a4e7e
merge of '01dbf4adfbd244ad73e7c0a6850a5bcc9d0b9582'
and '7d17d6b03c98b91ec1f90c5f17f7c923973f2e2c'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 21 Aug 2011 21:27:17 +0000 |
parents | dc3ea8f6381a (diff) 93cb9f408df4 (current diff) |
children | 3322201b446f |
files | |
diffstat | 7 files changed, 29 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/irc/msgs.c Sun Aug 21 21:27:17 2011 +0000 @@ -357,39 +357,35 @@ g_free(tmp); if (irc->whois.away) { - tmp = g_markup_escape_text(irc->whois.away, strlen(irc->whois.away)); + purple_notify_user_info_add_pair_plaintext(user_info, _("Away"), irc->whois.away); g_free(irc->whois.away); - purple_notify_user_info_add_pair(user_info, _("Away"), tmp); - g_free(tmp); } if (irc->whois.userhost) { - tmp = g_markup_escape_text(irc->whois.name, strlen(irc->whois.name)); + purple_notify_user_info_add_pair_plaintext(user_info, _("Username"), irc->whois.userhost); + purple_notify_user_info_add_pair_plaintext(user_info, _("Real name"), irc->whois.name); + g_free(irc->whois.userhost); g_free(irc->whois.name); - purple_notify_user_info_add_pair(user_info, _("Username"), irc->whois.userhost); - purple_notify_user_info_add_pair(user_info, _("Real name"), tmp); - g_free(irc->whois.userhost); - g_free(tmp); } if (irc->whois.server) { tmp = g_strdup_printf("%s (%s)", irc->whois.server, irc->whois.serverinfo); - purple_notify_user_info_add_pair(user_info, _("Server"), tmp); + purple_notify_user_info_add_pair_plaintext(user_info, _("Server"), tmp); g_free(tmp); g_free(irc->whois.server); g_free(irc->whois.serverinfo); } if (irc->whois.channels) { - purple_notify_user_info_add_pair(user_info, _("Currently on"), irc->whois.channels->str); + purple_notify_user_info_add_pair_plaintext(user_info, _("Currently on"), irc->whois.channels->str); g_string_free(irc->whois.channels, TRUE); } if (irc->whois.idle) { gchar *timex = purple_str_seconds_to_string(irc->whois.idle); - purple_notify_user_info_add_pair(user_info, _("Idle for"), timex); + purple_notify_user_info_add_pair_plaintext(user_info, _("Idle for"), timex); g_free(timex); - purple_notify_user_info_add_pair(user_info, + purple_notify_user_info_add_pair_plaintext(user_info, _("Online since"), purple_date_format_full(localtime(&irc->whois.signon))); } - if (!strcmp(irc->whois.nick, "Paco-Paco")) { - purple_notify_user_info_add_pair(user_info, + if (!strcmp(irc->whois.nick, "elb")) { + purple_notify_user_info_add_pair_plaintext(user_info, _("<b>Defining adjective:</b>"), _("Glorious")); }
--- a/libpurple/protocols/jabber/jabber.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Aug 21 21:27:17 2011 +0000 @@ -2238,7 +2238,7 @@ gchar *idle_str = purple_str_seconds_to_string(time(NULL) - jbr->idle); label = g_strdup_printf("%s%s", _("Idle"), (res ? res : "")); - purple_notify_user_info_add_pair(user_info, label, idle_str); + purple_notify_user_info_add_pair_plaintext(user_info, label, idle_str); g_free(idle_str); g_free(label); }
--- a/libpurple/protocols/myspace/user.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/myspace/user.c Sun Aug 21 21:27:17 2011 +0000 @@ -117,27 +117,27 @@ /* Useful to identify the account the tooltip refers to. * Other prpls show this. */ if (user->username) { - purple_notify_user_info_add_pair(user_info, _("User"), user->username); + purple_notify_user_info_add_pair_plaintext(user_info, _("User"), user->username); } /* a/s/l...the vitals */ if (user->age) { char age[16]; g_snprintf(age, sizeof(age), "%d", user->age); - purple_notify_user_info_add_pair(user_info, _("Age"), age); + purple_notify_user_info_add_pair_plaintext(user_info, _("Age"), age); } if (user->gender && *user->gender) { - purple_notify_user_info_add_pair(user_info, _("Gender"), user->gender); + purple_notify_user_info_add_pair_plaintext(user_info, _("Gender"), user->gender); } if (user->location && *user->location) { - purple_notify_user_info_add_pair(user_info, _("Location"), user->location); + purple_notify_user_info_add_pair_plaintext(user_info, _("Location"), user->location); } /* Other information */ if (user->headline && *user->headline) { - purple_notify_user_info_add_pair(user_info, _("Headline"), user->headline); + purple_notify_user_info_add_pair_plaintext(user_info, _("Headline"), user->headline); } if (user->buddy != NULL) { @@ -153,7 +153,7 @@ str = msim_format_now_playing(artist, title); if (str && *str) { - purple_notify_user_info_add_pair(user_info, _("Song"), str); + purple_notify_user_info_add_pair_plaintext(user_info, _("Song"), str); } g_free(str); } @@ -163,7 +163,7 @@ if (user->total_friends) { char friends[16]; g_snprintf(friends, sizeof(friends), "%d", user->total_friends); - purple_notify_user_info_add_pair(user_info, _("Total Friends"), friends); + purple_notify_user_info_add_pair_plaintext(user_info, _("Total Friends"), friends); } if (full) { @@ -181,7 +181,7 @@ client = g_strdup_printf("Build %d", cv); } if (client && *client) - purple_notify_user_info_add_pair(user_info, _("Client Version"), client); + purple_notify_user_info_add_pair_plaintext(user_info, _("Client Version"), client); g_free(client); }
--- a/libpurple/protocols/sametime/sametime.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sun Aug 21 21:27:17 2011 +0000 @@ -3334,9 +3334,7 @@ status = status_text(b); if(message != NULL && g_utf8_validate(message, -1, NULL) && purple_utf8_strcasecmp(status, message)) { - tmp = g_markup_escape_text(message, -1); - purple_notify_user_info_add_pair(user_info, status, tmp); - g_free(tmp); + purple_notify_user_info_add_pair_plaintext(user_info, status, message); } else { purple_notify_user_info_add_pair(user_info, _("Status"), status); @@ -3350,7 +3348,7 @@ } if(buddy_is_external(b)) { - purple_notify_user_info_add_pair(user_info, NULL, _("External User")); + purple_notify_user_info_add_pair_plaintext(user_info, NULL, _("External User")); } } }
--- a/libpurple/protocols/yahoo/libymsg.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sun Aug 21 21:27:17 2011 +0000 @@ -4036,22 +4036,12 @@ if (f && full) { YahooPersonalDetails *ypd = &f->ypd; - int i; - struct { - char *id; - char *text; - char *value; - } yfields[] = { - {"hp", N_("Home Phone Number"), ypd->phone.home}, - {"wp", N_("Work Phone Number"), ypd->phone.work}, - {"mo", N_("Mobile Phone Number"), ypd->phone.mobile}, - {NULL, NULL, NULL} - }; - for (i = 0; yfields[i].id; i++) { - if (!yfields[i].value || !*yfields[i].value) - continue; - purple_notify_user_info_add_pair(user_info, _(yfields[i].text), yfields[i].value); - } + if (ypd->phone.home && *ypd->phone.home) + purple_notify_user_info_add_pair_plaintext(user_info, _("Home Phone Number"), ypd->phone.home); + if (ypd->phone.work && *ypd->phone.work) + purple_notify_user_info_add_pair_plaintext(user_info, _("Work Phone Number"), ypd->phone.work); + if (ypd->phone.mobile && *ypd->phone.mobile) + purple_notify_user_info_add_pair_plaintext(user_info, _("Mobile Phone Number"), ypd->phone.mobile); } }
--- a/libpurple/protocols/yahoo/yahoo_profile.c Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/protocols/yahoo/yahoo_profile.c Sun Aug 21 21:27:17 2011 +0000 @@ -1228,7 +1228,7 @@ str = _("The user's profile is empty."); } - purple_notify_user_info_add_pair(user_info, NULL, str); + purple_notify_user_info_add_pair_plaintext(user_info, NULL, str); } /* put a link to the actual profile URL */
--- a/libpurple/util.h Sun Aug 21 15:28:07 2011 +0000 +++ b/libpurple/util.h Sun Aug 21 21:27:17 2011 +0000 @@ -1177,6 +1177,7 @@ * @param max_len The maximum number of bytes to retrieve (-1 for unlimited) * @param callback The callback function. * @param data The user data to pass to the callback function. + * @deprecated In 3.0.0, we'll rename this to "purple_util_fetch_url_request" and get rid of the old one */ PurpleUtilFetchUrlData *purple_util_fetch_url_request_len( PurpleAccount *account, const gchar *url,