changeset 23551:8263c86099df

propagate from branch 'im.pidgin.pidgin' (head 88a24003053cda8454a59fd448eb6575bdea2e0e) to branch 'im.pidgin.cpw.qulogic.msn' (head a55416290c960231dcdcf3632a0e9262906c9a6a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 23 Jun 2008 05:38:55 +0000
parents 540a26a1a88d (diff) efa4534fd23a (current diff)
children 711773577380
files
diffstat 5 files changed, 8 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_auth.c	Mon Jun 23 05:36:52 2008 +0000
+++ b/libpurple/protocols/oscar/family_auth.c	Mon Jun 23 05:38:55 2008 +0000
@@ -81,12 +81,9 @@
 static int
 aim_encode_password_md5(const char *password, size_t password_len, const char *key, guint8 *digest)
 {
-	PurpleCipher *cipher;
 	PurpleCipherContext *context;
 
-	cipher = purple_ciphers_find_cipher("md5");
-
-	context = purple_cipher_context_new(cipher, NULL);
+	context = purple_cipher_context_new_by_name("md5", NULL);
 	purple_cipher_context_append(context, (const guchar *)key, strlen(key));
 	purple_cipher_context_append(context, (const guchar *)password, password_len);
 	purple_cipher_context_append(context, (const guchar *)AIM_MD5_STRING, strlen(AIM_MD5_STRING));
--- a/libpurple/protocols/oscar/family_oservice.c	Mon Jun 23 05:36:52 2008 +0000
+++ b/libpurple/protocols/oscar/family_oservice.c	Mon Jun 23 05:38:55 2008 +0000
@@ -952,13 +952,10 @@
 		byte_stream_putraw(&bs, buf, 0x10);
 
 	} else if (buf && (len > 0)) { /* use input buffer */
-		PurpleCipher *cipher;
 		PurpleCipherContext *context;
 		guchar digest[16];
 
-		cipher = purple_ciphers_find_cipher("md5");
-
-		context = purple_cipher_context_new(cipher, NULL);
+		context = purple_cipher_context_new_by_name("md5", NULL);
 		purple_cipher_context_append(context, buf, len);
 		purple_cipher_context_digest(context, 16, digest, NULL);
 		purple_cipher_context_destroy(context);
@@ -966,7 +963,6 @@
 		byte_stream_putraw(&bs, digest, 0x10);
 
 	} else if (len == 0) { /* no length, just hash NULL (buf is optional) */
-		PurpleCipher *cipher;
 		PurpleCipherContext *context;
 		guchar digest[16];
 		guint8 nil = '\0';
@@ -975,9 +971,7 @@
 		 * I'm not sure if we really need the empty append with the
 		 * new MD5 functions, so I'll leave it in, just in case.
 		 */
-		cipher = purple_ciphers_find_cipher("md5");
-
-		context = purple_cipher_context_new(cipher, NULL);
+		context = purple_cipher_context_new_by_name("md5", NULL);
 		purple_cipher_context_append(context, &nil, 0);
 		purple_cipher_context_digest(context, 16, digest, NULL);
 		purple_cipher_context_destroy(context);
--- a/libpurple/protocols/oscar/oscar.c	Mon Jun 23 05:36:52 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon Jun 23 05:38:55 2008 +0000
@@ -6424,15 +6424,12 @@
 	if (img == NULL) {
 		aim_ssi_delicon(od);
 	} else {
-		PurpleCipher *cipher;
 		PurpleCipherContext *context;
 		guchar md5[16];
 		gconstpointer data = purple_imgstore_get_data(img);
 		size_t len = purple_imgstore_get_size(img);
 
-
-		cipher = purple_ciphers_find_cipher("md5");
-		context = purple_cipher_context_new(cipher, NULL);
+		context = purple_cipher_context_new_by_name("md5", NULL);
 		purple_cipher_context_append(context, data, len);
 		purple_cipher_context_digest(context, 16, md5, NULL);
 		purple_cipher_context_destroy(context);
--- a/pidgin/gtkimhtml.c	Mon Jun 23 05:36:52 2008 +0000
+++ b/pidgin/gtkimhtml.c	Mon Jun 23 05:38:55 2008 +0000
@@ -768,7 +768,7 @@
 	gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(widget), &end,
 	                                   buf_x + event->area.width, buf_y + event->area.height);
 
-
+	gtk_text_iter_order(&start, &end);
 
 	cur = start;
 
--- a/pidgin/gtkmenutray.c	Mon Jun 23 05:36:52 2008 +0000
+++ b/pidgin/gtkmenutray.c	Mon Jun 23 05:38:55 2008 +0000
@@ -98,8 +98,9 @@
 		gtk_widget_destroy(GTK_WIDGET(tray->tray));
 #endif
 
-	if (tray->tooltips)
-		g_object_ref_sink(G_OBJECT(tray->tooltips));
+	if (tray->tooltips) {
+		gtk_object_sink(GTK_OBJECT(tray->tooltips));
+	}
 
 	G_OBJECT_CLASS(parent_class)->finalize(obj);
 }