changeset 32574:4fa36f6928e3

propagate from branch 'im.pidgin.pidgin' (head c8528fe7f2a21bd2071ce51b1e739e5110e7613b) to branch 'im.pidgin.cpw.qulogic.gtk3' (head 0fe1b29ed5bfe491d8250fd2c628b0ec39f7e1d4)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 18 Apr 2009 07:37:40 +0000
parents 65d599736f3d (current diff) a3f7ade9e45b (diff)
children 8cf9251e49ef
files pidgin/gtkblist.c pidgin/gtkconv.c pidgin/gtkimhtmltoolbar.h pidgin/gtkmenutray.h pidgin/gtkprefs.c
diffstat 48 files changed, 1058 insertions(+), 399 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Fri Apr 10 07:33:31 2009 +0000
+++ b/COPYRIGHT	Sat Apr 18 07:37:40 2009 +0000
@@ -30,6 +30,7 @@
 Derek Battams
 Martin Bayard
 Curtis Beattie
+Carlos Bederian
 Dave Bell
 Igor Belyi
 Brian Bernas
--- a/ChangeLog	Fri Apr 10 07:33:31 2009 +0000
+++ b/ChangeLog	Sat Apr 18 07:37:40 2009 +0000
@@ -8,6 +8,8 @@
 	  in a group on the buddy list.
 	* Removed the unmaintained and unneeded toc protocol plugin.
 	* Fixed NTLM authentication on big-endian systems.
+	* Dragging a buddy onto a chat pops up a chat-invitation dialog.
+	  (Carlos Bederian)
 
 	libpurple:
 	* Various memory cleanups when unloading libpurple. (Nick Hebner)
--- a/ChangeLog.API	Fri Apr 10 07:33:31 2009 +0000
+++ b/ChangeLog.API	Sat Apr 18 07:37:40 2009 +0000
@@ -22,6 +22,7 @@
 		* purple_connection_get_protocol_data
 		* purple_connection_set_protocol_data
 		* purple_contact_destroy
+		* purple_conv_chat_invite_user
 		* purple_global_proxy_set_info
 		* purple_group_destroy
 		* purple_log_get_activity_score
@@ -77,6 +78,10 @@
 		* pidgin_utils_init, pidgin_utils_uninit
 		* pidgin_notify_pounce_add
 
+	libgnt:
+		Added:
+		* GntProgressBar and functions (Saleem Abdulrasool)
+
 	perl:
 		Changed:
 		* Made a bunch of functions act more perl-like. Call the new()
--- a/finch/gntconv.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/finch/gntconv.c	Sat Apr 18 07:37:40 2009 +0000
@@ -559,44 +559,11 @@
 }
 
 static void
-invite_select_cb(FinchConv *fc, PurpleRequestFields *fields)
-{
-	PurpleConversation *conv = fc->active_conv;
-	const char *buddy = purple_request_fields_get_string(fields,  "screenname");
-	const char *message = purple_request_fields_get_string(fields,  "message");
-	serv_chat_invite(purple_conversation_get_gc(conv),
-		purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
-		message, buddy);
-
-}
-
-static void
 invite_cb(GntMenuItem *item, gpointer ggconv)
 {
-	PurpleRequestFields *fields;
-	PurpleRequestFieldGroup *group;
-	PurpleRequestField *field;
-
-	fields = purple_request_fields_new();
-
-	group = purple_request_field_group_new(NULL);
-	purple_request_fields_add_group(fields, group);
-
-	field = purple_request_field_string_new("screenname", _("Name"), NULL, FALSE);
-	purple_request_field_set_type_hint(field, "screenname");
-	purple_request_field_set_required(field, TRUE);
-	purple_request_field_group_add_field(group, field);
-	field = purple_request_field_string_new("message", _("Invite message"), NULL, FALSE);
-	purple_request_field_group_add_field(group, field);
-	purple_request_fields(finch_conv_get_handle(), _("Invite"),
-						NULL,
-						_("Please enter the name of the user "
-						  "you wish to invite,\nalong with an optional invite message."),
-						fields,
-						_("OK"), G_CALLBACK(invite_select_cb),
-						_("Cancel"), NULL,
-						NULL, NULL, NULL,
-						ggconv);
+	FinchConv *fc = ggconv;
+	PurpleConversation *conv = fc->active_conv;
+	purple_conv_chat_invite_user(PURPLE_CONV_CHAT(conv), NULL, NULL, TRUE);
 }
 
 static void
--- a/finch/gntmedia.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/finch/gntmedia.c	Sat Apr 18 07:37:40 2009 +0000
@@ -37,11 +37,11 @@
 #include "cmds.h"
 #include "conversation.h"
 #include "debug.h"
-#include "media-gst.h"
 #include "mediamanager.h"
 
 /* An incredibly large part of the following is from gtkmedia.c */
 #ifdef USE_VV
+#include "media-gst.h"
 
 #undef hangup
 
--- a/finch/libgnt/Makefile.am	Fri Apr 10 07:33:31 2009 +0000
+++ b/finch/libgnt/Makefile.am	Sat Apr 18 07:37:40 2009 +0000
@@ -28,6 +28,7 @@
 	gntmenu.c \
 	gntmenuitem.c \
 	gntmenuitemcheck.c \
+	gntprogressbar.c \
 	gntslider.c \
 	gntstyle.c \
 	gnttextview.c \
@@ -56,6 +57,7 @@
 	gntmenu.h \
 	gntmenuitem.h \
 	gntmenuitemcheck.h \
+	gntprogressbar.h \
 	gntslider.h \
 	gntstyle.h \
 	gnttextview.h \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/finch/libgnt/gntprogressbar.c	Sat Apr 18 07:37:40 2009 +0000
@@ -0,0 +1,253 @@
+/**
+ * GNT - The GLib Ncurses Toolkit
+ *
+ * GNT is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ **/
+
+#include "gntprogressbar.h"
+#include "gntutils.h"
+
+#include <string.h>
+
+typedef struct _GntProgressBarPrivate
+{
+	gdouble fraction;
+	gboolean show_value;
+	GntProgressBarOrientation orientation;
+} GntProgressBarPrivate;
+
+struct _GntProgressBar
+{
+	GntWidget parent;
+#if !GLIB_CHECK_VERSION(2,4,0)
+	GntProgressBarPrivate priv;
+#endif
+};
+
+#if GLIB_CHECK_VERSION(2,4,0)
+#define GNT_PROGRESS_BAR_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarPrivate))
+#else
+#define GNT_PROGRESS_BAR_GET_PRIVATE(o)   &(GNT_PROGRESS_BAR(o)->priv)
+#endif
+
+static GntWidgetClass *parent_class = NULL;
+
+
+static void
+gnt_progress_bar_draw (GntWidget *widget)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (GNT_PROGRESS_BAR (widget));
+	gchar progress[8];
+	gint start, end, i, pos;
+	int color;
+
+	g_snprintf (progress, sizeof (progress), "%.1f%%", priv->fraction * 100);
+	color = gnt_color_pair(GNT_COLOR_NORMAL);
+
+	switch (priv->orientation) {
+		case GNT_PROGRESS_LEFT_TO_RIGHT:
+		case GNT_PROGRESS_RIGHT_TO_LEFT:
+			start = (priv->orientation == GNT_PROGRESS_LEFT_TO_RIGHT ? 0 : (1.0 - priv->fraction) * widget->priv.width);
+			end = (priv->orientation == GNT_PROGRESS_LEFT_TO_RIGHT ? widget->priv.width * priv->fraction : widget->priv.width);
+
+			/* background */
+			for (i = 0; i < widget->priv.height; i++)
+				mvwhline (widget->window, i, 0, ' ' | color, widget->priv.width);
+
+			/* foreground */
+			for (i = 0; i < widget->priv.height; i++)
+				mvwhline (widget->window, i, start, ACS_CKBOARD | color | A_REVERSE, end);
+
+			/* text */
+			if (priv->show_value) {
+				pos = widget->priv.width / 2 - strlen (progress) / 2;
+				for (i = 0; i < progress[i]; i++, pos++) {
+					wattrset (widget->window, color | ((pos < start || pos > end) ? A_NORMAL : A_REVERSE));
+					mvwprintw (widget->window, widget->priv.height / 2, pos, "%c", progress[i]);
+				}
+				wattrset (widget->window, color);
+			}
+
+			break;
+		case GNT_PROGRESS_TOP_TO_BOTTOM:
+		case GNT_PROGRESS_BOTTOM_TO_TOP:
+			start = (priv->orientation == GNT_PROGRESS_TOP_TO_BOTTOM ? 0 : (1.0 - priv->fraction) * widget->priv.height);
+			end = (priv->orientation == GNT_PROGRESS_TOP_TO_BOTTOM ? widget->priv.height * priv->fraction : widget->priv.height);
+
+			/* background */
+			for (i = 0; i < widget->priv.width; i++)
+				mvwvline (widget->window, 0, i, ' ' | color, widget->priv.height);
+
+			/* foreground */
+			for (i = 0; i < widget->priv.width; i++)
+				mvwvline (widget->window, start, i, ACS_CKBOARD | color | A_REVERSE, end);
+
+			/* text */
+			if (priv->show_value) {
+				pos = widget->priv.height / 2 - strlen (progress) / 2;
+				for (i = 0; i < progress[i]; i++, pos++) {
+					wattrset (widget->window, color | ((pos < start || pos > end) ? A_NORMAL : A_REVERSE));
+					mvwprintw (widget->window, pos, widget->priv.width / 2, "%c\n", progress[i]);
+				}
+				wattrset (widget->window, color);
+			}
+
+			break;
+		default:
+			g_assert_not_reached ();
+	}
+}
+
+static void
+gnt_progress_bar_size_request (GntWidget *widget)
+{
+	gnt_widget_set_size (widget, widget->priv.minw, widget->priv.minh);
+}
+
+static void
+gnt_progress_bar_class_init (gpointer klass, gpointer class_data)
+{
+	GObjectClass *g_class = G_OBJECT_CLASS (klass);
+
+	parent_class = GNT_WIDGET_CLASS (klass);
+
+#if GLIB_CHECK_VERSION(2,4,0)
+	g_type_class_add_private (g_class, sizeof (GntProgressBarPrivate));
+#endif
+
+	parent_class->draw = gnt_progress_bar_draw;
+	parent_class->size_request = gnt_progress_bar_size_request;
+}
+
+static void
+gnt_progress_bar_init (GTypeInstance *instance, gpointer g_class)
+{
+	GntWidget *widget = GNT_WIDGET (instance);
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (GNT_PROGRESS_BAR (widget));
+
+	gnt_widget_set_take_focus (widget, FALSE);
+	GNT_WIDGET_SET_FLAGS (widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW | GNT_WIDGET_GROW_X);
+
+	widget->priv.minw = 8;
+	widget->priv.minh = 1;
+
+	priv->show_value = TRUE;
+}
+
+GType
+gnt_progress_bar_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		static const GTypeInfo info = {
+			sizeof (GntProgressBarClass),
+			NULL,                         /* base_init */
+			NULL,                         /* base_finalize */
+			gnt_progress_bar_class_init,  /* class_init */
+			NULL,                         /* class_finalize */
+			NULL,                         /* class_data */
+			sizeof (GntProgressBar),
+			0,                            /* n_preallocs */
+			gnt_progress_bar_init,        /* instance_init */
+			NULL                          /* value_table */
+		}; 
+
+		type = g_type_register_static (GNT_TYPE_WIDGET, "GntProgressBar", &info, 0);
+	}
+
+	return type;
+}
+
+GntWidget *
+gnt_progress_bar_new (void)
+{
+	GntWidget *widget = g_object_new (GNT_TYPE_PROGRESS_BAR, NULL);
+	return widget;
+}
+
+void
+gnt_progress_bar_set_fraction (GntProgressBar *pbar, gdouble fraction)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+
+	if (fraction > 1.0)
+		priv->fraction = 1.0;
+	else if (fraction < 0.0)
+		priv->fraction = 0.0;
+	else
+		priv->fraction = fraction;
+
+	if ((GNT_WIDGET_FLAGS(pbar) & GNT_WIDGET_MAPPED))
+		gnt_widget_draw(GNT_WIDGET(pbar));
+}
+
+void
+gnt_progress_bar_set_orientation (GntProgressBar *pbar,
+		GntProgressBarOrientation orientation)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	GntWidget *widget = GNT_WIDGET(pbar);
+
+	priv->orientation = orientation;
+	if (orientation == GNT_PROGRESS_LEFT_TO_RIGHT ||
+			orientation == GNT_PROGRESS_RIGHT_TO_LEFT) {
+		GNT_WIDGET_SET_FLAGS(pbar, GNT_WIDGET_GROW_X);
+		GNT_WIDGET_UNSET_FLAGS(pbar, GNT_WIDGET_GROW_Y);
+		widget->priv.minw = 8;
+		widget->priv.minh = 1;
+	} else {
+		GNT_WIDGET_UNSET_FLAGS(pbar, GNT_WIDGET_GROW_X);
+		GNT_WIDGET_SET_FLAGS(pbar, GNT_WIDGET_GROW_Y);
+		widget->priv.minw = 1;
+		widget->priv.minh = 8;
+	}
+
+	if ((GNT_WIDGET_FLAGS(pbar) & GNT_WIDGET_MAPPED))
+		gnt_widget_draw(GNT_WIDGET(pbar));
+}
+
+void
+gnt_progress_bar_set_show_progress (GntProgressBar *pbar, gboolean show)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	priv->show_value = show;
+}
+
+gdouble
+gnt_progress_bar_get_fraction (GntProgressBar *pbar)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	return priv->fraction;
+}
+
+GntProgressBarOrientation
+gnt_progress_bar_get_orientation (GntProgressBar *pbar)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	return priv->orientation;
+}
+
+gboolean
+gnt_progress_bar_get_show_progress (GntProgressBar *pbar)
+{
+	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	return priv->show_value;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/finch/libgnt/gntprogressbar.h	Sat Apr 18 07:37:40 2009 +0000
@@ -0,0 +1,132 @@
+/**
+ * @file gntprogressbar.h Progress Bar API
+ * @ingroup gnt
+ */
+/*
+ * GNT - The GLib Ncurses Toolkit
+ *
+ * GNT is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+
+#ifndef GNT_PROGRESS_BAR_H
+#define GNT_PROGRESS_BAR_H
+
+#include "gnt.h"
+#include "gntwidget.h"
+
+#define GNT_TYPE_PROGRESS_BAR          (gnt_progress_bar_get_type ())
+#define GNT_PROGRESS_BAR(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBar))
+#define GNT_PROGRESS_BAR_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST ((k), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
+#define GNT_IS_PROGRESS_BAR(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNT_TYPE_PROGRESS_BAR))
+#define GNT_IS_PROGRESS_BAR_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), GNT_TYPE_PROGRESS_BAR))
+#define GNT_PROGRESS_BAR_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
+
+typedef enum _GntProgressBarOrientation
+{
+   GNT_PROGRESS_LEFT_TO_RIGHT,
+   GNT_PROGRESS_RIGHT_TO_LEFT,
+   GNT_PROGRESS_BOTTOM_TO_TOP,
+   GNT_PROGRESS_TOP_TO_BOTTOM,
+} GntProgressBarOrientation;
+
+typedef struct _GntProgressBar GntProgressBar;
+
+typedef struct _GntProgressBarClass
+{
+   GntWidgetClass parent;
+
+   void (*gnt_reserved1)(void);
+   void (*gnt_reserved2)(void);
+   void (*gnt_reserved3)(void);
+   void (*gnt_reserved4)(void);
+} GntProgressBarClass;
+
+G_BEGIN_DECLS
+
+/**
+ * Get the GType for GntProgressBar
+ * @return The GType for GntProrgressBar
+ **/
+GType
+gnt_progress_bar_get_type (void);
+
+/**
+ * Create a new GntProgressBar
+ * @return The new GntProgressBar
+ **/
+GntWidget *
+gnt_progress_bar_new (void);
+
+/**
+ * Set the progress for a progress bar
+ *
+ * @param pbar The GntProgressBar
+ * @param fraction The value between 0 and 1 to display
+ **/
+void
+gnt_progress_bar_set_fraction (GntProgressBar *pbar, gdouble fraction);
+
+/**
+ * Set the orientation for a progress bar
+ *
+ * @param pbar The GntProgressBar
+ * @param orientation The orientation to use
+ **/
+void
+gnt_progress_bar_set_orientation (GntProgressBar *pbar, GntProgressBarOrientation orientation);
+
+/**
+ * Controls whether the progress value is shown
+ *
+ * @param pbar The GntProgressBar
+ * @param show A boolean indicating if the value is shown
+ **/
+void
+gnt_progress_bar_set_show_progress (GntProgressBar *pbar, gboolean show);
+
+/**
+ * Get the progress that is displayed
+ *
+ * @param pbar The GntProgressBar
+ * @return The progress displayed as a value between 0 and 1
+ **/
+gdouble
+gnt_progress_bar_get_fraction (GntProgressBar *pbar);
+
+/**
+ * Get the orientation for the progress bar
+ *
+ * @param pbar The GntProgressBar
+ * @return The current orientation of the progress bar
+ **/
+GntProgressBarOrientation
+gnt_progress_bar_get_orientation (GntProgressBar *pbar);
+
+/**
+ * Get a boolean describing if the progress value is shown
+ *
+ * @param pbar The GntProgressBar
+ * @return A boolean @c true if the progress value is shown, @c false otherwise.
+ **/
+gboolean
+gnt_progress_bar_get_show_progress (GntProgressBar *pbar);
+
+G_END_DECLS
+
+#endif /* GNT_PROGRESS_BAR_H */
--- a/libpurple/Makefile.am	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/Makefile.am	Sat Apr 18 07:37:40 2009 +0000
@@ -113,7 +113,6 @@
 	idle.h \
 	imgstore.h \
 	log.h \
-	marshallers.h \
 	media.h \
 	media-gst.h \
 	mediamanager.h \
@@ -153,7 +152,7 @@
 	xmlnode.h \
 	whiteboard.h
 
-purple_builtheaders = purple.h version.h
+purple_builtheaders = purple.h version.h marshallers.h
 
 marshallers.h: marshallers.list
 	@echo "Generating marshallers.h"
--- a/libpurple/Makefile.mingw	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/Makefile.mingw	Sat Apr 18 07:37:40 2009 +0000
@@ -35,6 +35,7 @@
 			buddyicon.c \
 			certificate.c \
 			cipher.c \
+			circbuffer.c \
 			cmds.c \
 			connection.c \
 			conversation.c \
@@ -44,10 +45,11 @@
 			dnssrv.c \
 			eventloop.c \
 			ft.c \
-			circbuffer.c \
 			idle.c \
 			imgstore.c \
 			log.c \
+			media.c \
+			mediamanager.c \
 			mime.c \
 			nat-pmp.c \
 			network.c \
@@ -66,22 +68,22 @@
 			server.c \
 			signals.c \
 			smiley.c \
-			sound.c \
+			sound-theme-loader.c \
 			sound-theme.c \
-			sound-theme-loader.c \
+			sound.c \
 			sslconn.c \
 			status.c \
 			stringref.c \
 			stun.c \
-			theme.c \
 			theme-loader.c \
 			theme-manager.c \
+			theme.c \
 			upnp.c \
 			util.c \
 			value.c \
 			version.c \
+			whiteboard.c \
 			xmlnode.c \
-			whiteboard.c \
 			win32/giowin32.c \
 			win32/libc_interface.c \
 			win32/win32dep.c
--- a/libpurple/account.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/account.c	Sat Apr 18 07:37:40 2009 +0000
@@ -2787,7 +2787,6 @@
 void
 purple_accounts_uninit(void)
 {
-	GList* account;
 	gpointer handle = purple_accounts_get_handle();
 	if (save_timer != 0)
 	{
@@ -2799,9 +2798,6 @@
 	purple_signals_disconnect_by_handle(handle);
 	purple_signals_unregister_by_instance(handle);
 
-	account = purple_accounts_get_all();
-	while (account) {
-		purple_account_destroy(account->data);
-		account = g_list_delete_link(account, account);
-	}
+	for (; accounts; accounts = g_list_delete_link(accounts, accounts))
+		purple_account_destroy(accounts->data);
 }
--- a/libpurple/blist.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/blist.c	Sat Apr 18 07:37:40 2009 +0000
@@ -699,10 +699,23 @@
 	return purplebuddylist ? purplebuddylist->root : NULL;
 }
 
-GHashTable *
+static void
+append_buddy(gpointer key, gpointer value, gpointer user_data)
+{
+	GSList **list = user_data;
+	*list = g_slist_prepend(*list, value);
+}
+
+GSList *
 purple_blist_get_buddies()
 {
-	return purplebuddylist ? purplebuddylist->buddies : NULL;
+	GSList *buddies = NULL;
+
+	if (!purplebuddylist)
+		return NULL;
+
+	g_hash_table_foreach(purplebuddylist->buddies, append_buddy, &buddies);
+	return buddies;
 }
 
 void *
@@ -1569,6 +1582,7 @@
 purple_contact_destroy(PurpleContact *contact)
 {
 	g_hash_table_destroy(contact->node.settings);
+	g_free(contact->alias);
 	PURPLE_DBUS_UNREGISTER_POINTER(contact);
 	g_free(contact);
 }
@@ -2616,7 +2630,7 @@
 purple_blist_node_destroy(PurpleBlistNode *node)
 {
 	PurpleBlistNode *child, *next_child;
-  
+
 	child = node->child;
 	while (child) {
 		next_child = child->next;
@@ -2936,6 +2950,7 @@
 		purple_blist_node_destroy(node);
 		node = next_node;
 	}
+	purplebuddylist->root = NULL;
 
 	purple_signals_unregister_by_instance(purple_blist_get_handle());
 }
--- a/libpurple/blist.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/blist.h	Sat Apr 18 07:37:40 2009 +0000
@@ -260,13 +260,14 @@
 PurpleBlistNode *purple_blist_get_root(void);
 
 /**
- * Returns the hash table of every buddy in the list.
+ * Returns a list of every buddy in the list.
  *
- * @return The hash table of every buddy in the list.
+ * @return A list of every buddy in the list. Caller is responsible for
+ *         freeing the list.
  *
  * @since 2.6.0
  */
-GHashTable *purple_blist_get_buddies(void);
+GSList *purple_blist_get_buddies(void);
 
 /**
  * Returns the UI data for the list.
--- a/libpurple/conversation.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/conversation.c	Sat Apr 18 07:37:40 2009 +0000
@@ -2005,6 +2005,66 @@
 	purple_conversation_update(chat->conv, PURPLE_CONV_UPDATE_CHATLEFT);
 }
 
+static void
+invite_user_to_chat(gpointer data, PurpleRequestFields *fields)
+{
+	PurpleConversation *conv;
+	PurpleConvChat *chat;
+	const char *user, *message;
+
+	conv = data;
+	chat = PURPLE_CONV_CHAT(conv);
+	user = purple_request_fields_get_string(fields, "screenname");
+	message = purple_request_fields_get_string(fields, "message");
+
+	serv_chat_invite(purple_conversation_get_gc(conv), chat->id, message, user);
+}
+
+void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
+		const char *message, gboolean confirm)
+{
+	PurpleAccount *account;
+	PurpleConversation *conv;
+	PurpleRequestFields *fields;
+	PurpleRequestFieldGroup *group;
+	PurpleRequestField *field;
+
+	g_return_if_fail(chat);
+
+	if (!user || !*user || !message || !*message)
+		confirm = TRUE;
+
+	conv = chat->conv;
+	account = conv->account;
+
+	if (!confirm) {
+		serv_chat_invite(purple_account_get_connection(account),
+				purple_conv_chat_get_id(chat), message, user);
+		return;
+	}
+
+	fields = purple_request_fields_new();
+	group = purple_request_field_group_new(_("Invite to chat"));
+	purple_request_fields_add_group(fields, group);
+
+	field = purple_request_field_string_new("screenname", _("Buddy"), user, FALSE);
+	purple_request_field_group_add_field(group, field);
+	purple_request_field_set_required(field, TRUE);
+	purple_request_field_set_type_hint(field, "screenname");
+
+	field = purple_request_field_string_new("message", _("Message"), message, FALSE);
+	purple_request_field_group_add_field(group, field);
+
+	purple_request_fields(conv, _("Invite to chat"), NULL,
+			_("Please enter the name of the user you wish to invite, "
+				"along with an optional invite message."),
+			fields,
+			_("Invite"), G_CALLBACK(invite_user_to_chat),
+			_("Cancel"), NULL,
+			account, user, conv,
+			conv);
+}
+
 gboolean
 purple_conv_chat_has_left(PurpleConvChat *chat)
 {
--- a/libpurple/conversation.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/conversation.h	Sat Apr 18 07:37:40 2009 +0000
@@ -1300,6 +1300,22 @@
 void purple_conv_chat_left(PurpleConvChat *chat);
 
 /**
+ * Invite a user to a chat.
+ * The user will be prompted to enter the user's name or a message if one is
+ * not given.
+ *
+ * @param chat     The chat.
+ * @param user     The user to invite to the chat.
+ * @param message  The message to send with the invitation.
+ * @param confirm  Prompt before sending the invitation. The user is always
+ *                 prompted if either #user or #message is @c NULL.
+ *
+ * @since 2.6.0
+ */
+void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
+		const char *message, gboolean confirm);
+
+/**
  * Returns true if we're no longer in this chat,
  * and just left the window open.
  *
--- a/libpurple/media.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/media.c	Sat Apr 18 07:37:40 2009 +0000
@@ -29,14 +29,17 @@
 #include "internal.h"
 
 #include "account.h"
-#include "marshallers.h"
 #include "media.h"
-#include "media-gst.h"
 #include "mediamanager.h"
 #include "network.h"
 
 #include "debug.h"
 
+#ifdef USE_GSTREAMER
+#include "marshallers.h"
+#include "media-gst.h"
+#endif
+
 #ifdef USE_VV
 
 #include <gst/farsight/fs-conference-iface.h>
@@ -1908,6 +1911,7 @@
 }
 #endif
 
+#ifdef USE_GSTREAMER
 GstElement *
 purple_media_get_src(PurpleMedia *media, const gchar *sess_id)
 {
@@ -1920,6 +1924,7 @@
 	return NULL;
 #endif
 }
+#endif /* USE_GSTREAMER */
 
 #ifdef USE_VV
 static PurpleMediaSession *
