pidgin: 01dbf4ad: Use purple_notify_user_info_add_pair_pla...
markdoliner at pidgin.im
markdoliner at pidgin.im
Sun Aug 21 14:45:57 EDT 2011
----------------------------------------------------------------------
Revision: 01dbf4adfbd244ad73e7c0a6850a5bcc9d0b9582
Parent: f21537d04db182c6400ea3f922a84aa8ca72b77a
Author: markdoliner at pidgin.im
Date: 08/21/11 14:43:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/01dbf4adfbd244ad73e7c0a6850a5bcc9d0b9582
Changelog:
Use purple_notify_user_info_add_pair_plaintext in some places where we
were using purple_notify_user_info_add_pair (which expects an html string
for the value). Feel free to double check these if you care about one of
these protocols.
Changes against parent f21537d04db182c6400ea3f922a84aa8ca72b77a
patched libpurple/protocols/irc/msgs.c
patched libpurple/protocols/jabber/jabber.c
patched libpurple/protocols/myspace/user.c
patched libpurple/protocols/sametime/sametime.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/protocols/yahoo/yahoo_profile.c
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c 433eafec69f5a2661a8d46d61bcbb257fd03b08e
+++ libpurple/protocols/jabber/jabber.c 4fcdb7d60afc72f69ecc1f35334e1fbd2fc64c3c
@@ -2238,7 +2238,7 @@ jabber_tooltip_add_resource_text(JabberB
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);
}
============================================================
--- libpurple/protocols/yahoo/libymsg.c bbb59cc3352da1c83ee25de62267897c134c9f31
+++ libpurple/protocols/yahoo/libymsg.c 75d3e1b021db1b40a78a28e1000061180dcd65e7
@@ -4037,11 +4037,11 @@ void yahoo_tooltip_text(PurpleBuddy *b,
if (f && full) {
YahooPersonalDetails *ypd = &f->ypd;
if (ypd->phone.home && *ypd->phone.home)
- purple_notify_user_info_add_pair(user_info, _("Home Phone Number"), 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(user_info, _("Work Phone Number"), 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(user_info, _("Mobile Phone Number"), ypd->phone.mobile);
+ purple_notify_user_info_add_pair_plaintext(user_info, _("Mobile Phone Number"), ypd->phone.mobile);
}
}
============================================================
--- libpurple/protocols/irc/msgs.c 062a97bb86a323755845d4bc2a85a26657cf391b
+++ libpurple/protocols/irc/msgs.c 4cc8f7a8afd962199f4d75aa136dcc77e13ed84b
@@ -357,39 +357,35 @@ void irc_msg_endwhois(struct irc_conn *i
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));
- 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);
+ 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(tmp);
+ g_free(irc->whois.name);
}
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"));
}
============================================================
--- libpurple/protocols/yahoo/yahoo_profile.c 86635aa6e8bb4df05b9828d99c18b2be8213dd1f
+++ libpurple/protocols/yahoo/yahoo_profile.c 9b69e1e524b62a25bc32670292a0b87b449de98a
@@ -1228,7 +1228,7 @@ yahoo_got_photo(PurpleUtilFetchUrlData *
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 */
============================================================
--- libpurple/protocols/sametime/sametime.c abd8a01eff4d1dedc9dff9cb2b018d9c9d8d6c8e
+++ libpurple/protocols/sametime/sametime.c 8323b41480ee4922cf533e35e6e0920933c4879e
@@ -3334,9 +3334,7 @@ static void mw_prpl_tooltip_text(PurpleB
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 @@ static void mw_prpl_tooltip_text(PurpleB
}
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"));
}
}
}
============================================================
--- libpurple/protocols/myspace/user.c 65cb6dc5bd9448880b75bb41b648e0d71d78e718
+++ libpurple/protocols/myspace/user.c 52dc40e4ca42c45d8178864f812cd4e8edb01e10
@@ -117,27 +117,27 @@ msim_append_user_info(MsimSession *sessi
/* 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 @@ msim_append_user_info(MsimSession *sessi
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 @@ msim_append_user_info(MsimSession *sessi
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 @@ msim_append_user_info(MsimSession *sessi
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);
}
More information about the Commits
mailing list