merge of 'd2d2dada677fccf7ea8c4db3894162c1c4112086'

Mon, 21 May 2007 14:42:45 +0000

author
Eric Polino <aluink@pidgin.im>
date
Mon, 21 May 2007 14:42:45 +0000
changeset 17264
8074a0f5a16e
parent 17191
d2d2dada677f (current diff)
parent 17263
3d4d78600825 (diff)
child 17265
fd5b0ca330a3
child 17269
160516669e11
child 17376
8987df8d5615

merge of 'd2d2dada677fccf7ea8c4db3894162c1c4112086'
and '3d4d7860082540f7315f697467f7b378c3d35ebe'

--- a/COPYRIGHT	Fri May 18 14:00:33 2007 +0000
+++ b/COPYRIGHT	Mon May 21 14:42:45 2007 +0000
@@ -87,6 +87,7 @@
 Palmer Cox
 Jeramey Crawford
 Michael Culbertson
+Steven Danna
 Martijn Dekker
 Vinicius Depizzol
 Philip Derrin
@@ -172,6 +173,7 @@
 Thomas Huriaux
 Instant Messaging Freedom, Inc.
 Vitaliy Ischenko
+Intel Corporation
 Scott Jackson
 Hans Petter Jansson
 Henry Jen
@@ -303,7 +305,7 @@
 David Schmitt
 Mark Schneider
 Evan Schoenberg
-Gabriel Schulof
+Gabriel Schulhof
 Federico Schwindt
 Torrey Searle
 Peter Seebach
@@ -356,6 +358,7 @@
 Junichi Uekawa
 István Váradi
 Martijn van Beers
+Arjan van de Ven
 Philip Van Hoof
 Kristof Vansant
 James Vega