@@ -3034,6 +3039,7 @@
 #endif
 }
 
+#ifdef USE_GSTREAMER
 GstElement *
 purple_media_get_tee(PurpleMedia *media,
 		const gchar *session_id, const gchar *participant)
@@ -3056,4 +3062,5 @@
 	return NULL;
 #endif
 }
-
+#endif /* USE_GSTREAMER */
+
--- a/libpurple/mediamanager.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/mediamanager.c	Sat Apr 18 07:37:40 2009 +0000
@@ -28,10 +28,13 @@
 
 #include "account.h"
 #include "debug.h"
+#include "media.h"
+#include "mediamanager.h"
+
+#ifdef USE_GSTREAMER
 #include "marshallers.h"
-#include "media.h"
 #include "media-gst.h"
-#include "mediamanager.h"
+#endif
 
 #ifdef USE_VV
 
@@ -218,6 +221,7 @@
 }
 #endif
 
+#ifdef USE_GSTREAMER
 GstElement *
 purple_media_manager_get_pipeline(PurpleMediaManager *manager)
 {
@@ -246,6 +250,7 @@
 	return NULL;
 #endif
 }
+#endif /* USE_GSTREAMER */
 
 PurpleMedia *
 purple_media_manager_create_media(PurpleMediaManager *manager,
@@ -366,6 +371,7 @@
 }
 #endif
 
+#ifdef USE_GSTREAMER
 GstElement *
 purple_media_manager_get_element(PurpleMediaManager *manager,
 		PurpleMediaSessionType type, PurpleMedia *media,
@@ -611,6 +617,7 @@
 
 	return NULL;
 }
+#endif /* USE_GSTREAMER */
 
 #ifdef USE_VV
 static void
@@ -844,6 +851,7 @@
 #endif
 }
 
+#ifdef USE_GSTREAMER
 
 /*
  * PurpleMediaElementType
@@ -1115,3 +1123,5 @@
 	return NULL;
 }
 
+#endif /* USE_GSTREAMER */
+
--- a/libpurple/network.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/network.c	Sat Apr 18 07:37:40 2009 +0000
@@ -825,8 +825,13 @@
 		*ip = g_strdup(dst);
 		purple_debug_info("network", "set IP address: %s\n", *ip);
 	}
-	
-	g_slist_free(hosts);
+
+	while (hosts != NULL) {
+		hosts = g_slist_delete_link(hosts, hosts);
+		/* Free the address */
+		g_free(hosts->data);
+		hosts = g_slist_delete_link(hosts, hosts);
+	}
 }
 
 void
--- a/libpurple/protocols/bonjour/jabber.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Sat Apr 18 07:37:40 2009 +0000
@@ -237,7 +237,7 @@
 };
 
 static void
-_match_buddies_by_address(gpointer key, gpointer value, gpointer data)
+_match_buddies_by_address(gpointer value, gpointer data)
 {
 	PurpleBuddy *pb = value;
 	PurpleAccount *account = NULL;
@@ -638,6 +638,7 @@
 	char *address_text = NULL;
 	struct _match_buddies_by_address_t *mbba;
 	BonjourJabberConversation *bconv;
+	GSList *buddies;
 
 	/* Check that it is a read condition */
 	if (condition != PURPLE_INPUT_READ)
@@ -658,7 +659,10 @@
 	mbba = g_new0(struct _match_buddies_by_address_t, 1);
 	mbba->address = address_text;
 	mbba->jdata = jdata;
-	g_hash_table_foreach(purple_blist_get_buddies(), _match_buddies_by_address, mbba);
+
+	buddies = purple_blist_get_buddies();
+	g_slist_foreach(buddies, _match_buddies_by_address, mbba);
+	g_slist_free(buddies);
 
 	if (mbba->matched_buddies == NULL) {
 		purple_debug_info("bonjour", "We don't like invisible buddies, this is not a superheros comic\n");
@@ -850,11 +854,15 @@
 bonjour_jabber_conv_match_by_ip(BonjourJabberConversation *bconv) {
 	BonjourJabber *jdata = ((BonjourData*) bconv->account->gc->proto_data)->jabber_data;
 	struct _match_buddies_by_address_t *mbba;
+	GSList *buddies;
 
 	mbba = g_new0(struct _match_buddies_by_address_t, 1);
 	mbba->address = bconv->ip;
 	mbba->jdata = jdata;
-	g_hash_table_foreach(purple_blist_get_buddies(), _match_buddies_by_address, mbba);
+
+	buddies = purple_blist_get_buddies();
+	g_slist_foreach(buddies, _match_buddies_by_address, mbba);
+	g_slist_free(buddies);
 
 	/* If there is exactly one match, use it */
 	if(mbba->matched_buddies != NULL) {
--- a/libpurple/protocols/jabber/google.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Sat Apr 18 07:37:40 2009 +0000
@@ -1156,7 +1156,12 @@
 		}
 	}
 
-	g_slist_free(hosts);
+	while (hosts != NULL) {
+		hosts = g_slist_delete_link(hosts, hosts);
+		/* Free the address */
+		g_free(hosts->data);
+		hosts = g_slist_delete_link(hosts, hosts);
+	}
 }
 
 static void
--- a/libpurple/protocols/jabber/jabber.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sat Apr 18 07:37:40 2009 +0000
@@ -463,7 +463,7 @@
 	JabberStream *js = gc->proto_data;
 
 	if (js->keepalive_timeout == -1) {
-		jabber_ping_jid(js, NULL);
+		jabber_ping_jid(js, js->user->domain);
 		js->keepalive_timeout = purple_timeout_add_seconds(120,
 				(GSourceFunc)(jabber_keepalive_timeout), gc);
 	}
--- a/libpurple/protocols/jabber/message.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/jabber/message.c	Sat Apr 18 07:37:40 2009 +0000
@@ -626,24 +626,27 @@
 					purple_debug_info("jabber", "found %d smileys\n",
 						g_list_length(smiley_refs));
 
-					if (jm->type == JABBER_MESSAGE_GROUPCHAT) {
-						JabberID *jid = jabber_id_new(jm->from);
-						JabberChat *chat = NULL;
+					if (smiley_refs) {		
+						if (jm->type == JABBER_MESSAGE_GROUPCHAT) {
+							JabberID *jid = jabber_id_new(jm->from);
+							JabberChat *chat = NULL;
 
-						if (jid) {
-							chat = jabber_chat_find(js, jid->node, jid->domain);
-							if (chat) conv = chat->conv;
-						}
+							if (jid) {
+								chat = jabber_chat_find(js, jid->node, jid->domain);
+								if (chat) conv = chat->conv;
+							}
 
-						jabber_id_free(jid);
-					} else {
-						conv =
-							purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
-								who, account);
-						if (!conv) {
-							/* we need to create the conversation here */
-							conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
-								account, who);
+							jabber_id_free(jid);
+						} else {
+							conv =
+								purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
+									who, account);
+							if (!conv) {
+								/* we need to create the conversation here */
+								conv = 
+									purple_conversation_new(PURPLE_CONV_TYPE_IM,
+									account, who);
+							}
 						}
 					}
 
@@ -675,7 +678,7 @@
 						    TRUE)) {
 						const JabberData *data =
 								jabber_data_find_remote_by_cid(cid);
-						/* if data is already known, we add write it immediatly */
+						/* if data is already known, we write it immediatly */
 						if (data) {
 							purple_debug_info("jabber",
 								"data is already known\n");
--- a/libpurple/protocols/jabber/ping.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/jabber/ping.c	Sat Apr 18 07:37:40 2009 +0000
@@ -55,15 +55,10 @@
                                   JabberIqType type, const char *id,
                                   xmlnode *packet, gpointer data)
 {
-	char *own_bare_jid = g_strdup_printf("%s@%s", js->user->node,
-	                                     js->user->domain);
-
-	if (!from || !strcmp(from, own_bare_jid)) {
-		/* If the pong is from our bare JID, treat it as a return from the
+	if (purple_strequal(from, js->user->domain))
+		/* If the pong is from the server, assume it's a result of the
 		 * keepalive functions */
 		jabber_keepalive_pong_cb(js);
-	}
-	g_free(own_bare_jid);
 
 	if (type == JABBER_IQ_RESULT) {
 		purple_debug_info("jabber", "PONG!\n");
--- a/libpurple/protocols/yahoo/yahoo.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Sat Apr 18 07:37:40 2009 +0000
@@ -2973,8 +2973,10 @@
 
 		/* connect to host */
 		if((purple_proxy_connect(NULL, account, host_ip, YAHOO_PAGER_PORT_P2P, yahoo_p2p_init_cb, p2p_data))==NULL)	{
-			yahoo_p2p_disconnect_destroy_data(p2p_data);
 			purple_debug_info("yahoo","p2p: Connection to %s failed\n", host_ip);
+			g_free(p2p_data->host_ip);
+			g_free(p2p_data->host_username);
+			g_free(p2p_data);
 		}
 	}
 }
@@ -4416,7 +4418,7 @@
 		"Cookie: T=%s; path=/; domain=.yahoo.com; Y=%s; path=/; domain=.yahoo.com;\r\n"
 		"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
 		"Host: validate.msg.yahoo.com\r\n"
-		"Content-Length: %d\r\n"
+		"Content-Length: %" G_GSIZE_FORMAT "\r\n"
 		"Cache-Control: no-cache\r\n\r\n%s",
 		YAHOO_CLIENT_VERSION, yd->cookie_t, yd->cookie_y, strlen(validate_request_str), validate_request_str);
 
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Sat Apr 18 07:37:40 2009 +0000
@@ -1029,12 +1029,7 @@
 		xd->port = YAHOO_XFER_RELAY_PORT;
 
 	url = g_strdup_printf("%ld.%ld.%ld.%ld", d, c, b, a);
-	if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) {
-		purple_xfer_cancel_remote(xfer);
-		g_free(url);
-		return;
-	}
-	g_free(url);
+
 	/* Free the address... */
 	g_free(hosts->data);
 	hosts = g_slist_remove(hosts, hosts->data);
@@ -1048,6 +1043,13 @@
 		hosts = g_slist_remove(hosts, hosts->data);
 	}
 
+	if (!purple_url_parse(url, &(xd->host), &(xd->port), &(xd->path), NULL, NULL)) {
+		purple_xfer_cancel_remote(xfer);
+		g_free(url);
+		return;
+	}
+	g_free(url);
+
 	pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_INFO_15, YAHOO_STATUS_AVAILABLE, yd->session_id);
 	filename = g_path_get_basename(purple_xfer_get_local_filename(xfer));
 
@@ -1385,7 +1387,13 @@
 	strcpy(time_str + strlen(time_str) - 1, "\0");
 
 	if (xd->txbuflen == 0)	{
-		xd->txbuf = g_strdup_printf("HTTP/1.0 200 OK\r\nDate: %s GMT\r\nServer: Y!/1.0\r\nMIME-version: 1.0\r\nLast-modified: %s GMT\r\nContent-length: %d\r\n\r\n", time_str, time_str, xfer->size);
+		xd->txbuf = g_strdup_printf("HTTP/1.0 200 OK\r\n"
+		                            "Date: %s GMT\r\n"
+		                            "Server: Y!/1.0\r\n"
+		                            "MIME-version: 1.0\r\n"
+		                            "Last-modified: %s GMT\r\n"
+		                            "Content-length: %" G_GSIZE_FORMAT "\r\n\r\n",
+		                            time_str, time_str, xfer->size);
 		xd->txbuflen = strlen(xd->txbuf);
 		xd->txbuf_written = 0;
 	}
--- a/libpurple/stun.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/stun.c	Sat Apr 18 07:37:40 2009 +0000
@@ -341,6 +341,12 @@
 	}
 
 	if (!purple_network_listen_range(12108, 12208, SOCK_DGRAM, hbn_listen_cb, hosts)) {
+		while(hosts) {
+			hosts = g_slist_remove(hosts, hosts->data);
+			g_free(hosts->data);
+			hosts = g_slist_remove(hosts, hosts->data);
+		}
+
 		nattype.status = PURPLE_STUN_STATUS_UNKNOWN;
 		nattype.lookup_time = time(NULL);
 		do_callbacks();
--- a/libpurple/theme-manager.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/libpurple/theme-manager.c	Sat Apr 18 07:37:40 2009 +0000
@@ -130,6 +130,7 @@
 				theme_dir = g_build_filename(purple_dir, type, NULL);
 
 				theme = purple_theme_loader_build(loader, theme_dir);
+				g_free(theme_dir);
 
 				if (PURPLE_IS_THEME(theme))
 					purple_theme_manager_add_theme(theme);
--- a/pidgin/gtkaccount.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkaccount.c	Sat Apr 18 07:37:40 2009 +0000
@@ -413,7 +413,11 @@
 
 	if (dialog->protocol_menu != NULL)
 	{
+#if GTK_CHECK_VERSION(2,12,0)
+		g_object_ref(G_OBJECT(dialog->protocol_menu));
+#else
 		gtk_widget_ref(dialog->protocol_menu);
+#endif
 		hbox = g_object_get_data(G_OBJECT(dialog->protocol_menu), "container");
 		gtk_container_remove(GTK_CONTAINER(hbox), dialog->protocol_menu);
 	}
@@ -440,13 +444,21 @@
 	{
 		dialog->protocol_menu = pidgin_protocol_option_menu_new(
 				dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog);
+#if GTK_CHECK_VERSION(2,12,0)
+		g_object_ref(G_OBJECT(dialog->protocol_menu));
+#else
 		gtk_widget_ref(dialog->protocol_menu);
+#endif
 	}
 
 	hbox = add_pref_box(dialog, vbox, _("Pro_tocol:"), dialog->protocol_menu);
 	g_object_set_data(G_OBJECT(dialog->protocol_menu), "container", hbox);
 
+#if GTK_CHECK_VERSION(2,12,0)
+	g_object_unref(G_OBJECT(dialog->protocol_menu));
+#else
 	gtk_widget_unref(dialog->protocol_menu);
+#endif
 
 	/* Username */
 	dialog->username_entry = gtk_entry_new();
--- a/pidgin/gtkblist-theme-loader.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkblist-theme-loader.c	Sat Apr 18 07:37:40 2009 +0000
@@ -21,6 +21,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "xmlnode.h"
 
@@ -44,10 +45,10 @@
 	gchar *filename_full, *data;
 	const gchar *temp;
 	gboolean success = TRUE;
-	GdkColor *bgcolor, *expanded_bgcolor, *collapsed_bgcolor, *contact_color;
+	GdkColor bgcolor, expanded_bgcolor, collapsed_bgcolor, contact_color;
 	GdkColor color;
-	FontColorPair *expanded, *collapsed, *contact, *online, *away, *offline, *idle, *message, *message_nick_said, *status;
-	PidginBlistLayout *layout;
+	FontColorPair expanded, collapsed, contact, online, away, offline, idle, message, message_nick_said, status;
+	PidginBlistLayout layout;
 	PidginBlistTheme *theme;
 
 	/* Find the theme file */
@@ -63,145 +64,117 @@
 	sub_node = xmlnode_get_child(root_node, "description");
 	data = xmlnode_get_data(sub_node);
 
-	/* init all structs and colors */
-	bgcolor = g_new0(GdkColor, 1);
-	expanded_bgcolor = g_new0(GdkColor, 1);
-	collapsed_bgcolor = g_new0(GdkColor, 1);
-
-	layout = g_new0(PidginBlistLayout, 1);
-
-	contact_color = g_new0(GdkColor, 1);
-
-	expanded = g_new0(FontColorPair, 1);
-	collapsed = g_new0(FontColorPair, 1);
-	contact = g_new0(FontColorPair, 1);
-	online = g_new0(FontColorPair, 1);
-	away = g_new0(FontColorPair, 1);
-	offline = g_new0(FontColorPair, 1);
-	idle = g_new0(FontColorPair, 1);
-	message = g_new0(FontColorPair, 1);
-	message_nick_said = g_new0(FontColorPair, 1);
-	status = g_new0(FontColorPair, 1);
-
 	/* <blist> */
 	if ((success = (sub_node = xmlnode_get_child(root_node, "blist")) != NULL)) {
-		if ((temp = xmlnode_get_attrib(sub_node, "color")) != NULL && gdk_color_parse(temp, bgcolor))
-			gdk_colormap_alloc_color(gdk_colormap_get_system(), bgcolor, FALSE, TRUE);
-		else {
-			g_free(bgcolor);
-			bgcolor = NULL;
-		}
+		if ((temp = xmlnode_get_attrib(sub_node, "color")) != NULL && gdk_color_parse(temp, &bgcolor))
+			gdk_colormap_alloc_color(gdk_colormap_get_system(), &bgcolor, FALSE, TRUE);
+		else
+			memset(&bgcolor, 0, sizeof(GdkColor));
 	}
 
 	/* <groups> */
 	if ((success = (success && (sub_node = xmlnode_get_child(root_node, "groups")) != NULL
 		     && (sub_sub_node = xmlnode_get_child(sub_node, "expanded")) != NULL)))
 	{
-		expanded->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		expanded.font = xmlnode_get_attrib(sub_sub_node, "font");
 
 		if ((temp = xmlnode_get_attrib(sub_sub_node, "text_color")) != NULL && gdk_color_parse(temp, &color))
-			expanded->color = g_strdup(temp);
-		else expanded->color = g_strdup(DEFAULT_TEXT_COLOR);
+			expanded.color = temp;
+		else expanded.color = DEFAULT_TEXT_COLOR;
 
-		if ((temp = xmlnode_get_attrib(sub_sub_node, "background")) != NULL && gdk_color_parse(temp, expanded_bgcolor))
-			gdk_colormap_alloc_color(gdk_colormap_get_system(), expanded_bgcolor, FALSE, TRUE);
-		else {
-			g_free(expanded_bgcolor);
-			expanded_bgcolor = NULL;
-		}
+		if ((temp = xmlnode_get_attrib(sub_sub_node, "background")) != NULL && gdk_color_parse(temp, &expanded_bgcolor))
+			gdk_colormap_alloc_color(gdk_colormap_get_system(), &expanded_bgcolor, FALSE, TRUE);
+		else
+			memset(&expanded_bgcolor, 0, sizeof(GdkColor));
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "collapsed")) != NULL)))
 	{
-		collapsed->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		collapsed.font = xmlnode_get_attrib(sub_sub_node, "font");
 
 		if((temp = xmlnode_get_attrib(sub_sub_node, "text_color")) != NULL && gdk_color_parse(temp, &color))
-			collapsed->color = g_strdup(temp);
-		else collapsed->color = g_strdup(DEFAULT_TEXT_COLOR);
+			collapsed.color = temp;
+		else collapsed.color = DEFAULT_TEXT_COLOR;
 
-		if ((temp = xmlnode_get_attrib(sub_sub_node, "background")) != NULL && gdk_color_parse(temp, collapsed_bgcolor))
-			gdk_colormap_alloc_color(gdk_colormap_get_system(), collapsed_bgcolor, FALSE, TRUE);
-		else {
-			g_free(collapsed_bgcolor);
-			collapsed_bgcolor = NULL;
-		}
+		if ((temp = xmlnode_get_attrib(sub_sub_node, "background")) != NULL && gdk_color_parse(temp, &collapsed_bgcolor))
+			gdk_colormap_alloc_color(gdk_colormap_get_system(), &collapsed_bgcolor, FALSE, TRUE);
+		else
+			memset(&collapsed_bgcolor, 0, sizeof(GdkColor));
 	}
 
 	/* <buddys> */
 	if ((success = (success && (sub_node = xmlnode_get_child(root_node, "buddys")) != NULL &&
 		     (sub_sub_node = xmlnode_get_child(sub_node, "placement")) != NULL)))
 	{
-		layout->status_icon = (temp = xmlnode_get_attrib(sub_sub_node, "status_icon")) != NULL ? atoi(temp) : 0;
-		layout->text = (temp = xmlnode_get_attrib(sub_sub_node, "name")) != NULL ? atoi(temp) : 1;
-		layout->emblem = (temp = xmlnode_get_attrib(sub_sub_node, "emblem")) != NULL ? atoi(temp) : 2;
-		layout->protocol_icon = (temp = xmlnode_get_attrib(sub_sub_node, "protocol_icon")) != NULL ? atoi(temp) : 3;
-		layout->buddy_icon = (temp = xmlnode_get_attrib(sub_sub_node, "buddy_icon")) != NULL ? atoi(temp) : 4;
-		layout->show_status = (temp = xmlnode_get_attrib(sub_sub_node, "status_icon")) != NULL ? atoi(temp) != 0 : 1;
+		layout.status_icon = (temp = xmlnode_get_attrib(sub_sub_node, "status_icon")) != NULL ? atoi(temp) : 0;
+		layout.text = (temp = xmlnode_get_attrib(sub_sub_node, "name")) != NULL ? atoi(temp) : 1;
+		layout.emblem = (temp = xmlnode_get_attrib(sub_sub_node, "emblem")) != NULL ? atoi(temp) : 2;
+		layout.protocol_icon = (temp = xmlnode_get_attrib(sub_sub_node, "protocol_icon")) != NULL ? atoi(temp) : 3;
+		layout.buddy_icon = (temp = xmlnode_get_attrib(sub_sub_node, "buddy_icon")) != NULL ? atoi(temp) : 4;
+		layout.show_status = (temp = xmlnode_get_attrib(sub_sub_node, "status_icon")) != NULL ? atoi(temp) != 0 : 1;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "background")) != NULL))) {
-		if(gdk_color_parse(xmlnode_get_attrib(sub_sub_node, "color"), contact_color))
-			gdk_colormap_alloc_color(gdk_colormap_get_system(), contact_color, FALSE, TRUE);
-		else {
-			g_free(contact_color);
-			contact_color = NULL;
-		}
+		if(gdk_color_parse(xmlnode_get_attrib(sub_sub_node, "color"), &contact_color))
+			gdk_colormap_alloc_color(gdk_colormap_get_system(), &contact_color, FALSE, TRUE);
+		else
+			memset(&contact_color, 0, sizeof(GdkColor));
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "contact_text")) != NULL))) {
-		contact->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		contact.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			contact->color = g_strdup(temp);
-		else contact->color = g_strdup(DEFAULT_TEXT_COLOR);
+			contact.color = temp;
+		else contact.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "online_text")) != NULL))) {
-		online->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		online.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			online->color = g_strdup(temp);
-		else online->color = g_strdup(DEFAULT_TEXT_COLOR);
+			online.color = temp;
+		else online.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "away_text")) != NULL))) {
-		away->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		away.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			away->color = g_strdup(temp);
-		else away->color = g_strdup(DEFAULT_TEXT_COLOR);
+			away.color = temp;
+		else away.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "offline_text")) != NULL))) {
-		offline->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		offline.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			online->color = g_strdup(temp);
-		else online->color = g_strdup(DEFAULT_TEXT_COLOR);
+			offline.color = temp;
+		else offline.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "idle_text")) != NULL))) {
-		idle->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		idle.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			idle->color = g_strdup(temp);
-		else online->color = g_strdup(DEFAULT_TEXT_COLOR);
+			idle.color = temp;
+		else idle.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "message_text")) != NULL))) {
-		message->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		message.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			message->color = g_strdup(temp);
-		else message->color = g_strdup(DEFAULT_TEXT_COLOR);
+			message.color = temp;
+		else message.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "message_nick_said_text")) != NULL))) {
-		message_nick_said->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		message_nick_said.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			message_nick_said->color = g_strdup(temp);
-		else message_nick_said->color = g_strdup(DEFAULT_TEXT_COLOR);
+			message_nick_said.color = temp;
+		else message_nick_said.color = DEFAULT_TEXT_COLOR;
 	}
 
 	if ((success = (success && sub_node != NULL && (sub_sub_node = xmlnode_get_child(sub_node, "status_text")) != NULL))) {
-		status->font = g_strdup(xmlnode_get_attrib(sub_sub_node, "font"));
+		status.font = xmlnode_get_attrib(sub_sub_node, "font");
 		if(gdk_color_parse(temp = xmlnode_get_attrib(sub_sub_node, "color"), &color))
-			status->color = g_strdup(temp);
-		else status->color = g_strdup(DEFAULT_TEXT_COLOR);
+			status.color = temp;
+		else status.color = DEFAULT_TEXT_COLOR;
 	}
 
 	/* name is required for theme manager */
@@ -215,21 +188,21 @@
 			"image", xmlnode_get_attrib(root_node, "image"),
 			"directory", dir,
 			"description", data,
-			"background-color", bgcolor,
-			"layout", layout,
-			"expanded-color", expanded_bgcolor,
-			"expanded-text", expanded,
-			"collapsed-color", collapsed_bgcolor,
-			"collapsed-text", collapsed,
-			"contact-color", contact_color,
-			"contact", contact,
-			"online", online,
-			"away", away,
-			"offline", offline,
-			"idle", idle,
-			"message", message,
-			"message_nick_said", message_nick_said,
-			"status", status, NULL);
+			"background-color", &bgcolor,
+			"layout", &layout,
+			"expanded-color", &expanded_bgcolor,
+			"expanded-text", &expanded,
+			"collapsed-color", &collapsed_bgcolor,
+			"collapsed-text", &collapsed,
+			"contact-color", &contact_color,
+			"contact", &contact,
+			"online", &online,
+			"away", &away,
+			"offline", &offline,
+			"idle", &idle,
+			"message", &message,
+			"message_nick_said", &message_nick_said,
+			"status", &status, NULL);
 
 	xmlnode_free(root_node);
 	g_free(data);
--- a/pidgin/gtkblist-theme.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkblist-theme.c	Sat Apr 18 07:37:40 2009 +0000
@@ -96,14 +96,21 @@
 free_font_and_color(FontColorPair *pair)
 {
 	if (pair != NULL) {
-		if (pair->font)
-			g_free(pair->font);
-		if (pair->color)
-			g_free(pair->color);
+		g_free((gchar *)pair->font);
+		g_free((gchar *)pair->color);
 		g_free(pair);
 	}
 }
 
+static FontColorPair *
+copy_font_and_color(const FontColorPair *pair)
+{
+	FontColorPair *copy = g_new0(FontColorPair, 1);
+	copy->font  = g_strdup(pair->font);
+	copy->color = g_strdup(pair->color);
+	return copy;
+}
+
 /******************************************************************************
  * GObject Stuff
  *****************************************************************************/
@@ -245,17 +252,22 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(obj);
 
 	/* Buddy List */
+	gdk_color_free(priv->bgcolor);
 	g_free(priv->layout);
 
 	/* Group */
+	gdk_color_free(priv->expanded_color);
 	free_font_and_color(priv->expanded);
+	gdk_color_free(priv->collapsed_color);
 	free_font_and_color(priv->collapsed);
 
 	/* Buddy */
+	gdk_color_free(priv->contact_color);
 	free_font_and_color(priv->contact);
 	free_font_and_color(priv->online);
 	free_font_and_color(priv->away);
 	free_font_and_color(priv->offline);
+	free_font_and_color(priv->idle);
 	free_font_and_color(priv->message);
 	free_font_and_color(priv->message_nick_said);
 	free_font_and_color(priv->status);
@@ -581,7 +593,7 @@
 
 /* Set Methods */
 void
-pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, GdkColor *color)
+pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkColor *color)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -589,7 +601,8 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
-	priv->bgcolor = color;
+	gdk_color_free(priv->bgcolor);
+	priv->bgcolor = gdk_color_copy(color);
 }
 
 void
@@ -605,7 +618,7 @@
 }
 
 void
-pidgin_blist_theme_set_layout(PidginBlistTheme *theme, PidginBlistLayout *layout)
+pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -614,11 +627,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	g_free(priv->layout);
-	priv->layout = layout;
+	priv->layout = g_memdup(layout, sizeof(PidginBlistLayout));
 }
 
 void
-pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, GdkColor *color)
+pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkColor *color)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -626,11 +639,12 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
-	priv->expanded_color = color;
+	gdk_color_free(priv->expanded_color);
+	priv->expanded_color = gdk_color_copy(color);
 }
 
 void
-pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -639,11 +653,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->expanded);
-	priv->expanded = pair;
+	priv->expanded = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, GdkColor *color)
+pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkColor *color)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -651,11 +665,12 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
-	priv->collapsed_color = color;
+	gdk_color_free(priv->collapsed_color);
+	priv->collapsed_color = gdk_color_copy(color);
 }
 
 void
-pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -664,11 +679,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->collapsed);
-	priv->collapsed = pair;
+	priv->collapsed = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, GdkColor *color)
+pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkColor *color)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -676,11 +691,12 @@
 
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
-	priv->contact_color = color;
+	gdk_color_free(priv->contact_color);
+	priv->contact_color = gdk_color_copy(color);
 }
 
 void
-pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -689,11 +705,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->contact);
-	priv->contact = pair;
+	priv->contact = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -702,11 +718,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->online);
-	priv->online = pair;
+	priv->online = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -715,11 +731,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->away);
-	priv->away = pair;
+	priv->away = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -728,11 +744,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->offline);
-	priv->offline = pair;
+	priv->offline = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -741,11 +757,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->idle);
-	priv->idle = pair;
+	priv->idle = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -754,11 +770,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->message);
-	priv->message = pair;
+	priv->message = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -767,11 +783,11 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->message_nick_said);
-	priv->message_nick_said = pair;
+	priv->message_nick_said = copy_font_and_color(pair);
 }
 
 void
-pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, FontColorPair *pair)
+pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const FontColorPair *pair)
 {
 	PidginBlistThemePrivate *priv;
 
@@ -780,5 +796,5 @@
 	priv = PIDGIN_BLIST_THEME_GET_PRIVATE(G_OBJECT(theme));
 
 	free_font_and_color(priv->status);
-	priv->status = pair;
+	priv->status = copy_font_and_color(pair);
 }
--- a/pidgin/gtkblist-theme.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkblist-theme.h	Sat Apr 18 07:37:40 2009 +0000
@@ -61,8 +61,8 @@
 
 typedef struct
 {
-	gchar *font;
-	gchar *color;
+	const gchar *font;
+	const gchar *color;
 
 } FontColorPair;
 
@@ -220,7 +220,7 @@
  *
  * @param color The new background color.
  */
-void pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, GdkColor *color);
+void pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkColor *color);
 
 /**
  * Sets the opacity to be used for this buddy list theme.
@@ -234,84 +234,84 @@
  *
  * @param layout The new layout.
  */
-void pidgin_blist_theme_set_layout(PidginBlistTheme *theme, PidginBlistLayout *layout);
+void pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout);
 
 /**
  * Sets the background color to be used for expanded groups.
  *
  * @param color The new background color.
  */
