changeset 27758:4426e530c156

propagate from branch 'im.pidgin.pidgin' (head d6936cb019234c5f9985eceac8678731c6b7bf25) to branch 'im.pidgin.pidgin.yaz' (head bc5b850d928a6335925869de1135ab510801ea03)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 08 Jan 2008 19:23:50 +0000
parents a8529c3dafe4 (current diff) 4a204ebed41c (diff)
children 54479172725e
files libpurple/protocols/jabber/jabber.c libpurple/protocols/msn/msn.c libpurple/protocols/msn/switchboard.c libpurple/protocols/oscar/oscar.c pidgin/gtkconv.c
diffstat 18 files changed, 70 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Jan 07 18:17:44 2008 +0000
+++ b/COPYRIGHT	Tue Jan 08 19:23:50 2008 +0000
@@ -350,6 +350,7 @@
 Scott Shedden
 Dossy Shiobara
 Michael Shkutkov
+Shreevatsa R
 Ettore Simone
 John Silvestri
 Craig Slusher
--- a/libpurple/buddyicon.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/buddyicon.c	Tue Jan 08 19:23:50 2008 +0000
@@ -617,16 +617,15 @@
 				purple_buddy_icon_set_data(icon, data, len, checksum);
 			}
 			else
-			{
 				delete_buddy_icon_settings((PurpleBlistNode*)b, "buddy_icon");
-			}
+
 			g_free(path);
 		}
 
 		purple_buddy_icons_set_caching(caching);
 	}
 
-	return purple_buddy_icon_ref(icon);
+	return (icon ? purple_buddy_icon_ref(icon) : NULL);
 }
 
 gboolean
