changeset 16517:18d566625ae5

merge of 'c303a7c8b23b07ec77b907c286f1f7eb37ffb076' and 'c4af5d58ae0a812912ffe29dc285f3d08afb5425'
author Tim Ringenbach <marv@pidgin.im>
date Mon, 23 Apr 2007 02:44:04 +0000
parents ce6b4346e56d (current diff) d8d5b7f45466 (diff)
children 3c1c77f441c6
files
diffstat 8 files changed, 59 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/config.h.mingw	Mon Apr 23 02:04:41 2007 +0000
+++ b/config.h.mingw	Mon Apr 23 02:44:04 2007 +0000
@@ -325,7 +325,7 @@
 /* #define HAVE_SIGNAL_H 1 */
 
 /* Define if we have silcmime.h */
-/* #undef HAVE_SILCMIME_H */
+#define HAVE_SILCMIME_H 1
 
 /* Define to 1 if you have the <smime.h> header file. */
 /* #undef HAVE_SMIME_H */
--- a/doc/funniest_home_convos.txt	Mon Apr 23 02:04:41 2007 +0000
+++ b/doc/funniest_home_convos.txt	Mon Apr 23 02:44:04 2007 +0000
@@ -451,3 +451,12 @@
 (07:54:03 PM) clueless21:  what's an im client?
 (07:54:25 PM) Nathan Walp: it lets you chat with other people, like we are chatting now
 (07:54:45 PM) clueless21:  oooooooooo... thanks
+
+23:58 -!- seanegan is now known as beta7
+23:58 <beta7> Hey, guys, remember me?
+23:59 <beta7> We were all supposed to be working on getting me out.
+23:59 <beta7> you guys remember that?
+23:59 -!- mode/#pidgin [+o elb] by ChanServ
+23:59 -!- beta7 was kicked from #pidgin by elb [getting feisty, are we?]
+23:59 -!- mode/#pidgin [-o elb] by ChanServ
+23:59 <marv> elb: good job getting beta7 out
--- a/finch/gntblist.c	Mon Apr 23 02:04:41 2007 +0000
+++ b/finch/gntblist.c	Mon Apr 23 02:44:04 2007 +0000
@@ -114,6 +114,7 @@
 static void account_signed_on_cb(void);
 
 /* Sort functions */
+static int blist_node_compare_position(PurpleBlistNode *n1, PurpleBlistNode *n2);
 static int blist_node_compare_text(PurpleBlistNode *n1, PurpleBlistNode *n2);
 static int blist_node_compare_status(PurpleBlistNode *n1, PurpleBlistNode *n2);
 static int blist_node_compare_log(PurpleBlistNode *n1, PurpleBlistNode *n2);
@@ -1778,6 +1779,15 @@
 }
 
 static int
+blist_node_compare_position(PurpleBlistNode *n1, PurpleBlistNode *n2)
+{
+	while ((n1 = n1->prev) != NULL)
+		if (n1 == n2)
+			return 1;
+	return -1;
+}
+
+static int
 blist_node_compare_text(PurpleBlistNode *n1, PurpleBlistNode *n2)
 {
 	const char *s1, *s2;
@@ -1788,10 +1798,6 @@
 	
 	switch (n1->type)
 	{
-		case PURPLE_BLIST_GROUP_NODE:
-			s1 = ((PurpleGroup*)n1)->name;
-			s2 = ((PurpleGroup*)n2)->name;
-			break;
 		case PURPLE_BLIST_CHAT_NODE:
 			s1 = purple_chat_get_name((PurpleChat*)n1);
 			s2 = purple_chat_get_name((PurpleChat*)n2);
@@ -1805,7 +1811,7 @@
 			s2 = purple_contact_get_alias((PurpleContact*)n2);
 			break;
 		default:
-			return -1;
+			return blist_node_compare_position(n1, n2);
 	}
 
 	us1 = g_utf8_strup(s1, -1);
@@ -1836,6 +1842,7 @@
 				return ret;
 			break;
 		default:
+			return blist_node_compare_position(n1, n2);
 			break;
 	}
 