-void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, GdkColor *color);
+void pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkColor *color);
 
 /**
  * Sets the text color and font to be used for expanded groups.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the background color to be used for collapsed groups.
  *
  * @param color The new background color.
  */
-void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, GdkColor *color);
+void pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkColor *color);
 
 /**
  * Sets the text color and font to be used for expanded groups.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the background color to be used for contacts and chats.
  *
  * @param color The color to use for contacts and chats.
  */
-void pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, GdkColor *color);
+void pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkColor *color);
 
 /**
  * Sets the text color and font to be used for expanded contacts.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for online buddies.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for away and idle buddies.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for offline buddies.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for idle buddies.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for buddies with unread messages.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for a chat with unread messages
@@ -319,14 +319,14 @@
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 /**
  * Sets the text color and font to be used for buddy status messages.
  *
  * @param pair The new text font at color pair.
  */
-void pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, FontColorPair *pair);
+void pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const FontColorPair *pair);
 
 G_END_DECLS
 #endif /* PIDGIN_BLIST_THEME_H */
--- a/pidgin/gtkblist.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkblist.c	Sat Apr 18 07:37:40 2009 +0000
@@ -6201,7 +6201,7 @@
 	PurpleBlistNode *selected_node = NULL;
 	GtkTreeIter iter;
 	FontColorPair *pair;
-	gchar *text_color, *text_font;
+	gchar const *text_color, *text_font;
 	PidginBlistTheme *theme;
 
 	group = (PurpleGroup*)gnode;
--- a/pidgin/gtkconv.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkconv.c	Sat Apr 18 07:37:40 2009 +0000
@@ -4981,11 +4981,17 @@
 	PurpleConversation *conv = gtkconv->active_conv;
 	PidginWindow *win = gtkconv->win;
 	PurpleConversation *c;
+	PurpleAccount *convaccount = purple_conversation_get_account(conv);
+	PurpleConnection *gc = purple_account_get_connection(convaccount);
+	PurplePluginProtocolInfo *prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
+
 	if (sd->target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE))
 	{
 		PurpleBlistNode *n = NULL;
 		PurpleBuddy *b;
 		PidginConversation *gtkconv = NULL;
+		PurpleAccount *buddyaccount;
+		const char *buddyname;
 
 		n = *(PurpleBlistNode **)sd->data;
 
@@ -4996,32 +5002,44 @@
 		else
 			return;
 
+		buddyaccount = purple_buddy_get_account(b);
+		buddyname = purple_buddy_get_name(b);
 		/*
-		 * If we already have an open conversation with this buddy, then
-		 * just move the conv to this window.  Otherwise, create a new
-		 * conv and add it to this window.
+		 * If a buddy is dragged to a chat window of the same protocol,
+		 * invite him to the chat.
 		 */
-		c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, b->account);
-		if (c != NULL) {
-			PidginWindow *oldwin;
-			gtkconv = PIDGIN_CONVERSATION(c);
-			oldwin = gtkconv->win;
-			if (oldwin != win) {
-				pidgin_conv_window_remove_gtkconv(oldwin, gtkconv);
-				pidgin_conv_window_add_gtkconv(win, gtkconv);
-			}
+		if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT &&
+				prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_invite) &&
+				strcmp(purple_account_get_protocol_id(convaccount),
+					purple_account_get_protocol_id(buddyaccount)) == 0) {
+		    purple_conv_chat_invite_user(PURPLE_CONV_CHAT(conv), buddyname, NULL, TRUE);
 		} else {
-			c = purple_conversation_new(PURPLE_CONV_TYPE_IM, b->account, b->name);
-			gtkconv = PIDGIN_CONVERSATION(c);
-			if (gtkconv->win != win)
-			{
-				pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
-				pidgin_conv_window_add_gtkconv(win, gtkconv);
+			/*
+			 * If we already have an open conversation with this buddy, then
+			 * just move the conv to this window.  Otherwise, create a new
+			 * conv and add it to this window.
+			 */
+			c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, buddyname, buddyaccount);
+			if (c != NULL) {
+				PidginWindow *oldwin;
+				gtkconv = PIDGIN_CONVERSATION(c);
+				oldwin = gtkconv->win;
+				if (oldwin != win) {
+					pidgin_conv_window_remove_gtkconv(oldwin, gtkconv);
+					pidgin_conv_window_add_gtkconv(win, gtkconv);
+				}
+			} else {
+				c = purple_conversation_new(PURPLE_CONV_TYPE_IM, buddyaccount, buddyname);
+				gtkconv = PIDGIN_CONVERSATION(c);
+				if (gtkconv->win != win) {
+					pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
+					pidgin_conv_window_add_gtkconv(win, gtkconv);
+				}
 			}
-		}
-
-		/* Make this conversation the active conversation */
-		pidgin_conv_window_switch_gtkconv(win, gtkconv);
+
+			/* Make this conversation the active conversation */
+			pidgin_conv_window_switch_gtkconv(win, gtkconv);
+		}
 
 		gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
 	}
@@ -5040,15 +5058,22 @@
 				purple_notify_error(win, NULL,
 					_("You are not currently signed on with an account that "
 					  "can add that buddy."), NULL);
-			}
-			else
-			{
-				c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, username);
-				gtkconv = PIDGIN_CONVERSATION(c);
-				if (gtkconv->win != win)
-				{
-					pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
-					pidgin_conv_window_add_gtkconv(win, gtkconv);
+			} else {
+				/*
+				 * If a buddy is dragged to a chat window of the same protocol,
+				 * invite him to the chat.
+				 */
+				if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT &&
+						prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_invite) &&
+						strcmp(purple_account_get_protocol_id(convaccount), protocol) == 0) {
+					purple_conv_chat_invite_user(PURPLE_CONV_CHAT(conv), username, NULL, TRUE);
+				} else {
+					c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, username);
+					gtkconv = PIDGIN_CONVERSATION(c);
+					if (gtkconv->win != win) {
+						pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
+						pidgin_conv_window_add_gtkconv(win, gtkconv);
+					}
 				}
 			}
 		}
@@ -5060,7 +5085,7 @@
 	}
 	else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) {
 		if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
-			pidgin_dnd_file_manage(sd, purple_conversation_get_account(conv), purple_conversation_get_name(conv));
+			pidgin_dnd_file_manage(sd, convaccount, purple_conversation_get_name(conv));
 		gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
 	}
 	else
@@ -6810,7 +6835,8 @@
 wrote_msg_update_unseen_cb(PurpleAccount *account, const char *who, const char *message,
 		PurpleConversation *conv, PurpleMessageFlags flags, gpointer null)
 {
-	if (conv == NULL || PIDGIN_IS_PIDGIN_CONVERSATION(conv))
+	PidginConversation *gtkconv = conv ? PIDGIN_CONVERSATION(conv) : NULL;
+	if (conv == NULL || (gtkconv && gtkconv->win != hidden_convwin))
 		return;
 	if (flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)) {
 		PidginUnseenState unseen = PIDGIN_UNSEEN_NONE;
--- a/pidgin/gtkdialogs.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkdialogs.c	Sat Apr 18 07:37:40 2009 +0000
@@ -427,7 +427,7 @@
 #endif
 	gtk_widget_destroy(logo);
 	logo = gtk_image_new_from_pixbuf(pixbuf);
-	gdk_pixbuf_unref(pixbuf);
+	g_object_unref(G_OBJECT(pixbuf));
 	/* Insert the logo */
 	obj = gtk_widget_get_accessible(logo);
 	tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL);
--- a/pidgin/gtkimhtml.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkimhtml.h	Sat Apr 18 07:37:40 2009 +0000
@@ -40,13 +40,13 @@
  **************************************************************************/
 /*@{*/
 
-#define GTK_TYPE_IMHTML            (gtk_imhtml_get_type ())
-#define GTK_IMHTML(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml))
-#define GTK_IMHTML_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))
-#define GTK_IS_IMHTML(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML))
-#define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML))
+#define GTK_TYPE_IMHTML            (gtk_imhtml_get_type())
+#define GTK_IMHTML(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTML, GtkIMHtml))
+#define GTK_IMHTML_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))
+#define GTK_IS_IMHTML(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTML))
+#define GTK_IS_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTML))
 #define GTK_IMHTML_SCALABLE(obj)   ((GtkIMHtmlScalable *)obj)
-#define GTK_IMHTML_ANIMATION(obj)   ((GtkIMHtmlAnimation *)obj)
+#define GTK_IMHTML_ANIMATION(obj)  ((GtkIMHtmlAnimation *)obj)
 
 typedef struct _GtkIMHtml			GtkIMHtml;
 typedef struct _GtkIMHtmlClass		GtkIMHtmlClass;
--- a/pidgin/gtkimhtmltoolbar.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkimhtmltoolbar.h	Sat Apr 18 07:37:40 2009 +0000
@@ -32,11 +32,11 @@
 
 #define DEFAULT_FONT_FACE "Helvetica 12"
 
-#define GTK_TYPE_IMHTMLTOOLBAR            (gtk_imhtmltoolbar_get_type ())
-#define GTK_IMHTMLTOOLBAR(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbar))
-#define GTK_IMHTMLTOOLBAR_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbarClass))
-#define GTK_IS_IMHTMLTOOLBAR(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTMLTOOLBAR))
-#define GTK_IS_IMHTMLTOOLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTMLTOOLBAR))
+#define GTK_TYPE_IMHTMLTOOLBAR            (gtk_imhtmltoolbar_get_type())
+#define GTK_IMHTMLTOOLBAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbar))
+#define GTK_IMHTMLTOOLBAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTMLTOOLBAR, GtkIMHtmlToolbarClass))
+#define GTK_IS_IMHTMLTOOLBAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTMLTOOLBAR))
+#define GTK_IS_IMHTMLTOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTMLTOOLBAR))
 
 typedef struct _GtkIMHtmlToolbar		GtkIMHtmlToolbar;
 typedef struct _GtkIMHtmlToolbarClass		GtkIMHtmlToolbarClass;
--- a/pidgin/gtkmain.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkmain.c	Sat Apr 18 07:37:40 2009 +0000
@@ -787,7 +787,7 @@
 		DBusMessage *message = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE,
 				DBUS_INTERFACE_PURPLE, "PurpleBlistSetVisible");
 		gboolean tr = TRUE;
-		dbus_message_append_args(message, DBUS_TYPE_UINT32, &tr, DBUS_TYPE_INVALID);
+		dbus_message_append_args(message, DBUS_TYPE_INT32, &tr, DBUS_TYPE_INVALID);
 		dbus_connection_send_with_reply_and_block(conn, message, -1, NULL);
 		dbus_message_unref(message);
 #endif
--- a/pidgin/gtkmenutray.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkmenutray.h	Sat Apr 18 07:37:40 2009 +0000
@@ -26,12 +26,12 @@
 
 #include <gtk/gtk.h>
 
-#define PIDGIN_TYPE_MENU_TRAY				(pidgin_menu_tray_get_gtype())
-#define PIDGIN_MENU_TRAY(obj)				(GTK_CHECK_CAST((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTray))
-#define PIDGIN_MENU_TRAY_CLASS(klass)		(GTK_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
-#define PIDGIN_IS_MENU_TRAY(obj)			(GTK_CHECK_TYPE((obj), PIDGIN_TYPE_MENU_TRAY))
-#define PIDGIN_IS_MENU_TRAY_CLASS(klass)	(GTK_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_MENU_TRAY))
-#define PIDGIN_MENU_TRAY_GET_CLASS(obj)	(GTK_CHECK_GET_CLASS((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
+#define PIDGIN_TYPE_MENU_TRAY            (pidgin_menu_tray_get_gtype())
+#define PIDGIN_MENU_TRAY(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTray))
+#define PIDGIN_MENU_TRAY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
+#define PIDGIN_IS_MENU_TRAY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_MENU_TRAY))
+#define PIDGIN_IS_MENU_TRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_MENU_TRAY))
+#define PIDGIN_MENU_TRAY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
 
 typedef struct _PidginMenuTray				PidginMenuTray;
 typedef struct _PidginMenuTrayClass		PidginMenuTrayClass;
