changeset 27955:6c044b5083c4

propagate from branch 'im.pidgin.pidgin' (head e211e5c80765054db1df78db6a636e0c310be116) to branch 'im.pidgin.pidgin.yaz' (head 389087f2aa046ea6197087610e2e307c99ba292b)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 21 Jun 2009 05:28:32 +0000
parents 462a509fb2ad (current diff) c952aa75df18 (diff)
children c815b2aa78ee
files libpurple/protocols/yahoo/yahoo.c
diffstat 5 files changed, 38 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/finch/plugins/gnthistory.c	Fri Jun 19 04:18:11 2009 +0000
+++ b/finch/plugins/gnthistory.c	Sun Jun 21 05:28:32 2009 +0000
@@ -31,6 +31,7 @@
 #include "util.h"
 #include "version.h"
 
+#include "gntconv.h"
 #include "gntplugin.h"
 #include "gntrequest.h"
 
@@ -54,6 +55,9 @@
 	if (convtype == PURPLE_CONV_TYPE_IM) {
 		GSList *buddies;
 		GSList *cur;
+		FinchConv *fc = FINCH_CONV(c);
+		if (fc->list && fc->list->next) /* We were already in the middle of a conversation. */
+			return;
 
 		/* If we're not logging, don't show anything.
 		 * Otherwise, we might show a very old log. */
--- a/libpurple/protocols/myspace/myspace.c	Fri Jun 19 04:18:11 2009 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Jun 21 05:28:32 2009 +0000
@@ -1824,17 +1824,19 @@
 					gchar *suggestion;
 
 					suggestion = g_strdup_printf(_("%s Your password is "
-							"%d characters, greater than the "
-							"expected maximum length of %d for "
-							"MySpaceIM. Please shorten your "
+							"%zu characters, which is longer than the "
+							"maximum length of %d.  Please shorten your "
 							"password at http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.changePassword and try again."),
-							full_errmsg, (int)
+							full_errmsg,
 							strlen(session->account->password),
 							MSIM_MAX_PASSWORD_LENGTH);
 
 					/* Replace full_errmsg. */
 					g_free(full_errmsg);
 					full_errmsg = suggestion;
+				} else {
+					g_free(full_errmsg);
+					full_errmsg = g_strdup(_("Incorrect username or password"));
 				}
 #endif
 				break;
--- a/libpurple/protocols/yahoo/yahoo.c	Fri Jun 19 04:18:11 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Sun Jun 21 05:28:32 2009 +0000
@@ -813,6 +813,7 @@
 	int time;
 	int utf8;
 	int buddy_icon;
+	char *id;
 	char *msg;
 };
 
@@ -930,6 +931,9 @@
 			{
 				imv = pair->value;
 			}
+			if (pair->key == 429)
+				if (im)
+					im->id = pair->value;
 			l = l->next;
 		}
 	} else if (pkt->status == 2) {
@@ -997,6 +1001,28 @@
 			return;
 		}
 
+		/*
+		 * TODO: Is there anything else we should check when determining whether
+		 *       we should send an acknowledgement?
+		 */
+		if (im->id != NULL) {
+			/* Send acknowledgement.  If we don't do this then the official
+			 * Yahoo Messenger client for Windows will send us the same
+			 * message 7 seconds later as an offline message.  This is true
+			 * for at least version 9.0.0.2162 on Windows XP. */
+			struct yahoo_packet *pkt2;
+			pkt2 = yahoo_packet_new(YAHOO_SERVICE_MESSAGE_ACK,
+					YAHOO_STATUS_AVAILABLE, pkt->id);
+			yahoo_packet_hash(pkt2, "ssisii",
+					1, purple_connection_get_display_name(gc),
+					5, im->from,
+					302, 430,
+					430, im->id,
+					303, 430,
+					450, 0);
+			yahoo_packet_send_and_free(pkt2, yd);
+		}
+
 		m = yahoo_string_decode(gc, im->msg, im->utf8);
 		/* This may actually not be necessary, but it appears
 		 * that at least at one point some clients were sending
--- a/libpurple/protocols/yahoo/yahoo_packet.h	Fri Jun 19 04:18:11 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.h	Sun Jun 21 05:28:32 2009 +0000
@@ -107,6 +107,7 @@
 	YAHOO_SERVICE_CHGRP_15 = 0xe7,
 	YAHOO_SERVICE_STATUS_15 = 0xf0,
 	YAHOO_SERVICE_LIST_15 = 0xf1,
+	YAHOO_SERVICE_MESSAGE_ACK = 0xfb,
 	YAHOO_SERVICE_WEBLOGIN = 0x0226,
 	YAHOO_SERVICE_SMS_MSG = 0x02ea
 	/* YAHOO_SERVICE_DISCONNECT = 0x07d1 Server forces us to disconnect. Is sent with TCP FIN flag set */
--- a/pidgin/plugins/gevolution/gevolution.c	Fri Jun 19 04:18:11 2009 +0000
+++ b/pidgin/plugins/gevolution/gevolution.c	Sun Jun 21 05:28:32 2009 +0000
@@ -39,6 +39,7 @@
 #include <libedata-book/Evolution-DataServer-Addressbook.h>
 
 #include <libedata-book/e-data-book-factory.h>
+/* TODO: bonobo is going away eventually, we'll need to find an alternative */
 #include <bonobo/bonobo-main.h>
 
 #include <glib.h>