@@ -1882,6 +1889,7 @@
 				return ret;
 			break;
 		default:
+			return blist_node_compare_position(n1, n2);
 			break;
 	}
 	ret = blist_node_compare_text(n1, n2);
--- a/libpurple/account.c	Mon Apr 23 02:04:41 2007 +0000
+++ b/libpurple/account.c	Mon Apr 23 02:44:04 2007 +0000
@@ -792,6 +792,8 @@
 	}
 
 	xmlnode_free(node);
+
+	purple_buddy_icons_account_loaded_cb();
 }
 
 
--- a/libpurple/buddyicon.c	Mon Apr 23 02:04:41 2007 +0000
+++ b/libpurple/buddyicon.c	Mon Apr 23 02:44:04 2007 +0000
@@ -960,6 +960,31 @@
 }
 
 void
+purple_buddy_icons_account_loaded_cb()
+{
+	const char *dirname = purple_buddy_icons_get_cache_dir();
+	GList *cur;
+
+	for (cur = purple_accounts_get_all(); cur != NULL; cur = cur->next)
+	{
+		PurpleAccount *account = cur->data;
+		const char *account_icon_file = purple_account_get_string(account, "buddy_icon", NULL);
+
+		if (account_icon_file != NULL)
+		{
+			char *path = g_build_filename(dirname, account_icon_file, NULL);
+			if (!g_file_test(path, G_FILE_TEST_EXISTS))
+			{
+				purple_account_set_string(account, "buddy_icon", NULL);
+			} else {
+				ref_filename(account_icon_file);
+			}
+			g_free(path);
+		}
+	}
+}
+
+void
 purple_buddy_icons_blist_loaded_cb()
 {
 	PurpleBlistNode *node = purple_blist_get_root();
@@ -999,7 +1024,7 @@
 				else
 				{
 					char *path = g_build_filename(dirname, filename, NULL);
-					if (!g_file_test(filename, G_FILE_TEST_EXISTS))
+					if (!g_file_test(path, G_FILE_TEST_EXISTS))
 					{
 						purple_blist_node_remove_setting(node,
 						                                 "buddy_icon");
--- a/libpurple/internal.h	Mon Apr 23 02:04:41 2007 +0000
+++ b/libpurple/internal.h	Mon Apr 23 02:44:04 2007 +0000
@@ -184,6 +184,11 @@
 
 #define PURPLE_WEBSITE "http://pidgin.im/"
 
+/* This is for the accounts code to notify the buddy icon code that
+ * it's done loading.  We may want to replace this with a signal. */
+void
+purple_buddy_icons_account_loaded_cb(void);
+
 /* This is for the buddy list to notify the buddy icon code that
  * it's done loading.  We may want to replace this with a signal. */
 void
--- a/libpurple/protocols/jabber/auth.c	Mon Apr 23 02:04:41 2007 +0000
+++ b/libpurple/protocols/jabber/auth.c	Mon Apr 23 02:44:04 2007 +0000
@@ -294,7 +294,7 @@
 					purple_request_yes_no(js->gc, _("Plaintext Authentication"),
 							_("Plaintext Authentication"),
 							_("This server requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
-							2, js->gc->account,
+							2, js->gc->account, NULL, NULL, NULL,
 							allow_cyrus_plaintext_auth,
 							disallow_plaintext_auth);
 					return;
--- a/libpurple/protocols/silc/util.c	Mon Apr 23 02:04:41 2007 +0000
+++ b/libpurple/protocols/silc/util.c	Mon Apr 23 02:44:04 2007 +0000
@@ -676,9 +676,9 @@
 		}
 
 		id = g_datalist_get_data(&attribs, "id");
-		if (id && (image = purple_imgstore_get(atoi(id)))) {
+		if (id && (image = purple_imgstore_find_by_id(atoi(id)))) {
 			unsigned long imglen = purple_imgstore_get_size(image);
-			gpointer img = purple_imgstore_get_data(image);
+			gconstpointer img = purple_imgstore_get_data(image);
 
 			p = silc_mime_alloc();