--- a/ChangeLog	Fri May 18 14:00:33 2007 +0000
+++ b/ChangeLog	Mon May 21 14:42:45 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/gntaccount.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntaccount.c	Mon May 21 14:42:45 2007 +0000
@@ -930,11 +930,15 @@
 
 static PurpleAccountUiOps ui_ops =
 {
-	.notify_added = notify_added,
-	.status_changed = NULL,
-	.request_add  = request_add,
-	.request_authorize = finch_request_authorize,
-	.close_account_request = finch_request_close
+	notify_added,
+	NULL,
+	request_add,
+	finch_request_authorize,
+	finch_request_close,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 PurpleAccountUiOps *finch_accounts_get_ui_ops()
--- a/finch/gntblist.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntblist.c	Mon May 21 14:42:45 2007 +0000
@@ -447,9 +447,13 @@
 	node_remove,
 	NULL,
 	NULL,
-	.request_add_buddy = finch_request_add_buddy,
-	.request_add_chat = finch_request_add_chat,
-	.request_add_group = finch_request_add_group
+	finch_request_add_buddy,
+	finch_request_add_chat,
+	finch_request_add_group,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 static gpointer
--- a/finch/gntconn.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntconn.c	Mon May 21 14:42:45 2007 +0000
@@ -56,11 +56,17 @@
 
 static PurpleConnectionUiOps ops = 
 {
-	.connect_progress = NULL,
-	.connected = NULL,
-	.disconnected = NULL,
-	.notice = NULL,
-	.report_disconnect = finch_connection_report_disconnect
+	NULL, /* connect_progress */
+	NULL, /* connected */
+	NULL, /* disconnected */
+	NULL, /* notice */
+	finch_connection_report_disconnect,
+	NULL, /* network_connected */
+	NULL, /* network_disconnected */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 PurpleConnectionUiOps *finch_connections_get_ui_ops()
--- a/finch/gntconv.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntconv.c	Mon May 21 14:42:45 2007 +0000
@@ -747,7 +747,7 @@
 }
 
 static void
-finch_chat_remove_user(PurpleConversation *conv, GList *list)
+finch_chat_remove_users(PurpleConversation *conv, GList *list)
 {
 	/* Remove the name from string completion */
 	FinchConv *ggc = conv->ui_data;
@@ -769,20 +769,25 @@
 
 static PurpleConversationUiOps conv_ui_ops = 
 {
-	.create_conversation = finch_create_conversation,
-	.destroy_conversation = finch_destroy_conversation,
-	.write_chat = finch_write_chat,
-	.write_im = finch_write_im,
-	.write_conv = finch_write_conv,
-	.chat_add_users = finch_chat_add_users,
-	.chat_rename_user = finch_chat_rename_user,
-	.chat_remove_users = finch_chat_remove_user,
-	.chat_update_user = finch_chat_update_user,
-	.present = NULL,
-	.has_focus = NULL,
-	.custom_smiley_add = NULL,
-	.custom_smiley_write = NULL,
-	.custom_smiley_close = NULL
+	finch_create_conversation,
+	finch_destroy_conversation,
+	finch_write_chat,
+	finch_write_im,
+	finch_write_conv,
+	finch_chat_add_users,
+	finch_chat_rename_user,
+	finch_chat_remove_users,
+	finch_chat_update_user,
+	NULL, /* present */
+	NULL, /* has_focus */
+	NULL, /* custom_smiley_add */
+	NULL, /* custom_smiley_write */
+	NULL, /* custom_smiley_close */
+	NULL, /* send_confirm */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 PurpleConversationUiOps *finch_conv_get_ui_ops()
--- a/finch/gntnotify.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntnotify.c	Mon May 21 14:42:45 2007 +0000
@@ -405,17 +405,21 @@
 
 static PurpleNotifyUiOps ops = 
 {
-	.notify_message = finch_notify_message,
-	.close_notify = finch_close_notify,       /* The rest of the notify-uiops return a GntWidget.
-                                              These widgets should be destroyed from here. */
-	.notify_formatted = finch_notify_formatted,
-	.notify_email = finch_notify_email,
-	.notify_emails = finch_notify_emails,
-	.notify_userinfo = finch_notify_userinfo,
+	finch_notify_message,
+	finch_notify_email,
+	finch_notify_emails,
+	finch_notify_formatted,
+	finch_notify_searchresults,
+	finch_notify_sr_new_rows,
+	finch_notify_userinfo,
+	NULL,                     /* notify_uri is of low-priority to me. --sadrul */
+	finch_close_notify,       /* The rest of the notify-uiops return a GntWidget.
+                                     These widgets should be destroyed from here. */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 
-	.notify_searchresults = finch_notify_searchresults,
-	.notify_searchresults_new_rows = finch_notify_sr_new_rows,
-	.notify_uri = NULL                     /* This is of low-priority to me */
 };
 
 PurpleNotifyUiOps *finch_notify_get_ui_ops()
--- a/finch/gntplugin.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntplugin.c	Mon May 21 14:42:45 2007 +0000
@@ -67,11 +67,10 @@
 static void
 plugin_toggled_cb(GntWidget *tree, PurplePlugin *plugin, gpointer null)
 {
-	/* TODO: Mark these strings for translation after the freeze */
 	if (gnt_tree_get_choice(GNT_TREE(tree), plugin))
 	{
 		if (!purple_plugin_load(plugin)) {
-			purple_notify_error(NULL, "ERROR", "loading plugin failed", NULL);
+			purple_notify_error(NULL, _("ERROR"), _("loading plugin failed"), NULL);
 			gnt_tree_set_choice(GNT_TREE(tree), plugin, FALSE);
 		}
 	}
@@ -80,7 +79,7 @@
 		GntWidget *win;
 
 		if (!purple_plugin_unload(plugin)) {
-			purple_notify_error(NULL, "ERROR", "unloading plugin failed", NULL);
+			purple_notify_error(NULL, _("ERROR"), _("unloading plugin failed"), NULL);
 			gnt_tree_set_choice(GNT_TREE(tree), plugin, TRUE);
 		}
 
--- a/finch/gntprefs.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntprefs.c	Mon May 21 14:42:45 2007 +0000
@@ -76,7 +76,7 @@
 get_idle_options()
 {
 	GList *list = NULL;
-	list = g_list_append(list, "Based on keyboard use"); /* XXX: string freeze */
+	list = g_list_append(list, (char *)_("Based on keyboard use"));
 	list = g_list_append(list, "system");
 	list = g_list_append(list, (char*)_("From last sent message"));
 	list = g_list_append(list, "purple");
--- a/finch/gntrequest.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/gntrequest.c	Mon May 21 14:42:45 2007 +0000
@@ -612,13 +612,17 @@
 
 static PurpleRequestUiOps uiops =
 {
-	.request_input = finch_request_input,
-	.close_request = finch_close_request,
-	.request_choice = finch_request_choice,
-	.request_action = finch_request_action,
-	.request_fields = finch_request_fields,
-	.request_file = finch_request_file,
-	.request_folder = NULL                        /* No plans for this */
+	finch_request_input,
+	finch_request_choice,
+	finch_request_action,
+	finch_request_fields,
+	finch_request_file,
+	finch_close_request,
+	NULL,                       /* No plans for request_folder */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 PurpleRequestUiOps *finch_request_get_ui_ops()
--- a/finch/libgnt/Makefile.am	Fri May 18 14:00:33 2007 +0000
+++ b/finch/libgnt/Makefile.am	Mon May 21 14:42:45 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/finch/libgnt/gntwm.c	Fri May 18 14:00:33 2007 +0000
+++ b/finch/libgnt/gntwm.c	Mon May 21 14:42:45 2007 +0000
@@ -697,7 +697,11 @@
 				if (bgp == -1)
 					bgp = COLOR_WHITE;
 				if (now & A_REVERSE)
-					fgp ^= bgp ^= fgp ^= bgp;  /* *wink* */
+				{
+					short tmp = fgp;
+					fgp = bgp;
+					bgp = tmp;
+				}
 				ret = color_content(fgp, &r, &g, &b);
 				fg.r = r; fg.b = b; fg.g = g;
 				ret = color_content(bgp, &r, &g, &b);
--- a/libpurple/account.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/account.c	Mon May 21 14:42:45 2007 +0000
@@ -548,9 +548,9 @@
 	data = xmlnode_get_attrib(node, "active");
 	if (data == NULL)
 		return;
-	if (strcasecmp(data, "true") == 0)
+	if (g_ascii_strcasecmp(data, "true") == 0)
 		active = TRUE;
-	else if (strcasecmp(data, "false") == 0)
+	else if (g_ascii_strcasecmp(data, "false") == 0)
 		active = FALSE;
 	else
 		return;
--- a/libpurple/cipher.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/cipher.c	Mon May 21 14:42:45 2007 +0000
@@ -2000,8 +2000,8 @@
 	/* Check for a supported algorithm. */
 	g_return_val_if_fail(algorithm == NULL ||
 						 *algorithm == '\0' ||
-						 strcasecmp(algorithm, "MD5") ||
-						 strcasecmp(algorithm, "MD5-sess"), NULL);
+						 g_ascii_strcasecmp(algorithm, "MD5") ||
+						 g_ascii_strcasecmp(algorithm, "MD5-sess"), NULL);
 
 	cipher = purple_ciphers_find_cipher("md5");
 	g_return_val_if_fail(cipher != NULL, NULL);
@@ -2014,7 +2014,7 @@
 	purple_cipher_context_append(context, (guchar *)":", 1);
 	purple_cipher_context_append(context, (guchar *)password, strlen(password));
 
-	if (algorithm != NULL && !strcasecmp(algorithm, "MD5-sess"))
+	if (algorithm != NULL && !g_ascii_strcasecmp(algorithm, "MD5-sess"))
 	{
 		guchar digest[16];
 
@@ -2065,14 +2065,14 @@
 	/* Check for a supported algorithm. */
 	g_return_val_if_fail(algorithm == NULL ||
 						 *algorithm == '\0' ||
-						 strcasecmp(algorithm, "MD5") ||
-						 strcasecmp(algorithm, "MD5-sess"), NULL);
+						 g_ascii_strcasecmp(algorithm, "MD5") ||
+						 g_ascii_strcasecmp(algorithm, "MD5-sess"), NULL);
 
 	/* Check for a supported "quality of protection". */
 	g_return_val_if_fail(qop == NULL ||
 						 *qop == '\0' ||
-						 strcasecmp(qop, "auth") ||
-						 strcasecmp(qop, "auth-int"), NULL);
+						 g_ascii_strcasecmp(qop, "auth") ||
+						 g_ascii_strcasecmp(qop, "auth-int"), NULL);
 
 	cipher = purple_ciphers_find_cipher("md5");
 	g_return_val_if_fail(cipher != NULL, NULL);
@@ -2083,7 +2083,7 @@
 	purple_cipher_context_append(context, (guchar *)":", 1);
 	purple_cipher_context_append(context, (guchar *)digest_uri, strlen(digest_uri));
 
-	if (qop != NULL && !strcasecmp(qop, "auth-int"))
+	if (qop != NULL && !g_ascii_strcasecmp(qop, "auth-int"))
 	{
 		PurpleCipherContext *context2;
 		gchar entity_hash[33];
--- a/libpurple/conversation.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/conversation.c	Mon May 21 14:42:45 2007 +0000
@@ -1497,7 +1497,7 @@
 	} else if (a->buddy != b->buddy) {
 		ret = a->buddy ? -1 : 1;
 	} else {
-		ret = strcasecmp(user1, user2);
+		ret = purple_utf8_strcasecmp(user1, user2);
 	}
 
 	return ret;
--- a/libpurple/example/nullclient.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/example/nullclient.c	Mon May 21 14:42:45 2007 +0000
@@ -137,7 +137,25 @@
 
 static PurpleConversationUiOps null_conv_uiops = 
 {
-	.write_conv = null_write_conv
+	NULL,                      /* create_conversation  */
+	NULL,                      /* destroy_conversation */
+	NULL,                      /* write_chat           */
+	NULL,                      /* write_im             */
+	null_write_conv,           /* write_conv           */
+	NULL,                      /* chat_add_users       */
+	NULL,                      /* chat_rename_user     */
+	NULL,                      /* chat_remove_users    */
+	NULL,                      /* chat_update_user     */
+	NULL,                      /* present              */
+	NULL,                      /* has_focus            */
+	NULL,                      /* custom_smiley_add    */
+	NULL,                      /* custom_smiley_write  */
+	NULL,                      /* custom_smiley_close  */
+	NULL,                      /* send_confirm         */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 static void
--- a/libpurple/idle.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/idle.c	Mon May 21 14:42:45 2007 +0000
@@ -92,6 +92,7 @@
 }
 
 
+static int no_away = 0;
 static gint time_until_next_idle_event;
 /*
  * This function should be called when you think your idle state
@@ -121,7 +122,7 @@
 	gboolean report_idle;
 	GList *l;
 	gint away_seconds = 0;
-	static int no_away = 0;
+	gint idle_recheck_interval;
 
 	purple_signal_emit(purple_blist_get_handle(), "update-idle");
 
@@ -132,11 +133,13 @@
 	{
 		/* Use system idle time (mouse or keyboard movement, etc.) */
 		time_idle = idle_ui_ops->get_time_idle();
+		idle_recheck_interval = 60;
 	}
 	else if (!strcmp(idle_reporting, "purple"))
 	{
 		/* Use 'Purple idle' */
 		time_idle = time(NULL) - last_active_time;
+		idle_recheck_interval = 0;
 	}
 	else
 	{
@@ -150,14 +153,39 @@
 
 	/* If we're not reporting idle, we can still do auto-away.
 	 * First try "system" and if that isn't possible, use "purple" */
-	if (!report_idle && auto_away) {
-		if ((idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL))
-			time_idle = idle_ui_ops->get_time_idle();
+	if (!report_idle)
+	{
+		if (auto_away)
+		{
+			if ((idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL))
+			{
+				time_idle = idle_ui_ops->get_time_idle();
+				idle_recheck_interval = 60;
+			}
+			else
+			{
+				time_idle = time(NULL) - last_active_time;
+				idle_recheck_interval = 0;
+			}
+		}
 		else
-			time_idle = time(NULL) - last_active_time;
+		{
+			if (!no_away)
+			{
+				purple_savedstatus_set_idleaway(FALSE);
+				no_away = 1;
+			}
+			time_until_next_idle_event = 0;
+			return;
+		}
 	}
 
-	time_until_next_idle_event = IDLEMARK - time_idle; /* reasonable start upperbound */
+	time_until_next_idle_event = IDLEMARK - time_idle;
+	if (time_until_next_idle_event < 0)
+	{
+		/* If we're already idle, check again as appropriate. */
+		time_until_next_idle_event = idle_recheck_interval;
+	}
 
 	if (auto_away || !no_away)
 		away_seconds = 60 * purple_prefs_get_int("/purple/away/mins_before_away");
@@ -166,14 +194,12 @@
 	{
 		purple_savedstatus_set_idleaway(TRUE);
 		no_away = 0;
-		if (time_idle < away_seconds && (away_seconds - time_idle) < time_until_next_idle_event)
-			time_until_next_idle_event = away_seconds - time_idle;
 	}
 	else if (!no_away && time_idle < away_seconds)
 	{
+		no_away = 1;
 		purple_savedstatus_set_idleaway(FALSE);
-		no_away = 1;
-		if (time_idle < away_seconds && (away_seconds - time_idle) < time_until_next_idle_event)
+		if (time_until_next_idle_event == 0 || (away_seconds - time_idle) < time_until_next_idle_event)
 			time_until_next_idle_event = away_seconds - time_idle;
 	}
 
@@ -191,9 +217,6 @@
 		while (idled_accts != NULL)
 			set_account_unidle(idled_accts->data);
 	}
-	
-	if (time_until_next_idle_event < 0)
-		time_until_next_idle_event = IDLEMARK;
 }
 
 
@@ -204,7 +227,10 @@
 check_idleness_timer()
 {
 	check_idleness();
-	idle_timer = purple_timeout_add(1000 * (time_until_next_idle_event + 1), check_idleness_timer, NULL);
+	if (time_until_next_idle_event == 0)
+		idle_timer = 0;
+	else
+		idle_timer = purple_timeout_add(1000 * (time_until_next_idle_event + 1), check_idleness_timer, NULL);
 	return FALSE;
 }
 
@@ -232,10 +258,26 @@
 	set_account_unidle(account);
 }
 
+static void
+idle_reporting_cb(const char *name, PurplePrefType type, gconstpointer val, gpointer data)
+{
+	if (idle_timer)
+		purple_timeout_remove(idle_timer);
+	idle_timer = 0;
+	check_idleness_timer();
+}
+
 void
 purple_idle_touch()
 {
 	time(&last_active_time);
+	if (!no_away)
+	{
+		if (idle_timer)
+			purple_timeout_remove(idle_timer);
+		idle_timer = 0;
+		check_idleness_timer();
+	}
 }
 
 void
@@ -280,6 +322,9 @@
 						purple_idle_get_handle(),
 						PURPLE_CALLBACK(signing_off_cb), NULL);
 
+	purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting",
+	                              idle_reporting_cb, NULL);
+
 	purple_idle_touch();
 }
 
