changeset 28316:776a9b5bd50c

propagate from branch 'im.pidgin.pidgin' (head 73a88ac85b97264c19b9a9966270eecd310b6bff) to branch 'im.pidgin.cpw.darkrain42.2.6.1' (head 9911474a2783df1b7d4e71da598c85ae0b6da738)
author Paul Aurich <paul@darkrain42.org>
date Tue, 21 Jul 2009 05:15:54 +0000
parents 7e473a437c7f (current diff) 248e47560a4a (diff)
children 20798dc089af
files libpurple/protocols/jabber/jabber.c libpurple/protocols/yahoo/libymsg.c pidgin/pixmaps/dialogs/64/scalable/auth.svg pidgin/pixmaps/dialogs/64/scalable/cool.svg pidgin/pixmaps/dialogs/64/scalable/dialog.svg pidgin/pixmaps/dialogs/64/scalable/error.svg pidgin/pixmaps/dialogs/64/scalable/info.svg pidgin/pixmaps/dialogs/64/scalable/mail.svg pidgin/pixmaps/dialogs/64/scalable/question.svg pidgin/pixmaps/dialogs/64/scalable/warning.svg pidgin/pixmaps/emblems/16/scalable/aol-client.svg pidgin/pixmaps/emblems/16/scalable/birthday.svg pidgin/pixmaps/emblems/16/scalable/blocked.svg pidgin/pixmaps/emblems/16/scalable/bot.svg pidgin/pixmaps/emblems/16/scalable/external.svg pidgin/pixmaps/emblems/16/scalable/female.svg pidgin/pixmaps/emblems/16/scalable/free-for-chat.svg pidgin/pixmaps/emblems/16/scalable/game.svg pidgin/pixmaps/emblems/16/scalable/male.svg pidgin/pixmaps/emblems/16/scalable/mobile.svg pidgin/pixmaps/emblems/16/scalable/music.svg pidgin/pixmaps/emblems/16/scalable/not-authorized.svg pidgin/pixmaps/emblems/16/scalable/qq-member.svg pidgin/pixmaps/emblems/16/scalable/secure.svg pidgin/pixmaps/emblems/16/scalable/unavailable.svg pidgin/pixmaps/emblems/16/scalable/video.svg pidgin/pixmaps/emblems/16/scalable/voice.svg pidgin/pixmaps/icons/hicolor/48x48/apps/scalable/pidgin.svg pidgin/pixmaps/protocols/48/scalable/aim.svg pidgin/pixmaps/protocols/48/scalable/bonjour.svg pidgin/pixmaps/protocols/48/scalable/gadu-gadu.svg pidgin/pixmaps/protocols/48/scalable/google-talk.svg pidgin/pixmaps/protocols/48/scalable/icq.svg pidgin/pixmaps/protocols/48/scalable/irc.svg pidgin/pixmaps/protocols/48/scalable/jabber.svg pidgin/pixmaps/protocols/48/scalable/meanwhile.svg pidgin/pixmaps/protocols/48/scalable/msn.svg pidgin/pixmaps/protocols/48/scalable/novell.svg pidgin/pixmaps/protocols/48/scalable/qq.svg pidgin/pixmaps/protocols/48/scalable/silc.svg pidgin/pixmaps/protocols/48/scalable/simple.svg pidgin/pixmaps/protocols/48/scalable/yahoo.svg pidgin/pixmaps/protocols/48/scalable/zephyr.svg
diffstat 4 files changed, 63 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/ft.c	Tue Jul 21 04:25:59 2009 +0000
+++ b/libpurple/ft.c	Tue Jul 21 05:15:54 2009 +0000
@@ -1161,7 +1161,7 @@
 
 	if (purple_xfer_get_filename(xfer) != NULL)
 	{
-		msg = g_strdup_printf(_("You canceled the transfer of %s"),
+		msg = g_strdup_printf(_("You cancelled the transfer of %s"),
 							  purple_xfer_get_filename(xfer));
 	}
 	else
@@ -1224,12 +1224,12 @@
 
 	if (purple_xfer_get_filename(xfer) != NULL)
 	{
-		msg = g_strdup_printf(_("%s canceled the transfer of %s"),
+		msg = g_strdup_printf(_("%s cancelled the transfer of %s"),
 				buddy ? purple_buddy_get_alias(buddy) : xfer->who, purple_xfer_get_filename(xfer));
 	}
 	else
 	{
-		msg = g_strdup_printf(_("%s canceled the file transfer"),
+		msg = g_strdup_printf(_("%s cancelled the file transfer"),
 				buddy ? purple_buddy_get_alias(buddy) : xfer->who);
 	}
 	purple_xfer_conversation_write(xfer, msg, TRUE);
--- a/libpurple/protocols/oscar/oscar.c	Tue Jul 21 04:25:59 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Tue Jul 21 05:15:54 2009 +0000
@@ -6335,6 +6335,44 @@
 }
 
 static void
+oscar_close_directim(gpointer object, gpointer ignored)
+{
+	PurpleBlistNode *node;
+	PurpleBuddy *buddy;
+	PurpleAccount *account;
+	PurpleConnection *gc;
+	PurpleConversation *conv;
+	OscarData *od;
+	PeerConnection *conn;
+	const char *name;
+
+	node = object;
+
+	g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node));
+
+	buddy = (PurpleBuddy*)node;
+	name = purple_buddy_get_name(buddy);
+	account = purple_buddy_get_account(buddy);
+	gc = purple_account_get_connection(account);
+	od = gc->proto_data;
+	conn = peer_connection_find_by_type(od, name, OSCAR_CAPABILITY_DIRECTIM);
+
+	if (conn != NULL)
+	{
+		if (!conn->ready)
+			aim_im_sendch2_cancel(conn);
+
+		peer_connection_destroy(conn, OSCAR_DISCONNECT_LOCAL_CLOSED, NULL);
+
+		/* OSCAR_DISCONNECT_LOCAL_CLOSED doesn't write anything to the convo
+		 * window. Let the user know that we canceled the Direct IM. */
+		conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
+		purple_conversation_write(conv, NULL, _("You closed the connection."),
+		                          PURPLE_MESSAGE_SYSTEM, time(NULL));
+	}
+}
+
+static void
 oscar_get_aim_info_cb(PurpleBlistNode *node, gpointer ignore)
 {
 	PurpleBuddy *buddy;
@@ -6397,11 +6435,23 @@
 		oscar_util_name_compare(purple_account_get_username(account), bname) &&
 		PURPLE_BUDDY_IS_ONLINE(buddy))
 	{
+		PeerConnection *conn;
+		conn = peer_connection_find_by_type(od, bname, OSCAR_CAPABILITY_DIRECTIM);
+
 		if (userinfo->capabilities & OSCAR_CAPABILITY_DIRECTIM)
 		{
-			act = purple_menu_action_new(_("Direct IM"),
-			                           PURPLE_CALLBACK(oscar_ask_directim),
-			                           NULL, NULL);
+			if (conn)
+			{
+				act = purple_menu_action_new(_("Cancel Direct IM"),
+				                          PURPLE_CALLBACK(oscar_close_directim),
+				                          NULL, NULL);
+			}
+			else
+			{
+				act = purple_menu_action_new(_("Direct IM"),
+				                          PURPLE_CALLBACK(oscar_ask_directim),
+				                          NULL, NULL);
+			}
 			menu = g_list_prepend(menu, act);
 		}
 #if 0
--- a/libpurple/protocols/qq/send_file.c	Tue Jul 21 04:25:59 2009 +0000
+++ b/libpurple/protocols/qq/send_file.c	Tue Jul 21 05:15:54 2009 +0000
@@ -730,7 +730,7 @@
 	*/
 	filename = g_path_get_basename(purple_xfer_get_local_filename(qd->xfer));
 	msg = g_strdup_printf
-		(_("%d canceled the transfer of %s"),
+		(_("%d cancelled the transfer of %s"),
 		 sender_uid, filename);
 
 	purple_notify_warning (gc, _("File Send"), msg, NULL);
--- a/libpurple/protocols/yahoo/libymsg.c	Tue Jul 21 04:25:59 2009 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Tue Jul 21 05:15:54 2009 +0000
@@ -2070,15 +2070,18 @@
 		if (!purple_account_get_remember_password(account))
 			purple_account_set_password(account, NULL);
 
-		msg = g_strdup(_("Incorrect password"));
+		msg = g_strdup(_("Invalid username or password"));
 		reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 		break;
 	case 14:
-		msg = g_strdup(_("Your account is locked, please log in to the Yahoo! website."));
+		msg = g_strdup(_("Your account has been locked due to too many failed login attempts."
+					"  Please try logging into the Yahoo! website."));
 		reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 		break;
 	case 1013:
-		msg = g_strdup(_("Invalid username"));
+		msg = g_strdup(_("Error 1013: The username you have entered is invalid."
+					"  The most common cause of this error is entering your e-mail"
+					" address instead of your Yahoo! ID."));
 		reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME;
 		break;
 	default: