/soc/2012/tomkiewicz/gg: f4d15445488e: Merge 177359654a3d from t...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Thu Jul 5 13:31:50 EDT 2012


Changeset: f4d15445488e005d36350b2b3379bd17a57f6d12
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-06-25 18:28 +0200
Branch:	 soc.2012.gg
URL: http://hg.pidgin.im/soc/2012/tomkiewicz/gg/rev/f4d15445488e

Description:

Merge 177359654a3d from trunk

diffstat:

 .hgignore                                 |    15 +
 .hgtags                                   |    86 +
 COPYRIGHT                                 |     1 +
 ChangeLog                                 |     3 +
 libpurple/ft.c                            |     3 +-
 libpurple/imgstore.h                      |     2 +
 libpurple/protocols/jabber/buddy.c        |     3 +-
 libpurple/protocols/msn/switchboard.c     |     3 +-
 libpurple/protocols/mxit/formcmds.c       |     6 +-
 libpurple/protocols/mxit/markup.c         |    10 +-
 libpurple/protocols/mxit/profile.c        |     3 +-
 libpurple/protocols/mxit/splashscreen.c   |     3 +-
 libpurple/protocols/oscar/odc.c           |     4 +-
 libpurple/protocols/oscar/oscar.c         |     6 +-
 libpurple/protocols/sametime/sametime.c   |     2 +-
 libpurple/protocols/silc/ops.c            |     4 +-
 libpurple/protocols/yahoo/yahoo_profile.c |     3 +-
 libpurple/proxy.c                         |   145 +-
 libpurple/util.c                          |   359 +++++
 libpurple/util.h                          |    13 +
 pidgin/gtkblist.c                         |     1 +
 pidgin/gtkconv.c                          |    72 +-
 pidgin/gtkstatusbox.h                     |     4 +-
 pidgin/gtkutils.c                         |     4 +-
 pidgin/gtkwebview.c                       |   481 ++++---
 pidgin/gtkwebview.h                       |    76 +-
 pidgin/gtkwebviewtoolbar.c                |   882 +++++-------
 pidgin/plugins/xmppconsole.c              |   160 +-
 po/de.po                                  |  1905 ++++++++++++++++------------
 29 files changed, 2562 insertions(+), 1697 deletions(-)

diffs (truncated from 6235 to 300 lines):

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -7,15 +7,30 @@
 .*/perl/common/[^/]+\.c$
 .*/perl/common/blib.*
 .*/perl/common/pm_to_blib$
+.*~$
+.*\.a$
+.*\.bak$
 .*\.bs$
 .*\.def$
+\.deps
 .*\.dll$
 .*\.exe$
+.*\.g?mo$
+.*\.la$
+\.libs
+.*\.lo$
 .*\.loT$
+.*\.o$
+.*\.orig$
+.*\.pyc$
+.*\.pyo$
+.*\.rej$
+.*\.so$
 Doxyfile(\.mingw)?$
 VERSION$
 aclocal.m4
 autogen.args
+autom4te.*\.cache
 compile
 config.cache
 config.guess
diff --git a/.hgtags b/.hgtags
new file mode 100644
--- /dev/null
+++ b/.hgtags
@@ -0,0 +1,86 @@
+d812dd63e689cb0fd60015eef671ec83c6f3ff8a v0.54
+f49f4ab77014183973405181dd92edf65e8b4dcd v0.55
+7ff6f30d688e18b2601edb1df73035567d3e4644 v0.56
+bfd5a69f995cc4f233e0742da0a46181ce5516fc v0.57
+cc5cde268059d1b9252f389682a7ea99befc442c v0.58
+0c7331596d448fff0ca93fa691f21b497055ea2f v0.59
+c224575f8eb881e67d08d1c6094837d33d8706eb v0.60
+c224575f8eb881e67d08d1c6094837d33d8706eb ZERO_DOT_FUCKING_SIXTY
+deed98aa31812639fd7254114b00520318a165db v0.62
+8662b9123cbf6bbae57f449c944ce5a9fab08aab v0.63
+5b623486acb2d22ad281ec4ca98ea065fe8e4ba7 v0.64
+e658e3d8c606a1682de9bf984fddc92c36cc88bc v0.65
+12d3fe5e5b1bde69be1b71bc58d24cb1f27e5a57 v0.67
+27bd2a70b5a43d22ea8d18f99e6e33a7cbad988a v0.68
+64caf5a74e41b9e00feddec214feebadad365dad v0.69
+b1c86e03b94c431e8503837df024e1bc084947d0 v0.70
+2f69d33ab267080d1f087122d99ffc3dbeedc767 v0.71
+6433ba1f3d07caf648351dd6adb4d46d942ae6fd v0.72
+a05075fd93a308da129a80563fb3e8790dfddc6a v0.73
+1701b0c05fb230604f6c7f1da92a6c92df5fa60c v0.75
+1c2387d7dc8a031e2eafc0fa5907072457327683 v0.76
+f2e325d6dcbbbaaa4a8f424be7fcf85716378127 v0.77
+b95adbd031d5450ec6380fa8ebb829a3356b01fc v0.78
+931f778136d2ea51533ae240062d0f5c94677007 v0.79
+f6fad583d7dcc4d52a47b3d45e6c13d98eedf528 v0.80
+442f0fc23d7758583daf79f41a0fb79359c83940 v0.81
+c63823101be4b343b89cc2cf08a9edac3c0c35fe v0.82
+75b4ea520acd299a844ad3e6ca6bbf256b6b255a v1.5.1
+9b9d7869632670be9d8854ad8beddd479119ff5d v2.0.0beta4
+4366b2b87b5512fe68d816e82264f31c83b6ad25 v2.0.0beta5
+1be10968797300a6a4dc4612eec9bce0339f04b9 v2.0.0beta6
+1f0524cd66b3f108e63723eac64a77b1c34fb9a5 v2_0_0beta7
+4490afd5c483be08470900d6bdaf48e6a4bf1b13 v2.0.0
+c5abad45e8a7ccb777ff38f325d074314ca27dcb v2.0.1
+87854ccfae544467c988edbac854c1ae2018eed4 v2.0.2
+77c6142b3dcbab82ab7e039e3846a9049959d1a6 v2.1.0
+b20348da23da8150e224115e46f05b6516f06b6c v2.1.1
+84a0da498a94f965b9a35353201171745b7f7ac0 soc_07_finchfeat_end
+9fc4dcfbeeec6d30f679d8e7c6f16cb494893a4a v2.2.0
+e7dd28283ec3a014386b5c0c26d72abe7f319c7c v2.2.1
+420a401299c50f9d30046b2472a552378fbd682f v2.2.2
+8e8cba27fc7816cd4f4c7cf3b88766fa17044415 v2.3.0
+aa94ee871b7f592e064f2d3bcf4cd8ac323b2cb2 v2.3.1
+6ab75c14d1a29d73c08629af1b1a37dc7e7c0e7c v2.4.0
+45429d7c48f20743dd5b7257893dd460b39dd8b6 v2.4.1
+f0bf4538cf3a89fcd99e72c168f92556225ab5dc v2.4.2
+ec9776e51fb12b7f5379770f8fbafb66198f2755 v2.4.3
+299954ac2431e66e4b02fc2fcd21599e5ce79f4f v2.5.0
+123de59aee23f9bd7baa167b9bf32ea6d54cad84 v2.5.1
+9445b5d874861a760bff3c9cbdd9a5838e636e11 v2.5.2
+fbd4b005d1a82bca8afd78a2f1a833950eb5d842 v2.5.3
+82ad6019d2a23122014bfd6ab041ea029561857d v2.5.3a
+b677fdd3a6162fee14352acb9fb69077ed9af018 v2.5.4
+ec395082163ff0a5d3f47756fc91df07120290a1 v2.5.5
+7daaab423cd29201f8c3cf48912d27a2ebdbe026 soc_2009_vulture_start
+662d7dad27b9648391a2965a1f62a9bb8f95e874 v2.5.6
+550e6ec7c9fd15db9956387a5775df07322ec766 v2.5.7
+1533d33dee9a832f566d49879589c7e27323f8a0 v2.5.8
+3ef2ec3fc4d3492c5232c790047162ffee326dc1 v2.5.9
+7af7adebd500f38cc69eaad8b02a951af1eae624 v2.6.0
+996b28f252ebdbdbc3f414948aa7d84a236a9cd1 v2.6.1
+2bd78084506643b0d52a0771b8e755586af64d85 soc_2009_vulture_end
+7be7530f775fc5d6cb000303aa6fb5f920e0982d v2.6.2
+a17a77cbefc76c92ebdb54ff282a463619f9db1b v2.6.3
+03107f67cd77c5198c5bf1e1068a95c8172c32c5 v2.6.4
+09a30290163a65c61402fff98ac0dd609bc261ec v2.6.5
+41919b7e238aaa6f975741672a5eded86d12a354 v2.6.6
+383aeae59ce2be0c5bd286938ce640bbc536f2c2 v2.7.0
+a331f53dbf74f7ec3e50a12901e142ce35741171 v2.7.1
+8cf083761af48bc1e2cd438947ba12c78ec3d85c v2.7.2
+d79eaf981448fd057af7e62e8db9fcd3c597c309 v2.7.3
+2523c556d8db3af086088dd99746d21449f1e71a v2.7.4
+7bbb1a32b19aaa5784959670a26e202fab7dbef2 v2.7.5
+f432b3f58724fce08169eb1745cf01019142f7e4 v2.7.6
+9c6db2c041007b46fada6642abcae232eb69bb05 v2.7.7
+f9f06151db38f279ab34dba08abea1b19f92403e v2.7.8
+2b4adcd31accfb6d083b63f9e90a041366ea349d v2.7.9
+71262d97b3f97c11a2df49ab54d62f6660e773ed v2.7.10
+7a8d014ad83116d52aa3742cee92182836a14d84 v2.7.11
+9ecfb4eb0153f06632730f0d4cee7ae2f5c7d9a1 v2.8.0
+cefaf8feb01cdc8ce0ad9f613e9085daad1fca6a v2.9.0
+a217bdda7c4b41250e57819b45127b739b7f5828 v2.10.0
+26af8696fb84cc8d3f8f52d2a7c3e0ae79869866 v2.10.1
+fbe2ce8d288fe7e2ab4bf180a537664ef7f8e907 v2.10.2
+dab0253fe3754ffd68e070cdfbbf31cd79f9a421 v2.10.3
+1d00b9e4aa6add6dca97cca4ac614d63bd105dfd v2.10.4
diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -478,6 +478,7 @@
 Torrey Searle
 Peter Seebach
 Don Seiler