@@ -287,6 +332,7 @@
 purple_idle_uninit()
 {
 	purple_signals_disconnect_by_handle(purple_idle_get_handle());
+	purple_prefs_disconnect_by_handle(purple_idle_get_handle());
 
 	/* Remove the idle timer */
 	if (idle_timer > 0)
--- a/libpurple/plugins/perl/common/SavedStatuses.xs	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/plugins/perl/common/SavedStatuses.xs	Mon May 21 14:42:45 2007 +0000
@@ -1,41 +1,129 @@
 #include "module.h"
 
+/* I can't get this to work, both with and without the const on the return
+ * type I get errors from gcc. One way about ignoring types in a cast, and the
+ * other about assigning to read-only variables.
+const Purple::StatusType
+purple_savedstatus_substatus_get_type(substatus)
+	const Purple::SavedStatus::Sub substatus
+*/
+
 MODULE = Purple::SavedStatus  PACKAGE = Purple::SavedStatus  PREFIX = purple_savedstatus_
 PROTOTYPES: ENABLE
 
-gboolean
-purple_savedstatus_delete(title)
-	const char *title
-
-Purple::SavedStatus
-purple_savedstatus_find(title)
-	const char *title
-
-const char *
-purple_savedstatus_get_message(saved_status)
-	Purple::SavedStatus saved_status
-
-const char *
-purple_savedstatus_get_title(saved_status)
-	Purple::SavedStatus saved_status
-
-Purple::StatusPrimitive
-purple_savedstatus_get_type(saved_status)
-	Purple::SavedStatus saved_status
-
 Purple::SavedStatus
 purple_savedstatus_new(title, type)
 	const char *title
 	Purple::StatusPrimitive type
 
 void
+purple_savedstatus_set_title(status, title)
+	Purple::SavedStatus status
+	const char *title
+
+void
+purple_savedstatus_set_type(status, type)
+	Purple::SavedStatus status
+	Purple::StatusPrimitive type
+
+void
 purple_savedstatus_set_message(status, message)
 	Purple::SavedStatus status
 	const char *message
 
+void
+purple_savedstatus_set_substatus(status, account, type, message)
+	Purple::SavedStatus status
+	Purple::Account account
+	Purple::StatusType type
+	const char *message
+
+void
+purple_savedstatus_unset_substatus(status, account)
+	Purple::SavedStatus status
+	Purple::Account account
+
+gboolean
+purple_savedstatus_delete(title)
+	const char *title
+
 Purple::SavedStatus
 purple_savedstatus_get_current()
 
+Purple::SavedStatus
+purple_savedstatus_get_default()
+
+Purple::SavedStatus
+purple_savedstatus_get_idleaway()
+
+gboolean
+purple_savedstatus_is_idleaway()
+
+void
+purple_savedstatus_set_idleaway(idleaway)
+	gboolean idleaway
+
+Purple::SavedStatus
+purple_savedstatus_get_startup()
+
+Purple::SavedStatus
+purple_savedstatus_find(title)
+	const char *title
+
+Purple::SavedStatus
+purple_savedstatus_find_by_creation_time(creation_time)
+	time_t creation_time
+
+Purple::SavedStatus
+purple_savedstatus_find_transient_by_type_and_message(type, message)
+	Purple::StatusPrimitive type
+	const char *message
+
+gboolean
+purple_savedstatus_is_transient(saved_status)
+	const Purple::SavedStatus saved_status
+
+const char *
+purple_savedstatus_get_title(saved_status)
+	const Purple::SavedStatus saved_status
+
+Purple::StatusPrimitive
+purple_savedstatus_get_type(saved_status)
+	const Purple::SavedStatus saved_status
+
+const char *
+purple_savedstatus_get_message(saved_status)
+	const Purple::SavedStatus saved_status
+
+time_t
+purple_savedstatus_get_creation_time(saved_status)
+	const Purple::SavedStatus saved_status
+
+gboolean
+purple_savedstatus_has_substatuses(saved_status)
+	const Purple::SavedStatus saved_status
+
+Purple::SavedStatus::Sub
+purple_savedstatus_get_substatus(saved_status, account)
+	Purple::SavedStatus saved_status
+	Purple::Account account
+
+void
+purple_savedstatus_activate(saved_status)
+	Purple::SavedStatus saved_status
+
+void
+purple_savedstatus_activate_for_account(saved_status, account)
+	const Purple::SavedStatus saved_status
+	Purple::Account account
+
+MODULE = Purple::SavedStatus::Sub  PACKAGE = Purple::SavedStatus::Sub  PREFIX = purple_savedstatus_substatus_
+PROTOTYPES: ENABLE
+
+const char *
+purple_savedstatus_substatus_get_message(substatus)
+	const Purple::SavedStatus::Sub substatus
+
 MODULE = Purple::SavedStatus  PACKAGE = Purple::SavedStatuses  PREFIX = purple_savedstatuses_
 PROTOTYPES: ENABLE
 
@@ -48,6 +136,16 @@
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
 	}
 
