changeset 17208:c6c9f8a6dd9c

propagate from branch 'im.pidgin.pidgin' (head b917cc2cf9c46c7163ad3345b312dac1eea896cf) to branch 'org.maemo.garage.pidgin.pidgin.aop_menu' (head 87fe754f90bef1c1fbd8a48c351e97df6d1abe45)
author Gabriel Schulhof <nix@go-nix.ca>
date Sun, 20 May 2007 20:59:16 +0000
parents bf1cde8614c1 (current diff) ddf759c28d0b (diff)
children 5e89c6d85d6e
files
diffstat 8 files changed, 100 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun May 20 17:53:37 2007 +0000
+++ b/ChangeLog	Sun May 20 20:59:16 2007 +0000
@@ -32,6 +32,17 @@
 	  conversation tabs (Ma Xuan)
 	* Fix IRC connection bug with dircproxy (xjoe)
 	* Ctrl+[shift]+tab focuses the next most active tab (William Thompson)
+	* Fix Open Hotmail Inbox for MSN to work more reliably
+	* Add a Google Talk item to the protocol list, to help users who think
+	  we don't support Google Talk.  The item acts just like "XMPP".
+	* Remember if the X server supports XScreenSaver, to avoid waking it
+	  every 5 seconds.  (Arjan van de Ven with Intel Corporation)
+	* Change our idle checking to poll only as necessary and raise the
+	  unidle timeout from 5 seconds to 60 when using XScreenSaver.  This
+	  and the XScreenSaver change will reduce Pidgin's effect on power
+	  consumption when running with NO_HZ.  (Arjan van de Ven with Intel
+	  Corporation)
+	* Conversation -> Save As will now use aliases.
 
 	Finch:
 	* Userlist in chat windows, which can be turned on or off using
--- a/finch/libgnt/Makefile.am	Sun May 20 17:53:37 2007 +0000
+++ b/finch/libgnt/Makefile.am	Sun May 20 20:59:16 2007 +0000
@@ -66,10 +66,10 @@
 
 gntmarshal.c: $(srcdir)/genmarshal gntmarshal.h
 	echo "#include \"gntmarshal.h\"" > $@
-	cat $(srcdir)/genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --body >> $@
+	glib-genmarshal --prefix=gnt_closure_marshal --body $(srcdir)/genmarshal >> $@
 
 gntmarshal.h: $(srcdir)/genmarshal
-	cat $(srcdir)/genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --header > $@
+	glib-genmarshal --prefix=gnt_closure_marshal --header $(srcdir)/genmarshal > $@
 
 libgnt_laincludedir=$(includedir)/gnt
 libgnt_lainclude_HEADERS = \
--- a/libpurple/protocols/msn/msn.c	Sun May 20 17:53:37 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Sun May 20 20:59:16 2007 +0000
@@ -619,7 +619,8 @@
 	account = purple_connection_get_account(gc);
 	user = msn_normalize(account, purple_account_get_username(account));
 
