summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <malu@pidgin.im>2009-02-06 22:46:24 +0000
committerMarcus Lundblad <malu@pidgin.im>2009-02-06 22:46:24 +0000
commitb45570d29829798f9edaf4e1ef7fda557427373d (patch)
tree2afbc8d5f632ac091d9c5c501e34650a883e6c25
parent8e8391dcdc6392b7a1dcdb17ca435c1e8a4f25cf (diff)
parent5b22e45200167e4ff96b8269f10f85901fb1a31c (diff)
downloadpidgin-b45570d29829798f9edaf4e1ef7fda557427373d.tar.gz
propagate from branch 'im.pidgin.pidgin' (head 0ca56c346a33015d3aaca38a60b0864c080bf3dc)
to branch 'im.pidgin.cpw.malu.xmpp.idle' (head f703af7527a64836a63adbeb59b18eda592dedcd)
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.API2
-rw-r--r--finch/finch.c2
-rw-r--r--finch/libgnt/gntkeys.c3
-rw-r--r--libpurple/dbus-analyze-functions.py2
-rw-r--r--libpurple/protocols/jabber/data.c8
-rw-r--r--libpurple/protocols/jabber/data.h3
-rw-r--r--libpurple/protocols/jabber/google.c8
-rw-r--r--libpurple/protocols/jabber/google.h2
-rw-r--r--libpurple/protocols/jabber/iq.c18
-rw-r--r--libpurple/protocols/jabber/jabber.c2
-rw-r--r--libpurple/protocols/jabber/ping.c6
-rw-r--r--libpurple/protocols/jabber/ping.h3
-rw-r--r--libpurple/protocols/jabber/si.c13
-rw-r--r--libpurple/protocols/jabber/si.h2
-rw-r--r--libpurple/protocols/msn/msg.c4
-rw-r--r--libpurple/protocols/msn/msn.c17
-rw-r--r--libpurple/protocols/msn/user.c2
-rw-r--r--libpurple/protocols/myspace/myspace.c12
-rw-r--r--libpurple/protocols/novell/novell.c2
-rw-r--r--libpurple/protocols/oscar/oscar.c21
-rw-r--r--libpurple/protocols/qq/qq.c8
-rw-r--r--libpurple/protocols/silc/silc.c14
-rw-r--r--libpurple/protocols/silc10/silc.c14
-rw-r--r--libpurple/xmlnode.c10
-rw-r--r--libpurple/xmlnode.h6
-rw-r--r--pidgin/gtkdialogs.c2
-rw-r--r--pidgin/win32/nsis/pidgin-installer.nsi33
28 files changed, 137 insertions, 93 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f91f1616e..1bc3b20d7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,11 +6,16 @@ version 2.5.5 (??/??/????):
* Beta support for SSL connections for AIM and ICQ accounts. To
enable, check the "Use SSL" option from the Advanced tab when
editing your AIM or ICQ account. (Paul Aurich)
- * Fix retrieval of ICQ status messages from users of ICQ 6.x, Miranda,
- and other libpurple clients (fixes with libpurple users only on
- statuses other than Available). (Daniel Ljungborg)
* Fix a memory leak in SILC. (Luke Petre)
+ ICQ:
+ * Fix retrieval of status messages from users of ICQ 6.x, Miranda, and
+ other libpurple clients. (Daniel Ljungborg)
+ * Change client ID to match ICQ Basic 14.34.3096. This fixes publishing
+ of buddy icons and available messages.
+ * Properly publish status messages for statuses other than Available.
+ ICQ 6.x users can now see these status messages. (Daniel Ljungborg)
+
MSN:
* Fix transfer of buddy icons, custom smileys, and files from the
latest Windows Live Messenger 9 official client. (Thomas
diff --git a/ChangeLog.API b/ChangeLog.API
index e80e6dc314..883c8fb011 100644
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -6,6 +6,8 @@ version 2.5.5 (??/??/2009):
* purple_status_type_new now defaults "saveable" to TRUE.
This was necessary in order to maintain the current behavior
while fixing non-saveable statuses not to be saved.
+ * xmlnode_get_prefix, xmlnode_to_str and xmlnode_to_formatted_str
+ now all take a const xmlnode* instead of an xmlnode*
version 2.5.4 (01/12/2009):
perl:
diff --git a/finch/finch.c b/finch/finch.c
index 58c6e902db..fe96d76deb 100644
--- a/finch/finch.c
+++ b/finch/finch.c
@@ -210,7 +210,7 @@ show_usage(const char *name, gboolean terse)
text = g_strdup_printf(_("%s\n"
"Usage: %s [OPTION]...\n\n"
" -c, --config=DIR use DIR for config files\n"
- " -d, --debug print debugging messages to stdout\n"
+ " -d, --debug print debugging messages to stderr\n"
" -h, --help display this help and exit\n"
" -n, --nologin don't automatically login\n"
" -v, --version display the current version and exit\n"), DISPLAY_VERSION, name);
diff --git a/finch/libgnt/gntkeys.c b/finch/libgnt/gntkeys.c
index 4948318474..dc17c1a9fa 100644
--- a/finch/libgnt/gntkeys.c
+++ b/finch/libgnt/gntkeys.c
@@ -163,7 +163,8 @@ void gnt_keys_refine(char *text)
(*(text + 2) >= 'A' && *(text + 2) <= 'D')) {
/* Apparently this is necessary for urxvt and screen and xterm */
if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0 ||
- strstr(term, "xterm") == term)
+ strstr(term, "xterm") == term ||
+ strstr(term, "vt100") == term)
*(text + 1) = 'O';
} else if (*(unsigned char*)text == 195) {
if (*(text + 2) == 0 && strstr(term, "xterm") == term) {
diff --git a/libpurple/dbus-analyze-functions.py b/libpurple/dbus-analyze-functions.py
index fe330cec97..9675b7b59c 100644
--- a/libpurple/dbus-analyze-functions.py
+++ b/libpurple/dbus-analyze-functions.py
@@ -497,7 +497,7 @@ class ServerBinding (Binding):
# This is a total hack, but self.call is set up before the parameters
# are processed, so we can't tell it to pass a parameter by reference.
self.call = "%s(%s)" % (self.function.name,
- ", ".join(param.name if param.name != "len" else "&len" for param in self.params))
+ ", ".join([(param.name, "&len")[param.name == "len"] for param in self.params]))
self.cdecls.append("\tgconstpointer %s;" % name)
self.ccode.append("\t%s = %s;" % (name, self.call))
diff --git a/libpurple/protocols/jabber/data.c b/libpurple/protocols/jabber/data.c
index 2064f0a1b8..f61511c954 100644
--- a/libpurple/protocols/jabber/data.c
+++ b/libpurple/protocols/jabber/data.c
@@ -200,11 +200,9 @@ jabber_data_associate_remote(JabberData *data)
}
void
-jabber_data_parse(JabberStream *js, xmlnode *packet)
+jabber_data_parse(JabberStream *js, xmlnode *data_node, const char *who, const char *id)
{
JabberIq *result = NULL;
- const char *who = xmlnode_get_attrib(packet, "from");
- xmlnode *data_node = xmlnode_get_child(packet, "data");
const JabberData *data =
jabber_data_find_local_by_cid(xmlnode_get_attrib(data_node, "cid"));
@@ -213,12 +211,12 @@ jabber_data_parse(JabberStream *js, xmlnode *packet)
result = jabber_iq_new(js, JABBER_IQ_ERROR);
xmlnode_set_attrib(result->node, "to", who);
- xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id"));
+ xmlnode_set_attrib(result->node, "id", id);
xmlnode_insert_child(result->node, item_not_found);
} else {
result = jabber_iq_new(js, JABBER_IQ_RESULT);
xmlnode_set_attrib(result->node, "to", who);
- xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id"));
+ xmlnode_set_attrib(result->node, "id", id);
xmlnode_insert_child(result->node,
jabber_data_get_xml_definition(data));
}
diff --git a/libpurple/protocols/jabber/data.h b/libpurple/protocols/jabber/data.h
index 40698de730..8603aed639 100644
--- a/libpurple/protocols/jabber/data.h
+++ b/libpurple/protocols/jabber/data.h
@@ -65,7 +65,8 @@ void jabber_data_associate_local(JabberData *data, const gchar *alt);
void jabber_data_associate_remote(JabberData *data);
/* handles iq requests */
-void jabber_data_parse(JabberStream *js, xmlnode *packet);
+void jabber_data_parse(JabberStream *js, xmlnode *data_node,
+ const char *who, const char *id);
void jabber_data_init(void);
void jabber_data_uninit(void);
diff --git a/libpurple/protocols/jabber/google.c b/libpurple/protocols/jabber/google.c
index b509096e5f..23847eccbe 100644
--- a/libpurple/protocols/jabber/google.c
+++ b/libpurple/protocols/jabber/google.c
@@ -144,9 +144,8 @@ jabber_gmail_parse(JabberStream *js, xmlnode *packet, gpointer nul)
}
void
-jabber_gmail_poke(JabberStream *js, xmlnode *packet)
+jabber_gmail_poke(JabberStream *js, const char *type)
{
- const char *type;
xmlnode *query;
JabberIq *iq;
@@ -154,11 +153,8 @@ jabber_gmail_poke(JabberStream *js, xmlnode *packet)
if (!purple_account_get_check_mail(js->gc->account))
return;
- type = xmlnode_get_attrib(packet, "type");
-
-
/* Is this an initial incoming mail notification? If so, send a request for more info */
- if (strcmp(type, "set") || !xmlnode_get_child(packet, "new-mail"))
+ if (strcmp(type, "set"))
return;
purple_debug(PURPLE_DEBUG_MISC, "jabber",
diff --git a/libpurple/protocols/jabber/google.h b/libpurple/protocols/jabber/google.h
index c1b6e0d0c2..59f48778a8 100644
--- a/libpurple/protocols/jabber/google.h
+++ b/libpurple/protocols/jabber/google.h
@@ -27,7 +27,7 @@
#include "jabber.h"
void jabber_gmail_init(JabberStream *js);
-void jabber_gmail_poke(JabberStream *js, xmlnode *node);
+void jabber_gmail_poke(JabberStream *js, const char *type);
void jabber_google_roster_init(JabberStream *js);
void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item);
diff --git a/libpurple/protocols/jabber/iq.c b/libpurple/protocols/jabber/iq.c
index 11442ed5a5..a669d2effd 100644
--- a/libpurple/protocols/jabber/iq.c
+++ b/libpurple/protocols/jabber/iq.c
@@ -309,7 +309,7 @@ void jabber_iq_remove_callback_by_id(JabberStream *js, const char *id)
void jabber_iq_parse(JabberStream *js, xmlnode *packet)
{
JabberCallbackData *jcd;
- xmlnode *query, *error, *x;
+ xmlnode *child, *query, *error, *x;
const char *xmlns;
const char *type, *id, *from;
JabberIqHandler *jih;
@@ -371,25 +371,25 @@ void jabber_iq_parse(JabberStream *js, xmlnode *packet)
}
}
- if(xmlnode_get_child_with_namespace(packet, "si", "http://jabber.org/protocol/si")) {
- jabber_si_parse(js, packet);
+ if ((child = xmlnode_get_child_with_namespace(packet, "si", "http://jabber.org/protocol/si"))) {
+ jabber_si_parse(js, child, from, id);
return;
}
- if(xmlnode_get_child_with_namespace(packet, "new-mail", "google:mail:notify")) {
- jabber_gmail_poke(js, packet);
+ if (xmlnode_get_child_with_namespace(packet, "new-mail", "google:mail:notify")) {
+ jabber_gmail_poke(js, type);
return;
}
purple_debug_info("jabber", "jabber_iq_parse\n");
- if(xmlnode_get_child_with_namespace(packet, "ping", "urn:xmpp:ping")) {
- jabber_ping_parse(js, packet);
+ if (xmlnode_get_child_with_namespace(packet, "ping", "urn:xmpp:ping")) {
+ jabber_ping_parse(js, from, id);
return;
}
- if (xmlnode_get_child_with_namespace(packet, "data", XEP_0231_NAMESPACE)) {
- jabber_data_parse(js, packet);
+ if ((child = xmlnode_get_child_with_namespace(packet, "data", XEP_0231_NAMESPACE))) {
+ jabber_data_parse(js, child, from, id);
return;
}
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index f9b5ffef6f..65dcc62b6a 100644
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -1909,7 +1909,7 @@ GList *jabber_status_types(PurpleAccount *account)
type = purple_status_type_new_with_attrs(PURPLE_STATUS_OFFLINE,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_UNAVAILABLE),
- NULL, FALSE, TRUE, FALSE,
+ NULL, TRUE, TRUE, FALSE,
"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
NULL);
types = g_list_append(types, type);
diff --git a/libpurple/protocols/jabber/ping.c b/libpurple/protocols/jabber/ping.c
index 4339c27dd1..40df95bd7a 100644
--- a/libpurple/protocols/jabber/ping.c
+++ b/libpurple/protocols/jabber/ping.c
@@ -30,7 +30,7 @@
#include "iq.h"
void
-jabber_ping_parse(JabberStream *js, xmlnode *packet)
+jabber_ping_parse(JabberStream *js, const char *from, const char *id)
{
JabberIq *iq;
@@ -38,9 +38,9 @@ jabber_ping_parse(JabberStream *js, xmlnode *packet)
iq = jabber_iq_new(js, JABBER_IQ_RESULT);
- xmlnode_set_attrib(iq->node, "to", xmlnode_get_attrib(packet, "from") );
+ xmlnode_set_attrib(iq->node, "to", from);
- jabber_iq_set_id(iq, xmlnode_get_attrib(packet, "id"));
+ jabber_iq_set_id(iq, id);
jabber_iq_send(iq);
}
diff --git a/libpurple/protocols/jabber/ping.h b/libpurple/protocols/jabber/ping.h
index 377452f56c..f7718158c7 100644
--- a/libpurple/protocols/jabber/ping.h
+++ b/libpurple/protocols/jabber/ping.h
@@ -26,7 +26,8 @@
#include "conversation.h"
void jabber_ping_parse(JabberStream *js,
- xmlnode *packet);
+ const char *from,
+ const char *id);
gboolean jabber_ping_jid(PurpleConversation *conv, const char *jid);
diff --git a/libpurple/protocols/jabber/si.c b/libpurple/protocols/jabber/si.c
index 02a79229c4..4d99ac6a3c 100644
--- a/libpurple/protocols/jabber/si.c
+++ b/libpurple/protocols/jabber/si.c
@@ -1182,17 +1182,14 @@ void jabber_si_xfer_send(PurpleConnection *gc, const char *who, const char *file
purple_xfer_request(xfer);
}
-void jabber_si_parse(JabberStream *js, xmlnode *packet)
+void jabber_si_parse(JabberStream *js, xmlnode *si, const char *from, const char *id)
{
JabberSIXfer *jsx;
PurpleXfer *xfer;
- xmlnode *si, *file, *feature, *x, *field, *option, *value;
- const char *stream_id, *filename, *filesize_c, *profile, *from;
+ xmlnode *file, *feature, *x, *field, *option, *value;
+ const char *stream_id, *filename, *filesize_c, *profile;
size_t filesize = 0;
- if(!(si = xmlnode_get_child(packet, "si")))
- return;
-
if(!(profile = xmlnode_get_attrib(si, "profile")) ||
strcmp(profile, "http://jabber.org/protocol/si/profile/file-transfer"))
return;
@@ -1215,7 +1212,7 @@ void jabber_si_parse(JabberStream *js, xmlnode *packet)
if(!(x = xmlnode_get_child_with_namespace(feature, "x", "jabber:x:data")))
return;
- if(!(from = xmlnode_get_attrib(packet, "from")))
+ if(!from)
return;
/* if they've already sent us this file transfer with the same damn id
@@ -1256,7 +1253,7 @@ void jabber_si_parse(JabberStream *js, xmlnode *packet)
jsx->js = js;
jsx->stream_id = g_strdup(stream_id);
- jsx->iq_id = g_strdup(xmlnode_get_attrib(packet, "id"));
+ jsx->iq_id = g_strdup(id);
xfer = purple_xfer_new(js->gc->account, PURPLE_XFER_RECEIVE, from);
if (xfer)
diff --git a/libpurple/protocols/jabber/si.h b/libpurple/protocols/jabber/si.h
index c7f0ff9526..3b6208c58f 100644
--- a/libpurple/protocols/jabber/si.h
+++ b/libpurple/protocols/jabber/si.h
@@ -27,7 +27,7 @@
#include "jabber.h"
void jabber_bytestreams_parse(JabberStream *js, xmlnode *packet);
-void jabber_si_parse(JabberStream *js, xmlnode *packet);
+void jabber_si_parse(JabberStream *js, xmlnode *si, const char *from, const char *id);
PurpleXfer *jabber_si_new_xfer(PurpleConnection *gc, const char *who);
void jabber_si_xfer_send(PurpleConnection *gc, const char *who, const char *file);
diff --git a/libpurple/protocols/msn/msg.c b/libpurple/protocols/msn/msg.c
index 27f107f1d6..745ebe41b8 100644
--- a/libpurple/protocols/msn/msg.c
+++ b/libpurple/protocols/msn/msg.c
@@ -80,7 +80,7 @@ msn_message_ref(MsnMessage *msg)
msg->ref_count++;
#ifdef MSN_DEBUG_MSG
- purple_debug_info("msn", "message ref (%p)[%d]\n", msg, msg->ref_count);
+ purple_debug_info("msn", "message ref (%p)[%" G_GSIZE_FORMAT "]\n", msg, msg->ref_count);
#endif
return msg;
@@ -95,7 +95,7 @@ msn_message_unref(MsnMessage *msg)
msg->ref_count--;
#ifdef MSN_DEBUG_MSG
- purple_debug_info("msn", "message unref (%p)[%d]\n", msg, msg->ref_count);
+ purple_debug_info("msn", "message unref (%p)[%" G_GSIZE_FORMAT "]\n", msg, msg->ref_count);
#endif
if (msg->ref_count == 0)
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
index 5c2feaee13..09377a0f4d 100644
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -853,11 +853,11 @@ msn_status_types(PurpleAccount *account)
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_INVISIBLE,
- NULL, NULL, FALSE, TRUE, FALSE);
+ NULL, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_OFFLINE,
- NULL, NULL, FALSE, TRUE, FALSE);
+ NULL, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_MOBILE,
@@ -1176,6 +1176,7 @@ msn_send_im(PurpleConnection *gc, const char *who, const char *message,
MsnMessage *msg;
char *msgformat;
char *msgtext;
+ size_t msglen;
const char *username;
purple_debug_info("msn", "send IM {%s} to %s\n", message, who);
@@ -1203,13 +1204,23 @@ msn_send_im(PurpleConnection *gc, const char *who, const char *message,
}
msn_import_html(message, &msgformat, &msgtext);
+ msglen = strlen(msgtext);
+ if (msglen == 0) {
+ /* Stuff like <hr> will be ignored. Don't send an empty message
+ if that's all there is. */
+ g_free(msgtext);
+ g_free(msgformat);
+
+ return 0;
+ }
+
if (msn_user_is_online(account, who) ||
msn_user_is_yahoo(account, who) ||
swboard != NULL) {
/*User online or have a swboard open because it's invisible
* and sent us a message,then send Online Instant Message*/
- if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564)
+ if (msglen + strlen(msgformat) + strlen(VERSION) > 1564)
{
g_free(msgformat);
g_free(msgtext);
diff --git a/libpurple/protocols/msn/user.c b/libpurple/protocols/msn/user.c
index 88cc9eefda..d5b5430afc 100644
--- a/libpurple/protocols/msn/user.c
+++ b/libpurple/protocols/msn/user.c
@@ -180,7 +180,7 @@ msn_user_set_passport(MsnUser *user, const char *passport)
gboolean
msn_user_set_friendly_name(MsnUser *user, const char *name)
{
- g_return_if_fail(user != NULL);
+ g_return_val_if_fail(user != NULL, FALSE);
if (user->friendly_name && name && !strcmp(user->friendly_name, name))
return FALSE;
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
index d92451e9fb..c4b543da96 100644
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -1146,7 +1146,11 @@ msim_got_contact_list(MsimSession *session, const MsimMessage *reply, gpointer u
break;
case MSIM_CONTACT_LIST_INITIAL_FRIENDS:
- /* Nothing */
+ /* The session is now set up, ready to be connected. This emits the
+ * signedOn signal, so clients can now do anything with msimprpl, and
+ * we're ready for it (session key, userid, username all setup). */
+ purple_connection_update_progress(session->gc, _("Connected"), 3, 4);
+ purple_connection_set_state(session->gc, PURPLE_CONNECTED);
break;
}
@@ -1185,12 +1189,6 @@ gboolean msim_we_are_logged_on(MsimSession *session)
/* Set display name to username (otherwise will show email address) */
purple_connection_set_display_name(session->gc, session->username);
- /* The session is now set up, ready to be connected. This emits the
- * signedOn signal, so clients can now do anything with msimprpl, and
- * we're ready for it (session key, userid, username all setup). */
- purple_connection_update_progress(session->gc, _("Connected"), 3, 4);
- purple_connection_set_state(session->gc, PURPLE_CONNECTED);
-
body = msim_msg_new(
"UserID", MSIM_TYPE_INTEGER, session->userid,
NULL);
diff --git a/libpurple/protocols/novell/novell.c b/libpurple/protocols/novell/novell.c
index 47d26ab783..55d4a53ea2 100644
--- a/libpurple/protocols/novell/novell.c
+++ b/libpurple/protocols/novell/novell.c
@@ -2976,7 +2976,7 @@ novell_status_types(PurpleAccount *account)
NULL, TRUE, TRUE, FALSE);
status_types = g_list_append(status_types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, NULL, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, NULL, NULL, TRUE, TRUE, FALSE);
status_types = g_list_append(status_types, type);
return status_types;
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
index a565213a44..ce68d684a5 100644
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -4782,7 +4782,7 @@ oscar_set_info_and_status(PurpleAccount *account, gboolean setinfo, const char *
if (status_html != NULL)
{
status_text = purple_markup_strip_html(status_html);
- /* If the status_text is longer than 60 character then truncate it */
+ /* If the status_text is longer than 251 characters then truncate it */
if (strlen(status_text) > MAXAVAILMSGLEN)
{
char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]);
@@ -4799,9 +4799,28 @@ oscar_set_info_and_status(PurpleAccount *account, gboolean setinfo, const char *
}
else
{
+ char *status_text = NULL;
+
htmlaway = purple_status_get_attr_string(status, "message");
if ((htmlaway == NULL) || (*htmlaway == '\0'))
htmlaway = purple_status_type_get_name(status_type);
+
+ /* ICQ 6.x seems to use an available message for all statuses so set one */
+ if (od->icq)
+ {
+ status_text = purple_markup_strip_html(htmlaway);
+ /* If the status_text is longer than 251 characters then truncate it */
+ if (strlen(status_text) > MAXAVAILMSGLEN)
+ {
+ char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]);
+ strcpy(tmp, "...");
+ }
+ aim_srv_setextrainfo(od, FALSE, 0, TRUE, status_text, NULL);
+ }
+ g_free(status_text);
+
+ /* Set a proper away message for icq too so that they work for old third party clients */
+
away = purple_prpl_oscar_convert_to_infotext(htmlaway, &awaylen, &away_encoding);
if (awaylen > od->rights.maxawaymsglen)
diff --git a/libpurple/protocols/qq/qq.c b/libpurple/protocols/qq/qq.c
index d82615c598..1fcac6feac 100644
--- a/libpurple/protocols/qq/qq.c
+++ b/libpurple/protocols/qq/qq.c
@@ -406,15 +406,15 @@ static GList *qq_status_types(PurpleAccount *ga)
GList *types = NULL;
status = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE,
- "available", _("Available"), FALSE, TRUE, FALSE);
+ "available", _("Available"), TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_AWAY,
- "away", _("Away"), FALSE, TRUE, FALSE);
+ "away", _("Away"), TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_INVISIBLE,
- "invisible", _("Invisible"), FALSE, TRUE, FALSE);
+ "invisible", _("Invisible"), TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE,
@@ -422,7 +422,7 @@ static GList *qq_status_types(PurpleAccount *ga)
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_OFFLINE,
- "offline", _("Offline"), FALSE, TRUE, FALSE);
+ "offline", _("Offline"), TRUE, TRUE, FALSE);
types = g_list_append(types, status);
status = purple_status_type_new_full(PURPLE_STATUS_MOBILE,
diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c
index 9eb54b0dfa..4088f1c078 100644
--- a/libpurple/protocols/silc/silc.c
+++ b/libpurple/protocols/silc/silc.c
@@ -48,19 +48,19 @@ silcpurple_away_states(PurpleAccount *account)
PurpleStatusType *type;
GList *types = NULL;
- type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_AVAILABLE, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_AVAILABLE, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_HYPER, _("Hyper Active"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_HYPER, _("Hyper Active"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_AWAY, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_AWAY, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, SILCPURPLE_STATUS_ID_BUSY, _("Busy"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, SILCPURPLE_STATUS_ID_BUSY, _("Busy"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_INDISPOSED, _("Indisposed"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_INDISPOSED, _("Indisposed"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_PAGE, _("Wake Me Up"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_PAGE, _("Wake Me Up"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, SILCPURPLE_STATUS_ID_OFFLINE, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, SILCPURPLE_STATUS_ID_OFFLINE, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
return types;
diff --git a/libpurple/protocols/silc10/silc.c b/libpurple/protocols/silc10/silc.c
index fe68af53da..191a2fd6a3 100644
--- a/libpurple/protocols/silc10/silc.c
+++ b/libpurple/protocols/silc10/silc.c
@@ -39,19 +39,19 @@ silcpurple_away_states(PurpleAccount *account)
PurpleStatusType *type;
GList *types = NULL;
- type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_AVAILABLE, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_AVAILABLE, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_HYPER, _("Hyper Active"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, SILCPURPLE_STATUS_ID_HYPER, _("Hyper Active"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_AWAY, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_AWAY, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, SILCPURPLE_STATUS_ID_BUSY, _("Busy"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_UNAVAILABLE, SILCPURPLE_STATUS_ID_BUSY, _("Busy"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_INDISPOSED, _("Indisposed"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_INDISPOSED, _("Indisposed"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_PAGE, _("Wake Me Up"), FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_AWAY, SILCPURPLE_STATUS_ID_PAGE, _("Wake Me Up"), TRUE, TRUE, FALSE);
types = g_list_append(types, type);
- type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, SILCPURPLE_STATUS_ID_OFFLINE, NULL, FALSE, TRUE, FALSE);
+ type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, SILCPURPLE_STATUS_ID_OFFLINE, NULL, TRUE, TRUE, FALSE);
types = g_list_append(types, type);
return types;
diff --git a/libpurple/xmlnode.c b/libpurple/xmlnode.c
index 3e64b45570..bcfea76b0b 100644
--- a/libpurple/xmlnode.c
+++ b/libpurple/xmlnode.c
@@ -303,7 +303,7 @@ void xmlnode_set_prefix(xmlnode *node, const char *prefix)
node->prefix = g_strdup(prefix);
}
-const char *xmlnode_get_prefix(xmlnode *node)
+const char *xmlnode_get_prefix(const xmlnode *node)
{
g_return_val_if_fail(node != NULL, NULL);
return node->prefix;
@@ -443,11 +443,11 @@ xmlnode_to_str_foreach_append_ns(const char *key, const char *value,
}
static char *
-xmlnode_to_str_helper(xmlnode *node, int *len, gboolean formatting, int depth)
+xmlnode_to_str_helper(const xmlnode *node, int *len, gboolean formatting, int depth)
{
GString *text = g_string_new("");
const char *prefix;
- xmlnode *c;
+ const xmlnode *c;
char *node_name, *esc, *esc2, *tab = NULL;
gboolean need_end = FALSE, pretty = formatting;
@@ -537,13 +537,13 @@ xmlnode_to_str_helper(xmlnode *node, int *len, gboolean formatting, int depth)
}
char *
-xmlnode_to_str(xmlnode *node, int *len)
+xmlnode_to_str(const xmlnode *node, int *len)
{
return xmlnode_to_str_helper(node, len, FALSE, 0);
}
char *
-xmlnode_to_formatted_str(xmlnode *node, int *len)
+xmlnode_to_formatted_str(const xmlnode *node, int *len)
{
char *xml, *xml_with_declaration;
diff --git a/libpurple/xmlnode.h b/libpurple/xmlnode.h
index f7422b232c..769600ca07 100644
--- a/libpurple/xmlnode.h
+++ b/libpurple/xmlnode.h
@@ -243,7 +243,7 @@ void xmlnode_set_prefix(xmlnode *node, const char *prefix);
* @param node The node to get the prefix from
* @return The prefix of this node
*/
-const char *xmlnode_get_prefix(xmlnode *node);
+const char *xmlnode_get_prefix(const xmlnode *node);
/**
* Returns the node in a string of xml.
@@ -254,7 +254,7 @@ const char *xmlnode_get_prefix(xmlnode *node);
* @return The node represented as a string. You must
* g_free this string when finished using it.
*/
-char *xmlnode_to_str(xmlnode *node, int *len);
+char *xmlnode_to_str(const xmlnode *node, int *len);
/**
* Returns the node in a string of human readable xml.
@@ -266,7 +266,7 @@ char *xmlnode_to_str(xmlnode *node, int *len);
* tab and new line characters. You must
* g_free this string when finished using it.
*/
-char *xmlnode_to_formatted_str(xmlnode *node, int *len);
+char *xmlnode_to_formatted_str(const xmlnode *node, int *len);
/**
* Creates a node from a string of XML. Calling this on the
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
index b3c4279a52..a13083ee5a 100644
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -198,7 +198,7 @@ static const struct translator translators[] = {
{N_("Macedonian"), "mk", "Arangel Angov ", "arangel@linux.net.mk"},
{N_("Macedonian"), "mk", "Ivana Kirkovska", "ivana.kirkovska@gmail.com"},
{N_("Macedonian"), "mk", "Jovan Naumovski", "jovan@lugola.net"},
- {"Mongolian", "mn", "gooyo", NULL},
+ {N_("Mongolian"), "mn", "gooyo", NULL},
{N_("Bokmål Norwegian"), "nb", "Hans Fredrik Nordhaug", "hans@nordhaug.priv.no"},
{N_("Nepali"), "ne", "Shyam Krishna Bal", "shyamkrishna_bal@yahoo.com"},
{N_("Dutch, Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"},
diff --git a/pidgin/win32/nsis/pidgin-installer.nsi b/pidgin/win32/nsis/pidgin-installer.nsi
index 43bfb6e1a8..fafe85ee48 100644
--- a/pidgin/win32/nsis/pidgin-installer.nsi
+++ b/pidgin/win32/nsis/pidgin-installer.nsi
@@ -1247,6 +1247,9 @@ Function .onInit
Push $R0
Push $R1
Push $R2
+ Push $R3 ; This is only used for the Parameters throughout the function
+
+ ${GetParameters} $R3
IntOp $R1 0 + 0
retry_runcheck:
@@ -1258,7 +1261,14 @@ Function .onInit
IntCmp $R0 0 +3 ;This could check for ERROR_ALREADY_EXISTS(183), but lets just assume
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) /SD IDCANCEL IDRETRY retry_runcheck
Abort
+
+ ; Allow installer to run even if pidgin is running via "/NOPIDGINRUNCHECK=1"
+ ; This is useful for testing
+ ClearErrors
+ ${GetOptions} "$R3" "/NOPIDGINRUNCHECK=" $R1
+ IfErrors 0 +2
Call RunCheck
+
StrCpy $name "Pidgin ${PIDGIN_VERSION}"
StrCpy $SPELLCHECK_SEL ""
@@ -1312,16 +1322,13 @@ Function .onInit
SetShellVarContext "current"
StrCpy $ISSILENT "/S"
-
- ; GTK installer has two silent states.. one with Message boxes, one without
+ ; GTK installer has two silent states - one with Message boxes, one without
; If pidgin installer was run silently, we want to supress gtk installer msg boxes.
- IfSilent 0 set_gtk_normal
- StrCpy $ISSILENT "/NOUI"
- set_gtk_normal:
+ IfSilent 0 +2
+ StrCpy $ISSILENT "/NOUI"
- ${GetParameters} $R0
ClearErrors
- ${GetOptions} "$R0" "/L=" $R1
+ ${GetOptions} "$R3" "/L=" $R1
IfErrors +3
StrCpy $LANGUAGE $R1
Goto skip_lang
@@ -1332,7 +1339,7 @@ Function .onInit
skip_lang:
ClearErrors
- ${GetOptions} "$R0" "/DS=" $R1
+ ${GetOptions} "$R3" "/DS=" $R1
IfErrors +8
SectionGetFlags ${SecDesktopShortcut} $R2
StrCmp "1" $R1 0 +2
@@ -1343,7 +1350,7 @@ Function .onInit
SectionSetFlags ${SecDesktopShortcut} $R2
ClearErrors
- ${GetOptions} "$R0" "/SMS=" $R1
+ ${GetOptions} "$R3" "/SMS=" $R1
IfErrors +8
SectionGetFlags ${SecStartMenuShortcut} $R2
StrCmp "1" $R1 0 +2
@@ -1380,6 +1387,7 @@ Function .onInit
instdir_done:
;LogSet on
+ Pop $R3
Pop $R2
Pop $R1
Pop $R0
@@ -1694,6 +1702,7 @@ Function InstallAspellDictionary
Push $R1
Push $R2
Push $R3
+ Push $R4
check:
ClearErrors
@@ -1714,7 +1723,12 @@ Function InstallAspellDictionary
StrCmp $R3 "success" +3
StrCpy $R0 $R3
Goto done
+ ; Use a specific temporary $OUTDIR for each dictionary because the installer doesn't clean up after itself
+ StrCpy $R4 "$OUTDIR"
+ SetOutPath "$TEMP\aspell_dict-$R0"
ExecWait '"$R1"'
+ SetOutPath "$R4"
+ RMDir /r "$TEMP\aspell_dict-$R0"
Delete $R1
Goto check ; Check that it is now installed correctly
@@ -1723,6 +1737,7 @@ Function InstallAspellDictionary
StrCpy $R0 ''
done:
+ Pop $R4
Pop $R3
Pop $R2
Pop $R1