+void
+purple_savedstatuses_get_popular(how_many)
+	unsigned int how_many
+PREINIT:
+	const GList *l;
+PPCODE:
+	for (l = purple_savedstatuses_get_popular(how_many); l != NULL; l = l->next) {
+		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
+	}
+
 Purple::Handle
 purple_savedstatuses_get_handle()
 
--- a/libpurple/plugins/perl/common/module.h	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/plugins/perl/common/module.h	Mon May 21 14:42:45 2007 +0000
@@ -236,7 +236,7 @@
 
 /* savedstatuses.h */
 typedef PurpleSavedStatus *		Purple__SavedStatus;
-typedef PurpleSavedStatusSub *		Purple__SavedStatusSub;
+typedef PurpleSavedStatusSub *		Purple__SavedStatus__Sub;
 
 /* sound.h */
 typedef PurpleSoundEventID		Purple__SoundEventID;
--- a/libpurple/plugins/perl/common/typemap	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/plugins/perl/common/typemap	Mon May 21 14:42:45 2007 +0000
@@ -137,7 +137,9 @@
 Purple::RoomlistRoomType			T_IV
 
 Purple::SavedStatus			T_PurpleObj
-Purple::SavedStatusSub			T_PurpleObj
+const Purple::SavedStatus			T_PurpleObj
+Purple::SavedStatus::Sub			T_PurpleObj
+const Purple::SavedStatus::Sub			T_PurpleObj
 Purple::SoundEventID			T_IV
 Purple::Sound::UiOps			T_PurpleObj
 
