diff -u lib/rb-util.c lib/rb-util.c
--- lib/rb-util.c	16 Apr 2006 11:01:27 -0000
+++ lib/rb-util.c	16 Apr 2006 15:34:28 -0000
@@ -744,6 +744,7 @@
 	    g_value_get_object (handler_return) == NULL)
 		return TRUE;
 
+	g_value_unset (return_accu);
 	g_value_init (return_accu, G_VALUE_TYPE (handler_return));
 	g_value_copy (handler_return, return_accu);
 	
diff -u sources/rb-ipod-source.c sources/rb-ipod-source.c
--- sources/rb-ipod-source.c	16 Apr 2006 11:01:27 -0000
+++ sources/rb-ipod-source.c	16 Apr 2006 15:34:28 -0000
@@ -37,6 +37,7 @@
 #include "eel-gconf-extensions.h"
 #include "rb-ipod-source.h"
 #include "rb-debug.h"
+#include "rb-plugin.h"
 #include "rb-removable-media-manager.h"
 #include "rb-static-playlist-source.h"
 #include "rb-util.h"
@@ -77,8 +78,10 @@
 	  G_CALLBACK (rb_ipod_source_cmd_rename) }
 };
 
+RB_PLUGIN_DEFINE_TYPE(RBiPodSource, 
+		      rb_ipod_source, 
+		      RB_TYPE_REMOVABLE_MEDIA_SOURCE)
 
-G_DEFINE_TYPE (RBiPodSource, rb_ipod_source, RB_TYPE_REMOVABLE_MEDIA_SOURCE)
 #define IPOD_SOURCE_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_IPOD_SOURCE, RBiPodSourcePrivate))
 
 
@@ -109,6 +112,10 @@
 
 	mpl = itdb_playlist_mpl (priv->ipod_db);
 	rb_debug ("Renaming iPod from %s to %s", mpl->name, name);
+	if (strcmp (mpl->name, name) == 0) {
+		rb_debug ("iPod is already named %s", name);
+		return;
+	}
 	g_free (mpl->name);
 	mpl->name = g_strdup (name);
 	itdb_write (priv->ipod_db, NULL);
reverted:
diff -u plugins/ipod/rb-ipod-plugin.c plugins/ipod/rb-ipod-plugin.c
--- plugins/ipod/rb-ipod-plugin.c	2006-04-16 13:00:25.521400066 +0200
+++ plugins/ipod/rb-ipod-plugin.c	2006-04-16 17:34:03.771828131 +0200
@@ -78,9 +78,11 @@
 	RBPluginClass *plugin_class = RB_PLUGIN_CLASS (klass);
 
 	object_class->finalize = rb_ipod_plugin_finalize;
-
+	
 	plugin_class->activate = impl_activate;
 	plugin_class->deactivate = impl_deactivate;
+
+	RB_PLUGIN_REGISTER_TYPE(rb_ipod_source);
 }
 
 static void
reverted:
only in patch2:
unchanged:
only in patch2:
unchanged:
--- plugins/rb-plugin.h	11 Mar 2006 05:24:55 -0000	1.1
+++ plugins/rb-plugin.h	16 Apr 2006 15:34:28 -0000
@@ -93,6 +93,7 @@
 #define RB_PLUGIN_REGISTER(PluginName, plugin_name)				\
 										\
 static GType plugin_name##_type = 0;						\
+static GTypeModule *plugin_module_type = 0;		                \
 										\
 GType										\
 plugin_name##_get_type (void)							\
@@ -131,12 +132,67 @@
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);			\
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");			\
 										\
+	plugin_module_type = module;						\
 	plugin_name##_type = g_type_module_register_type (module,		\
 					    RB_TYPE_PLUGIN,			\
 					    #PluginName,			\
 					    &our_info,				\
 					    0);					\
 	return plugin_name##_type;						\
+}
+
+
+#define RB_PLUGIN_REGISTER_TYPE(type_name)                                      \
+        type_name##_register_type (plugin_module_type)
+
+#define RB_PLUGIN_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT)			\
+static void type_name##_init (TypeName *self); 				\
+static void type_name##_class_init (TypeName##Class *klass); 			\
+static gpointer type_name##_parent_class = ((void *)0); 			\
+static GType type_name##_type_id = 0;						\
+										\
+static void 									\
+type_name##_class_intern_init (gpointer klass) 					\
+{ 										\
+	type_name##_parent_class = g_type_class_peek_parent (klass);		\
+	type_name##_class_init ((TypeName##Class*) klass); 			\
+}										\
+										\
+										\
+GType 										\
+type_name##_get_type (void)							\
+{										\
+	g_assert (type_name##_type_id != 0);					\
+										\
+	return type_name##_type_id;						\
+}										\
+										\
+GType 										\
+type_name##_register_type (GTypeModule *module) 				\
+{ 										\
+										\
+	if ((type_name##_type_id == 0)) { 					\
+		static const GTypeInfo g_define_type_info = { 			\
+			sizeof (TypeName##Class), 				\
+			(GBaseInitFunc) ((void *)0), 				\
+			(GBaseFinalizeFunc) ((void *)0), 			\
+			(GClassInitFunc) type_name##_class_intern_init, 	\
+			(GClassFinalizeFunc) ((void *)0), 			\
+			((void *)0), 						\
+			sizeof (TypeName), 					\
+			0, 							\
+			(GInstanceInitFunc) type_name##_init,			\
+			((void *)0) 						\
+		}; 								\
+		type_name##_type_id = 						\
+			g_type_module_register_type (module, 			\
+						     TYPE_PARENT, 		\
+						     g_intern_static_string (#TypeName), \
+						     &g_define_type_info, 	\
+						     (GTypeFlags) 0); 		\
+	} 									\
+										\
+	return type_name##_type_id;						\
 }
 
 
only in patch2:
unchanged:
--- sources/rb-generic-player-source.c	2 Apr 2006 09:35:26 -0000	1.7
+++ sources/rb-generic-player-source.c	16 Apr 2006 15:34:28 -0000
@@ -260,7 +260,6 @@
 		g_free (file);
 		g_free (path);
 	}
-
 	return result;
 }
 
only in patch2:
unchanged:
--- sources/rb-ipod-source.h	11 Sep 2005 03:05:11 -0000	1.4
+++ sources/rb-ipod-source.h	16 Apr 2006 15:34:28 -0000
@@ -47,6 +47,7 @@
 
 RBRemovableMediaSource *	rb_ipod_source_new		(RBShell *shell, GnomeVFSVolume *volume);
 GType			rb_ipod_source_get_type		(void);
+GType                   rb_ipod_source_register_type    (GTypeModule *module);
 
 gboolean		rb_ipod_is_volume_ipod		(GnomeVFSVolume *volume);
 