--- a/pidgin/gtkprefs.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkprefs.c	Sat Apr 18 07:37:40 2009 +0000
@@ -743,7 +743,7 @@
 		gtk_list_store_set(prefs_sound_themes, &iter, 0, pixbuf, 2, purple_theme_get_name(theme), -1);
 
 		if (pixbuf != NULL)
-			gdk_pixbuf_unref(pixbuf);
+			g_object_unref(G_OBJECT(pixbuf));
 
 	} else if (PIDGIN_IS_BLIST_THEME(theme) || PIDGIN_IS_STATUS_ICON_THEME(theme)){
 		GtkListStore *store;
@@ -770,7 +770,7 @@
 
 		g_free(markup);
 		if (pixbuf != NULL)
-			gdk_pixbuf_unref(pixbuf);
+			g_object_unref(G_OBJECT(pixbuf));
 	}
 
 }
--- a/pidgin/gtksmiley.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtksmiley.c	Sat Apr 18 07:37:40 2009 +0000
@@ -74,7 +74,7 @@
 	gtk_widget_destroy(smiley->parent);
 	g_free(smiley->filename);
 	if (smiley->custom_pixbuf)
-		gdk_pixbuf_unref(smiley->custom_pixbuf);
+		g_object_unref(G_OBJECT(smiley->custom_pixbuf));
 	g_free(smiley);
 }
 
@@ -460,7 +460,7 @@
 {
 	if (editor->custom_pixbuf)
 		gdk_pixbuf_unref(editor->custom_pixbuf);
-	editor->custom_pixbuf = image ? gdk_pixbuf_ref(image) : NULL;
+	editor->custom_pixbuf = image ? g_object_ref(G_OBJECT(image)) : NULL;
 	if (image)
 		gtk_image_set_from_pixbuf(GTK_IMAGE(editor->smiley_image), image);
 }
--- a/pidgin/gtksourceundomanager.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtksourceundomanager.h	Sat Apr 18 07:37:40 2009 +0000
@@ -28,12 +28,12 @@
 
 #include <gtk/gtk.h>
 
-#define GTK_SOURCE_TYPE_UNDO_MANAGER             	(gtk_source_undo_manager_get_type ())
-#define GTK_SOURCE_UNDO_MANAGER(obj)			(GTK_CHECK_CAST ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManager))
-#define GTK_SOURCE_UNDO_MANAGER_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
-#define GTK_SOURCE_IS_UNDO_MANAGER(obj)			(GTK_CHECK_TYPE ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER))
-#define GTK_SOURCE_IS_UNDO_MANAGER_CLASS(klass)  	(GTK_CHECK_CLASS_TYPE ((klass), GTK_SOURCE_TYPE_UNDO_MANAGER))
-#define GTK_SOURCE_UNDO_MANAGER_GET_CLASS(obj)  	(GTK_CHECK_GET_CLASS ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
+#define GTK_SOURCE_TYPE_UNDO_MANAGER            (gtk_source_undo_manager_get_type())
+#define GTK_SOURCE_UNDO_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManager))
+#define GTK_SOURCE_UNDO_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
+#define GTK_SOURCE_IS_UNDO_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_SOURCE_TYPE_UNDO_MANAGER))
+#define GTK_SOURCE_IS_UNDO_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_SOURCE_TYPE_UNDO_MANAGER))
+#define GTK_SOURCE_UNDO_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
 
 
 typedef struct _GtkSourceUndoManager        	GtkSourceUndoManager;
--- a/pidgin/gtkstatusbox.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkstatusbox.c	Sat Apr 18 07:37:40 2009 +0000
@@ -536,12 +536,12 @@
 
 	for (i = 0; i < G_N_ELEMENTS(statusbox->connecting_pixbufs); i++) {
 		if (statusbox->connecting_pixbufs[i] != NULL)
-			gdk_pixbuf_unref(statusbox->connecting_pixbufs[i]);
+			g_object_unref(G_OBJECT(statusbox->connecting_pixbufs[i]));
 	}
 
 	for (i = 0; i < G_N_ELEMENTS(statusbox->typing_pixbufs); i++) {
 		if (statusbox->typing_pixbufs[i] != NULL)
-			gdk_pixbuf_unref(statusbox->typing_pixbufs[i]);
+			g_object_unref(G_OBJECT(statusbox->typing_pixbufs[i]));
 	}
 
 	g_object_unref(G_OBJECT(statusbox->store));
--- a/pidgin/gtkutils.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkutils.c	Sat Apr 18 07:37:40 2009 +0000
@@ -1627,7 +1627,7 @@
 						    _("Set as buddy icon"), DND_BUDDY_ICON,
 						    (ft ? _("Send image file") : _("Insert in message")), (ft ? DND_FILE_TRANSFER : DND_IM_IMAGE),
 							NULL);
-			gdk_pixbuf_unref(pb);
+			g_object_unref(G_OBJECT(pb));
 			return;
 		}
 
--- a/pidgin/gtkwhiteboard.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/gtkwhiteboard.c	Sat Apr 18 07:37:40 2009 +0000
@@ -624,7 +624,7 @@
 							   update_rect.x, update_rect.y,
 							   update_rect.width, update_rect.height);
 
-	gdk_gc_unref(gfx_con);
+	g_object_unref(G_OBJECT(gfx_con));
 }
 
 /* Uses Bresenham's algorithm (as provided by Wikipedia) */
--- a/pidgin/plugins/markerline.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/plugins/markerline.c	Sat Apr 18 07:37:40 2009 +0000
@@ -84,7 +84,7 @@
 		gdk_gc_set_rgb_fg_color(gc, &red);
 		gdk_draw_line(event->window, gc,
 					0, y, visible_rect.width, y);
-		gdk_gc_unref(gc);
+		g_object_unref(G_OBJECT(gc));
 	}
 	return FALSE;
 }
--- a/pidgin/plugins/ticker/gtkticker.c	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/plugins/ticker/gtkticker.c	Sat Apr 18 07:37:40 2009 +0000
@@ -41,7 +41,7 @@
 		gboolean	       include_internals,
 		GtkCallback       callback,
 		gpointer          callback_data);
-static GtkType gtk_ticker_child_type (GtkContainer     *container);
+static GType gtk_ticker_child_type   (GtkContainer     *container);
 
 
 static GtkContainerClass *parent_class = NULL;
@@ -97,7 +97,7 @@
 	widget_class = (GtkWidgetClass*) class;
 	container_class = (GtkContainerClass*) class;
 
-	parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+	parent_class = g_type_class_ref (GTK_TYPE_CONTAINER);
 
 	gobject_class->finalize = gtk_ticker_finalize;
 
@@ -112,7 +112,7 @@
 	container_class->child_type = gtk_ticker_child_type;
 }
 
-static GtkType gtk_ticker_child_type (GtkContainer *container)
+static GType gtk_ticker_child_type (GtkContainer *container)
 {
 	return GTK_TYPE_WIDGET;
 }
--- a/pidgin/plugins/ticker/gtkticker.h	Fri Apr 10 07:33:31 2009 +0000
+++ b/pidgin/plugins/ticker/gtkticker.h	Sat Apr 18 07:37:40 2009 +0000
@@ -33,11 +33,11 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#define GTK_TYPE_TICKER                  (gtk_ticker_get_type ())
-#define GTK_TICKER(obj)                  (GTK_CHECK_CAST ((obj), GTK_TYPE_TICKER, GtkTicker))
-#define GTK_TICKER_CLASS(klass)          (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TICKER, GtkTickerClass))
-#define GTK_IS_TICKER(obj)               (GTK_CHECK_TYPE ((obj), GTK_TYPE_TICKER))
-#define GTK_IS_TICKER_CLASS(klass)       (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TICKER))
+#define GTK_TYPE_TICKER            (gtk_ticker_get_type())
+#define GTK_TICKER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_TICKER, GtkTicker))
+#define GTK_TICKER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_TICKER, GtkTickerClass))
+#define GTK_IS_TICKER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_TICKER))
+#define GTK_IS_TICKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_TICKER))
 
 
 typedef struct _GtkTicker        GtkTicker;
@@ -72,7 +72,7 @@
 };
 
 
-GtkType    gtk_ticker_get_type          (void);
+GType      gtk_ticker_get_type          (void);
 GtkWidget* gtk_ticker_new               (void);
 void       gtk_ticker_add               (GtkTicker       *ticker,
                                         GtkWidget      *widget);
--- a/po/de.po	Fri Apr 10 07:33:31 2009 +0000
+++ b/po/de.po	Sat Apr 18 07:37:40 2009 +0000
@@ -11,9 +11,9 @@
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-03-28 16:59+0100\n"
-"PO-Revision-Date: 2009-03-28 16:53+0100\n"
-"Last-Translator: Jochen Kemnade <jochenkemnade@web.de>\n"
+"POT-Creation-Date: 2009-04-16 16:28+0200\n"
+"PO-Revision-Date: 2009-04-16 16:27+0200\n"
+"Last-Translator: Björn Voigt <bjoern@cs.tu-berlin.de>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -614,19 +614,6 @@
 msgid "Send To"
 msgstr "Senden an"
 
-msgid "Invite message"
-msgstr "Einladungsnachricht"
-
-msgid "Invite"
-msgstr "Einladen"
-
-msgid ""
-"Please enter the name of the user you wish to invite,\n"
-"along with an optional invite message."
-msgstr ""
-"Bitte geben Sie den Benutzernamen der Person ein, die Sie einladen möchten "
-"zusammen mit einer optionalen Einladungsnachricht."
-
 msgid "Conversation"
 msgstr "Unterhaltung"
 
@@ -889,6 +876,39 @@
 msgid "System Log"
 msgstr "System-Mitschnitt"
 
+msgid "Calling ... "
+msgstr "Anrufen..."
+
+msgid "Hangup"
+msgstr "Auflegen"
+
+#. Number of actions
+msgid "Accept"
+msgstr "Akzeptieren"
+
+msgid "Reject"
+msgstr "Ablehnen"
+
+msgid "Call in progress."
+msgstr "Anruf läuft."
+
+msgid "The call has been terminated."
+msgstr "Der Anruf wurde beendet."
+
+#, c-format
+msgid "%s wishes to start an audio session with you."
+msgstr "%s möchte eine Audio-Sitzung mit Ihnen starten."
+
+#, c-format
+msgid "%s is trying to start an unsupported media session type with you."
+msgstr ""
+
+msgid "You have rejected the call."
+msgstr "Sie haben den Anruf abgelehnt."
+
+msgid "call: Make an audio call."
+msgstr "call: Einen Audio-Anruf tätigen."
+
 msgid "Emails"
 msgstr "E-Mails"
 
@@ -923,6 +943,9 @@
 msgid "IM"
 msgstr "Nachricht"
 
+msgid "Invite"
+msgstr "Einladen"
+
 msgid "(none)"
 msgstr "(kein)"
 
@@ -1092,7 +1115,7 @@
 
 #, c-format
 msgid "%s has paused while typing to you (%s)"