--- a/libpurple/plugins/perl/perl-common.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/plugins/perl/perl-common.c	Mon May 21 14:42:45 2007 +0000
@@ -80,7 +80,7 @@
 	stash = gv_stashpv(stash_name, 1);
 
 	hv = newHV();
-	hv_store(hv, "_purple", 5, create_sv_ptr(object), 0);
+	hv_store(hv, "_purple", 7, create_sv_ptr(object), 0);
 
 	return sv_bless(newRV_noinc((SV *)hv), stash);
 }
@@ -94,7 +94,7 @@
 	hv = hvref(o);
 
 	if (hv != NULL) {
-		sv = hv_fetch(hv, "_purple", 5, 0);
+		sv = hv_fetch(hv, "_purple", 7, 0);
 
 		if (sv != NULL)
 			return TRUE;
@@ -118,7 +118,7 @@
 	if (hv == NULL)
 		return NULL;
 
-	sv = hv_fetch(hv, "_purple", 5, 0);
+	sv = hv_fetch(hv, "_purple", 7, 0);
 
 	if (sv == NULL)
 		croak("variable is damaged");
--- a/libpurple/protocols/bonjour/jabber.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Mon May 21 14:42:45 2007 +0000
@@ -242,7 +242,7 @@
 	if (cbba->bj->account == gb->account)
 	{
 		bb = gb->proto_data;
-		if ((bb != NULL) && (g_strcasecmp(bb->ip, cbba->address) == 0))
+		if ((bb != NULL) && (g_ascii_strcasecmp(bb->ip, cbba->address) == 0))
 			*(cbba->gb) = gb;
 	}
 }
--- a/libpurple/protocols/irc/parse.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/irc/parse.c	Mon May 21 14:42:45 2007 +0000
@@ -264,7 +264,7 @@
 		while (*charset == ' ')
 			charset++;
 
-		if (!strcasecmp("UTF-8", charset)) {
+		if (!g_ascii_strcasecmp("UTF-8", charset)) {
 			if (g_utf8_validate(string, -1, NULL))
 				utf8 = g_strdup(string);
 		} else {
--- a/libpurple/protocols/msn/msn.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Mon May 21 14:42:45 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	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Mon May 21 14:42:45 2007 +0000
@@ -589,6 +589,23 @@
 }
 
 static void
+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;
+
+	count = 0;
+	msn_cmdproc_send(cmdproc, "URL", "%s", "INBOX");
+}
+
+
+static void
 fln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
 	MsnSlpLink *slplink;
@@ -1405,7 +1422,7 @@
 	msn_table_add_cmd(cbs_table, NULL, "ADD", add_cmd);
 
 	msn_table_add_cmd(cbs_table, NULL, "QRY", NULL);
-	msn_table_add_cmd(cbs_table, NULL, "QNG", NULL);
+	msn_table_add_cmd(cbs_table, NULL, "QNG", qng_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "FLN", fln_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "NLN", nln_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "ILN", iln_cmd);
--- a/libpurple/protocols/msn/session.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Mon May 21 14:42:45 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/protocols/novell/nmuser.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/novell/nmuser.c	Mon May 21 14:42:45 2007 +0000
@@ -944,7 +944,7 @@
 	}
 
 	/* Remove item from the cached list */