-	if (strstr(user, "@hotmail.") != NULL)
+	if ((strstr(user, "@hotmail.") != NULL) ||
+		(strstr(user, "@msn.com") != NULL))
 	{
 		m = g_list_append(m, NULL);
 		act = purple_plugin_action_new(_("Open Hotmail Inbox"),
--- a/libpurple/protocols/msn/notification.c	Sun May 20 17:53:37 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Sun May 20 20:59:16 2007 +0000
@@ -592,6 +592,10 @@
 qng_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
 	static int count = 0;
+	MsnSession *session = cmdproc->session;
+
+	if (session->passport_info.file == NULL)
+		return;
 
 	if (count++ < 26)
 		return;
--- a/libpurple/protocols/msn/session.c	Sun May 20 17:53:37 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Sun May 20 20:59:16 2007 +0000
@@ -404,4 +404,9 @@
 
 	/* Sync users */
 	msn_session_sync_users(session);
+	/* It seems that some accounts that haven't accessed hotmail for a while
+	 * and @msn.com accounts don't automatically get the initial email
+	 * notification so we always request it on login
+	 */
+	msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX");
 }
--- a/libpurple/purple-remote	Sun May 20 17:53:37 2007 +0000
+++ b/libpurple/purple-remote	Sun May 20 20:59:16 2007 +0000
@@ -94,6 +94,8 @@
 def execute(uri):
     match = re.match(urlregexp, uri)
     protocol = match.group(2)
+    if protocol == "xmpp"
+        protocol = "jabber"
     if protocol == "aim" or protocol == "icq":
         protocol = "oscar"
     if protocol is not None:
--- a/libpurple/util.c	Sun May 20 17:53:37 2007 +0000
+++ b/libpurple/util.c	Sun May 20 20:59:16 2007 +0000
@@ -1874,6 +1874,11 @@
 			while (1) {
 				if (badchar(*t) || badentity(t)) {
 
+					if ((!g_ascii_strncasecmp(c, "http://", 7) && (t - c == 7)) ||
+						(!g_ascii_strncasecmp(c, "https://", 8) && (t - c == 8))) {
+						break;
+					}
+
 					if (*(t) == ',' && (*(t + 1) != ' ')) {
 						t++;
 						continue;
@@ -1933,6 +1938,12 @@
 			t = c;
 			while (1) {
 				if (badchar(*t) || badentity(t)) {
+
+					if ((!g_ascii_strncasecmp(c, "ftp://", 6) && (t - c == 6)) ||
+						(!g_ascii_strncasecmp(c, "sftp://", 7) && (t - c == 7))) {
+						break;
+					}
+
 					if (*(t - 1) == '.')
 						t--;
 					if ((*(t - 1) == ')' && (inside_paren > 0))) {
@@ -1984,8 +1995,21 @@
 			t = c;
 			while (1) {
 				if (badchar(*t) || badentity(t)) {
+					char *d;
+					if (t - c == 7) {
+						break;
+					}
 					if (*(t - 1) == '.')
 						t--;
+					if ((d = strstr(c + 7, "?")) != NULL && d < t)
+						url_buf = g_strndup(c + 7, d - c - 7);
+					else
+						url_buf = g_strndup(c + 7, t - c - 7);
+					if (!purple_email_is_valid(url_buf)) {
+						g_free(url_buf);
+						break;
+					}
+					g_free(url_buf);
 					url_buf = g_strndup(c, t - c);
 					tmpurlbuf = purple_unescape_html(url_buf);
 					g_string_append_printf(ret, "<A HREF=\"%s\">%s</A>",
@@ -2000,6 +2024,39 @@
 				t++;
 
 			}
+		} else if ((*c=='x') && (!g_ascii_strncasecmp(c, "xmpp:", 5)) &&
+				   (c == text || badchar(c[-1]) || badentity(c-1))) {
+			t = c;
+			while (1) {
+				if (badchar(*t) || badentity(t)) {
+
+					if (t - c == 5) {
+						break;
+					}
+
+					if (*(t) == ',' && (*(t + 1) != ' ')) {
+						t++;
+						continue;
+					}
+
+					if (*(t - 1) == '.')
+						t--;
+					if ((*(t - 1) == ')' && (inside_paren > 0))) {
+						t--;
+					}
+
+					url_buf = g_strndup(c, t - c);
+					tmpurlbuf = purple_unescape_html(url_buf);
+					g_string_append_printf(ret, "<A HREF=\"%s\">%s</A>",
+							tmpurlbuf, url_buf);
+					g_free(url_buf);
+					g_free(tmpurlbuf);
+					c = t;
+					break;
+				}
+				t++;
+
+			}
 		} else if (c != text && (*c == '@')) {
 			int flag;
 			GString *gurl_buf = NULL;
@@ -4155,7 +4212,7 @@
 		gunichar c = g_utf8_get_char(iter);
 		/* If the character is an ASCII character and is alphanumeric,
 		 * or one of the specified values, no need to escape */
-		if (c < 128 && (isalnum(c) || c == '@' || c == '-' ||
+		if (c < 128 && (g_ascii_isalnum(c) || c == '@' || c == '-' ||
 				c == '_' || c == '.' || c == '#')) {
 			buf[j++] = c;
 		} else {
--- a/pidgin/gtkconv.c	Sun May 20 17:53:37 2007 +0000
+++ b/pidgin/gtkconv.c	Sun May 20 20:59:16 2007 +0000
@@ -1012,12 +1012,24 @@
 {
 	PidginWindow *win = data;
 	PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
+	PurpleBuddy *buddy = purple_find_buddy(conv->account, conv->name);
+	const char *name;
 	gchar *buf;
-
-	buf = g_strdup_printf("%s.html", purple_normalize(conv->account, conv->name));
-
+	gchar *c;
+
+	if (buddy != NULL)
+		name = purple_buddy_get_contact_alias(buddy);
+	else
+		name = purple_normalize(conv->account, conv->name);
+
+	buf = g_strdup_printf("%s.html", name);
+	for (c = buf ; *c ; c++)
+	{
+		if (*c == '/' || *c == '\\')
+			*c = ' ';
+	}
 	purple_request_file(PIDGIN_CONVERSATION(conv), _("Save Conversation"),
-					  purple_escape_filename(buf),
+					  buf,
 					  TRUE, G_CALLBACK(savelog_writefile_cb), NULL,
 					  NULL, NULL, conv,
 					  conv);