--- a/libpurple/connection.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/connection.c	Tue Jan 08 19:23:50 2008 +0000
@@ -542,8 +542,10 @@
 
 	switch (ssl_error) {
 		case PURPLE_SSL_HANDSHAKE_FAILED:
+			reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR;
+			break;
 		case PURPLE_SSL_CONNECT_FAILED:
-			reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR;
+			reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
 			break;
 		case PURPLE_SSL_CERTIFICATE_INVALID:
 			/* TODO: maybe PURPLE_SSL_* should be more specific? */
@@ -551,7 +553,7 @@
 			break;
 		default:
 			g_assert_not_reached ();
-			reason = PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR;
+			reason = PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR;
 	}
 
 	purple_connection_error_reason (gc, reason,
@@ -564,12 +566,12 @@
 	switch (reason)
 	{
 		case PURPLE_CONNECTION_ERROR_NETWORK_ERROR:
+		case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
 			return FALSE;
 		case PURPLE_CONNECTION_ERROR_INVALID_USERNAME:
 		case PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED:
 		case PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE:
 		case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
-		case PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR:
 		case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
 		case PURPLE_CONNECTION_ERROR_INVALID_SETTINGS:
 		case PURPLE_CONNECTION_ERROR_OTHER_ERROR:
--- a/libpurple/protocols/jabber/jabber.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Jan 08 19:23:50 2008 +0000
@@ -560,13 +560,12 @@
 	purple_input_remove(js->gc->inpa);
 	js->gc->inpa = 0;
 	js->gsc = purple_ssl_connect_with_host_fd(js->gc->account, js->fd,
-			jabber_login_callback_ssl, jabber_ssl_connect_failure, js->host, js->gc);
+			jabber_login_callback_ssl, jabber_ssl_connect_failure, js->certificate_CN, js->gc);
 }
 
 static void jabber_login_connect(JabberStream *js, const char *fqdn, const char *host, int port)
 {
 	js->serverFQDN = g_strdup(fqdn);
-	js->host = g_strdup(host);
 
 	if (purple_proxy_connect(js->gc, js->gc->account, host,
 			port, jabber_login_callback, js->gc) == NULL)
@@ -617,6 +616,7 @@
 	js->write_buffer = purple_circ_buffer_new(512);
 	js->old_length = 0;
 	js->keepalive_timeout = -1;
+	js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user->domain);
 
 	if(!js->user) {
 		purple_connection_error_reason (gc,
@@ -654,7 +654,7 @@
 	if(purple_account_get_bool(js->gc->account, "old_ssl", FALSE)) {
 		if(purple_ssl_is_supported()) {
 			js->gsc = purple_ssl_connect(js->gc->account,
-					connect_server[0] ? connect_server : js->user->domain,
+					js->certificate_CN,
 					purple_account_get_int(account, "port", 5223), jabber_login_callback_ssl,
 					jabber_ssl_connect_failure, js->gc);
 		} else {
@@ -1129,6 +1129,7 @@
 		my_jb->subscription |= JABBER_SUB_BOTH;
 
 	server = connect_server[0] ? connect_server : js->user->domain;
+	js->certificate_CN = g_strdup(server);
 
 	jabber_stream_set_state(js, JABBER_STREAM_CONNECTING);
 
@@ -1305,7 +1306,7 @@
 		js->commands = g_list_delete_link(js->commands, js->commands);
 	}
 	g_free(js->server_name);
-	g_free(js->host);
+	g_free(js->certificate_CN);
 	g_free(js->gmail_last_time);
 	g_free(js->gmail_last_tid);
 	g_free(js->old_msg);
--- a/libpurple/protocols/jabber/jabber.h	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Tue Jan 08 19:23:50 2008 +0000
@@ -192,7 +192,7 @@
 	int old_length;
 	char *old_track;
 	
-	char *host;
+	char *certificate_CN;
 	
 	/* A purple timeout tag for the keepalive */
 	int keepalive_timeout;
--- a/libpurple/protocols/msn/msn.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msn/msn.c	Tue Jan 08 19:23:50 2008 +0000
@@ -480,7 +480,7 @@
 	msn_switchboard_request_add_user(swboard, buddy->name);
 
 	/* TODO: This might move somewhere else, after USR might be */
-	swboard->chat_id = session->conv_seq++;
+	swboard->chat_id = msn_switchboard_get_chat_id();
 	swboard->conv = serv_got_joined_chat(gc, swboard->chat_id, "MSN Chat");
 	swboard->flag = MSN_SB_FLAG_IM;
 
--- a/libpurple/protocols/msn/session.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msn/session.c	Tue Jan 08 19:23:50 2008 +0000
@@ -48,7 +48,6 @@
 	/*if you want to chat with Yahoo Messenger*/
 	//session->protocol_ver = WLM_YAHOO_PROT_VER;
 	session->protocol_ver = WLM_PROT_VER;
-	session->conv_seq = 1;
 
 	return session;
 }
--- a/libpurple/protocols/msn/session.h	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msn/session.h	Tue Jan 08 19:23:50 2008 +0000
@@ -107,8 +107,6 @@
 	GList *directconns; /**< The list of all the directconnections. */
 	GList *slplinks; /**< The list of all the slplinks. */
 
-	int conv_seq; /**< The current conversation sequence number. */
-
 	/*psm info*/
 	char *psm;
 
--- a/libpurple/protocols/msn/switchboard.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Tue Jan 08 19:23:50 2008 +0000
@@ -164,6 +164,14 @@
 	return swboard->session_id;
 }
 
+int
+msn_switchboard_get_chat_id(void)
+{
+	static int chat_id = 1;
+
+	return chat_id++;
+}
+
 void
 msn_switchboard_set_invited(MsnSwitchBoard *swboard, gboolean invited)
 {
@@ -250,7 +258,7 @@
 				purple_conversation_destroy(swboard->conv);
 #endif
 
-			swboard->chat_id = cmdproc->session->conv_seq++;
+			swboard->chat_id = msn_switchboard_get_chat_id();
 			swboard->flag |= MSN_SB_FLAG_IM;
 			swboard->conv = serv_got_joined_chat(account->gc,
 												 swboard->chat_id,
--- a/libpurple/protocols/msn/switchboard.h	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.h	Tue Jan 08 19:23:50 2008 +0000
@@ -167,6 +167,13 @@
 const char *msn_switchboard_get_session_id(MsnSwitchBoard *swboard);
 
 /**
+ * Returns the next chat ID for use by a switchboard.
+ *
+ * @return The chat ID.
+ */
+int msn_switchboard_get_chat_id(void);
+
+/**
  * Sets whether or not we were invited to this switchboard.
  *
  * @param swboard The switchboard.
--- a/libpurple/protocols/msnp9/msn.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msnp9/msn.c	Tue Jan 08 19:23:50 2008 +0000
@@ -435,7 +435,7 @@
 	msn_switchboard_request_add_user(swboard, buddy->name);
 
 	/* TODO: This might move somewhere else, after USR might be */
-	swboard->chat_id = session->conv_seq++;
+	swboard->chat_id = msn_switchboard_get_chat_id();
 	swboard->conv = serv_got_joined_chat(gc, swboard->chat_id, "MSN Chat");
 	swboard->flag = MSN_SB_FLAG_IM;
 
--- a/libpurple/protocols/msnp9/session.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msnp9/session.c	Tue Jan 08 19:23:50 2008 +0000
@@ -44,7 +44,6 @@
 								 purple_account_get_username(account), NULL);
 
 	session->protocol_ver = 9;
-	session->conv_seq = 1;
 
 	return session;
 }
--- a/libpurple/protocols/msnp9/session.h	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msnp9/session.h	Tue Jan 08 19:23:50 2008 +0000
@@ -103,8 +103,6 @@
 	GList *directconns; /**< The list of all the directconnections. */
 	GList *slplinks; /**< The list of all the slplinks. */
 
-	int conv_seq; /**< The current conversation sequence number. */
-
 	struct
 	{
 		char *kv;
--- a/libpurple/protocols/msnp9/switchboard.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msnp9/switchboard.c	Tue Jan 08 19:23:50 2008 +0000
@@ -166,6 +166,14 @@
 	return swboard->session_id;
 }
 
+int
+msn_switchboard_get_chat_id(void)
+{
+	static int chat_id = 1;
+
+	return chat_id++;
+}
+
 void
 msn_switchboard_set_invited(MsnSwitchBoard *swboard, gboolean invited)
 {
@@ -252,7 +260,7 @@
 				purple_conversation_destroy(swboard->conv);
 #endif
 
-			swboard->chat_id = cmdproc->session->conv_seq++;
+			swboard->chat_id = msn_switchboard_get_chat_id();
 			swboard->flag |= MSN_SB_FLAG_IM;
 			swboard->conv = serv_got_joined_chat(account->gc,
 												 swboard->chat_id,
--- a/libpurple/protocols/msnp9/switchboard.h	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/msnp9/switchboard.h	Tue Jan 08 19:23:50 2008 +0000
@@ -167,6 +167,13 @@
 const char *msn_switchboard_get_session_id(MsnSwitchBoard *swboard);
 
 /**
+ * Returns the next chat ID for use by a switchboard.
+ *
+ * @return The chat ID.
+ */
+int msn_switchboard_get_chat_id(void);
+
+/**
  * Sets whether or not we were invited to this switchboard.
  *
  * @param swboard The switchboard.
--- a/libpurple/protocols/oscar/oscar.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Tue Jan 08 19:23:50 2008 +0000
@@ -7,6 +7,7 @@
  * Some code copyright (C) 2001-2007, Mark Doliner <thekingant@users.sourceforge.net>
  * Some code copyright (C) 2005, Jonathan Clark <ardentlygnarly@users.sourceforge.net>
  * Some code copyright (C) 2007, ComBOTS Product GmbH (htfv) <foss@combots.com>
+ * Some code copyright (C) 2008, Aman Gupta
  *
  * Most libfaim code copyright (C) 1998-2001 Adam Fritzler <afritz@auk.cx>
  * Some libfaim code copyright (C) 2001-2004 Mark Doliner <thekingant@users.sourceforge.net>
--- a/pidgin/gtkconv.c	Mon Jan 07 18:17:44 2008 +0000
+++ b/pidgin/gtkconv.c	Tue Jan 08 19:23:50 2008 +0000
@@ -3433,6 +3433,7 @@
 	}
 }
 
+#if 0
 static gboolean
 typing_animation(gpointer data) {
 	PidginConversation *gtkconv = data;
@@ -3471,6 +3472,7 @@
 	gtk_widget_show(gtkwin->menu.typing_icon);
 	return TRUE;
 }
+#endif
 
 static void
 update_typing_message(PidginConversation *gtkconv, const char *message)
@@ -3506,8 +3508,6 @@
 	PidginWindow *gtkwin;
 	PurpleConvIm *im = NULL;
 	PurpleConversation *conv = gtkconv->active_conv;
-	char *stock_id;
-	const char *tooltip;
 	char *message = NULL;
 
 	gtkwin = gtkconv->win;
@@ -3515,55 +3515,20 @@
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
 		im = PURPLE_CONV_IM(conv);
 
-	if (gtkwin->menu.typing_icon) {
-		gtk_widget_hide(gtkwin->menu.typing_icon);
-	}
-
 	if (im == NULL)
 		return;
 
 	if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) {
-		if (gtkconv->u.im->typing_timer != 0) {
-			g_source_remove(gtkconv->u.im->typing_timer);
-			gtkconv->u.im->typing_timer = 0;
-		}
 		update_typing_message(gtkconv, "\n");
 		return;
 	}
 
 	if (purple_conv_im_get_typing_state(im) == PURPLE_TYPING) {
-		if (gtkconv->u.im->typing_timer == 0) {
-			gtkconv->u.im->typing_timer = g_timeout_add(250, typing_animation, gtkconv);
-		}
-		stock_id = PIDGIN_STOCK_ANIMATION_TYPING1;
-		tooltip = _("User is typing...");
 		message = g_strdup_printf(_("\n%s is typing..."), purple_conversation_get_title(conv));
 	} else {
-		stock_id = PIDGIN_STOCK_ANIMATION_TYPING5;
-		tooltip = _("User has typed something and stopped");
-		message = g_strdup_printf(_("\n%s has typed something and stopped"), purple_conversation_get_title(conv));
-		if (gtkconv->u.im->typing_timer != 0) {
-			g_source_remove(gtkconv->u.im->typing_timer);
-			gtkconv->u.im->typing_timer = 0;
-		}
-	}
-
-	if (gtkwin->menu.typing_icon == NULL)
-	{
-		gtkwin->menu.typing_icon = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU);
-		pidgin_menu_tray_append(PIDGIN_MENU_TRAY(gtkwin->menu.tray),
-								  gtkwin->menu.typing_icon,
-								  tooltip);
-	}
-	else
-	{
-		gtk_image_set_from_stock(GTK_IMAGE(gtkwin->menu.typing_icon), stock_id, GTK_ICON_SIZE_MENU);
-		pidgin_menu_tray_set_tooltip(PIDGIN_MENU_TRAY(gtkwin->menu.tray),
-									   gtkwin->menu.typing_icon,
-									   tooltip);
-	}
-
-	gtk_widget_show(gtkwin->menu.typing_icon);
+		message = g_strdup_printf(_("\n%s has stopped typing"), purple_conversation_get_title(conv));
+	}
+
 	update_typing_message(gtkconv, message);
 	g_free(message);
 }
@@ -6713,7 +6678,7 @@
 			pango_attr_list_unref(list);
 		} else
 			gtk_label_set_attributes(GTK_LABEL(gtkconv->tab_label), NULL);
-
+		
 		if (pidgin_conv_window_is_active_conversation(conv))
 			update_typing_icon(gtkconv);
 
--- a/po/de.po	Mon Jan 07 18:17:44 2008 +0000
+++ b/po/de.po	Tue Jan 08 19:23:50 2008 +0000
@@ -11,8 +11,8 @@
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-05 13:31+0100\n"
-"PO-Revision-Date: 2008-01-05 13:31+0100\n"
+"POT-Creation-Date: 2008-01-08 11:16+0100\n"
+"PO-Revision-Date: 2008-01-08 11:15+0100\n"
 "Last-Translator: Jochen Kemnade <jochenkemnade@web.de>\n"
 "Language-Team: Deutsch <de@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -1022,6 +1022,16 @@
 msgid "Choose Location..."
 msgstr "Wählen Sie einen Ort..."
 
+msgid "Hit 'Enter' to find more rooms of this category."
+msgstr "Drücken Sie 'Enter', um mehr Räume dieser Kategorie zu finden."
+
+msgid "Get"
+msgstr "Holen"
+
+#. Create the window.
+msgid "Room List"
+msgstr "Raumliste"
+
 msgid "Buddy logs in"
 msgstr "Buddy meldet sich an"
 
@@ -3976,7 +3986,7 @@
 msgstr "Stimmung"
 
 msgid "Now Listening"
-msgstr ""
+msgstr "Hört gerade"
 
 msgid "Mood Text"
 msgstr "Stimmungstext"
@@ -10480,16 +10490,13 @@
 msgid "User is typing..."
 msgstr "Benutzer tippt gerade..."
 
-msgid "User has typed something and stopped"
-msgstr "Benutzer hat etwas getippt und wartet nun"
-
 #, c-format
 msgid ""
 "\n"
-"%s has typed something and stopped"
+"%s has stopped typing"
 msgstr ""
 "\n"
-"%s hat etwas getippt und wartet nun"
+"%s hat aufgehört zu tippen"
 
 #. Build the Send To menu
 msgid "S_end To"
@@ -12110,10 +12117,6 @@
 msgid "Select Folder..."
 msgstr "Ordner auswählen..."
 
-#. Create the window.
-msgid "Room List"
-msgstr "Raumliste"
-
 #. list button
 msgid "_Get List"
 msgstr "_Liste abrufen"
@@ -12304,9 +12307,6 @@
 msgid "none"
 msgstr "keine"
 
-msgid "Display Statistics"
-msgstr "Statistik anzeigen"
-
 msgid "Response Probability:"
 msgstr "Antwortwahrscheinlichkeit:"