-	if ((node = g_slist_find_custom(*list_ptr, dn, (GCompareFunc)nm_utf8_strcasecmp))) {
+	if ((node = g_slist_find_custom(*list_ptr, dn, (GCompareFunc)purple_utf8_strcasecmp))) {
 		*list_ptr = g_slist_remove_link(*list_ptr, node);
 		g_slist_free_1(node);
 	}
@@ -1223,13 +1223,13 @@
 	locate = nm_locate_field(NM_A_LOCKED_ATTR_LIST, user->fields);
 	if (locate && locate->ptr_value) {
 		if (locate->type == NMFIELD_TYPE_UTF8 &&
-			(nm_utf8_strcasecmp(locate->ptr_value, NM_A_BLOCKING) == 0)) {
+			(purple_utf8_strcasecmp(locate->ptr_value, NM_A_BLOCKING) == 0)) {
 			user->privacy_locked = TRUE;
 		} else if (locate->type == NMFIELD_TYPE_MV ||
 				   locate->type == NMFIELD_TYPE_ARRAY) {
 			NMField *tmp = (NMField *)locate->ptr_value;
 			while (tmp && tmp->tag) {
-				if (nm_utf8_strcasecmp(tmp->ptr_value, NM_A_BLOCKING) == 0) {
+				if (purple_utf8_strcasecmp(tmp->ptr_value, NM_A_BLOCKING) == 0) {
 					user->privacy_locked = TRUE;
 					break;
 				}
@@ -1800,25 +1800,11 @@
  * Some utility functions...haven't figured out where
  * they belong yet.
  */
-gint
-nm_utf8_strcasecmp(gconstpointer str1, gconstpointer str2)
-{
-	gint rv;
-	char *str1_down = g_utf8_strdown(str1, -1);
-	char *str2_down = g_utf8_strdown(str2, -1);
-
-	rv = g_utf8_collate(str1_down, str2_down);
-
-	g_free(str1_down);
-	g_free(str2_down);
-
-	return rv;
-}
 
 gboolean
 nm_utf8_str_equal(gconstpointer str1, gconstpointer str2)
 {
-	return (nm_utf8_strcasecmp(str1, str2) == 0);
+	return (purple_utf8_strcasecmp(str1, str2) == 0);
 }
 
 char *
--- a/libpurple/protocols/novell/nmuser.h	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/novell/nmuser.h	Mon May 21 14:42:45 2007 +0000
@@ -646,18 +646,6 @@
  */
 gboolean nm_are_guids_equal(const char *guid1, const char *guid2);
 
-
-/**
- * Case insensitive compare for utf8 strings
- *
- * @param guid1	First string to compare
- * @param guid2 Second string to compare
- *
- * @return 		-1 if str1 < str2, 0 if str1 = str2, 1 if str1 > str2
- *
- */
-gint nm_utf8_strcasecmp(gconstpointer str1, gconstpointer str2);
-
 /**
  * Compare UTF8 strings for equality only (case insensitive)
  *
--- a/libpurple/protocols/novell/novell.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/novell/novell.c	Mon May 21 14:42:45 2007 +0000
@@ -734,14 +734,14 @@
 		if (allowed) {
 
 			if (!g_slist_find_custom(gc->account->permit,
-									 display_id, (GCompareFunc)nm_utf8_strcasecmp)) {
+									 display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
 				purple_privacy_permit_add(gc->account, display_id, TRUE);
 			}
 
 		} else {
 
 			if (!g_slist_find_custom(gc->account->permit,
-									 display_id, (GCompareFunc)nm_utf8_strcasecmp)) {
+									 display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
 				purple_privacy_deny_add(gc->account, display_id, TRUE);
 			}
 		}
@@ -782,7 +782,7 @@
 		if (display_id) {
 
 			if (!g_slist_find_custom(gc->account->deny,
-									 display_id, (GCompareFunc)nm_utf8_strcasecmp)) {
+									 display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
 
 				purple_privacy_deny_add(gc->account, display_id, TRUE);
 			}
@@ -834,7 +834,7 @@
 
 			if (!g_slist_find_custom(gc->account->permit,
 									 display_id,
-									 (GCompareFunc)nm_utf8_strcasecmp)) {
+									 (GCompareFunc)purple_utf8_strcasecmp)) {
 
 				purple_privacy_permit_add(gc->account, display_id, TRUE);
 			}
@@ -1412,7 +1412,7 @@
 			name =(char *)node->data;
 
 		if (!g_slist_find_custom(gc->account->permit,
-								 name, (GCompareFunc)nm_utf8_strcasecmp)) {
+								 name, (GCompareFunc)purple_utf8_strcasecmp)) {
 			purple_privacy_permit_add(gc->account, name , TRUE);
 		}
 	}
@@ -1425,7 +1425,7 @@
 			name =(char *)node->data;
 
 		if (!g_slist_find_custom(gc->account->deny,
-								 name, (GCompareFunc)nm_utf8_strcasecmp)) {
+								 name, (GCompareFunc)purple_utf8_strcasecmp)) {
 			purple_privacy_deny_add(gc->account, name, TRUE);
 		}
 	}
@@ -1436,7 +1436,7 @@
 		dn = nm_lookup_dn(user, (char *)node->data);
 		if (dn != NULL &&
 			!g_slist_find_custom(user->allow_list,
-								 dn, (GCompareFunc)nm_utf8_strcasecmp)) {
+								 dn, (GCompareFunc)purple_utf8_strcasecmp)) {
 			rem_list = g_slist_append(rem_list, node->data);
 		}
 	}
@@ -1453,7 +1453,7 @@
 		dn = nm_lookup_dn(user, (char *)node->data);
 		if (dn != NULL &&
 			!g_slist_find_custom(user->deny_list,
-								 dn, (GCompareFunc)nm_utf8_strcasecmp)) {
+								 dn, (GCompareFunc)purple_utf8_strcasecmp)) {
 			rem_list = g_slist_append(rem_list, node->data);
 		}
 	}
@@ -3268,7 +3268,7 @@
 						name = nm_user_record_get_display_id(user_record);
 
 						if (!g_slist_find_custom(gc->account->permit,
-												 name, (GCompareFunc)nm_utf8_strcasecmp)) {
+												 name, (GCompareFunc)purple_utf8_strcasecmp)) {
 							purple_privacy_permit_add(gc->account, name , TRUE);
 						}
 					}
@@ -3282,7 +3282,7 @@
 						name = nm_user_record_get_display_id(user_record);
 
 						if (!g_slist_find_custom(user->allow_list,
-												 dn, (GCompareFunc)nm_utf8_strcasecmp)) {
+												 dn, (GCompareFunc)purple_utf8_strcasecmp)) {
 							rc = nm_send_create_privacy_item(user, dn, TRUE,
 															 _create_privacy_item_deny_resp_cb,
 															 g_strdup(dn));
@@ -3310,7 +3310,7 @@
 						name = nm_user_record_get_display_id(user_record);
 
 						if (!g_slist_find_custom(gc->account->deny,
-												 name, (GCompareFunc)nm_utf8_strcasecmp)) {
+												 name, (GCompareFunc)purple_utf8_strcasecmp)) {
 							purple_privacy_deny_add(gc->account, name , TRUE);
 						}
 					}
@@ -3325,7 +3325,7 @@
 						name = nm_user_record_get_display_id(user_record);
 
 						if (!g_slist_find_custom(user->deny_list,
-												 dn, (GCompareFunc)nm_utf8_strcasecmp)) {
+												 dn, (GCompareFunc)purple_utf8_strcasecmp)) {
 							rc = nm_send_create_privacy_item(user, dn, FALSE,
 															 _create_privacy_item_deny_resp_cb,
 															 g_strdup(name));
@@ -3358,7 +3358,7 @@
 				contact = nm_folder_get_contact(user->root_folder, i);
 				dn = nm_contact_get_dn(contact);
 				if (dn && !g_slist_find_custom(user->allow_list,
-											   dn, (GCompareFunc)nm_utf8_strcasecmp))
+											   dn, (GCompareFunc)purple_utf8_strcasecmp))
 				{
 					rc = nm_send_create_privacy_item(user, dn, TRUE,
 													 _create_privacy_item_deny_resp_cb,
@@ -3377,7 +3377,7 @@
 					contact = nm_folder_get_contact(folder, j);
 					dn = nm_contact_get_dn(contact);
 					if (dn && !g_slist_find_custom(user->allow_list,
-												   dn, (GCompareFunc)nm_utf8_strcasecmp))
+												   dn, (GCompareFunc)purple_utf8_strcasecmp))
 					{
 						rc = nm_send_create_privacy_item(user, dn, TRUE,
 														 _create_privacy_item_deny_resp_cb,
--- a/libpurple/protocols/oscar/oscar.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon May 21 14:42:45 2007 +0000
@@ -304,15 +304,15 @@
 
 	if ((encoding == NULL) || encoding[0] == '\0') {
 		purple_debug_info("oscar", "Empty encoding, assuming UTF-8\n");
-	} else if (!strcasecmp(encoding, "iso-8859-1")) {
+	} else if (!g_ascii_strcasecmp(encoding, "iso-8859-1")) {
 		utf8 = g_convert(text, textlen, "UTF-8", "iso-8859-1", NULL, NULL, NULL);
-	} else if (!strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1") ||
-	           !strcasecmp(encoding, "us-ascii"))
+	} else if (!g_ascii_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1") ||
+	           !g_ascii_strcasecmp(encoding, "us-ascii"))
 	{
 		utf8 = g_convert(text, textlen, "UTF-8", "Windows-1252", NULL, NULL, NULL);
-	} else if (!strcasecmp(encoding, "unicode-2-0")) {
+	} else if (!g_ascii_strcasecmp(encoding, "unicode-2-0")) {
 		utf8 = g_convert(text, textlen, "UTF-8", "UCS-2BE", NULL, NULL, NULL);
-	} else if (strcasecmp(encoding, "utf-8")) {
+	} else if (g_ascii_strcasecmp(encoding, "utf-8")) {
 		purple_debug_warning("oscar", "Unrecognized character encoding \"%s\", "
 						   "attempting to convert to UTF-8 anyway\n", encoding);
 		utf8 = g_convert(text, textlen, "UTF-8", encoding, NULL, NULL, NULL);
@@ -362,7 +362,7 @@
 	if ((charsetstr == NULL) || (*charsetstr == '\0'))
 		return NULL;
 
-	if (strcasecmp("UTF-8", charsetstr)) {
+	if (g_ascii_strcasecmp("UTF-8", charsetstr)) {
 		if (fallback)
 			ret = g_convert_with_fallback(data, datalen, "UTF-8", charsetstr, "?", NULL, NULL, &err);
 		else
@@ -4143,6 +4143,7 @@
 			conn->sn, msg->str, &tmp, &tmplen, &charset, &charsubset);
 	g_string_free(msg, TRUE);
 	msg = g_string_new_len(tmp, tmplen);
+	g_free(tmp);
 
 	/* Append any binary data that we may have */
 	if (oscar_id) {
--- a/libpurple/protocols/sametime/sametime.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Mon May 21 14:42:45 2007 +0000
@@ -611,9 +611,9 @@
 
 
 static struct mwAwareListHandler mw_aware_list_handler = {
-  .on_aware = mw_aware_list_on_aware,
-  .on_attrib = mw_aware_list_on_attrib,
-  .clear = mw_aware_list_clear,
+  mw_aware_list_on_aware,
+  mw_aware_list_on_attrib,
+  mw_aware_list_clear,
 };
 
 
@@ -1777,14 +1777,14 @@
 
 
 static struct mwSessionHandler mw_session_handler = {
-  .io_write = mw_session_io_write,
-  .io_close = mw_session_io_close,
-  .clear = mw_session_clear,
-  .on_stateChange = mw_session_stateChange,
-  .on_setPrivacyInfo = mw_session_setPrivacyInfo,
-  .on_setUserStatus = mw_session_setUserStatus,
-  .on_admin = mw_session_admin,
-  .on_announce = mw_session_announce,
+  mw_session_io_write,
+  mw_session_io_close,
+  mw_session_clear,
+  mw_session_stateChange,
+  mw_session_setPrivacyInfo,
+  mw_session_setUserStatus,
+  mw_session_admin,
+  mw_session_announce,
 };
 
 
@@ -1803,8 +1803,8 @@
 
 
 static struct mwAwareHandler mw_aware_handler = {
-  .on_attrib = mw_aware_on_attrib,
-  .clear = mw_aware_clear,
+  mw_aware_on_attrib,
+  mw_aware_clear,
 };
 
 
@@ -2042,14 +2042,14 @@
 
 
 static struct mwConferenceHandler mw_conference_handler = {
-  .on_invited = mw_conf_invited,
-  .conf_opened = mw_conf_opened,
-  .conf_closed = mw_conf_closed,
-  .on_peer_joined = mw_conf_peer_joined,
-  .on_peer_parted = mw_conf_peer_parted,
-  .on_text = mw_conf_text,
-  .on_typing = mw_conf_typing,
-  .clear = mw_conf_clear,
+  mw_conf_invited,
+  mw_conf_opened,
+  mw_conf_closed,
+  mw_conf_peer_joined,
+  mw_conf_peer_parted,
+  mw_conf_text,
+  mw_conf_typing,
+  mw_conf_clear,
 };
 
 
@@ -2287,12 +2287,12 @@
 
 
 static struct mwFileTransferHandler mw_ft_handler = {
-  .ft_offered = mw_ft_offered,
-  .ft_opened = mw_ft_opened,
-  .ft_closed = mw_ft_closed,
-  .ft_recv = mw_ft_recv,
-  .ft_ack = mw_ft_ack,
-  .clear = mw_ft_clear,
+  mw_ft_offered,
+  mw_ft_opened,
+  mw_ft_closed,
+  mw_ft_recv,
+  mw_ft_ack,
+  mw_ft_clear,
 };
 
 
@@ -2854,11 +2854,11 @@
 
 
 static struct mwImHandler mw_im_handler = {
-  .conversation_opened = mw_conversation_opened,
-  .conversation_closed = mw_conversation_closed,
-  .conversation_recv = mw_conversation_recv,
-  .place_invite = mw_place_invite,
-  .clear = mw_im_clear,
+  mw_conversation_opened,
+  mw_conversation_closed,
+  mw_conversation_recv,
+  mw_place_invite,
+  mw_im_clear,
 };
 
 
@@ -3052,14 +3052,14 @@
 
 
 static struct mwPlaceHandler mw_place_handler = {
-  .opened = mw_place_opened,
-  .closed = mw_place_closed,
-  .peerJoined = mw_place_peerJoined,
-  .peerParted = mw_place_peerParted,
-  .peerSetAttribute = mw_place_peerSetAttribute,
-  .peerUnsetAttribute = mw_place_peerUnsetAttribute,
-  .message = mw_place_message,
-  .clear = mw_place_clear,
+  mw_place_opened,
+  mw_place_closed,
+  mw_place_peerJoined,
+  mw_place_peerParted,
+  mw_place_peerSetAttribute,
+  mw_place_peerUnsetAttribute,
+  mw_place_message,
+  mw_place_clear,
 };
 
 
@@ -4575,9 +4575,9 @@
   struct mwSession *session;
 
   struct mwPrivacyInfo privacy = {
-    .deny = FALSE,
-    .count = 0,
-    .users = NULL,
+    FALSE, /* deny  */
+    0,     /* count */
+    NULL,  /* users */
   };
 
   g_return_if_fail(gc != NULL);
@@ -5167,7 +5167,13 @@
 
 
 static PurplePluginUiInfo mw_plugin_ui_info = {
-  .get_plugin_pref_frame = mw_plugin_get_plugin_pref_frame,
+  mw_plugin_get_plugin_pref_frame,
+  0,    /* page_num */
+  NULL, /* frame */
+  NULL,
+  NULL,
+  NULL,
+  NULL
 };
 
 
@@ -5648,30 +5654,39 @@
   g_log_remove_handler("meanwhile", log_handler[1]);
 }
 
-
-static PurplePluginInfo mw_plugin_info = {
-  .magic           = PURPLE_PLUGIN_MAGIC,
-  .major_version   = PURPLE_MAJOR_VERSION,
-  .minor_version   = PURPLE_MINOR_VERSION,
-  .type            = PURPLE_PLUGIN_PROTOCOL,
-  .ui_requirement  = NULL,
-  .flags           = 0,
-  .dependencies    = NULL,
-  .priority        = PURPLE_PRIORITY_DEFAULT,
-  .id              = PLUGIN_ID,
-  .name            = PLUGIN_NAME,
-  .version         = VERSION,
-  .summary         = PLUGIN_SUMMARY,
-  .description     = PLUGIN_DESC,
-  .author          = PLUGIN_AUTHOR,
-  .homepage        = PLUGIN_HOMEPAGE,
-  .load            = mw_plugin_load,
-  .unload          = mw_plugin_unload,
-  .destroy         = mw_plugin_destroy,
-  .ui_info         = NULL,
-  .extra_info      = &mw_prpl_info,
-  .prefs_info      = &mw_plugin_ui_info,
-  .actions         = mw_plugin_actions,
+static PurplePluginInfo mw_plugin_info =
+{
+	PURPLE_PLUGIN_MAGIC,
+	PURPLE_MAJOR_VERSION,
+	PURPLE_MINOR_VERSION,
+	PURPLE_PLUGIN_PROTOCOL,                           /**< type           */
+	NULL,                                             /**< ui_requirement */
+	0,                                                /**< flags          */
+	NULL,                                             /**< dependencies   */
+	PURPLE_PRIORITY_DEFAULT,                          /**< priority       */
+
+	PLUGIN_ID,                                        /**< id             */
+	PLUGIN_NAME,                                      /**< name           */
+	VERSION,                                          /**< version        */
+	PLUGIN_SUMMARY,                                   /**< summary        */
+	PLUGIN_DESC,                                      /**<  description    */
+	PLUGIN_AUTHOR,                                    /**< author         */
+	PLUGIN_HOMEPAGE,                                  /**< homepage       */
+
+	mw_plugin_load,                                   /**< load           */
+	mw_plugin_unload,                                 /**< unload         */
+	mw_plugin_destroy,                                /**< destroy        */
+
+	NULL,                                             /**< ui_info        */
+	&mw_prpl_info,                                    /**< extra_info     */
+	&mw_plugin_ui_info,                               /**< prefs_info     */
+	mw_plugin_actions,
+
+	/* padding */
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 
--- a/libpurple/protocols/silc/util.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/silc/util.c	Mon May 21 14:42:45 2007 +0000
@@ -620,15 +620,15 @@
 	ct = strrchr(filename, '.');
 	if (!ct)
 		return NULL;
-	else if (!strcasecmp(".png", ct))
+	else if (!g_ascii_strcasecmp(".png", ct))
 		return strdup("image/png");
-	else if (!strcasecmp(".jpg", ct))
+	else if (!g_ascii_strcasecmp(".jpg", ct))
 		return strdup("image/jpeg");
-	else if (!strcasecmp(".jpeg", ct))
+	else if (!g_ascii_strcasecmp(".jpeg", ct))
 		return strdup("image/jpeg");
-	else if (!strcasecmp(".gif", ct))
+	else if (!g_ascii_strcasecmp(".gif", ct))
 		return strdup("image/gif");
-	else if (!strcasecmp(".tiff", ct))
+	else if (!g_ascii_strcasecmp(".tiff", ct))
 		return strdup("image/tiff");
 	
 	return NULL;
--- a/libpurple/protocols/simple/simple.c	Fri May 18 14:00:33 2007 +0000
+++ b/libpurple/protocols/simple/simple.c	Mon May 21 14:42:45 2007 +0000
@@ -1237,9 +1237,9 @@
 			while(tmp && tmp < acceptheader + strlen(acceptheader)) {
 				gchar *tmp2 = strchr(tmp, ',');
 				if(tmp2) *tmp2 = '\0';