-msgstr "%s hat beim Schreiben an Sie (%s) angehalten"
+msgstr "%s hat beim Tippen an Sie (%s) angehalten"
 
 #, c-format
 msgid "%s has signed on (%s)"
@@ -1537,6 +1560,27 @@
 msgid "Lastlog plugin."
 msgstr "Verlauf-Plugin."
 
+msgid ""
+"\n"
+"Fetching TinyURL..."
+msgstr ""
+
+msgid "Only create TinyURL for urls of this length or greater"
+msgstr ""
+
+msgid "TinyURL (or other) address prefix"
+msgstr ""
+
+#, fuzzy
+msgid "TinyURL"
+msgstr "URL anpassen"
+
+msgid "TinyURL plugin"
+msgstr ""
+
+msgid "When receiving a message with URL(s), TinyURL for easier copying"
+msgstr ""
+
 msgid "accounts"
 msgstr "Konten"
 
@@ -1638,13 +1682,6 @@
 msgid "SSL Certificate Verification"
 msgstr "SSL-Zertifikatsüberprüfung"
 
-#. Number of actions
-msgid "Accept"
-msgstr "Akzeptieren"
-
-msgid "Reject"
-msgstr "Ablehnen"
-
 msgid "_View Certificate..."
 msgstr "Ze_rtifikat ansehen..."
 
@@ -1792,6 +1829,18 @@
 msgid "%s left the room (%s)."
 msgstr "%s hat den Raum verlassen (%s)."
 
+#, fuzzy
+msgid "Invite to chat"
+msgstr "Zur Konferenz einladen"
+
+#. Put our happy label in it.
+msgid ""
+"Please enter the name of the user you wish to invite, along with an optional "
+"invite message."
+msgstr ""
+"Bitte geben Sie den Benutzernamen der Person ein, die Sie einladen möchten "
+"zusammen mit einer optionalen Einladungsnachricht."
+
 #, c-format
 msgid "Failed to get connection: %s"
 msgstr "Kann keine Verbindung herstellen: %s"
@@ -2631,7 +2680,7 @@
 msgstr "Nicht nachfragen. Immer als Alarm sichern."
 
 msgid "One Time Password"
-msgstr ""
+msgstr "Einmalpasswort"
 
 #. *< type
 #. *< ui_requirement
@@ -2640,13 +2689,13 @@
 #. *< priority
 #. *< id
 msgid "One Time Password Support"
-msgstr ""
+msgstr "Unterstützung für Einmalpasswörter"
 
 #. *< name
 #. *< version
 #. *  summary
 msgid "Enforce that passwords are used only once."
-msgstr ""
+msgstr "Erzwinge, dass Passwörter nur einmal verwendet werden."
 
 #. *  description
 msgid ""
@@ -3748,6 +3797,10 @@
 msgid "Operating System"
 msgstr "Betriebssystem"
 
+#, fuzzy
+msgid "Local Time"
+msgstr "Lokale Datei:"
+
 msgid "Last Activity"
 msgstr "Letzte Aktivität"
 
@@ -4493,6 +4546,37 @@
 msgid "%s has buzzed you!"
 msgstr "%s hat bei Ihnen angeklopft!"
 
+#, fuzzy, c-format
+msgid "Unable to initiate media with %s: invalid JID"
+msgstr "Kann die Nachricht an %s nicht senden, ungültige JID"
+
+#, fuzzy, c-format
+msgid "Unable to initiate media with %s: user is not online"
+msgstr "Kann die Datei nicht an %s senden, Benutzer ist nicht online"
+
+#, fuzzy, c-format
+msgid "Unable to initiate media with %s: not subscribed to user presence"
+msgstr ""
+"Kann die Datei nicht an %s senden, Anwesenheit des Benutzers nicht abonniert"
+
+#, fuzzy
+msgid "Media Initiation Failed"
+msgstr "Registrierung fehlgeschlagen"
+
+#, fuzzy, c-format
+msgid ""
+"Please select the resource of %s with which you would like to start a media "
+"session."
+msgstr ""
+"Bitte wählen Sie die Ressource von %s, an die Sie eine Datei schicken möchten"
+
+msgid "Select a Resource"
+msgstr "Wählen Sie eine Ressource"
+
+#, fuzzy
+msgid "Initiate Media"
+msgstr "Initiiere _Chat"
+
 msgid "config:  Configure a chat room."
 msgstr "config:  Konfiguriere einen Chatraum."
 
@@ -4687,9 +4771,6 @@
 msgstr ""
 "Bitte wählen Sie die Ressource von %s, an die Sie eine Datei schicken möchten"
 
-msgid "Select a Resource"
-msgstr "Wählen Sie eine Ressource"
-
 msgid "Edit User Mood"
 msgstr "Benutzerstimmung ändern"
 
@@ -7308,9 +7389,8 @@
 msgid "Change his/her memo as you like"
 msgstr ""
 
-#, fuzzy
 msgid "_Modify"
-msgstr "Bearbeiten"
+msgstr "_Bearbeiten"
 
 #, fuzzy
 msgid "Memo Modify"
@@ -10345,6 +10425,16 @@
 msgid "I_M"
 msgstr "I_M"
 
+#, fuzzy
+msgid "_Audio Call"
+msgstr "Chat _hinzufügen"
+
+msgid "Audio/_Video Call"
+msgstr "Audio/_Video-Anruf"
+
+msgid "_Video Call"
+msgstr "_Video-Anruf"
+
 msgid "_Send File..."
 msgstr "_Datei versenden..."
 
@@ -10775,14 +10865,6 @@
 msgid "Invite Buddy Into Chat Room"
 msgstr "Buddy in einen Chatraum einladen"
 
-#. Put our happy label in it.
-msgid ""
-"Please enter the name of the user you wish to invite, along with an optional "
-"invite message."
-msgstr ""
-"Bitte geben Sie den Benutzernamen der Person ein, die Sie einladen möchten "
-"zusammen mit einer optionalen Einladungsnachricht."
-
 msgid "_Buddy:"
 msgstr "_Buddy:"
 
@@ -10857,6 +10939,22 @@
 msgid "/Conversation/Clea_r Scrollback"
 msgstr "/Unterhaltung/_Leeren"
 
+#, fuzzy
+msgid "/Conversation/M_edia"
+msgstr "/Unterhaltung/Me_hr"
+
+#, fuzzy
+msgid "/Conversation/Media/_Audio Call"
+msgstr "/Unterhaltung/Me_hr"
+
+#, fuzzy
+msgid "/Conversation/Media/_Video Call"
+msgstr "/Unterhaltung/Me_hr"
+
+#, fuzzy
+msgid "/Conversation/Media/Audio\\/Video _Call"
+msgstr "/Unterhaltung/Betrachte _Mitschnitt"
+
 msgid "/Conversation/Se_nd File..."
 msgstr "/Unterhaltung/Datei _senden..."
 
@@ -10929,6 +11027,18 @@
 msgid "/Conversation/View Log"
 msgstr "/Unterhaltung/Betrachte Mitschnitt"
 
+#, fuzzy
+msgid "/Conversation/Media/Audio Call"
+msgstr "/Unterhaltung/Mehr"
+
+#, fuzzy
+msgid "/Conversation/Media/Video Call"
+msgstr "/Unterhaltung/Betrachte Mitschnitt"
+
+#, fuzzy
+msgid "/Conversation/Media/Audio\\/Video Call"
+msgstr "/Unterhaltung/Mehr"
+
 msgid "/Conversation/Send File..."
 msgstr "/Unterhaltung/Datei senden ..."
 
@@ -12073,6 +12183,23 @@
 msgid "Exiting because another libpurple client is already running.\n"
 msgstr "Wird geschlossen, da bereits ein anderer libpurple-Client läuft\n"
 
+msgid "/_Media"
+msgstr "/_Medien"
+
+msgid "/Media/_Hangup"
+msgstr "/Medien/_Auflegen"
+
+msgid "Calling..."
+msgstr "Anrufen..."
+
+#, c-format
+msgid "%s wishes to start an audio/video session with you."
+msgstr ""
+
+#, c-format
+msgid "%s wishes to start a video session with you."
+msgstr ""
+
 #, c-format
 msgid "%s has %d new message."
 msgid_plural "%s has %d new messages."
@@ -12240,43 +12367,33 @@
 msgid "Pounce Target"
 msgstr "Alarm-Ziel"
 
-#, fuzzy
 msgid "Started typing"
-msgstr "zu tippen beginnt"
-
-#, fuzzy
+msgstr "Beginnt zu tippen"
+
 msgid "Paused while typing"
-msgstr "beim Tippen anhält"
-
-#, fuzzy
+msgstr "Hat beim Tippen angehalten"
+
 msgid "Signed on"
-msgstr "sich anmeldet"
-
-#, fuzzy
+msgstr "Hat sich anmeldet"
+
 msgid "Returned from being idle"
-msgstr "%s ist nicht mehr inaktiv (%s)"
-
-#, fuzzy
+msgstr "Ist nicht mehr inaktiv"
+
 msgid "Returned from being away"
-msgstr "wieder anwesend ist"
-
-#, fuzzy
+msgstr "Ist wieder anwesend"
+
 msgid "Stopped typing"
-msgstr "Tippen gestoppt"
-
-#, fuzzy
+msgstr "Hat das Tippen gestoppt"
+
 msgid "Signed off"
-msgstr "sich abmeldet"
-
-#, fuzzy
+msgstr "Hat sich abmeldet"
+
 msgid "Became idle"
-msgstr "untätig wird"
-
-#, fuzzy
+msgstr "Wurde untätig"
+
 msgid "Went away"
-msgstr "Bei Abwesenheit"
-
-#, fuzzy
+msgstr "Ging hinaus"
+
 msgid "Sent a message"
 msgstr "Eine Nachricht senden"
 
@@ -12420,9 +12537,6 @@
 msgid "Cannot start browser configuration program."
 msgstr "Kann das Browser-Konfigurationsprogramm nicht starten."
 
-msgid "ST_UN server:"
-msgstr "ST_UN Server:"
-
 msgid "<span style=\"italic\">Example: stunserver.org</span>"
 msgstr "<span style=\"italic\">Beispiel: stunserver.org</span>"
 
@@ -12447,6 +12561,10 @@
 msgid "_End port:"
 msgstr "_End-Port:"
 
+#. TURN server
+msgid "Relay Server (TURN)"
+msgstr "Relay-Server (TURN)"
+
 msgid "Proxy Server &amp; Browser"
 msgstr "Proxy-Server &amp; Browser"
 
@@ -12477,7 +12595,7 @@
 
 #. This is a global option that affects SOCKS4 usage even with account-specific proxy settings
 msgid "Use remote DNS with SOCKS4 proxies"
-msgstr "Remote-DNS mit SOCKS4-Proxys benuten"
+msgstr "Remote-DNS mit SOCKS4-Proxys benutzen"
 
 msgid "_User:"
 msgstr "_Benutzer:"
@@ -14003,3 +14121,16 @@
 msgid "This plugin is useful for debbuging XMPP servers or clients."
 msgstr ""
 "Dieses Plugin ist nützlich zur Fehlersuche in XMPP-Servern oder -Clients."
+
+#~ msgid "Invite message"
+#~ msgstr "Einladungsnachricht"
+
+#~ msgid ""
+#~ "Please enter the name of the user you wish to invite,\n"
+#~ "along with an optional invite message."
+#~ msgstr ""
+#~ "Bitte geben Sie den Benutzernamen der Person ein, die Sie einladen "
+#~ "möchten zusammen mit einer optionalen Einladungsnachricht."
+
+#~ msgid "ST_UN server:"
+#~ msgstr "ST_UN Server:"