Index: configure.ac
===================================================================
--- configure.ac	(revision 5159)
+++ configure.ac	(working copy)
@@ -912,7 +912,6 @@ shell/Makefile
 data/Makefile
 data/rhythmbox.desktop.in
 data/ui/Makefile
-data/art/Makefile
 data/glade/Makefile
 data/icons/Makefile
 data/icons/hicolor/Makefile
Index: shell/rb-shell.c
===================================================================
--- shell/rb-shell.c	(revision 5159)
+++ shell/rb-shell.c	(working copy)
@@ -2221,8 +2221,6 @@ rb_shell_cmd_about (GtkAction *action,
 {
 	const char **tem;
 	GString *comment;
-	GdkPixbuf *pixbuf = NULL;
-
 	const char *authors[] = {
 		"",
 #include "MAINTAINERS.tab"
@@ -2258,8 +2256,6 @@ rb_shell_cmd_about (GtkAction *action,
 
 	char *license_trans;
 
-	pixbuf = gdk_pixbuf_new_from_file (rb_file ("about-logo.png"), NULL);
-
 	authors[0] = _("Maintainers:");
 	for (tem = authors; *tem != NULL; tem++)
 		;
@@ -2283,10 +2279,9 @@ rb_shell_cmd_about (GtkAction *action,
 			       "authors", (const char **) authors,
 			       "documenters", (const char **) documenters,
 			       "translator-credits", strcmp (translator_credits, "translator-credits") != 0 ? translator_credits : NULL,
-			       "logo", pixbuf,
+			       "logo-icon-name", "rhythmbox",
 			       NULL);
-	if (pixbuf)
-		g_object_unref (pixbuf);
+
 	g_string_free (comment, TRUE);
 	g_free (license_trans);
 }
Index: data/art/Makefile.am
===================================================================
--- data/art/Makefile.am	(revision 5159)
+++ data/art/Makefile.am	(working copy)
@@ -1,9 +0,0 @@
-## arch-tag: Automake rules for included art
-
-art_DATA =  \
-	   about-logo.png
-
-
-artdir = $(pkgdatadir)/art
-
-EXTRA_DIST = $(art_DATA)
Index: data/art/.cvsignore
===================================================================
--- data/art/.cvsignore	(revision 5159)
+++ data/art/.cvsignore	(working copy)
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-.arch-ids
Index: data/Makefile.am
===================================================================
--- data/Makefile.am	(revision 5159)
+++ data/Makefile.am	(working copy)
@@ -1,6 +1,6 @@
 ## arch-tag: Automake rules for various data files
 
-SUBDIRS = ui glade art icons
+SUBDIRS = ui glade icons
 
 @INTLTOOL_XML_RULE@
 @INTLTOOL_DESKTOP_RULE@
Index: plugins/ipod/rb-ipod-source.h
===================================================================
--- plugins/ipod/rb-ipod-source.h	(revision 5159)
+++ plugins/ipod/rb-ipod-source.h	(working copy)
@@ -24,6 +24,7 @@
 
 #include "rb-shell.h"
 #include "rb-removable-media-source.h"
+#include "rb-plugin.h"
 #include "rhythmdb.h"
 
 G_BEGIN_DECLS
@@ -45,11 +46,14 @@ typedef struct
 	RBRemovableMediaSourceClass parent;
 } RBiPodSourceClass;
 
-RBRemovableMediaSource *	rb_ipod_source_new		(RBShell *shell, GnomeVFSVolume *volume);
+RBRemovableMediaSource * rb_ipod_source_new		(RBShell *shell,
+							 RBPlugin *plugin,
+							 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);
+gboolean		rb_ipod_is_volume_ipod		(GnomeVFSVolume *volume,
+							 RBPlugin *plugin);
 
 G_END_DECLS
 
Index: plugins/ipod/Makefile.am
===================================================================
--- plugins/ipod/Makefile.am	(revision 5159)
+++ plugins/ipod/Makefile.am	(working copy)
@@ -43,7 +43,10 @@ uixml_DATA = ipod-ui.xml
 
 plugin_DATA = $(plugin_in_files:.rb-plugin.desktop.in=.rb-plugin)
 
-EXTRA_DIST = $(uixml_DATA) $(plugin_in_files)
+gladedir = $(plugindir)
+glade_DATA = ipod_init.glade
+
+EXTRA_DIST = $(uixml_DATA) $(plugin_in_files) $(glade_DATA)
 
 CLEANFILES = $(plugin_DATA)
 DISTCLEANFILES = $(plugin_DATA)
Index: plugins/ipod/rb-ipod-plugin.c
===================================================================
--- plugins/ipod/rb-ipod-plugin.c	(revision 5159)
+++ plugins/ipod/rb-ipod-plugin.c	(working copy)
@@ -200,9 +200,9 @@ rb_ipod_plugin_source_deleted (RBiPodSou
 static RBSource *
 create_source_cb (RBRemovableMediaManager *rmm, GnomeVFSVolume *volume, RBIpodPlugin *plugin)
 {
-	if (rb_ipod_is_volume_ipod (volume)) {
+	if (rb_ipod_is_volume_ipod (volume, RB_PLUGIN (plugin))) {
 		RBSource *src;
-		src = RB_SOURCE (rb_ipod_source_new (plugin->shell, volume));
+		src = RB_SOURCE (rb_ipod_source_new (plugin->shell, RB_PLUGIN (plugin), volume));
 
 		plugin->ipod_sources = g_list_prepend (plugin->ipod_sources, src);
 		g_signal_connect_object (G_OBJECT (src),
Index: plugins/ipod/rb-ipod-source.c
===================================================================
--- plugins/ipod/rb-ipod-source.c	(revision 5159)
+++ plugins/ipod/rb-ipod-source.c	(working copy)
@@ -43,6 +43,8 @@
 #include "rb-static-playlist-source.h"
 #include "rb-util.h"
 #include "rhythmdb.h"
+#include "rb-dialog.h"
+#include "rb-glade-helpers.h"
 #include "rb-cut-and-paste-code.h"
 
 static GObject *rb_ipod_source_constructor (GType type,
@@ -239,6 +241,7 @@ rb_ipod_source_dispose (GObject *object)
 
 RBRemovableMediaSource *
 rb_ipod_source_new (RBShell *shell,
+		    RBPlugin *plugin,
 		    GnomeVFSVolume *volume)
 {
 	RBiPodSource *source;
@@ -247,7 +250,7 @@ rb_ipod_source_new (RBShell *shell,
 	char *name;
 	char *path;
 
-	g_assert (rb_ipod_is_volume_ipod (volume));
+	g_assert (rb_ipod_is_volume_ipod (volume, plugin));
 
 	g_object_get (shell, "db", &db, NULL);
 	path = gnome_vfs_volume_get_device_path (volume);
@@ -746,30 +749,229 @@ rb_ipod_volume_has_ipod_db (GnomeVFSVolu
 	return result;
 }
 
+enum {
+	COL_INFO = 0,
+	COL_NAME
+};
+
+static void
+set_cell (GtkCellLayout   *cell_layout,
+	  GtkCellRenderer *cell,
+	  GtkTreeModel    *tree_model,
+	  GtkTreeIter     *iter,
+	  gpointer         data)
+{
+	gboolean header;
+	gchar *text;
+	Itdb_IpodInfo *info;
+
+	gtk_tree_model_get (tree_model, iter, COL_INFO, &info, -1);
+	g_return_if_fail (info);
+
+	header = gtk_tree_model_iter_has_child (tree_model, iter);
+
+	if (header) {
+	    text = g_strdup (
+	  itdb_info_get_ipod_generation_string (info->ipod_generation));
+	} else {
+	    if (info->capacity >= 1) {   /* size in GB */
+	  text = g_strdup_printf ("%2.0f GB %s (x%s)",
+				  info->capacity,
+				  itdb_info_get_ipod_model_name_string (
+				      info->ipod_model),
+				  info->model_number);
+	    } else if (info->capacity > 0) {   /* size in MB */
+	  text = g_strdup_printf ("%3.0f MB %s (x%s)",
+				  info->capacity * 1024,
+				  itdb_info_get_ipod_model_name_string (
+				      info->ipod_model),
+				  info->model_number);
+	    } else {   /* no capacity information available */
+	  text = g_strdup_printf ("%s (x%s)",
+				  itdb_info_get_ipod_model_name_string (
+				      info->ipod_model),
+				  info->model_number);
+	    }
+	}
+
+	g_object_set (cell,
+		"sensitive", !header,
+		"text", text,
+		NULL);
+	g_free (text);
+}
+
+static void
+_setup_model_combo (GtkWidget *combo, const char *mount_path)
+{
+	const Itdb_IpodInfo *table;
+	const Itdb_IpodInfo *ipod_info;
+	Itdb_IpodGeneration generation;
+	Itdb_Device *device;
+	GtkTreeStore *store;
+	GtkCellRenderer *renderer;
+	GtkTreeIter *ipod_iter;
+	gboolean info_found;
+
+	table = itdb_info_get_ipod_info_table ();
+	device = itdb_device_new ();
+	itdb_device_set_mountpoint (device, mount_path);
+	itdb_device_read_sysinfo (device);
+	ipod_info = itdb_device_get_ipod_info (device);
+	ipod_iter = NULL;
+
+	store = gtk_tree_store_new (2, G_TYPE_POINTER, G_TYPE_STRING);
+	info_found = TRUE;
+	for (generation = ITDB_IPOD_GENERATION_FIRST; info_found; generation++) {
+		GtkTreeIter iter;
+		const Itdb_IpodInfo *model_info;
+
+		info_found = FALSE;
+		for (model_info = table; model_info->model_number; model_info++) {
+			if (model_info->ipod_generation == generation) {
+				GtkTreeIter iter_child;
+				char *model_name;
+
+				if (!info_found) {
+					gtk_tree_store_append (store, &iter, NULL);
+					gtk_tree_store_set (store, &iter,
+							    COL_INFO, model_info,
+							    COL_NAME, "",
+							    -1);
+					info_found = TRUE;
+				}
+				gtk_tree_store_append (store, &iter_child, &iter);
+				model_name = g_strdup_printf ("x%s", model_info->model_number);
+				gtk_tree_store_set (store, &iter_child,
+						    COL_INFO, model_info,
+						    COL_NAME, model_name,
+						    -1);
+
+				if (model_info == ipod_info) {
+					rb_debug ("found matching iPod model: %s", model_name);
+					ipod_iter = gtk_tree_iter_copy (&iter_child);
+				}
+
+				g_free (model_name);
+			}
+		}
+	}
+
+	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (store));
+	g_object_unref (store);
+	gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo), COL_NAME);
+	gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo));
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
+	gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
+					    renderer,
+					    set_cell,
+					    NULL, NULL);
+
+	if (ipod_iter) {
+		gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), ipod_iter);
+		gtk_tree_iter_free (ipod_iter);
+	} else {
+		/* the ipod wasn't found */
+	}
+
+	itdb_device_free (device);
+}
+
 gboolean
-rb_ipod_is_volume_ipod (GnomeVFSVolume *volume)
+rb_ipod_is_volume_ipod (GnomeVFSVolume *volume, RBPlugin *plugin)
 {
 #ifdef HAVE_HAL
 	gchar *udi;
+	gboolean result;
+	GError *error = NULL;
 #endif
-	if (gnome_vfs_volume_get_volume_type (volume) != GNOME_VFS_VOLUME_TYPE_MOUNTPOINT) {
+	if (gnome_vfs_volume_get_volume_type (volume) != GNOME_VFS_VOLUME_TYPE_MOUNTPOINT)
 		return FALSE;
-	}
 
 #ifdef HAVE_HAL
 	udi = gnome_vfs_volume_get_hal_udi (volume);
-	if (udi != NULL) {
-		gboolean result;
+	if (udi == NULL)
+		return FALSE;
 
-		result = hal_udi_is_ipod (udi);
-		g_free (udi);
-		if (result == FALSE) {
+	result = hal_udi_is_ipod (udi);
+	g_free (udi);
+	if (result == FALSE)
+		return FALSE;
+
+	if (!rb_ipod_volume_has_ipod_db (volume)) {
+		/* could be an uninitialised iPod, ask the user */
+		GladeXML *xml;
+		GtkWidget *dialog;
+		GtkWidget *widget;
+		GtkWidget *device;
+		GtkTreeModel *tree_model;
+		GtkTreeIter iter;
+		int response;
+		char *uri;
+		char *glade_file;
+		char *mountpoint;
+		char *model_name;
+		char *ipod_name;
+
+		uri = gnome_vfs_volume_get_activation_uri (volume);
+		mountpoint = g_filename_from_uri (uri, NULL, NULL);
+		g_free (uri);
+		if (mountpoint == NULL)
+			return FALSE;
+
+		/* create message dialog with model-number combo box
+		 * and asking whether they want to initialise the iPod
+		 */
+		glade_file = rb_plugin_find_file (plugin, "ipod_init.glade");
+		xml = glade_xml_new (glade_file, NULL, NULL);
+		g_free (glade_file);
+		dialog = glade_xml_get_widget (xml, "ipod_init");
+		widget = glade_xml_get_widget (xml, "model_combo");
+		_setup_model_combo (widget, mountpoint);
+
+		device = glade_xml_get_widget (xml, "device_info");
+		uri = gnome_vfs_volume_get_device_path (volume);
+		gtk_label_set_text (GTK_LABEL (device), uri);
+		g_free (uri);
+
+		response = gtk_dialog_run (GTK_DIALOG (dialog));
+		if (response != GTK_RESPONSE_ACCEPT) {
+			gtk_widget_destroy (dialog);
+			g_free (mountpoint);
 			return FALSE;
 		}
+
+		/* get model number and name */
+		tree_model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+		gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+		gtk_tree_model_get (tree_model, &iter, COL_NAME, &model_name, -1);
+		widget = glade_xml_get_widget (xml, "name_entry");
+		ipod_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));
+
+		gtk_widget_destroy (dialog);
+
+		rb_debug ("attempting to init ipod on '%s', with model '%s' and name '%s'", mountpoint, model_name, ipod_name);
+		if (!itdb_init_ipod (mountpoint, model_name, ipod_name, &error)) {
+			rb_error_dialog (NULL, _("Unable to initialise new iPod"), "%s", error->message);
+
+			g_free (mountpoint);
+			g_free (model_name);
+			g_free (ipod_name);
+			g_error_free (error);
+			return FALSE;
+		}
+
+		g_free (mountpoint);
+		g_free (model_name);
+		g_free (ipod_name);
 	}
-#endif
 
+	return TRUE;
+#else
 	return rb_ipod_volume_has_ipod_db (volume);
+#endif
 }
 
 #ifdef HAVE_HAL
@@ -1201,13 +1403,13 @@ utf8_to_ascii (const gchar *utf8)
 
 	string = g_string_new ("");
 	while ((it != NULL) && (*it != '\0')) {
-		/* Do we have a 7 bit char ? */
-		if (*it < 0x80) {
-			g_string_append_c (string, *it);
-		} else {
-			g_string_append_c (string, '_');
-		}
-		it = (const guchar *)g_utf8_next_char (it);
+	        /* Do we have a 7 bit char ? */
+	        if (*it < 0x80) {
+	                g_string_append_c (string, *it);
+	        } else {
+	                g_string_append_c (string, '_');
+	        }
+	        it = (const guchar *)g_utf8_next_char (it);
 	}
 
 	return g_string_free (string, FALSE);