+Mihai Serban
 Leonardo Serra
 Matteo Settenvini
 Colin Seymour
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,9 @@
 	  was an offline message. (Flavius Anton) (#2497)
 
 version 2.10.5:
+	libpurple:
+	* Add support for GNOME3 proxy settings. (Mihai Serban) (#15054)
+
 	Pidgin:
 	* Fix a crash that may occur when trying to ignore a user who is
 	  not in the current chat room. (#15139)
diff --git a/libpurple/ft.c b/libpurple/ft.c
--- a/libpurple/ft.c
+++ b/libpurple/ft.c
@@ -306,7 +306,8 @@
 		int id = purple_imgstore_add_with_id(data, size, NULL);
 
 		message_with_img =
-			g_strdup_printf("<img id='%d'> %s", id, escaped);
+			g_strdup_printf("<img src='" PURPLE_STORED_IMAGE_PROTOCOL "%d'> %s",
+			                id, escaped);
 		purple_conversation_write(conv, NULL, message_with_img, flags,
 			time(NULL));
 		purple_imgstore_unref_by_id(id);
diff --git a/libpurple/imgstore.h b/libpurple/imgstore.h
--- a/libpurple/imgstore.h
+++ b/libpurple/imgstore.h
@@ -29,6 +29,8 @@
 
 #include <glib.h>
 
+#define PURPLE_STORED_IMAGE_PROTOCOL "purple-image:"
+
 /** A reference-counted immutable wrapper around an image's data and its
  *  filename.
  */
diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c
--- a/libpurple/protocols/jabber/buddy.c
+++ b/libpurple/protocols/jabber/buddy.c
@@ -1204,7 +1204,8 @@
 						char *hash;
 
 						jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png")));
-						img_text = g_strdup_printf("<img id='%d'>", GPOINTER_TO_INT(jbi->vcard_imgids->data));
+						img_text = g_strdup_printf("<img src='" PURPLE_STORED_IMAGE_PROTOCOL "%d'>",
+						                           GPOINTER_TO_INT(jbi->vcard_imgids->data));
 
 						purple_notify_user_info_add_pair_html(user_info, (photo ? _("Photo") : _("Logo")), img_text);
 
diff --git a/libpurple/protocols/msn/switchboard.c b/libpurple/protocols/msn/switchboard.c
--- a/libpurple/protocols/msn/switchboard.c
+++ b/libpurple/protocols/msn/switchboard.c
@@ -828,7 +828,8 @@
 	}
 
 	imgid = purple_imgstore_add_with_id(image_data, image_len, NULL);
-	image_msg = g_strdup_printf("<IMG ID='%d'>", imgid);
+	image_msg = g_strdup_printf("<IMG SRC='" PURPLE_STORED_IMAGE_PROTOCOL "%d'>",
+	                            imgid);
 
 	if (swboard->current_users > 1 ||
 		((swboard->conv != NULL) &&
diff --git a/libpurple/protocols/mxit/formcmds.c b/libpurple/protocols/mxit/formcmds.c
--- a/libpurple/protocols/mxit/formcmds.c
+++ b/libpurple/protocols/mxit/formcmds.c
@@ -327,7 +327,6 @@
 	const char*	img;
 	const char*	reply;
 	guchar*		rawimg;
-	char		link[256];
 	gsize		rawimglen;
 	int			imgid;
 
@@ -336,8 +335,9 @@
 		rawimg = purple_base64_decode(img, &rawimglen);
 		//purple_util_write_data_to_file_absolute("/tmp/mxitinline.png", (char*) rawimg, rawimglen);
 		imgid = purple_imgstore_add_with_id(rawimg, rawimglen, NULL);
-		g_snprintf(link, sizeof(link), "<img id=\"%i\">", imgid);
-		g_string_append_printf(msg, "%s", link);
+		g_string_append_printf(msg,
+		                       "<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL "%i\">",
+		                       imgid);
 		mx->flags |= PURPLE_MESSAGE_IMAGES;
 	}
 	else {
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -403,7 +403,9 @@
 			}
 			else {
 				/* insert img tag */
-				g_snprintf( tag, sizeof( tag ), "<img id=\"%i\">", *img_id );
+				g_snprintf( tag, sizeof( tag ),
+				            "<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL "%i\">",
+				            *img_id );
 				g_string_insert( mx->msg, start, tag );
 			}
 		}
@@ -1066,7 +1068,7 @@
 	 *   Font colour:	<font color=#">...</font>
 	 *   Links:			<a href="">...</a>
 	 *   Newline:		<br>
-	 *   Inline image:  <IMG ID="">
+	 *   Inline image:  <IMG SRC="">
 	 * The following characters are also encoded:
 	 *   &  "  <  >
 	 */
@@ -1133,11 +1135,11 @@
 						g_free( tag );
 					}
 				}
-				else if ( purple_str_has_prefix( &message[i], "<IMG ID=" ) ) {
+				else if ( purple_str_has_prefix( &message[i], "<IMG SRC=" PURPLE_STORED_IMAGE_PROTOCOL) ) {
 					/* inline image */
 					int imgid;
 
-					if ( sscanf( &message[i+9], "%i", &imgid ) ) {
+					if ( sscanf( &message[i+sizeof("<IMG SRC=" PURPLE_STORED_IMAGE_PROTOCOL)-1], "%i", &imgid ) ) {
 						inline_image_add( mx, imgid );
 						*msgtype = CP_MSGTYPE_COMMAND;		/* inline image must be sent as a MXit command */
 					}
diff --git a/libpurple/protocols/mxit/profile.c b/libpurple/protocols/mxit/profile.c
--- a/libpurple/protocols/mxit/profile.c
+++ b/libpurple/protocols/mxit/profile.c
@@ -233,7 +233,8 @@
 			if ( contact->imgid ) {
 				/* this invite has a avatar */
 				char* img_text;
-				img_text = g_strdup_printf( "<img id='%d'>", contact->imgid );
+				img_text = g_strdup_printf( "<img src='" PURPLE_STORED_IMAGE_PROTOCOL "%d'>",
+				                            contact->imgid );
 				purple_notify_user_info_add_pair_html( info, _( "Photo" ), img_text );
 				g_free(img_text);
 			}
diff --git a/libpurple/protocols/mxit/splashscreen.c b/libpurple/protocols/mxit/splashscreen.c
--- a/libpurple/protocols/mxit/splashscreen.c
+++ b/libpurple/protocols/mxit/splashscreen.c
@@ -187,7 +187,8 @@
 		imgid = purple_imgstore_add_with_id(g_memdup(imgdata, imglen), imglen, NULL);
 
 		/* Generate and display message */
-		g_snprintf(buf, sizeof(buf), "<img id=\"%d\">", imgid);
+		g_snprintf(buf, sizeof(buf),
+		           "<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL "%d\">", imgid);
 
 		/* Open a request-type popup to display the image */
 		{
diff --git a/libpurple/protocols/oscar/odc.c b/libpurple/protocols/oscar/odc.c
--- a/libpurple/protocols/oscar/odc.c
+++ b/libpurple/protocols/oscar/odc.c
@@ -376,7 +376,9 @@
 		if (imgid != 0)
 		{
 			/* Write the new image tag */
-			g_string_append_printf(newmsg, "<IMG ID=\"%d\">", imgid);
+			g_string_append_printf(newmsg,
+			                       "<IMG SRC=\"" PURPLE_STORED_IMAGE_PROTOCOL "%d\">",
+			                       imgid);
 		}
 
 		/* Continue from the end of the tag */



More information about the Commits mailing list