? help/sv/.xml2po.mo
? help/sv/rhythmbox.xml
? lib/media-eject-inline.h
? lib/rhythmbox-no-star-inline.h
? lib/rhythmbox-podcast-inline.h
? lib/rhythmbox-set-star-inline.h
? lib/rhythmbox-tray-icon-inline.h
? lib/rhythmbox-unset-star-inline.h
? plugins/artdisplay/artdisplay/Makefile
? plugins/artdisplay/artdisplay/Makefile.in
? plugins/generic-player/Makefile
? plugins/generic-player/Makefile.in
? plugins/generic-player/generic-player.rb-plugin
? plugins/lyrics/Makefile
? plugins/lyrics/Makefile.in
? plugins/lyrics/lyrics.rb-plugin
? plugins/rb/Makefile
? plugins/rb/Makefile.in
? remote/Makefile
? remote/Makefile.in
? remote/dbus/rhythmbox-client
? shell/rb-shell-binding.h
? shell/rb-shell-player-binding.h
? tests/bench-rhythmdb-load
Index: rhythmdb/rhythmdb-query-model.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb-query-model.c,v
retrieving revision 1.134
diff -p -u -r1.134 rhythmdb-query-model.c
--- rhythmdb/rhythmdb-query-model.c	29 Jun 2006 22:14:24 -0000	1.134
+++ rhythmdb/rhythmdb-query-model.c	13 Jul 2006 23:40:23 -0000
@@ -440,6 +440,7 @@ rhythmdb_query_model_set_property (GObje
 		model->priv->db = g_value_get_object (value);
 		break;
 	case PROP_QUERY:
+		rhythmdb_query_free (model->priv->query);
 		model->priv->query = rhythmdb_query_copy (g_value_get_pointer (value));
 		model->priv->original_query = rhythmdb_query_copy (model->priv->query);
 		rhythmdb_query_preprocess (model->priv->db, model->priv->query);
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/main.c,v
retrieving revision 1.98
diff -p -u -r1.98 main.c
--- shell/main.c	30 May 2006 13:47:16 -0000	1.98
+++ shell/main.c	13 Jul 2006 23:40:23 -0000
@@ -60,7 +60,6 @@
 #include "eel-gconf-extensions.h"
 #include "rb-util.h"
 
-
 #if WITH_DBUS
 #include <dbus/dbus-glib.h>
 #include "rb-shell-glue.h"
@@ -74,8 +73,8 @@
 #endif
 
 #include <nautilus-burn-drive.h>
-#ifndef NAUTILUS_BURN_CHECK_VERSION 	 
-#define NAUTILUS_BURN_CHECK_VERSION(a,b,c) FALSE 	 
+#ifndef NAUTILUS_BURN_CHECK_VERSION
+#define NAUTILUS_BURN_CHECK_VERSION(a,b,c) FALSE
 #endif
 
 #if NAUTILUS_BURN_CHECK_VERSION(2,15,3)
@@ -189,7 +188,7 @@ main (int argc, char **argv)
 	else
 		rb_debug_init (debug);
 	rb_debug ("initializing Rhythmbox %s", VERSION);
-	
+
 	/* TODO: kill this function */
 	rb_threads_init ();
 
@@ -211,7 +210,7 @@ main (int argc, char **argv)
 		flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;
 #else
 		flags = DBUS_NAME_FLAG_DO_NOT_QUEUE;
-#endif                
+#endif
 
 #ifndef WITH_OLD_DBUS
 		DBusGProxy *bus_proxy;
@@ -263,10 +262,9 @@ main (int argc, char **argv)
 				   request_name_reply);
 			activated = FALSE;
 		}
-		
-						
+
 	}
-		
+
 #endif
 
 	if (!activated) {
@@ -278,15 +276,15 @@ main (int argc, char **argv)
 #ifdef WITH_RHYTHMDB_GDA
 		gda_init (PACKAGE, VERSION, argc, argv);
 #endif
- 	
+
 		rb_refstring_system_init ();
 
 		rb_file_helpers_init ();
 
 		rb_debug ("Going to create a new shell");
-	
+
 		glade_gnome_init ();
-	
+
 		rb_stock_icons_init ();
 
 #if NAUTILUS_BURN_CHECK_VERSION(2,15,3)
@@ -294,7 +292,7 @@ main (int argc, char **argv)
 #endif
 
 		gtk_window_set_default_icon_name ("rhythmbox");
-	
+
 		rb_shell = rb_shell_new (argc, argv, no_registration, no_update, dry_run, rhythmdb_file);
 		g_object_weak_ref (G_OBJECT (rb_shell), main_shell_weak_ref_cb, NULL);
 		if (!no_registration && session_bus != NULL) {
@@ -310,14 +308,14 @@ main (int argc, char **argv)
 			obj = rb_shell_get_player (rb_shell);
 			path = rb_shell_get_player_path (rb_shell);
 			dbus_g_connection_register_g_object (session_bus, path, obj);
-			
+
 			/* register playlist manager object */
 			dbus_g_object_type_install_info (RB_TYPE_PLAYLIST_MANAGER, &dbus_glib_rb_playlist_manager_object_info);
 			obj = rb_shell_get_playlist_manager (rb_shell);
 			path = rb_shell_get_playlist_manager_path (rb_shell);
 			dbus_g_connection_register_g_object (session_bus, path, obj);
 #elif WITH_OLD_DBUS
-			register_dbus_handler (dbus_g_connection_get_connection (session_bus), 
+			register_dbus_handler (dbus_g_connection_get_connection (session_bus),
 					       rb_shell);
 #endif /* WITH_DBUS */
 		}
@@ -361,7 +359,7 @@ main (int argc, char **argv)
 			g_object_unref (G_OBJECT (shell_proxy));
 		}
 #elif WITH_OLD_DBUS
-		if (!send_present_message (dbus_g_connection_get_connection (session_bus), 
+		if (!send_present_message (dbus_g_connection_get_connection (session_bus),
 					   current_time))
 			g_warning ("Unable to send dbus message to existing rhythmbox instance");
 #endif /* WITH_DBUS */
@@ -392,6 +390,8 @@ main (int argc, char **argv)
 
 	rb_debug ("THE END");
 	rb_profile_end ("starting rhythmbox");
+	g_object_unref (program);
+
 	exit (0);
 }
 
@@ -409,12 +409,12 @@ load_uri_args (const char **args, GFunc 
 		rb_debug ("examining argument %s", args[i]);
 
 		uri = gnome_vfs_make_uri_from_shell_arg (args[i]);
-			
+
 		if (rb_uri_is_local (uri) == FALSE || rb_uri_exists (uri)) {
 			handler (uri, user_data);
 		}
 		g_free (uri);
-		
+
 		handled = TRUE;
 	}
 	return handled;
@@ -442,7 +442,6 @@ main_shell_weak_ref_cb (gpointer data, G
 	gtk_main_quit ();
 }
 
-
 #ifdef WITH_OLD_DBUS
 /* old dbus support (0.31-0.34) */
 
@@ -487,7 +486,7 @@ handle_dbus_message (DBusConnection *con
 	if (dbus_message_is_method_call (message, "org.gnome.Rhythmbox.Shell", "present")) {
 		DBusMessageIter iter;
 		guint32 current_time;
-		
+
 		if (!dbus_message_iter_init (message, &iter))
 			return DBUS_HANDLER_RESULT_NEED_MEMORY;
 
@@ -521,4 +520,3 @@ register_dbus_handler (DBusConnection *c
 }
 
 #endif
-
Index: shell/rb-shell-clipboard.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-shell-clipboard.c,v
retrieving revision 1.46
diff -p -u -r1.46 rb-shell-clipboard.c
--- shell/rb-shell-clipboard.c	23 Jun 2006 11:20:59 -0000	1.46
+++ shell/rb-shell-clipboard.c	13 Jul 2006 23:40:23 -0000
@@ -1,5 +1,5 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * 
+ *
  *  arch-tag: Implementation of song cut/paste handler object
  *
  *  Copyright (C) 2002 Jorn Baayen <jorn@nl.linux.org>
@@ -172,7 +172,6 @@ static const char *playlist_menu_paths[]
 };
 static guint num_playlist_menu_paths = G_N_ELEMENTS (playlist_menu_paths);
 
-
 G_DEFINE_TYPE (RBShellClipboard, rb_shell_clipboard, G_TYPE_OBJECT)
 
 static void
@@ -242,7 +241,25 @@ rb_shell_clipboard_init (RBShellClipboar
 
 	shell_clipboard->priv->deleted_queue = g_async_queue_new ();
 
-	shell_clipboard->priv->idle_deletion_id = g_idle_add ((GSourceFunc) rb_shell_clipboard_idle_poll_deletions, shell_clipboard); 
+	shell_clipboard->priv->idle_deletion_id = g_idle_add ((GSourceFunc) rb_shell_clipboard_idle_poll_deletions, shell_clipboard);
+}
+
+static void
+unset_source_internal (RBShellClipboard *clipboard)
+{
+	if (clipboard->priv->source != NULL) {
+		RBEntryView *songs = rb_source_get_entry_view (clipboard->priv->source);
+
+		if (songs) {
+			g_signal_handlers_disconnect_by_func (G_OBJECT (songs),
+							      G_CALLBACK (rb_shell_clipboard_entryview_changed_cb),
+							      clipboard);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (songs),
+							      G_CALLBACK (rb_shell_clipboard_entries_changed_cb),
+							      clipboard);
+		}
+	}
+	clipboard->priv->source = NULL;
 }
 
 static void
@@ -257,6 +274,9 @@ rb_shell_clipboard_finalize (GObject *ob
 
 	g_return_if_fail (shell_clipboard->priv != NULL);
 
+	/* release references to the source */
+	unset_source_internal (shell_clipboard);
+
 	g_hash_table_destroy (shell_clipboard->priv->signal_hash);
 
 	g_list_free (shell_clipboard->priv->entries);
@@ -269,7 +289,7 @@ rb_shell_clipboard_finalize (GObject *ob
 		g_source_remove (shell_clipboard->priv->idle_deletion_id);
 	if (shell_clipboard->priv->idle_playlist_id)
 		g_source_remove (shell_clipboard->priv->idle_playlist_id);
-	
+
 	G_OBJECT_CLASS (rb_shell_clipboard_parent_class)->finalize (object);
 }
 
@@ -279,7 +299,7 @@ rb_shell_clipboard_constructor (GType ty
 {
 	RBShellClipboard *clip;
 	RBShellClipboardClass *klass;
-	GObjectClass *parent_class;  
+	GObjectClass *parent_class;
 
 	klass = RB_SHELL_CLIPBOARD_CLASS (g_type_class_peek (RB_TYPE_SHELL_CLIPBOARD));
 
@@ -287,7 +307,7 @@ rb_shell_clipboard_constructor (GType ty
 	clip = RB_SHELL_CLIPBOARD (parent_class->constructor (type,
 							      n_construct_properties,
 							      construct_properties));
-	
+
 	g_signal_connect_object (G_OBJECT (clip->priv->db),
 				 "entry_deleted",
 				 G_CALLBACK (rb_shell_clipboard_entry_deleted_cb),
@@ -300,18 +320,8 @@ static void
 rb_shell_clipboard_set_source_internal (RBShellClipboard *clipboard,
 					RBSource *source)
 {
-	if (clipboard->priv->source != NULL) {
-		RBEntryView *songs = rb_source_get_entry_view (clipboard->priv->source);
+	unset_source_internal (clipboard);
 
-		if (songs) {
-			g_signal_handlers_disconnect_by_func (G_OBJECT (songs),
-							      G_CALLBACK (rb_shell_clipboard_entryview_changed_cb),
-							      clipboard);
-			g_signal_handlers_disconnect_by_func (G_OBJECT (songs),
-							      G_CALLBACK (rb_shell_clipboard_entries_changed_cb),
-							      clipboard);
-		}
-	}
 	clipboard->priv->source = source;
 	rb_debug ("selected source %p", source);
 
@@ -370,8 +380,14 @@ rb_shell_clipboard_set_property (GObject
 		clipboard->priv->ui_mgr = g_value_get_object (value);
 		break;
 	case PROP_PLAYLIST_MANAGER:
+		if (clipboard->priv->playlist_manager != NULL) {
+			g_signal_handlers_disconnect_by_func (clipboard->priv->playlist_manager,
+							      G_CALLBACK (rb_shell_clipboard_playlist_added_cb),
+							      clipboard);
+		}
+
 		clipboard->priv->playlist_manager = g_value_get_object (value);
-		if (clipboard->priv->playlist_manager) {
+		if (clipboard->priv->playlist_manager != NULL) {
 			g_signal_connect_object (G_OBJECT (clipboard->priv->playlist_manager),
 						 "playlist-added", G_CALLBACK (rb_shell_clipboard_playlist_added_cb),
 						 clipboard, 0);
@@ -381,14 +397,23 @@ rb_shell_clipboard_set_property (GObject
 
 		break;
 	case PROP_QUEUE_SOURCE:
+		if (clipboard->priv->queue_source != NULL) {
+			RBEntryView *sidebar;
+			g_object_get (clipboard->priv->queue_source, "sidebar", &sidebar, NULL);
+			g_signal_handlers_disconnect_by_func (sidebar,
+							      G_CALLBACK (rb_shell_clipboard_entryview_changed_cb),
+							      clipboard);
+			g_object_unref (sidebar);
+		}
+
 		clipboard->priv->queue_source = g_value_get_object (value);
-		if (clipboard->priv->queue_source) {
+		if (clipboard->priv->queue_source != NULL) {
 			RBEntryView *sidebar;
-			g_object_get (G_OBJECT (clipboard->priv->queue_source), "sidebar", &sidebar, NULL);
+			g_object_get (clipboard->priv->queue_source, "sidebar", &sidebar, NULL);
 			g_signal_connect_object (G_OBJECT (sidebar), "selection-changed",
 						 G_CALLBACK (rb_shell_clipboard_entryview_changed_cb),
 						 clipboard, 0);
-			g_object_unref (G_OBJECT (sidebar));
+			g_object_unref (sidebar);
 		}
 		break;
 	default:
@@ -397,7 +422,7 @@ rb_shell_clipboard_set_property (GObject
 	}
 }
 
-static void 
+static void
 rb_shell_clipboard_get_property (GObject *object,
 			         guint prop_id,
 			         GValue *value,
@@ -487,7 +512,7 @@ rb_shell_clipboard_sync (RBShellClipboar
 	}
 
 	rb_debug ("syncing clipboard");
-	
+
 	if (g_list_length (clipboard->priv->entries) > 0)
 		can_paste = rb_source_can_paste (clipboard->priv->source);
 
@@ -503,13 +528,13 @@ rb_shell_clipboard_sync (RBShellClipboar
 
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditCut");
 	g_object_set (G_OBJECT (action), "sensitive", can_cut, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditDelete");
 	g_object_set (G_OBJECT (action), "sensitive", can_delete, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditMovetoTrash");
 	g_object_set (G_OBJECT (action), "sensitive", can_move_to_trash, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditCopy");
 	g_object_set (G_OBJECT (action), "sensitive", can_copy, NULL);
 
@@ -518,26 +543,25 @@ rb_shell_clipboard_sync (RBShellClipboar
 
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditPlaylistAdd");
 	g_object_set (G_OBJECT (action), "sensitive", can_copy, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "AddToQueue");
 	g_object_set (G_OBJECT (action), "sensitive", can_add_to_queue, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "MusicProperties");
 	g_object_set (G_OBJECT (action), "sensitive", have_selection, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "QueueMusicProperties");
 	g_object_set (G_OBJECT (action), "sensitive", have_sidebar_selection, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "QueueDelete");
 	g_object_set (G_OBJECT (action), "sensitive", have_sidebar_selection, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditSelectAll");
 	g_object_set (G_OBJECT (action), "sensitive", can_select_all, NULL);
-	
+
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, "EditSelectNone");
 	g_object_set (G_OBJECT (action), "sensitive", have_selection, NULL);
 
-
 	/* disable the whole add-to-playlist menu if we can't add to a playlist
 	 * FIXME: change this when we support non-library playilst adding
 	 */
@@ -681,7 +705,6 @@ rb_shell_clipboard_idle_poll_deletions (
 				       (GSourceFunc) rb_shell_clipboard_idle_poll_deletions,
 				       clipboard);
 
-
 	GDK_THREADS_LEAVE ();
 
 	return FALSE;
@@ -705,7 +728,7 @@ rb_shell_clipboard_entryview_changed_cb 
 							    clipboard);
 	rb_debug ("entryview changed");
 }
-	
+
 static void
 rb_shell_clipboard_entries_changed_cb (RBEntryView *view,
 				       gpointer stuff,
@@ -725,7 +748,7 @@ rb_shell_clipboard_cmd_add_to_playlist_n
 	RBSource *playlist_source;
 
 	rb_debug ("add to new playlist");
-	
+
 	entries = rb_source_copy (clipboard->priv->source);
 	playlist_source = rb_playlist_manager_new_playlist (clipboard->priv->playlist_manager,
 							    NULL, FALSE);
@@ -768,7 +791,7 @@ rb_shell_clipboard_playlist_add_cb (GtkA
 
 	rb_debug ("add to exisintg playlist");
 	playlist_source = g_object_get_data (G_OBJECT (action), "playlist-source");
-	
+
 	entries = rb_source_copy (clipboard->priv->source);
 	rb_source_paste (playlist_source, entries);
 	g_list_free (entries);
@@ -787,7 +810,7 @@ rb_shell_clipboard_playlist_deleted_cb (
 {
 	char *action_name;
 	GtkAction *action;
-	
+
 	action_name = generate_action_name (source, clipboard);
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, action_name);
 	g_assert (action);
@@ -816,7 +839,7 @@ rb_shell_clipboard_playlist_renamed_cb (
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, action_name);
 	g_assert (action);
 	g_free (action_name);
-	
+
 	g_object_set (G_OBJECT (action), "label", name, NULL);
 	g_free (name);
 	g_object_unref (G_OBJECT (action));
@@ -837,7 +860,7 @@ rb_shell_clipboard_playlist_visible_cb (
 	action = gtk_action_group_get_action (clipboard->priv->actiongroup, action_name);
 	g_assert (action);
 	g_free (action_name);
-	
+
 	gtk_action_set_visible (action, visible);
 	g_object_unref (G_OBJECT (action));
 }
@@ -923,11 +946,19 @@ rebuild_playlist_menu (RBShellClipboard 
 			gtk_ui_manager_new_merge_id (clipboard->priv->ui_mgr);
 	}
 
-	g_object_get (G_OBJECT (clipboard->priv->playlist_manager), "sourcelist", &sourcelist, NULL);
-	g_object_get (sourcelist, "model", &model, NULL);
-	g_object_unref (sourcelist);
-	gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)add_playlist_to_menu, clipboard);
-	g_object_unref (G_OBJECT (model));
+	if (clipboard->priv->playlist_manager != NULL) {
+		g_object_get (clipboard->priv->playlist_manager, "sourcelist", &sourcelist, NULL);
+	}
+
+	if (sourcelist != NULL) {
+		g_object_get (sourcelist, "model", &model, NULL);
+		g_object_unref (sourcelist);
+	}
+
+	if (model != NULL) {
+		gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)add_playlist_to_menu, clipboard);
+		g_object_unref (G_OBJECT (model));
+	}
 
 	clipboard->priv->idle_playlist_id = 0;
 	return FALSE;
@@ -946,4 +977,3 @@ rb_shell_clipboard_playlist_added_cb (RB
 			g_idle_add ((GSourceFunc)rebuild_playlist_menu, clipboard);
 	}
 }
-
Index: shell/rb-shell-player.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-shell-player.c,v
retrieving revision 1.249
diff -p -u -r1.249 rb-shell-player.c
--- shell/rb-shell-player.c	12 Jul 2006 07:01:35 -0000	1.249
+++ shell/rb-shell-player.c	13 Jul 2006 23:40:24 -0000
@@ -113,14 +113,14 @@ static void rb_shell_player_entry_change
 							RhythmDBEntry *entry,
 				       		GSList *changes,
 				       		RBShellPlayer *player);
-				       
+
 static void rb_shell_player_entry_activated_cb (RBEntryView *view,
 						RhythmDBEntry *entry,
 						RBShellPlayer *playa);
 static void rb_shell_player_property_row_activated_cb (RBPropertyView *view,
 						       const char *name,
 						       RBShellPlayer *playa);
-static void rb_shell_player_sync_volume (RBShellPlayer *player, gboolean notify); 
+static void rb_shell_player_sync_volume (RBShellPlayer *player, gboolean notify);
 static void rb_shell_player_sync_replaygain (RBShellPlayer *player,
                                              RhythmDBEntry *entry);
 static void tick_cb (RBPlayer *player, long elapsed, gpointer data);
@@ -257,7 +257,6 @@ static GtkActionEntry rb_shell_player_ac
 };
 static guint rb_shell_player_n_actions = G_N_ELEMENTS (rb_shell_player_actions);
 
-
 static GtkToggleActionEntry rb_shell_player_toggle_entries [] =
 {
 	{ "ControlPlay", GTK_STOCK_MEDIA_PLAY, N_("_Play"), "<control>space",
@@ -279,7 +278,6 @@ static guint rb_shell_player_signals[LAS
 
 G_DEFINE_TYPE (RBShellPlayer, rb_shell_player, GTK_TYPE_HBOX)
 
-
 static void
 rb_shell_player_class_init (RBShellPlayerClass *klass)
 {
@@ -338,7 +336,7 @@ rb_shell_player_class_init (RBShellPlaye
 							       "Activation only adds to queue",
 							       FALSE,
 							       G_PARAM_READWRITE));
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_PLAYING_FROM_QUEUE,
 					 g_param_spec_boolean ("playing-from-queue",
@@ -346,49 +344,48 @@ rb_shell_player_class_init (RBShellPlaye
 							       "Whether playing from the play queue or not",
 							       FALSE,
 							       G_PARAM_READABLE));
-	
+
 	/* If you change these, be sure to update the CORBA interface
 	 * in rb-remote-bonobo.c! */
 	g_object_class_install_property (object_class,
 					 PROP_PLAY_ORDER,
-					 g_param_spec_string ("play-order", 
-							      "play-order", 
+					 g_param_spec_string ("play-order",
+							      "play-order",
 							      "What play order to use",
 							      "linear",
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_PLAYING,
-					 g_param_spec_boolean ("playing", 
-							       "playing", 
-							      "Whether Rhythmbox is currently playing", 
+					 g_param_spec_boolean ("playing",
+							       "playing",
+							      "Whether Rhythmbox is currently playing",
 							       FALSE,
 							       G_PARAM_READABLE));
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_VOLUME,
-					 g_param_spec_float ("volume", 
-							     "volume", 
+					 g_param_spec_float ("volume",
+							     "volume",
 							     "Current playback volume",
 							     0.0f, 1.0f, 1.0f,
 							     G_PARAM_READWRITE));
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_STATUSBAR,
-					 g_param_spec_object ("statusbar", 
-							      "RBStatusbar", 
-							      "RBStatusbar object", 
+					 g_param_spec_object ("statusbar",
+							      "RBStatusbar",
+							      "RBStatusbar object",
 							      RB_TYPE_STATUSBAR,
 							      G_PARAM_READWRITE));
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_STREAM_SONG,
-					 g_param_spec_string ("stream-song", 
-							      "stream-song", 
+					 g_param_spec_string ("stream-song",
+							      "stream-song",
 							      "Current stream song title",
 							      "",
 							      G_PARAM_READABLE));
 
-
 	rb_shell_player_signals[WINDOW_TITLE_CHANGED] =
 		g_signal_new ("window_title_changed",
 			      G_OBJECT_CLASS_TYPE (object_class),
@@ -477,7 +474,7 @@ rb_shell_player_constructor (GType type,
 	RBShellPlayer *player;
 	RBShellPlayerClass *klass;
 	GtkAction *action;
-	
+
 	klass = RB_SHELL_PLAYER_CLASS (g_type_class_peek (RB_TYPE_SHELL_PLAYER));
 
 	player = RB_SHELL_PLAYER (G_OBJECT_CLASS (rb_shell_player_parent_class)->
@@ -514,8 +511,8 @@ rb_shell_player_constructor (GType type,
 }
 
 static void
-volume_pre_unmount_cb (GnomeVFSVolumeMonitor *monitor, 
-		       GnomeVFSVolume *volume, 
+volume_pre_unmount_cb (GnomeVFSVolumeMonitor *monitor,
+		       GnomeVFSVolume *volume,
 		       RBShellPlayer *player)
 {
 	gchar *uri_mount_point;
@@ -601,7 +598,7 @@ rb_shell_player_init (RBShellPlayer *pla
 				 G_CALLBACK (buffering_cb),
 				 player, 0);
 
-	g_signal_connect (G_OBJECT (gnome_vfs_get_volume_monitor ()), 
+	g_signal_connect (G_OBJECT (gnome_vfs_get_volume_monitor ()),
 			  "volume-pre-unmount",
 			  G_CALLBACK (volume_pre_unmount_cb),
 			  player);
@@ -625,63 +622,35 @@ rb_shell_player_init (RBShellPlayer *pla
 					    (GConfClientNotifyFunc) gconf_song_position_slider_visibility_changed,
 					    player);
 
-				 
 #ifdef HAVE_MMKEYS
 	/* Enable Multimedia Keys */
 	rb_shell_player_init_mmkeys (player);
 #endif /* HAVE_MMKEYS */
 }
-
 static void
-rb_shell_player_finalize (GObject *object)
+rb_shell_player_set_source_internal (RBShellPlayer *player,
+				     RBSource      *source)
 {
-	RBShellPlayer *player;
-
-	g_return_if_fail (object != NULL);
-	g_return_if_fail (RB_IS_SHELL_PLAYER (object));
-
-	player = RB_SHELL_PLAYER (object);
-
-	g_return_if_fail (player->priv != NULL);
-
-	eel_gconf_notification_remove (player->priv->gconf_play_order_id);
-
-	eel_gconf_set_float (CONF_STATE_VOLUME, player->priv->volume);
-
-	g_object_unref (G_OBJECT (player->priv->mmplayer));
-	g_object_unref (G_OBJECT (player->priv->play_order));
-
-	G_OBJECT_CLASS (rb_shell_player_parent_class)->finalize (object);
-}
-
-static void
-rb_shell_player_set_property (GObject *object,
-			      guint prop_id,
-			      const GValue *value,
-			      GParamSpec *pspec)
-{
-	RBShellPlayer *player = RB_SHELL_PLAYER (object);
-
-	switch (prop_id) {
-	case PROP_SOURCE:
 		if (player->priv->selected_source != NULL) {
 			RBEntryView *songs = rb_source_get_entry_view (player->priv->selected_source);
 			GList *property_views = rb_source_get_property_views (player->priv->selected_source);
 
-			if (songs)
+			if (songs != NULL) {
 				g_signal_handlers_disconnect_by_func (G_OBJECT (songs),
 								      G_CALLBACK (rb_shell_player_entry_activated_cb),
 								      player);
-			for (; property_views; property_views = property_views->next)
+			}
+
+			for (; property_views; property_views = property_views->next) {
 				g_signal_handlers_disconnect_by_func (G_OBJECT (property_views->data),
 								      G_CALLBACK (rb_shell_player_property_row_activated_cb),
 								      player);
+			}
+
 			g_list_free (property_views);
-			
 		}
 
-		
-		player->priv->selected_source = g_value_get_object (value);
+		player->priv->selected_source = source;
 		rb_debug ("selected source %p", player->priv->selected_source);
 
 		rb_shell_player_sync_with_selected_source (player);
@@ -716,25 +685,125 @@ rb_shell_player_set_property (GObject *o
 
 			rb_play_order_playing_source_changed (player->priv->play_order, source);
 		}
-		
+}
+
+static void
+rb_shell_player_set_db_internal (RBShellPlayer *player,
+				 RhythmDB      *db)
+{
+	if (player->priv->db != NULL) {
+		g_signal_handlers_disconnect_by_func (player->priv->db,
+						      G_CALLBACK (rb_shell_player_entry_changed_cb),
+						      player);
+	}
+
+	player->priv->db = db;
+
+	if (player->priv->db != NULL) {
+		/* Listen for changed entries to update metadata display */
+		g_signal_connect_object (G_OBJECT (player->priv->db),
+					 "entry_changed",
+					 G_CALLBACK (rb_shell_player_entry_changed_cb),
+					 player, 0);
+	}
+}
+
+static void
+rb_shell_player_set_queue_source_internal (RBShellPlayer     *player,
+					   RBPlayQueueSource *source)
+{
+	if (player->priv->queue_source != NULL) {
+		RBEntryView *sidebar;
+
+		g_object_get (G_OBJECT (player->priv->queue_source), "sidebar", &sidebar, NULL);
+		g_signal_handlers_disconnect_by_func (sidebar,
+						      G_CALLBACK (rb_shell_player_entry_activated_cb),
+						      player);
+		g_object_unref (sidebar);
+
+		if (player->priv->queue_play_order != NULL) {
+			g_signal_handlers_disconnect_by_func (player->priv->queue_play_order,
+							      G_CALLBACK (rb_shell_player_play_order_update_cb),
+							      player);
+			g_object_unref (player->priv->queue_play_order);
+		}
+
+	}
+
+	player->priv->queue_source = source;
+
+	if (player->priv->queue_source != NULL) {
+		RBEntryView *sidebar;
+
+		player->priv->queue_play_order = rb_play_order_new ("queue", player);
+		g_signal_connect_object (G_OBJECT (player->priv->queue_play_order),
+					 "have_next_previous_changed",
+					 G_CALLBACK (rb_shell_player_play_order_update_cb),
+					 player, 0);
+		rb_shell_player_play_order_update_cb (player->priv->play_order,
+						      FALSE, FALSE,
+						      player);
+		rb_play_order_playing_source_changed (player->priv->queue_play_order,
+						      RB_SOURCE (player->priv->queue_source));
+
+		g_object_get (G_OBJECT (player->priv->queue_source), "sidebar", &sidebar, NULL);
+		g_signal_connect_object (G_OBJECT (sidebar),
+					 "entry-activated",
+					 G_CALLBACK (rb_shell_player_entry_activated_cb),
+					 player, 0);
+		g_object_unref (sidebar);
+	}
+}
+
+static void
+rb_shell_player_finalize (GObject *object)
+{
+	RBShellPlayer *player;
+
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (RB_IS_SHELL_PLAYER (object));
+
+	player = RB_SHELL_PLAYER (object);
+
+	g_return_if_fail (player->priv != NULL);
+
+	rb_shell_player_set_source_internal (player, NULL);
+	rb_shell_player_set_queue_source_internal (player, NULL);
+	rb_shell_player_set_db_internal (player, NULL);
+
+	eel_gconf_notification_remove (player->priv->gconf_play_order_id);
+
+	eel_gconf_set_float (CONF_STATE_VOLUME, player->priv->volume);
+
+	g_object_unref (G_OBJECT (player->priv->mmplayer));
+	g_object_unref (G_OBJECT (player->priv->play_order));
+
+	G_OBJECT_CLASS (rb_shell_player_parent_class)->finalize (object);
+}
+
+static void
+rb_shell_player_set_property (GObject *object,
+			      guint prop_id,
+			      const GValue *value,
+			      GParamSpec *pspec)
+{
+	RBShellPlayer *player = RB_SHELL_PLAYER (object);
+
+	switch (prop_id) {
+	case PROP_SOURCE:
+		rb_shell_player_set_source_internal (player, g_value_get_object (value));
 		break;
 	case PROP_UI_MANAGER:
 		player->priv->ui_manager = g_value_get_object (value);
 		break;
 	case PROP_DB:
-		player->priv->db = g_value_get_object (value);
-		
-		/* Listen for changed entries to update metadata display */
-		g_signal_connect_object (G_OBJECT (player->priv->db),
-			 "entry_changed",
-			 G_CALLBACK (rb_shell_player_entry_changed_cb),
-			 player, 0);
+		rb_shell_player_set_db_internal (player, g_value_get_object (value));
 		break;
 	case PROP_ACTION_GROUP:
 		player->priv->actiongroup = g_value_get_object (value);
 		break;
 	case PROP_PLAY_ORDER:
-		eel_gconf_set_string (CONF_STATE_PLAY_ORDER, 
+		eel_gconf_set_string (CONF_STATE_PLAY_ORDER,
 				      g_value_get_string (value));
 		break;
 	case PROP_VOLUME:
@@ -745,28 +814,7 @@ rb_shell_player_set_property (GObject *o
 		player->priv->statusbar_widget = g_value_get_object (value);
 		break;
 	case PROP_QUEUE_SOURCE:
-		player->priv->queue_source = g_value_get_object (value);
-		if (player->priv->queue_source) {
-			RBEntryView *sidebar;
-
-			player->priv->queue_play_order = rb_play_order_new ("queue", player);
-			g_signal_connect_object (G_OBJECT (player->priv->queue_play_order),
-						 "have_next_previous_changed",
-						 G_CALLBACK (rb_shell_player_play_order_update_cb),
-						 player, 0);
-			rb_shell_player_play_order_update_cb (player->priv->play_order,
-							      FALSE, FALSE,
-							      player);
-			rb_play_order_playing_source_changed (player->priv->queue_play_order,
-							      RB_SOURCE (player->priv->queue_source));
-
-			g_object_get (G_OBJECT (player->priv->queue_source), "sidebar", &sidebar, NULL);
-			g_signal_connect_object (G_OBJECT (sidebar),
-						 "entry-activated",
-						 G_CALLBACK (rb_shell_player_entry_activated_cb),
-						 player, 0);
-			g_object_unref (sidebar);
-		}
+		rb_shell_player_set_queue_source_internal (player, g_value_get_object (value));
 		break;
 	case PROP_QUEUE_ONLY:
 		player->priv->queue_only = g_value_get_boolean (value);
@@ -777,7 +825,7 @@ rb_shell_player_set_property (GObject *o
 	}
 }
 
-static void 
+static void
 rb_shell_player_get_property (GObject *object,
 			      guint prop_id,
 			      GValue *value,
@@ -868,10 +916,10 @@ rb_shell_player_get_active_source (RBShe
 }
 
 RBShellPlayer *
-rb_shell_player_new (RhythmDB *db, GtkUIManager *mgr, 
+rb_shell_player_new (RhythmDB *db, GtkUIManager *mgr,
 		     GtkActionGroup *actiongroup)
 {
-	return g_object_new (RB_TYPE_SHELL_PLAYER,			       
+	return g_object_new (RB_TYPE_SHELL_PLAYER,
 			     "ui-manager", mgr,
 			     "action-group", actiongroup,
 			     "db", db,
@@ -907,11 +955,11 @@ notify_playing_idle (RBShellPlayer *play
 }
 
 static void
-rb_shell_player_open_playlist_url (RBShellPlayer *player, 
+rb_shell_player_open_playlist_url (RBShellPlayer *player,
 				   const char *location)
 {
 	GError *error = NULL;
-	
+
 	rb_debug ("playing stream url %s", location);
 	rb_player_open (player->priv->mmplayer, location, &error);
 	if (error == NULL)
@@ -1006,7 +1054,7 @@ rb_shell_player_open_location (RBShellPl
 
 	if (rb_source_try_playlist (player->priv->source)) {
 		OpenLocationThreadData *data;
-	       
+
 		data = g_new0 (OpenLocationThreadData, 1);
 		data->player = player;
 
@@ -1057,7 +1105,6 @@ rb_shell_player_open_entry (RBShellPlaye
 	return result;
 }
 
-
 /**
  * rb_shell_player_play:
  * @player: a #RBShellPlayer
@@ -1119,15 +1166,15 @@ do_next_idle (RBShellPlayer *player)
 }
 
 static gboolean
-rb_shell_player_set_playing_entry (RBShellPlayer *player, 
-				   RhythmDBEntry *entry, 
-				   gboolean out_of_order, 
+rb_shell_player_set_playing_entry (RBShellPlayer *player,
+				   RhythmDBEntry *entry,
+				   gboolean out_of_order,
 				   GError **error)
 {
 	GError *tmp_error = NULL;
 	const char *location;
 	GValue val = {0,};
-	
+
 	g_return_val_if_fail (player->priv->current_playing_source != NULL, TRUE);
 	g_return_val_if_fail (entry != NULL, TRUE);
 
@@ -1224,7 +1271,7 @@ found:
 	return TRUE;
 }
 
-static void 
+static void
 rb_shell_player_set_play_order (RBShellPlayer *player, const gchar *new_val)
 {
 	char *old_val;
@@ -1309,7 +1356,7 @@ rb_shell_player_play_order_update_cb (RB
 			have_previous |= rb_play_order_has_previous (player->priv->queue_play_order);
 		}
 	}
-	
+
 	action = gtk_action_group_get_action (player->priv->actiongroup,
 					      "ControlPrevious");
 	g_object_set (G_OBJECT (action), "sensitive", have_previous, NULL);
@@ -1353,7 +1400,7 @@ rb_shell_player_jump_to_current (RBShell
 		player->priv->selected_source;
 
 	songs = rb_source_get_entry_view (source);
-	entry = rb_shell_player_get_playing_entry (player);	
+	entry = rb_shell_player_get_playing_entry (player);
 	if (songs) {
 		if (entry) {
 			rb_entry_view_scroll_to_entry (songs, entry);
@@ -1412,7 +1459,7 @@ rb_shell_player_do_previous (RBShellPlay
 		if (entry)
 			rb_play_order_go_previous (player->priv->play_order);
 	}
-		
+
 	if (entry) {
 		rb_debug ("previous song found, doing previous");
 		if (new_source != player->priv->current_playing_source)
@@ -1430,7 +1477,7 @@ rb_shell_player_do_previous (RBShellPlay
 		rb_shell_player_set_playing_source (player, NULL);
 		return FALSE;
 	}
-		
+
 	return TRUE;
 }
 
@@ -1454,7 +1501,7 @@ rb_shell_player_do_next (RBShellPlayer *
 		if (entry) {
 			new_source = RB_SOURCE (player->priv->queue_source);
 		} else {
-			/* If we haven't played anything from the playing source yet, 
+			/* If we haven't played anything from the playing source yet,
 			 * _get_playing_entry will return NULL, so we'll have to advance
 			 * the play order to get an entry to play.
 			 */
@@ -1505,7 +1552,7 @@ rb_shell_player_do_next (RBShellPlayer *
 		rv = FALSE;
 	}
 	g_idle_add ((GSourceFunc)rb_shell_player_jump_to_current_idle, player);
-	
+
 	return rv;
 }
 
@@ -1532,8 +1579,8 @@ rb_shell_player_do_previous_or_seek (RBS
 			rb_header_sync_time (player->priv->header_widget);
 			return TRUE;
 		}
-	} 
-	
+	}
+
 	return rb_shell_player_do_previous (player, error);
 }
 
@@ -1542,7 +1589,7 @@ rb_shell_player_cmd_previous (GtkAction 
 			      RBShellPlayer *player)
 {
 	GError *error = NULL;
-	
+
 	if (!rb_shell_player_do_previous_or_seek (player, &error)) {
 		if (error->domain != RB_SHELL_PLAYER_ERROR ||
 		    error->code != RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST)
@@ -1557,7 +1604,7 @@ rb_shell_player_cmd_next (GtkAction *act
 			  RBShellPlayer *player)
 {
 	GError *error = NULL;
-	
+
 	if (!rb_shell_player_do_next (player, &error)) {
 		if (error->domain != RB_SHELL_PLAYER_ERROR ||
 		    error->code != RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST)
@@ -1605,8 +1652,8 @@ rb_shell_player_cmd_play (GtkAction *act
 	GError *error = NULL;
 	rb_debug ("play!");
 	if (!rb_shell_player_playpause (player, FALSE, &error))
-		rb_error_dialog (NULL, 
-				 _("Couldn't start playback"), 
+		rb_error_dialog (NULL,
+				 _("Couldn't start playback"),
 				 "%s", (error) ? error->message : "(null)");
 	g_clear_error (&error);
 }
@@ -1673,7 +1720,7 @@ rb_shell_player_playpause (RBShellPlayer
 					entry = (RhythmDBEntry*) selection->data;
 					if (entry)
 						out_of_order = TRUE;
-				
+
 					g_list_free (selection);
 				}
 			}
@@ -1709,7 +1756,6 @@ rb_shell_player_playpause (RBShellPlayer
 	return ret;
 }
 
-
 static void
 rb_shell_player_sync_control_state (RBShellPlayer *player)
 {
@@ -1748,16 +1794,14 @@ rb_shell_player_sync_volume (RBShellPlay
 					      "ControlVolumeDown");
 	g_object_set (G_OBJECT (action), "sensitive", player->priv->volume > 0.0001, NULL);
 
-
 	rb_player_set_volume (player->priv->mmplayer,
 			      player->priv->mute ? 0.0 : player->priv->volume);
 
 	eel_gconf_set_float (CONF_STATE_VOLUME, player->priv->volume);
 
-	rb_shell_player_sync_replaygain (player, 
+	rb_shell_player_sync_replaygain (player,
 					 rb_shell_player_get_playing_entry (player));
 
-
 	if (notify)
 		g_object_notify (G_OBJECT (player), "volume");
 }
@@ -1776,7 +1820,7 @@ rb_shell_player_sync_replaygain (RBShell
 	double entry_track_peak = 0;
 	double entry_album_gain = 0;
 	double entry_album_peak = 0;
-	
+
 	if (entry != NULL) {
              	entry_track_gain = rhythmdb_entry_get_double (entry, RHYTHMDB_PROP_TRACK_GAIN);
              	entry_track_peak = rhythmdb_entry_get_double (entry, RHYTHMDB_PROP_TRACK_PEAK);
@@ -1784,7 +1828,7 @@ rb_shell_player_sync_replaygain (RBShell
              	entry_album_peak = rhythmdb_entry_get_double (entry, RHYTHMDB_PROP_ALBUM_PEAK);
 	}
 
-	rb_player_set_replaygain (player->priv->mmplayer, entry_track_gain, 
+	rb_player_set_replaygain (player->priv->mmplayer, entry_track_gain,
 				  entry_track_peak, entry_album_gain, entry_album_peak);
 }
 
@@ -1809,7 +1853,6 @@ rb_shell_player_set_volume_relative (RBS
 	return TRUE;
 }
 
-
 gboolean
 rb_shell_player_get_volume (RBShellPlayer *player,
 			    gdouble *volume,
@@ -1844,7 +1887,7 @@ gconf_song_position_slider_visibility_ch
 					       GConfEntry *entry,
 					       RBShellPlayer *player)
 {
-	rb_debug ("song position slider visibility visibility changed"); 
+	rb_debug ("song position slider visibility visibility changed");
 	rb_shell_player_sync_song_position_slider_visibility (player);
 }
 
@@ -1867,7 +1910,7 @@ rb_shell_player_shuffle_changed_cb (GtkA
 	neworder = state_to_play_order[shuffle ? 1 : 0][repeat ? 1 : 0];
 	rb_shell_player_set_play_order (player, neworder);
 }
-	
+
 static void
 rb_shell_player_repeat_changed_cb (GtkAction *action,
 				   RBShellPlayer *player)
@@ -1895,7 +1938,6 @@ rb_shell_player_view_song_position_slide
 			       !gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
 }
 
-
 static void
 rb_shell_player_entry_activated_cb (RBEntryView *view,
 				    RhythmDBEntry *entry,
@@ -1938,11 +1980,11 @@ rb_shell_player_entry_activated_cb (RBEn
 
 			/* fall back to the current selected source once the queue is empty */
 			if (view == queue_sidebar && playa->priv->source == NULL) {
-				rb_play_order_playing_source_changed (playa->priv->play_order, 
+				rb_play_order_playing_source_changed (playa->priv->play_order,
 								      playa->priv->selected_source);
 				playa->priv->source = playa->priv->selected_source;
 			}
-			
+
 			/* queue entry activated: move it to the start of the queue */
 			rb_static_playlist_source_move_entry (RB_STATIC_PLAYLIST_SOURCE (playa->priv->queue_source), entry, 0);
 			rb_shell_player_set_playing_source (playa, RB_SOURCE (playa->priv->queue_source));
@@ -1999,12 +2041,12 @@ rb_shell_player_property_row_activated_c
 	GError *error = NULL;
 
 	rb_debug  ("got property activated");
-	
+
 	rb_shell_player_set_playing_source (playa, playa->priv->selected_source);
 
 	/* RHYTHMDBFIXME - do we need to wait here until the query is finished?
 	 * in theory, yes, but in practice the query is started when the row is
-	 * selected (on the first click when doubleclicking, or when using the 
+	 * selected (on the first click when doubleclicking, or when using the
 	 * keyboard to select then activate) and is pretty much always done by
 	 * the time we get in here.
 	 */
@@ -2014,7 +2056,7 @@ rb_shell_player_property_row_activated_c
 	if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
 		return;
 
-	entry = rhythmdb_query_model_iter_to_entry (model, &iter); 
+	entry = rhythmdb_query_model_iter_to_entry (model, &iter);
 	if (!rb_shell_player_set_playing_entry (playa, entry, TRUE, &error)) {
 		rb_shell_player_error (playa, FALSE, error);
 		g_clear_error (&error);
@@ -2029,7 +2071,7 @@ rb_shell_player_entry_changed_cb (Rhythm
 	gboolean synced = FALSE;
 	const char *location;
 	RhythmDBEntry *playing_entry = rb_shell_player_get_playing_entry (player);
-	
+
 	/* We try to update only if the changed entry is currently playing */
 	if (entry != playing_entry) {
 		return;
@@ -2052,7 +2094,7 @@ rb_shell_player_entry_changed_cb (Rhythm
 		default:
 			break;
 		}
-	
+
 		/* emit dbus signals for changes with easily marshallable types */
 		switch (rhythmdb_get_property_type (db, change->prop)) {
 		case G_TYPE_STRING:
@@ -2060,7 +2102,7 @@ rb_shell_player_entry_changed_cb (Rhythm
 		case G_TYPE_ULONG:
 		case G_TYPE_UINT64:
 		case G_TYPE_DOUBLE:
-			g_signal_emit (G_OBJECT (player), 
+			g_signal_emit (G_OBJECT (player),
 				       rb_shell_player_signals[PLAYING_SONG_PROPERTY_CHANGED], 0,
 				       location,
 				       rhythmdb_nice_elt_name_from_propid (db, change->prop),
@@ -2077,7 +2119,7 @@ static void
 rb_shell_player_sync_with_source (RBShellPlayer *player)
 {
 	const char *entry_title = NULL;
-	const char *artist = NULL;	
+	const char *artist = NULL;
 	char *title;
 	RhythmDBEntry *entry;
 
@@ -2112,7 +2154,7 @@ rb_shell_player_sync_with_source (RBShel
 	else
 		rb_header_set_title (player->priv->header_widget, entry_title);
 	g_free (title);
-	
+
 	rb_header_set_playing_entry (player->priv->header_widget, entry);
 	rb_header_sync (player->priv->header_widget);
 }
@@ -2135,7 +2177,7 @@ rb_shell_player_sync_buttons (RBShellPla
 		source = player->priv->selected_source;
 		entry_view_state = RB_ENTRY_VIEW_NOT_PLAYING;
 	}
-	
+
 	source = rb_shell_player_get_playing_entry (player) == NULL ?
 		 player->priv->selected_source : player->priv->current_playing_source;
 
@@ -2167,7 +2209,7 @@ rb_shell_player_set_playing_source (RBSh
 
 static void
 actually_set_playing_source (RBShellPlayer *player,
-			     RBSource *source, 
+			     RBSource *source,
 			     gboolean sync_entry_view)
 {
 	player->priv->source = source;
@@ -2176,7 +2218,7 @@ actually_set_playing_source (RBShellPlay
 	if (source != NULL) {
 		RBEntryView *songs = rb_source_get_entry_view (player->priv->source);
 		if (sync_entry_view && songs) {
-			rb_entry_view_set_state (songs, RB_ENTRY_VIEW_PLAYING); 
+			rb_entry_view_set_state (songs, RB_ENTRY_VIEW_PLAYING);
 		}
 	}
 
@@ -2200,7 +2242,7 @@ rb_shell_player_set_playing_source_inter
 	gboolean emit_source_changed = TRUE;
 	gboolean emit_playing_from_queue_changed = FALSE;
 
-	if (player->priv->source == source && 
+	if (player->priv->source == source &&
 	    player->priv->current_playing_source == source &&
 	    source != NULL)
 		return;
@@ -2229,7 +2271,7 @@ rb_shell_player_set_playing_source_inter
 				if (sync_entry_view) {
 					RBEntryView *songs = rb_source_get_entry_view (player->priv->current_playing_source);
 					rb_debug ("source is already playing, stopping it");
-					
+
 					/* clear the playing entry if we're switching between non-queue sources */
 					if (player->priv->current_playing_source != RB_SOURCE (player->priv->queue_source))
 						rb_play_order_set_playing_entry (player->priv->play_order, NULL);
@@ -2389,16 +2431,16 @@ long
 rb_shell_player_get_playing_song_duration (RBShellPlayer *player)
 {
 	RhythmDBEntry *current_entry;
-	
+
 	g_return_val_if_fail (RB_IS_SHELL_PLAYER (player), -1);
-	
+
 	current_entry = rb_shell_player_get_playing_entry (player);
 
 	if (current_entry == NULL) {
 		rb_debug ("Did not get playing entry : return -1 as length");
 		return -1;
 	}
-	
+
 	return rhythmdb_entry_get_ulong (current_entry, RHYTHMDB_PROP_DURATION);
 }
 
@@ -2416,7 +2458,6 @@ rb_shell_player_sync_with_selected_sourc
 	}
 }
 
-
 static void
 eos_cb (RBPlayer *mmplayer, gpointer data)
 {
@@ -2468,7 +2509,7 @@ eos_cb (RBPlayer *mmplayer, gpointer dat
 		case RB_SOURCE_EOF_NEXT:
 			{
 				GError *error = NULL;
-	
+
 				if (!rb_shell_player_do_next (player, &error)) {
 					if (error->domain != RB_SHELL_PLAYER_ERROR ||
 					    error->code != RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST)
@@ -2513,8 +2554,8 @@ rb_shell_player_error (RBShellPlayer *pl
 	} else if ((player->priv->current_playing_source != NULL) &&
 		   (rb_source_handle_eos (player->priv->current_playing_source) == RB_SOURCE_EOF_RETRY)) {
 		/* receiving an error means a broken stream or non-audio stream, so abort */
-		rb_error_dialog (NULL, 
-				 _("Couldn't start playback"), 
+		rb_error_dialog (NULL,
+				 _("Couldn't start playback"),
 				 "%s", (err) ? err->message : "(null)");
 		rb_shell_player_set_playing_source (player, NULL);
 	} else if (player->priv->do_next_idle_id == 0) {
@@ -2540,7 +2581,7 @@ error_cb (RBPlayer *mmplayer, const GErr
 	GDK_THREADS_ENTER ();
 
 	rb_shell_player_error (player, TRUE, err);
-	
+
 	rb_debug ("exiting error hander");
 	GDK_THREADS_LEAVE ();
 }
@@ -2575,7 +2616,7 @@ info_available_cb (RBPlayer *mmplayer,
         gboolean changed = FALSE;
         gboolean set_field = FALSE;
 	RhythmDBEntryType type;
-	
+
         rb_debug ("info: %d", field);
 
         /* Sanity check, this signal may come in after we stopped the
@@ -2632,7 +2673,7 @@ info_available_cb (RBPlayer *mmplayer,
 
 		/* check if the db entry already has a genre; if so, don't change it */
 		existing = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_GENRE);
-		if ((existing == NULL) || 
+		if ((existing == NULL) ||
 		    (strcmp (existing, "") == 0) ||
 		    (strcmp (existing, _("Unknown")) == 0)) {
 			entry_field = RHYTHMDB_PROP_GENRE;
@@ -2662,8 +2703,8 @@ info_available_cb (RBPlayer *mmplayer,
 		 */
 		existing = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE);
 		location = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION);
-		if ((existing == NULL) || 
-		    (strcmp (existing, "") == 0) || 
+		if ((existing == NULL) ||
+		    (strcmp (existing, "") == 0) ||
 		    (strcmp (existing, location) == 0)) {
 			entry_field = RHYTHMDB_PROP_TITLE;
 			rb_debug ("setting title of iradio station to %s", name);
@@ -2680,8 +2721,8 @@ info_available_cb (RBPlayer *mmplayer,
 			/* GStreamer sends us bitrate in bps, but we need it in kbps*/
 			bitrate = g_value_get_ulong (value);
 			g_value_set_ulong (value, bitrate/1000);
-			
-			rb_debug ("setting bitrate of iradio station to %lu", 
+
+			rb_debug ("setting bitrate of iradio station to %lu",
 				  g_value_get_ulong (value));
 			entry_field = RHYTHMDB_PROP_BITRATE;
 			set_field = TRUE;
@@ -2713,7 +2754,6 @@ buffering_cb (RBPlayer *mmplayer, guint 
 	GDK_THREADS_LEAVE ();
 }
 
-
 gboolean
 rb_shell_player_get_playing_path (RBShellPlayer *shell_player,
 				  const gchar **path,
@@ -2769,7 +2809,7 @@ grab_mmkey (int key_code, GdkWindow *roo
 		  Mod2Mask | Mod5Mask | LockMask,
 		  GDK_WINDOW_XID (root), True,
 		  GrabModeAsync, GrabModeAsync);
-	
+
 	gdk_flush ();
         if (gdk_error_trap_pop ()) {
 		rb_debug ("Error grabbing key");
@@ -2791,18 +2831,18 @@ filter_mmkeys (GdkXEvent *xevent, GdkEve
 
 	player = (RBShellPlayer *)data;
 
-	if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPlay) == key->keycode) {	
+	if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPlay) == key->keycode) {
 		rb_shell_player_playpause (player, FALSE, NULL);
 		return GDK_FILTER_REMOVE;
-	} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPause) == key->keycode) {	
+	} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPause) == key->keycode) {
 		rb_shell_player_pause (player, NULL);
 		return GDK_FILTER_REMOVE;
 	} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioStop) == key->keycode) {
 		rb_shell_player_stop (player);
-		return GDK_FILTER_REMOVE;		
+		return GDK_FILTER_REMOVE;
 	} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioPrev) == key->keycode) {
 		rb_shell_player_cmd_previous (NULL, player);
-		return GDK_FILTER_REMOVE;		
+		return GDK_FILTER_REMOVE;
 	} else if (XKeysymToKeycode (GDK_DISPLAY (), XF86XK_AudioNext) == key->keycode) {
 		rb_shell_player_cmd_next (NULL, player);
 		return GDK_FILTER_REMOVE;
@@ -2859,7 +2899,7 @@ _idle_unblock_signal_cb (gpointer data)
 	/* sync the active state of the action again */
 	g_object_get (G_OBJECT (player), "playing", &playing, NULL);
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), playing);
-	
+
 	g_signal_handlers_unblock_by_func (action, rb_shell_player_cmd_play, player);
 	return FALSE;
 }
@@ -2914,4 +2954,3 @@ rb_shell_player_error_get_type (void)
 
 	return etype;
 }
-
Index: shell/rb-shell.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-shell.c,v
retrieving revision 1.460
diff -p -u -r1.460 rb-shell.c
--- shell/rb-shell.c	10 Jul 2006 02:00:35 -0000	1.460
+++ shell/rb-shell.c	13 Jul 2006 23:40:24 -0000
@@ -138,7 +138,7 @@ static void source_activated_cb (RBSourc
 				 RBShell *shell);
 static void rb_shell_db_save_error_cb (RhythmDB *db,
 				       const char *uri, const GError *error,
-				       RBShell *shell); 
+				       RBShell *shell);
 static void rb_shell_db_entry_added_cb (RhythmDB *db,
 					RhythmDBEntry *entry,
 					RBShell *shell);
@@ -233,7 +233,7 @@ static gboolean rb_shell_show_popup_cb (
 					RBShell *shell);
 static gboolean tray_destroy_cb (GtkObject *object, RBShell *shell);
 
-static gboolean save_yourself_cb (GnomeClient *client, 
+static gboolean save_yourself_cb (GnomeClient *client,
                                   gint phase,
                                   GnomeSaveStyle save_style,
                                   gboolean shutdown,
@@ -302,7 +302,6 @@ static guint rb_shell_signals[LAST_SIGNA
 
 G_DEFINE_TYPE (RBShell, rb_shell, G_TYPE_OBJECT)
 
-
 struct RBShellPrivate
 {
 	GtkWidget *window;
@@ -382,7 +381,7 @@ struct RBShellPrivate
 	guint smalldisplay_notify_id;
 
 	glong last_small_time; /* when we last changed small mode */
-	
+
 	/* Cached copies of the gconf keys.
 	 *
 	 * To avoid race conditions, the only time the keys are actually read is at startup
@@ -480,48 +479,48 @@ rb_shell_class_init (RBShellClass *klass
 
 	g_object_class_install_property (object_class,
 					 PROP_ARGC,
-					 g_param_spec_int ("argc", 
-							   "argc", 
-							   "Argument count", 
+					 g_param_spec_int ("argc",
+							   "argc",
+							   "Argument count",
 							   0, 128,
 							   0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_ARGV,
-					 g_param_spec_pointer ("argv", 
-							       "argv", 
-							       "Arguments", 
+					 g_param_spec_pointer ("argv",
+							       "argv",
+							       "Arguments",
 							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_NO_REGISTRATION,
-					 g_param_spec_boolean ("no-registration", 
-							       "no-registration", 
-							       "Whether or not to register", 
+					 g_param_spec_boolean ("no-registration",
+							       "no-registration",
+							       "Whether or not to register",
 							       FALSE,
 							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_NO_UPDATE,
-					 g_param_spec_boolean ("no-update", 
-							       "no-update", 
-							       "Whether or not to update the library", 
+					 g_param_spec_boolean ("no-update",
+							       "no-update",
+							       "Whether or not to update the library",
 							       FALSE,
 							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_DRY_RUN,
-					 g_param_spec_boolean ("dry-run", 
-							       "dry-run", 
-							       "Whether or not this is a dry run", 
+					 g_param_spec_boolean ("dry-run",
+							       "dry-run",
+							       "Whether or not this is a dry run",
 							       FALSE,
 							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_RHYTHMDB_FILE,
-					 g_param_spec_string ("rhythmdb-file", 
-							      "rhythmdb-file", 
-							      "The RhythmDB file to use", 
+					 g_param_spec_string ("rhythmdb-file",
+							      "rhythmdb-file",
+							      "The RhythmDB file to use",
 #ifdef WITH_RHYTHMDB_TREE
 							      "rhythmdb.xml",
 #elif defined(WITH_RHYTHMDB_GDA)
@@ -531,26 +530,25 @@ rb_shell_class_init (RBShellClass *klass
 
 	g_object_class_install_property (object_class,
 					 PROP_SELECTED_SOURCE,
-					 g_param_spec_object ("selected-source", 
-							      "selected-source", 
-							      "Source which is currently selected", 
+					 g_param_spec_object ("selected-source",
+							      "selected-source",
+							      "Source which is currently selected",
 							      RB_TYPE_SOURCE,
 							      G_PARAM_READABLE));
 
-
 	g_object_class_install_property (object_class,
 					 PROP_DB,
-					 g_param_spec_object ("db", 
-							      "RhythmDB", 
-							      "RhythmDB object", 
+					 g_param_spec_object ("db",
+							      "RhythmDB",
+							      "RhythmDB object",
 							      RHYTHMDB_TYPE,
 							       G_PARAM_READABLE));
 
 	g_object_class_install_property (object_class,
 					 PROP_UI_MANAGER,
-					 g_param_spec_object ("ui-manager", 
-							      "GtkUIManager", 
-							      "GtkUIManager object", 
+					 g_param_spec_object ("ui-manager",
+							      "GtkUIManager",
+							      "GtkUIManager object",
 							      GTK_TYPE_UI_MANAGER,
 							       G_PARAM_READABLE));
 
@@ -584,23 +582,23 @@ rb_shell_class_init (RBShellClass *klass
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_WINDOW,
-					 g_param_spec_object ("window", 
-							      "GtkWindow", 
-							      "GtkWindow object", 
+					 g_param_spec_object ("window",
+							      "GtkWindow",
+							      "GtkWindow object",
 							      GTK_TYPE_WINDOW,
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_PREFS,
-					 g_param_spec_object ("prefs", 
-							      "RBShellPreferences", 
-							      "RBShellPreferences object", 
+					 g_param_spec_object ("prefs",
+							      "RBShellPreferences",
+							      "RBShellPreferences object",
 							      RB_TYPE_SHELL_PREFERENCES,
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_QUEUE_SOURCE,
-					 g_param_spec_object ("queue-source", 
-							      "queue-source", 
-							      "Queue source", 
+					 g_param_spec_object ("queue-source",
+							      "queue-source",
+							      "Queue source",
 							      RB_TYPE_PLAY_QUEUE_SOURCE,
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
@@ -612,23 +610,23 @@ rb_shell_class_init (RBShellClass *klass
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_LIBRARY_SOURCE,
-					 g_param_spec_object ("library-source", 
-							      "library-source", 
-							      "Library source", 
+					 g_param_spec_object ("library-source",
+							      "library-source",
+							      "Library source",
 							      RB_TYPE_LIBRARY_SOURCE,
 							      G_PARAM_READABLE));
 	g_object_class_install_property (object_class,
 					 PROP_SOURCELIST_MODEL,
-					 g_param_spec_object ("sourcelist-model", 
-							      "sourcelist-model", 
-							      "RBSourcelistModel", 
+					 g_param_spec_object ("sourcelist-model",
+							      "sourcelist-model",
+							      "RBSourcelistModel",
 							      RB_TYPE_SOURCELIST_MODEL,
 							      G_PARAM_READABLE));
 
 	g_object_class_install_property (object_class,
 					 PROP_VISIBILITY,
-					 g_param_spec_boolean ("visibility", 
-							       "visibility", 
+					 g_param_spec_boolean ("visibility",
+							       "visibility",
 							       "Current window visibility",
 							       TRUE,
 							       G_PARAM_READWRITE));
@@ -659,7 +657,7 @@ rb_shell_class_init (RBShellClass *klass
 }
 
 static void
-rb_shell_init (RBShell *shell) 
+rb_shell_init (RBShell *shell)
 {
 	shell->priv = RB_SHELL_GET_PRIVATE (shell);
 
@@ -695,7 +693,7 @@ rb_shell_set_property (GObject *object,
 	case PROP_DRY_RUN:
 		shell->priv->dry_run = g_value_get_boolean (value);
 		if (shell->priv->dry_run)
-			shell->priv->no_registration = TRUE;			
+			shell->priv->no_registration = TRUE;
 		break;
 	case PROP_RHYTHMDB_FILE:
 		shell->priv->rhythmdb_file = g_value_dup_string (value);
@@ -760,10 +758,10 @@ rb_shell_get_property (GObject *object,
 		break;
 	case PROP_WINDOW:
 		g_value_set_object (value, shell->priv->window);
-		break;	
+		break;
 	case PROP_PREFS:
 		g_value_set_object (value, shell->priv->prefs);
-		break;	
+		break;
 	case PROP_QUEUE_SOURCE:
 		g_value_set_object (value, shell->priv->queue_source);
 		break;
@@ -776,7 +774,7 @@ rb_shell_get_property (GObject *object,
  	case PROP_SOURCELIST_MODEL:
 		{
 			GtkTreeModel *model = NULL;
-			
+
 			g_object_get (G_OBJECT (shell->priv->sourcelist), "model", &model, NULL);
  			g_value_set_object (value, model);
 		}
@@ -802,7 +800,7 @@ rb_shell_sync_state (RBShell *shell)
 		rb_debug ("load incomplete, not syncing state");
 		return FALSE;
 	}
-	
+
 	rb_debug ("saving playlists");
 	rb_playlist_manager_save_playlists (shell->priv->playlist_manager, TRUE);
 
@@ -815,7 +813,7 @@ static gboolean
 idle_save_rhythmdb (RBShell *shell)
 {
 	rhythmdb_save (shell->priv->db);
-	
+
 	shell->priv->save_db_id = 0;
 
 	return FALSE;
@@ -874,6 +872,10 @@ rb_shell_finalize (GObject *object)
 		shell->priv->save_db_id = 0;
 	}
 
+	if (shell->priv->queue_sidebar != NULL) {
+		g_object_unref (shell->priv->queue_sidebar);
+	}
+
 	rb_debug ("shutting down playlist manager");
 	rb_playlist_manager_shutdown (shell->priv->playlist_manager);
 
@@ -884,7 +886,7 @@ rb_shell_finalize (GObject *object)
 	g_object_unref (G_OBJECT (shell->priv->removable_media_manager));
 
 	g_object_unref (G_OBJECT (shell->priv->proxy_config));
-	
+
 	rb_debug ("unreffing clipboard shell");
 	g_object_unref (G_OBJECT (shell->priv->clipboard_shell));
 
@@ -900,7 +902,7 @@ rb_shell_finalize (GObject *object)
 
 	rb_debug ("destroying tooltips");
 	gtk_object_destroy (GTK_OBJECT (shell->priv->tooltips));
-	
+
 	g_free (shell->priv->rhythmdb_file);
 
 	rb_debug ("destroying window");
@@ -1059,7 +1061,7 @@ construct_widgets (RBShell *shell)
 				 "size-allocate",
 				 G_CALLBACK (paned_size_allocate_cb),
 				 shell, 0);
-	
+
 	shell->priv->queue_source = RB_PLAYLIST_SOURCE (rb_play_queue_source_new (shell));
 	g_object_set (G_OBJECT(shell->priv->player_shell), "queue-source", shell->priv->queue_source, NULL);
 	g_object_set (G_OBJECT(shell->priv->clipboard_shell), "queue-source", shell->priv->queue_source, NULL);
@@ -1080,9 +1082,9 @@ construct_widgets (RBShell *shell)
 
 		shell->priv->queue_paned = gtk_vpaned_new ();
 		gtk_paned_pack1 (GTK_PANED (shell->priv->queue_paned),
-				 shell->priv->sourcelist, 
+				 shell->priv->sourcelist,
 				 FALSE, TRUE);
-		gtk_paned_pack2 (GTK_PANED (shell->priv->queue_paned), 
+		gtk_paned_pack2 (GTK_PANED (shell->priv->queue_paned),
 				 shell->priv->queue_sidebar,
 				 TRUE, TRUE);
 		gtk_container_child_set (GTK_CONTAINER (shell->priv->queue_paned),
@@ -1115,7 +1117,7 @@ construct_widgets (RBShell *shell)
 
 	shell->priv->main_vbox = gtk_vbox_new (FALSE, 0);
 	gtk_container_set_border_width (GTK_CONTAINER (shell->priv->main_vbox), 0);
- 	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), GTK_WIDGET (shell->priv->player_shell), FALSE, TRUE, 6);	
+ 	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), GTK_WIDGET (shell->priv->player_shell), FALSE, TRUE, 6);
 	gtk_widget_show (GTK_WIDGET (shell->priv->player_shell));
 
 	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), GTK_WIDGET (shell->priv->top_container), FALSE, TRUE, 0);
@@ -1127,7 +1129,7 @@ construct_widgets (RBShell *shell)
 	gtk_container_add (GTK_CONTAINER (win), shell->priv->main_vbox);
 
 	shell->priv->proxy_config = rb_proxy_config_new ();
- 
+
 	rb_profile_end ("constructing widgets");
 }
 
@@ -1142,7 +1144,6 @@ construct_sources (RBShell *shell)
 	rb_shell_append_source (shell, RB_SOURCE (shell->priv->iradio_source), NULL);
 	shell->priv->podcast_source = RB_PODCAST_SOURCE (rb_podcast_source_new (shell));
 	rb_shell_append_source (shell, RB_SOURCE (shell->priv->podcast_source), NULL);
-
 	shell->priv->missing_files_source = rb_missing_files_source_new (shell, shell->priv->library_source);
 	rb_shell_append_source (shell, shell->priv->missing_files_source, RB_SOURCE (shell->priv->library_source));
 	shell->priv->import_errors_source = rb_import_errors_source_new (shell, shell->priv->library_source);
@@ -1225,7 +1226,7 @@ construct_load_ui (RBShell *shell)
 	gtk_tool_item_set_expand (tool_item, TRUE);
 	gtk_widget_show (GTK_WIDGET (tool_item));
 	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1);
-	
+
 	tool_item = gtk_tool_item_new ();
 	gtk_container_add (GTK_CONTAINER (tool_item), shell->priv->volume_button);
 	gtk_widget_show_all (GTK_WIDGET (tool_item));
@@ -1236,8 +1237,8 @@ construct_load_ui (RBShell *shell)
 	shell->priv->tooltips = gtk_tooltips_new ();
 	gtk_tooltips_enable (shell->priv->tooltips);
 
-	gtk_tooltips_set_tip (GTK_TOOLTIPS (shell->priv->tooltips), 
-			      GTK_WIDGET (shell->priv->volume_button), 
+	gtk_tooltips_set_tip (GTK_TOOLTIPS (shell->priv->tooltips),
+			      GTK_WIDGET (shell->priv->volume_button),
 			      _("Change the music volume"), NULL);
 
 	if (error != NULL) {
@@ -1261,7 +1262,7 @@ rb_shell_constructor (GType type,
 
 	rb_debug ("Constructing shell");
 	rb_profile_start ("constructing shell");
-  
+
 	shell->priv->actiongroup = gtk_action_group_new ("MainActions");
 	gtk_action_group_set_translation_domain (shell->priv->actiongroup,
 						 GETTEXT_PACKAGE);
@@ -1306,14 +1307,13 @@ rb_shell_constructor (GType type,
 	shell->priv->small_width = eel_gconf_get_integer (CONF_STATE_SMALL_WIDTH);
 	shell->priv->window_maximised = eel_gconf_get_boolean (CONF_STATE_WINDOW_MAXIMIZED);
 	shell->priv->window_small = eel_gconf_get_boolean (CONF_UI_SMALL_DISPLAY);
-	shell->priv->queue_as_sidebar = eel_gconf_get_boolean (CONF_UI_QUEUE_AS_SIDEBAR); 
+	shell->priv->queue_as_sidebar = eel_gconf_get_boolean (CONF_UI_QUEUE_AS_SIDEBAR);
 	shell->priv->window_x = eel_gconf_get_integer (CONF_STATE_WINDOW_X_POSITION);
 	shell->priv->window_y = eel_gconf_get_integer (CONF_STATE_WINDOW_Y_POSITION);
 	shell->priv->paned_position = eel_gconf_get_integer (CONF_STATE_PANED_POSITION);
 	shell->priv->sourcelist_height = eel_gconf_get_integer (CONF_STATE_SOURCELIST_HEIGHT);
 	shell->priv->statusbar_hidden = eel_gconf_get_boolean (CONF_UI_STATUSBAR_HIDDEN);
 
-	
 	rb_debug ("shell: syncing with gconf");
 	rb_shell_sync_sidepane_visibility (shell);
 	rb_shell_sync_pane_visibility (shell);
@@ -1341,7 +1341,7 @@ rb_shell_constructor (GType type,
 	/* GO GO GO! */
 	rb_debug ("loading database");
 	rhythmdb_load (shell->priv->db);
-	
+
 	rb_debug ("shell: syncing window state");
 	rb_shell_sync_paned (shell);
 	gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
@@ -1364,7 +1364,7 @@ rb_shell_constructor (GType type,
 	/* focus play if small, the entry view if not */
 	if (shell->priv->window_small) {
 		GtkWidget *play_button;
-		
+
 		play_button = gtk_ui_manager_get_widget (shell->priv->ui_manager, "/ToolBar/Play");
 		gtk_widget_grab_focus (play_button);
 	} else {
@@ -1445,7 +1445,7 @@ rb_shell_get_visibility (RBShell *shell)
 		return FALSE;
 	if (shell->priv->iconified)
 		return FALSE;
-		
+
 	state = gdk_window_get_state (GTK_WIDGET (shell->priv->window)->window);
 	if (state & (GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_ICONIFIED))
 		return FALSE;
@@ -1500,7 +1500,7 @@ rb_shell_set_visibility (RBShell *shell,
 			gtk_window_set_skip_taskbar_hint (GTK_WINDOW (shell->priv->window), FALSE);
 		gtk_widget_show (GTK_WIDGET (shell->priv->window));
 		gtk_window_deiconify (GTK_WINDOW (shell->priv->window));
-		
+
 		if (GTK_WIDGET_REALIZED (GTK_WIDGET (shell->priv->window)))
 			rb_shell_present (shell, gtk_get_current_event_time (), NULL);
 		else
@@ -1621,7 +1621,7 @@ rb_shell_sync_window_state (RBShell *she
 						&hints,
 						0);
 	}
-	
+
 	gtk_window_move (GTK_WINDOW (shell->priv->window),
 			 shell->priv->window_x,
 			 shell->priv->window_y);
@@ -1671,7 +1671,7 @@ rb_shell_db_entry_added_cb (RhythmDB *db
 {
 	if (shell->priv->pending_entry == NULL)
 		return;
-	
+
 	rb_debug ("got entry added for %s", entry->location);
 	if (strcmp (entry->location, shell->priv->pending_entry) == 0) {
 		rb_shell_play_entry (shell, entry);
@@ -1694,15 +1694,13 @@ rb_shell_register_entry_type_for_source 
 					 RhythmDBEntryType type)
 {
 	if (shell->priv->sources_hash == NULL) {
-		shell->priv->sources_hash = g_hash_table_new (g_direct_hash, 
+		shell->priv->sources_hash = g_hash_table_new (g_direct_hash,
 							      g_direct_equal);
 	}
 	g_assert (g_hash_table_lookup (shell->priv->sources_hash, type) == NULL);
 	g_hash_table_insert (shell->priv->sources_hash, type, source);
 }
 
-
-
 void
 rb_shell_append_source (RBShell *shell,
 			RBSource *source,
@@ -1769,7 +1767,7 @@ rb_shell_transfer_progress_cb (RBRemovab
 		else
 			s = g_strdup_printf (_("Transferring track %d out of %d"),
 						   done + 1, total);
-			
+
 		rb_statusbar_set_progress (shell->priv->statusbar,
 					   (((double)(done) + fraction)/total),
 					   s);
@@ -1829,7 +1827,7 @@ rb_shell_playing_from_queue_cb (RBShellP
 		RBEntryView *songs;
 		RhythmDBEntry *entry;
 		RhythmDBEntryType entry_type;
-		
+
 		/* if playing from the queue, show the playing entry as playing in the
 		 * registered source for its type, so it makes sense when 'jump to current'
 		 * jumps to it there.
@@ -1880,10 +1878,10 @@ rb_shell_playing_entry_changed_cb (RBShe
 	notifytitle = g_strdup_printf (_("by %s from %s"),
 				       rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST),
 				       rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM));
-	rb_shell_hidden_notify (shell, 
-				4000, 
-				rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE), 
-				NULL, 
+	rb_shell_hidden_notify (shell,
+				4000,
+				rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE),
+				NULL,
 				notifytitle);
 	g_free (notifytitle);
 }
@@ -1911,15 +1909,15 @@ rb_shell_select_source (RBShell *shell,
 		return;
 
 	rb_debug ("selecting source %p", source);
-	
+
 	if (shell->priv->selected_source) {
 		rb_source_deactivate (shell->priv->selected_source);
 		gtk_ui_manager_remove_ui (shell->priv->ui_manager, shell->priv->source_ui_merge_id);
 	}
-	
+
 	shell->priv->selected_source = source;
 	rb_source_activate (shell->priv->selected_source);
-	
+
 	/* show source */
 	gtk_notebook_set_current_page (GTK_NOTEBOOK (shell->priv->notebook),
 				       gtk_notebook_page_num (GTK_NOTEBOOK (shell->priv->notebook), GTK_WIDGET (source)));
@@ -1932,7 +1930,7 @@ rb_shell_select_source (RBShell *shell,
 	g_signal_handlers_unblock_by_func (G_OBJECT (shell->priv->sourcelist),
 					   G_CALLBACK (source_selected_cb),
 					   shell);
-	
+
 	/* update services */
 	rb_shell_clipboard_set_source (shell->priv->clipboard_shell, source);
 	rb_shell_player_set_selected_source (shell->priv->player_shell, source);
@@ -1965,13 +1963,13 @@ rb_shell_player_elapsed_changed_cb (RBSh
 	rb_shell_set_elapsed (shell, elapsed);
 }
 
-static void 
+static void
 rb_shell_player_stream_song_changed_cb (RBShellPlayer *player,
 					GParamSpec *arg,
 					RBShell *shell)
 {
 	char *song;
-	g_object_get (G_OBJECT (player), "stream-song", &song, NULL);	
+	g_object_get (G_OBJECT (player), "stream-song", &song, NULL);
 	if (song) {
 		rb_shell_hidden_notify (shell, 4000, song, NULL, NULL);
 		g_free (song);
@@ -2015,7 +2013,7 @@ rb_shell_set_window_title (RBShell *shel
 
 		g_free (shell->priv->cached_title);
 		shell->priv->cached_title = NULL;
-		
+
 		gtk_window_set_title (GTK_WINDOW (shell->priv->window),
 				      _("Music Player"));
 	}
@@ -2069,14 +2067,14 @@ rb_shell_view_smalldisplay_changed_cb (G
 				       RBShell *shell)
 {
 	GTimeVal time;
-	
+
 	/* don't change more than once per second, it causes weirdness */
 	g_get_current_time (&time);
 	if (time.tv_sec == shell->priv->last_small_time)
 		return;
 
 	shell->priv->last_small_time = time.tv_sec;
-	
+
 	shell->priv->window_small = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	eel_gconf_set_boolean (CONF_UI_SMALL_DISPLAY, shell->priv->window_small);
 }
@@ -2098,14 +2096,14 @@ rb_shell_view_queue_as_sidebar_changed_c
 	shell->priv->queue_as_sidebar = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	eel_gconf_set_boolean (CONF_UI_QUEUE_AS_SIDEBAR, shell->priv->queue_as_sidebar);
 
-	if (shell->priv->queue_as_sidebar && 
+	if (shell->priv->queue_as_sidebar &&
 	    shell->priv->selected_source == RB_SOURCE (shell->priv->queue_source)) {
 		/* queue no longer exists as a source, so change to the library */
 		rb_shell_select_source (shell, RB_SOURCE (shell->priv->library_source));
 	}
 
 	rb_shell_playing_from_queue_cb (shell->priv->player_shell, NULL, shell);
-	
+
 	rb_shell_sync_pane_visibility (shell);
 }
 
@@ -2266,14 +2264,13 @@ rb_shell_plugins_response_cb (GtkDialog 
 		gtk_widget_hide (GTK_WIDGET (dialog));
 }
 
-
 static void
 rb_shell_cmd_plugins (GtkAction *action,
 		      RBShell *shell)
 {
 	if (shell->priv->plugins == NULL) {
 		GtkWidget *manager;
-		
+
 		shell->priv->plugins = gtk_dialog_new_with_buttons (_("Configure Plugins"),
 								    GTK_WINDOW (shell->priv->window),
 								    GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -2283,7 +2280,7 @@ rb_shell_cmd_plugins (GtkAction *action,
 	    	gtk_container_set_border_width (GTK_CONTAINER (shell->priv->plugins), 5);
 		gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (shell->priv->plugins)->vbox), 2);
 		gtk_dialog_set_has_separator (GTK_DIALOG (shell->priv->plugins), FALSE);
-								    
+
 		g_signal_connect_object (G_OBJECT (shell->priv->plugins),
 					 "delete_event",
 					 G_CALLBACK (rb_shell_plugins_window_delete_cb),
@@ -2292,13 +2289,13 @@ rb_shell_cmd_plugins (GtkAction *action,
 					 "response",
 					 G_CALLBACK (rb_shell_plugins_response_cb),
 					 NULL, 0);
-		
+
 		manager = rb_plugin_manager_new ();
 		gtk_widget_show_all (GTK_WIDGET (manager));
 		gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell->priv->plugins)->vbox),
 				   manager);
 	}
-	
+
 	gtk_window_present (GTK_WINDOW (shell->priv->plugins));
 }
 
@@ -2307,7 +2304,7 @@ add_to_library_response_cb (GtkDialog *d
 			    int response_id,
 			    RBShell *shell)
 {
-	
+
 	char *current_dir = NULL;
 	GSList *uri_list = NULL, *uris = NULL;
 
@@ -2344,7 +2341,7 @@ rb_shell_cmd_add_folder_to_library (GtkA
 {
 	char * dir = eel_gconf_get_string (CONF_STATE_ADD_DIR);
 	GtkWidget *dialog;
-    
+
 	dialog = rb_file_chooser_new (_("Import Folder into Library"),
 			              GTK_WINDOW (shell->priv->window),
 				      GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
@@ -2352,7 +2349,6 @@ rb_shell_cmd_add_folder_to_library (GtkA
 	if (dir)
 		gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog),
 							 dir);
-	
 
 	g_signal_connect_object (G_OBJECT (dialog),
 				 "response",
@@ -2366,7 +2362,7 @@ rb_shell_cmd_add_file_to_library (GtkAct
 {
 	char * dir = eel_gconf_get_string (CONF_STATE_ADD_DIR);
 	GtkWidget *dialog;
-    
+
 	dialog = rb_file_chooser_new (_("Import File into Library"),
 			              GTK_WINDOW (shell->priv->window),
 				      GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -2374,7 +2370,6 @@ rb_shell_cmd_add_file_to_library (GtkAct
 	if (dir)
 		gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog),
 							 dir);
-	
 
 	g_signal_connect_object (G_OBJECT (dialog),
 				 "response",
@@ -2469,11 +2464,10 @@ rb_shell_sync_pane_visibility (RBShell *
 
 	action = gtk_action_group_get_action (shell->priv->actiongroup,
 					      "ViewQueueAsSidebar");
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), 
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 				      shell->priv->queue_as_sidebar);
 }
 
-
 static void
 rb_shell_sync_toolbar_state (RBShell *shell)
 {
@@ -2601,13 +2595,13 @@ rb_shell_sync_smalldisplay (RBShell *she
 		g_object_set (G_OBJECT (action), "sensitive", FALSE, NULL);
 		g_object_set (G_OBJECT (queue_action), "sensitive", FALSE, NULL);
 		g_object_set (G_OBJECT (party_mode_action), "sensitive", FALSE, NULL);
-  
+
 		gtk_widget_hide (GTK_WIDGET (shell->priv->paned));
 	} else {
 		g_object_set (G_OBJECT (action), "sensitive", TRUE, NULL);
 		g_object_set (G_OBJECT (queue_action), "sensitive", TRUE, NULL);
 		g_object_set (G_OBJECT (party_mode_action), "sensitive", TRUE, NULL);
-  
+
 		gtk_widget_show (GTK_WIDGET (shell->priv->paned));
 	}
 	rb_shell_sync_statusbar_visibility (shell);
@@ -2636,7 +2630,7 @@ sidepane_visibility_changed_cb (GConfCli
 				GConfEntry *entry,
 				RBShell *shell)
 {
-	rb_debug ("sidepane visibility changed"); 
+	rb_debug ("sidepane visibility changed");
 	rb_shell_sync_sidepane_visibility (shell);
 }
 
@@ -2646,7 +2640,7 @@ toolbar_state_changed_cb (GConfClient *c
 			       GConfEntry *entry,
 			       RBShell *shell)
 {
-	rb_debug ("toolbar state changed"); 
+	rb_debug ("toolbar state changed");
 	rb_shell_sync_toolbar_state (shell);
 }
 
@@ -2716,7 +2710,6 @@ rb_shell_cmd_current_song (GtkAction *ac
 	rb_shell_jump_to_current (shell);
 }
 
-
 static void
 rb_shell_cmd_view_all (GtkAction *action,
 		       RBShell *shell)
@@ -2737,12 +2730,12 @@ rb_shell_jump_to_entry_with_source (RBSh
 
 	g_return_if_fail (entry != NULL);
 
-	if ((source == RB_SOURCE (shell->priv->queue_source) && 
+	if ((source == RB_SOURCE (shell->priv->queue_source) &&
 	     shell->priv->queue_as_sidebar) ||
 	     source == NULL) {
 		RhythmDBEntryType entry_type;
 		entry_type = rhythmdb_entry_get_entry_type (entry);
-		source = rb_shell_get_source_by_entry_type (shell, entry_type); 
+		source = rb_shell_get_source_by_entry_type (shell, entry_type);
 	}
 	if (source == NULL)
 		return;
@@ -2797,7 +2790,7 @@ tray_embedded_cb (GtkPlug *plug,
 
 	gdk_window_set_decorations (shell->priv->window->window,
 				    GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
-#endif	
+#endif
 }
 
 static gboolean
@@ -2842,8 +2835,8 @@ rb_shell_hidden_notify (RBShell *shell,
 			     icon, secondary);
 }
 
-static void 
-session_die_cb (GnomeClient *client, 
+static void
+session_die_cb (GnomeClient *client,
                 RBShell *shell)
 {
         rb_debug ("session die");
@@ -2861,7 +2854,7 @@ rb_shell_error_quark (void)
 }
 
 static gboolean
-save_yourself_cb (GnomeClient *client, 
+save_yourself_cb (GnomeClient *client,
                   gint phase,
                   GnomeSaveStyle save_style,
                   gboolean shutdown,
@@ -2881,7 +2874,7 @@ rb_shell_session_init (RBShell *shell)
 
         client = gnome_master_client ();
 
-        g_signal_connect_object (G_OBJECT (client), 
+        g_signal_connect_object (G_OBJECT (client),
 				 "save_yourself",
 				 G_CALLBACK (save_yourself_cb),
 				 shell, 0);
@@ -2987,9 +2980,9 @@ handle_playlist_entry_cb (TotemPlParser 
 	RhythmDBEntryType entry_type;
 
 	g_return_if_fail (uri != NULL);
-	
+
 	entry_type = rb_shell_guess_type_for_uri (data->shell, uri);
-	
+
 	if (entry_type != RHYTHMDB_ENTRY_TYPE_IRADIO_STATION)
 		data->iradio_playlist = FALSE;
 }
@@ -2997,7 +2990,7 @@ handle_playlist_entry_cb (TotemPlParser 
 /* Load a URI representing a single song, a directory, a playlist, or
  * an internet radio station, and optionally start playing it.
  *
- * For playlists containing only stream URLs, we either add the playlist 
+ * For playlists containing only stream URLs, we either add the playlist
  * itself (if it's remote) or each URL from it (if it's local).  The main
  * reason for this is so clicking on stream playlist links in web browsers
  * works properly - the playlist file will be downloaded to /tmp/, and
@@ -3011,7 +3004,7 @@ rb_shell_load_uri (RBShell *shell,
 		   GError **error)
 {
 	RhythmDBEntry *entry;
-	
+
 	entry = rhythmdb_entry_lookup_by_location (shell->priv->db, uri);
 
 	if (entry == NULL) {
@@ -3026,10 +3019,10 @@ rb_shell_load_uri (RBShell *shell,
 			 */
 			play = FALSE;
 		}
-		
+
 		rb_debug ("adding uri %s", uri);
 		parser = totem_pl_parser_new ();
-		
+
 		g_signal_connect_data (G_OBJECT (parser), "entry",
 				       G_CALLBACK (handle_playlist_entry_cb),
 				       &data, NULL, 0);
@@ -3040,7 +3033,7 @@ rb_shell_load_uri (RBShell *shell,
 
 		result = totem_pl_parser_parse (parser, uri, FALSE);
 		g_object_unref (parser);
-		
+
 		if (result == TOTEM_PL_PARSER_RESULT_SUCCESS && data.iradio_playlist == FALSE) {
 			rb_debug ("adding %s as a static playlist", uri);
 			if (!rb_playlist_manager_parse_file (shell->priv->playlist_manager,
@@ -3062,7 +3055,7 @@ rb_shell_load_uri (RBShell *shell,
 			rb_shell_add_uri (shell, entrytype, uri, NULL, NULL, NULL);
 		}
 	}
-	
+
 	if (play) {
 		if (entry == NULL)
 			entry = rhythmdb_entry_lookup_by_location (shell->priv->db, uri);
@@ -3122,7 +3115,7 @@ rb_shell_add_to_queue (RBShell *shell,
 		       const gchar *uri,
 		       GError **error)
 {
-	rb_static_playlist_source_add_location (RB_STATIC_PLAYLIST_SOURCE (shell->priv->queue_source), 
+	rb_static_playlist_source_add_location (RB_STATIC_PLAYLIST_SOURCE (shell->priv->queue_source),
 						uri, -1);
 	return TRUE;
 }
@@ -3146,7 +3139,6 @@ rb_shell_clear_queue (RBShell *shell,
 	return TRUE;
 }
 
-
 gboolean
 rb_shell_present (RBShell *shell,
 		  guint32 timestamp,
@@ -3158,7 +3150,7 @@ rb_shell_present (RBShell *shell,
 	gtk_widget_show (GTK_WIDGET (shell->priv->window));
 #if GTK_MINOR_VERSION >= 8
 	gtk_window_present_with_time (GTK_WINDOW (shell->priv->window), timestamp);
-#else	
+#else
 	gtk_window_present (GTK_WINDOW (shell->priv->window));
 	gdk_window_focus (GTK_WIDGET (shell->priv->window)->window, timestamp);
 #endif
@@ -3185,7 +3177,7 @@ rb_shell_get_song_properties (RBShell *s
 	RhythmDBEntry *entry;
 	GEnumClass *klass;
 	guint i;
-	
+
 	entry = rhythmdb_entry_lookup_by_location (shell->priv->db, uri);
 
 	if (entry == NULL) {
@@ -3221,7 +3213,7 @@ rb_shell_get_song_properties (RBShell *s
 		default:
 			continue;
 		}
-		
+
 		value = g_new0 (GValue, 1);
 		g_value_init (value, value_type);
 		rhythmdb_entry_get (shell->priv->db, entry, prop, value);
@@ -3244,7 +3236,7 @@ rb_shell_set_song_property (RBShell *she
 	RhythmDBEntry *entry;
 	GType proptype;
 	int propid;
-	
+
 	entry = rhythmdb_entry_lookup_by_location (shell->priv->db, uri);
 
 	if (entry == NULL) {
@@ -3285,8 +3277,8 @@ rb_shell_volume_widget_changed_cb (Bacon
 				   RBShell *shell)
 {
 	if (!shell->priv->syncing_volume)
-		g_object_set (shell->priv->player_shell, 
-			      "volume", bacon_volume_button_get_value (vol), 
+		g_object_set (shell->priv->player_shell,
+			      "volume", bacon_volume_button_get_value (vol),
 			      NULL);
 }
 
@@ -3298,7 +3290,7 @@ rb_shell_player_volume_changed_cb (RBShe
 	float volume;
 	g_object_get (G_OBJECT (player), "volume", &volume, NULL);
 	shell->priv->syncing_volume = TRUE;
-	bacon_volume_button_set_value (BACON_VOLUME_BUTTON (shell->priv->volume_button), 
+	bacon_volume_button_set_value (BACON_VOLUME_BUTTON (shell->priv->volume_button),
 				       volume);
 	shell->priv->syncing_volume = FALSE;
 
@@ -3376,4 +3368,3 @@ rb_shell_ui_location_get_type (void)
 
 	return etype;
 }
-
Index: sources/rb-auto-playlist-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-auto-playlist-source.c,v
retrieving revision 1.23
diff -p -u -r1.23 rb-auto-playlist-source.c
--- sources/rb-auto-playlist-source.c	23 Jun 2006 11:26:56 -0000	1.23
+++ sources/rb-auto-playlist-source.c	13 Jul 2006 23:40:24 -0000
@@ -19,12 +19,13 @@
  *
  */
 
-#include <config.h>
+#include "config.h"
+
+#include <string.h>
+#include <libxml/tree.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
 #include <libgnomevfs/gnome-vfs-uri.h>
-#include <libxml/tree.h>
-#include <string.h>
 
 #include "rb-auto-playlist-source.h"
 #include "rb-library-browser.h"
@@ -34,7 +35,6 @@
 #include "rb-stock-icons.h"
 #include "rb-playlist-xml.h"
 
-
 static GObject *rb_auto_playlist_source_constructor (GType type, guint n_construct_properties,
 						      GObjectConstructParam *construct_properties);
 static void rb_auto_playlist_source_finalize (GObject *object);
@@ -51,8 +51,8 @@ static GList *impl_get_search_actions (R
 static void impl_save_contents_to_xml (RBPlaylistSource *source,
 				       xmlNodePtr node);
 
-static void rb_auto_playlist_source_songs_sort_order_changed_cb (RBEntryView *view, 
-								 RBAutoPlaylistSource *source); 
+static void rb_auto_playlist_source_songs_sort_order_changed_cb (RBEntryView *view,
+								 RBAutoPlaylistSource *source);
 static void rb_auto_playlist_source_do_query (RBAutoPlaylistSource *source,
 					      gboolean subset);
 
@@ -75,8 +75,6 @@ static GtkRadioActionEntry rb_auto_playl
 	{ "AutoPlaylistSearchTitles", NULL, N_("Titles"), NULL, N_("Search titles"), 3 }
 };
 
-
-
 #define AUTO_PLAYLIST_SOURCE_POPUP_PATH "/AutoPlaylistSourcePopup"
 
 typedef struct _RBAutoPlaylistSourcePrivate RBAutoPlaylistSourcePrivate;
@@ -130,13 +128,13 @@ rb_auto_playlist_source_class_init (RBAu
 	source_class->impl_get_search_actions = impl_get_search_actions;
 
 	playlist_class->impl_save_contents_to_xml = impl_save_contents_to_xml;
-	
+
 	gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &size, NULL);
 	klass->pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
 						  GNOME_MEDIA_AUTO_PLAYLIST,
 						  size,
 						  0, NULL);
-	
+
 	g_type_class_add_private (klass, sizeof (RBAutoPlaylistSourcePrivate));
 }
 
@@ -193,7 +191,6 @@ rb_auto_playlist_source_constructor (GTy
 				 G_CALLBACK (rb_auto_playlist_source_browser_changed_cb),
 				 source, 0);
 
-
 	songs = rb_source_get_entry_view (RB_SOURCE (source));
 	g_signal_connect_object (G_OBJECT (songs), "sort-order-changed",
 				 G_CALLBACK (rb_auto_playlist_source_songs_sort_order_changed_cb),
@@ -213,13 +210,13 @@ rb_auto_playlist_source_constructor (GTy
 	priv->search_prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	g_object_unref (G_OBJECT (shell));
 
-
 	/* reparent the entry view */
-	g_object_ref (G_OBJECT (songs));
+	g_object_ref (songs);
 	gtk_container_remove (GTK_CONTAINER (source), GTK_WIDGET (songs));
 	gtk_paned_pack2 (GTK_PANED (priv->paned), GTK_WIDGET (songs), TRUE, FALSE);
 	gtk_container_add (GTK_CONTAINER (source), priv->paned);
-	
+	g_object_unref (songs);
+
 	gtk_widget_show_all (GTK_WIDGET (source));
 
 	return G_OBJECT (source);
@@ -240,11 +237,10 @@ rb_auto_playlist_source_new (RBShell *sh
 					NULL));
 }
 
-RBSource *	
+RBSource *
 rb_auto_playlist_source_new_from_xml (RBShell *shell, xmlNodePtr node)
 {
 	RBAutoPlaylistSource *source = RB_AUTO_PLAYLIST_SOURCE (rb_auto_playlist_source_new (shell, NULL, TRUE));
-
 	xmlNodePtr child;
 	xmlChar *tmp;
 	GPtrArray *query;
@@ -258,7 +254,7 @@ rb_auto_playlist_source_new_from_xml (RB
 	while (xmlNodeIsText (child))
 		child = child->next;
 
-	query = rhythmdb_query_deserialize (rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source)), 
+	query = rhythmdb_query_deserialize (rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source)),
 					    child);
 
 	limit_value = g_value_array_new (0);
@@ -330,6 +326,7 @@ rb_auto_playlist_source_new_from_xml (RB
 					   sort_direction);
 	g_free (sort_key);
 	g_value_array_free (limit_value);
+	rhythmdb_query_free (query);
 
 	return RB_SOURCE (source);
 }
@@ -346,7 +343,7 @@ impl_reset_filters (RBSource *source)
 {
 	RBAutoPlaylistSourcePrivate *priv = RB_AUTO_PLAYLIST_SOURCE_GET_PRIVATE (source);
 	gboolean changed = FALSE;
-	
+
 	if (rb_library_browser_reset (priv->browser))
 		changed = TRUE;
 
@@ -370,7 +367,7 @@ impl_search (RBSource *source, const cha
 
 	if (search_text != NULL && search_text[0] == '\0')
 		search_text = NULL;
-	
+
 	if (search_text == NULL && priv->search_text == NULL)
 		return;
 	if (search_text != NULL && priv->search_text != NULL
@@ -389,7 +386,7 @@ impl_search (RBSource *source, const cha
 			subset = (g_str_has_prefix (priv->search_text, old_search_text));
 	}
 	g_free (old_search_text);
-	
+
 	/* we can only do subset searches once the original query is complete */
 	if (priv->query_active && subset) {
 		rb_debug ("deferring search for \"%s\" until query completion", debug_search_text);
@@ -442,7 +439,7 @@ static gboolean
 impl_receive_drag (RBSource *asource, GtkSelectionData *data)
 {
 	RBAutoPlaylistSource *source = RB_AUTO_PLAYLIST_SOURCE (asource);
-        
+
 	GPtrArray *subquery = NULL;
 	gchar **names;
 	guint propid;
@@ -458,7 +455,7 @@ impl_receive_drag (RBSource *asource, Gt
 	g_object_get (G_OBJECT (asource), "db", &db, NULL);
 
 	for (i=0; names[i]; i++) {
-		if (subquery == NULL) 
+		if (subquery == NULL)
 			subquery = rhythmdb_query_parse (db,
 							 RHYTHMDB_QUERY_PROP_EQUALS,
 							 propid,
@@ -479,7 +476,7 @@ impl_receive_drag (RBSource *asource, Gt
 	if (subquery) {
 		RhythmDBEntryType qtype;
 		GPtrArray *query;
-		
+
 		g_object_get (G_OBJECT (source), "entry-type", &qtype, NULL);
 		if (qtype == RHYTHMDB_ENTRY_TYPE_INVALID)
 			qtype = RHYTHMDB_ENTRY_TYPE_SONG;
@@ -525,8 +522,7 @@ _save_write_uint64 (xmlNodePtr node, GVa
 	g_free (str);
 }
 
-
-static void 
+static void
 impl_save_contents_to_xml (RBPlaylistSource *psource, xmlNodePtr node)
 {
 	GPtrArray *query;
@@ -546,7 +542,7 @@ impl_save_contents_to_xml (RBPlaylistSou
 	switch (limit_type) {
 	case RHYTHMDB_QUERY_MODEL_LIMIT_NONE:
 		break;
-		
+
 	case RHYTHMDB_QUERY_MODEL_LIMIT_COUNT:
 		_save_write_ulong (node, limit_value, RB_PLAYLIST_LIMIT_COUNT);
 		break;
@@ -581,7 +577,7 @@ rb_auto_playlist_source_query_complete_c
 					   RBAutoPlaylistSource *source)
 {
 	RBAutoPlaylistSourcePrivate *priv = RB_AUTO_PLAYLIST_SOURCE_GET_PRIVATE (source);
-	
+
 	priv->query_active = FALSE;
 	if (priv->search_on_completion) {
 		priv->search_on_completion = FALSE;
@@ -600,7 +596,7 @@ rb_auto_playlist_source_do_query (RBAuto
 	GPtrArray *query;
 
 	g_assert (priv->cached_all_query);
-	
+
 	if (!priv->search_text) {
 		rb_library_browser_set_model (priv->browser,
 					      priv->cached_all_query,
@@ -635,8 +631,8 @@ rb_auto_playlist_source_do_query (RBAuto
 		g_signal_connect_object (G_OBJECT (query_model),
 					 "complete", G_CALLBACK (rb_auto_playlist_source_query_complete_cb),
 					 source, 0);
-		rhythmdb_do_full_query_async_parsed (db, 
-						     RHYTHMDB_QUERY_RESULTS (query_model), 
+		rhythmdb_do_full_query_async_parsed (db,
+						     RHYTHMDB_QUERY_RESULTS (query_model),
 						     query);
 		g_object_unref (G_OBJECT (query_model));
 	}
@@ -670,18 +666,17 @@ rb_auto_playlist_source_set_query (RBAut
 	if (priv->limit_value)
 		g_value_array_free (priv->limit_value);
 	priv->limit_value = limit_value ? g_value_array_copy (limit_value) : NULL;
-	
+
 	priv->cached_all_query = g_object_new (RHYTHMDB_TYPE_QUERY_MODEL,
 					      "db", db,
 					      "limit-type", priv->limit_type,
 					      "limit-value", priv->limit_value,
 					      NULL);
 	rb_library_browser_set_model (priv->browser, priv->cached_all_query, TRUE);
-	rhythmdb_do_full_query_async_parsed (db, 
-					     RHYTHMDB_QUERY_RESULTS (priv->cached_all_query), 
+	rhythmdb_do_full_query_async_parsed (db,
+					     RHYTHMDB_QUERY_RESULTS (priv->cached_all_query),
 					     query);
 
-
 	priv->query_resetting = FALSE;
 }
 
@@ -723,12 +718,12 @@ rb_auto_playlist_source_browser_changed_
 {
 	RBEntryView *songs = rb_source_get_entry_view (RB_SOURCE (source));
 	RhythmDBQueryModel *query_model;
-	
+
 	g_object_get (G_OBJECT (browser), "output-model", &query_model, NULL);
 	rb_entry_view_set_model (songs, query_model);
 	rb_playlist_source_set_query_model (RB_PLAYLIST_SOURCE (source), query_model);
 	g_object_unref (G_OBJECT (query_model));
-	
+
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
 
@@ -756,7 +751,7 @@ search_action_to_prop (GtkAction *action
 	if (name == NULL) {
 		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "AutoPlaylistSearchAll") == 0) {
-		prop = RHYTHMDB_PROP_SEARCH_MATCH;		
+		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "AutoPlaylistSearchArtists") == 0) {
 		prop = RHYTHMDB_PROP_ARTIST_FOLDED;
 	} else if (strcmp (name, "AutoPlaylistSearchAlbums") == 0) {
Index: sources/rb-browser-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-browser-source.c,v
retrieving revision 1.13
diff -p -u -r1.13 rb-browser-source.c
--- sources/rb-browser-source.c	6 Jul 2006 10:37:44 -0000	1.13
+++ sources/rb-browser-source.c	13 Jul 2006 23:40:24 -0000
@@ -109,7 +109,7 @@ static void rb_browser_source_do_query (
 struct RBBrowserSourcePrivate
 {
 	RhythmDB *db;
-	
+
 	RBLibraryBrowser *browser;
 	GtkWidget *vbox;
 
@@ -125,7 +125,7 @@ struct RBBrowserSourcePrivate
 
 	GtkActionGroup *action_group;
 	GtkActionGroup *search_action_group;
-	
+
 	RhythmDBEntryType entry_type;
 
 	char *sorting_key;
@@ -166,7 +166,6 @@ enum
 	PROP_SORTING_KEY
 };
 
-
 G_DEFINE_ABSTRACT_TYPE (RBBrowserSource, rb_browser_source, RB_TYPE_SOURCE)
 
 static void
@@ -233,7 +232,7 @@ rb_browser_source_init (RBBrowserSource 
 
 	source->priv->vbox = gtk_vbox_new (FALSE, 5);
 
-	/* Default value, should be overridden at object construction by the 
+	/* Default value, should be overridden at object construction by the
 	 * "entry-type" property
 	 */
 	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
@@ -256,12 +255,12 @@ rb_browser_source_dispose (GObject *obje
 		g_free (source->priv->search_text);
 		source->priv->search_text = NULL;
 	}
-	
+
 	if (source->priv->cached_all_query) {
 		g_object_unref (G_OBJECT (source->priv->cached_all_query));
 		source->priv->cached_all_query = NULL;
 	}
-	
+
 	G_OBJECT_CLASS (rb_browser_source_parent_class)->dispose (object);
 }
 
@@ -317,7 +316,7 @@ search_action_to_prop (GtkAction *action
 	if (name == NULL) {
 		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "BrowserSourceSearchAll") == 0) {
-		prop = RHYTHMDB_PROP_SEARCH_MATCH;		
+		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "BrowserSourceSearchArtists") == 0) {
 		prop = RHYTHMDB_PROP_ARTIST_FOLDED;
 	} else if (strcmp (name, "BrowserSourceSearchAlbums") == 0) {
@@ -370,7 +369,7 @@ rb_browser_source_constructor (GType typ
 	g_object_get (G_OBJECT (source), "shell", &shell, NULL);
 	g_object_get (G_OBJECT (shell), "db", &source->priv->db, NULL);
 	shell_player = rb_shell_get_player (shell);
-	
+
 	source->priv->action_group = _rb_source_register_action_group (RB_SOURCE (source),
 								       "BrowserSourceActions",
 								       rb_browser_source_actions,
@@ -459,7 +458,6 @@ rb_browser_source_constructor (GType typ
 					 source, 0);
 	}
 
-
 	/* this gets emitted when the paned thingie is moved */
 	g_signal_connect_object (G_OBJECT (source->priv->songs),
 				 "size_allocate",
@@ -481,7 +479,6 @@ rb_browser_source_constructor (GType typ
 	return G_OBJECT (source);
 }
 
-
 static void
 rb_browser_source_set_property (GObject *object,
 				guint prop_id,
@@ -540,7 +537,7 @@ rb_browser_source_cmd_choose_genre (GtkA
 	view = rb_library_browser_get_property_view (source->priv->browser, RHYTHMDB_PROP_GENRE);
 	if (view)
 		rb_property_view_set_selection (view, props);
-	
+
 	rb_list_deep_free (props);
 	g_object_unref (source);
 }
@@ -549,7 +546,7 @@ static void
 rb_browser_source_cmd_choose_artist (GtkAction *action,
 				     RBShell *shell)
 {
-	GList *props;	
+	GList *props;
 	RBBrowserSource *source;
 	RBPropertyView *view;
 
@@ -569,7 +566,7 @@ static void
 rb_browser_source_cmd_choose_album (GtkAction *action,
 				    RBShell *shell)
 {
-	GList *props;	
+	GList *props;
 	RBBrowserSource *source;
 	RBPropertyView *view;
 
@@ -621,7 +618,7 @@ impl_search (RBSource *asource, const ch
 			subset = (g_str_has_prefix (source->priv->search_text, old_search_text));
 	}
 	g_free (old_search_text);
-	
+
 	/* we can't do subset searches until the original query is complete, because they
 	 * reuse the query model.
 	 */
@@ -634,7 +631,6 @@ impl_search (RBSource *asource, const ch
 	}
 }
 
-
 static RBEntryView *
 impl_get_entry_view (RBSource *asource)
 {
@@ -819,12 +815,12 @@ rb_browser_source_browser_changed_cb (RB
 				      RBBrowserSource *source)
 {
 	RhythmDBQueryModel *query_model;
-	
+
 	g_object_get (G_OBJECT (browser), "output-model", &query_model, NULL);
 	rb_entry_view_set_model (source->priv->songs, query_model);
 	g_object_set (RB_SOURCE (source), "query-model", query_model, NULL);
 	g_object_unref (G_OBJECT (query_model));
-	
+
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
 
@@ -847,7 +843,7 @@ rb_browser_source_do_query (RBBrowserSou
 	RhythmDBQueryModel *query_model;
 	GPtrArray *query;
 	RhythmDBEntryType entry_type;
-	
+
 	/* use the cached 'all' query to optimise the no-search case */
 	if (!source->priv->search_text) {
 		rb_library_browser_set_model (source->priv->browser,
@@ -855,7 +851,7 @@ rb_browser_source_do_query (RBBrowserSou
 					      FALSE);
 		return;
 	}
-	
+
 	g_object_get (G_OBJECT (source), "entry-type", &entry_type, NULL);
 	query = rhythmdb_query_parse (source->priv->db,
 				      RHYTHMDB_QUERY_PROP_EQUALS,
@@ -891,4 +887,3 @@ rb_browser_source_do_query (RBBrowserSou
 	}
 	rhythmdb_query_free (query);
 }
-
Index: sources/rb-daap-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-daap-source.c,v
retrieving revision 1.38
diff -p -u -r1.38 rb-daap-source.c
--- sources/rb-daap-source.c	11 Jul 2006 11:29:23 -0000	1.38
+++ sources/rb-daap-source.c	13 Jul 2006 23:40:24 -0000
@@ -44,7 +44,6 @@
 
 #include "rb-static-playlist-source.h"
 
-
 static void rb_daap_source_dispose (GObject *object);
 static void rb_daap_source_set_property  (GObject *object,
 					  guint prop_id,
@@ -68,7 +67,6 @@ static void rb_daap_source_disconnect (R
 #define CONF_STATE_PANED_POSITION CONF_PREFIX "/state/daap/paned_position"
 #define CONF_STATE_SHOW_BROWSER CONF_PREFIX "/state/daap/show_browser"
 
-
 static RBDaapMdnsBrowser *mdns_browser = NULL;
 
 static GHashTable *source_lookup = NULL;
@@ -110,8 +108,8 @@ G_DEFINE_TYPE (RBDAAPSource, rb_daap_sou
 
 static GtkActionEntry rb_daap_source_actions [] =
 {
-	{ "DaapSourceDisconnect", GTK_STOCK_DISCONNECT, N_("_Disconnect"), NULL, 
-	  N_("Disconnect from DAAP share"), 
+	{ "DaapSourceDisconnect", GTK_STOCK_DISCONNECT, N_("_Disconnect"), NULL,
+	  N_("Disconnect from DAAP share"),
 	  G_CALLBACK (rb_daap_source_cmd_disconnect) },
 };
 GtkActionGroup *daap_action_group;
@@ -144,7 +142,6 @@ rb_daap_source_class_init (RBDAAPSourceC
 	browser_source_class->impl_get_paned_key = rb_daap_source_get_paned_key;
 	browser_source_class->impl_has_drop_support = (RBBrowserSourceFeatureFunc) rb_false_function;
 
-
 	g_object_class_install_property (object_class,
 					 PROP_SERVICE_NAME,
 					 g_param_spec_string ("service-name",
@@ -152,7 +149,7 @@ rb_daap_source_class_init (RBDAAPSourceC
 							      "mDNS/DNS-SD service name of the share",
 							      NULL,
 							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_HOST,
 					 g_param_spec_string ("host",
@@ -184,8 +181,8 @@ rb_daap_source_class_init (RBDAAPSourceC
 static void
 rb_daap_source_init (RBDAAPSource *source)
 {
-	source->priv = G_TYPE_INSTANCE_GET_PRIVATE (source, 
-						    RB_TYPE_DAAP_SOURCE, 
+	source->priv = G_TYPE_INSTANCE_GET_PRIVATE (source,
+						    RB_TYPE_DAAP_SOURCE,
 						    RBDAAPSourcePrivate);
 }
 
@@ -197,7 +194,7 @@ rb_daap_source_dispose (GObject *object)
 	if (source->priv) {
 		/* we should already have been disconnected */
 		g_assert (source->priv->connection == NULL);
-	
+
 		g_free (source->priv->service_name);
 		g_free (source->priv->host);
 	}
@@ -214,7 +211,7 @@ rb_daap_source_set_property (GObject *ob
 	RBDAAPSource *source = RB_DAAP_SOURCE (object);
 
 	switch (prop_id) {
-		case PROP_SERVICE_NAME: 
+		case PROP_SERVICE_NAME:
 			source->priv->service_name = g_value_dup_string (value);
 			break;
 		case PROP_HOST:
@@ -332,7 +329,6 @@ rb_daap_source_new (RBShell *shell,
 	return source;
 }
 
-
 static RBSource *
 find_source_by_service_name (const char *service_name)
 {
@@ -434,8 +430,8 @@ start_browsing (RBShell *shell)
 	}
 
 	source_lookup = g_hash_table_new_full ((GHashFunc)g_str_hash,
-					       (GEqualFunc)g_str_equal, 
-					       (GDestroyNotify)g_free, 
+					       (GEqualFunc)g_str_equal,
+					       (GDestroyNotify)g_free,
 					       (GDestroyNotify)remove_source);
 
 }
@@ -553,6 +549,10 @@ create_pixbufs (void)
 	emblem = gtk_icon_theme_load_icon (theme, "stock_lock", size, 0, NULL);
 
 	daap_share_locked_pixbuf = composite_icons (daap_share_pixbuf, emblem);
+
+	if (emblem != NULL) {
+		g_object_unref (emblem);
+	}
 }
 
 static void
@@ -599,7 +599,7 @@ rb_daap_sources_init (RBShell *shell)
 
 	/* add UI */
 	g_object_get (G_OBJECT (shell),
-		      "ui-manager", &uimanager, 
+		      "ui-manager", &uimanager,
 		      NULL);
 	daap_action_group = gtk_action_group_new ("DaapActions");
 	gtk_action_group_set_translation_domain (daap_action_group,
@@ -627,7 +627,7 @@ rb_daap_sources_shutdown (RBShell *shell
 	daap_was_shutdown = TRUE;
 
 	g_object_get (G_OBJECT (shell),
-		      "ui-manager", &uimanager, 
+		      "ui-manager", &uimanager,
 		      NULL);
 
 	if (mdns_browser) {
@@ -760,8 +760,8 @@ rb_daap_source_connection_cb (RBDAAPConn
 		return;
 	}
 
-	g_object_get (G_OBJECT (daap_source), 
-		      "shell", &shell, 
+	g_object_get (G_OBJECT (daap_source),
+		      "shell", &shell,
 		      "entry-type", &entry_type,
 		      NULL);
 	playlists = rb_daap_connection_get_playlists (RB_DAAP_CONNECTION (daap_source->priv->connection));
@@ -792,10 +792,10 @@ rb_daap_source_activate (RBSource *sourc
 		return;
 	}
 
-	g_object_get (G_OBJECT (daap_source), 
-		      "shell", &shell, 
-		      "entry-type", &type, 
-		      "name", &name, 
+	g_object_get (G_OBJECT (daap_source),
+		      "shell", &shell,
+		      "entry-type", &type,
+		      "name", &name,
 		      NULL);
 	g_object_get (G_OBJECT (shell), "db", &db, NULL);
 
@@ -849,7 +849,7 @@ rb_daap_source_cmd_disconnect (GtkAction
 {
 	RBSource *source;
 
-	g_object_get (G_OBJECT (shell), 
+	g_object_get (G_OBJECT (shell),
 		      "selected-source", &source,
 		      NULL);
 
@@ -857,7 +857,7 @@ rb_daap_source_cmd_disconnect (GtkAction
 		g_critical ("got non-Daap source for Daap action");
 		return;
 	}
-		
+
 	rb_daap_source_disconnect (RB_DAAP_SOURCE (source));
 }
 
@@ -955,7 +955,7 @@ rb_daap_source_find_for_uri (const char 
 	source = (RBDAAPSource *)g_hash_table_find (source_lookup, (GHRFunc)source_host_find, ip);
 
 	g_free (ip);
-	
+
 	return source;
 }
 
@@ -981,7 +981,7 @@ rb_daap_source_get_headers (RBDAAPSource
 		RBShell *shell;
 		RhythmDBEntry *entry;
 		gulong bitrate;
-		
+
 		g_object_get (G_OBJECT (source), "shell", &shell, NULL);
 		g_object_get (G_OBJECT (shell), "db", &db, NULL);
 
@@ -989,13 +989,13 @@ rb_daap_source_get_headers (RBDAAPSource
 
 		g_object_unref (G_OBJECT (shell));
 		g_object_unref (G_OBJECT (db));
-		
-		bitrate = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_BITRATE); 
+
+		bitrate = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_BITRATE);
 		/* bitrate is kilobits per second */
 		/* a kilobit is 128 bytes */
-		bytes = (time * bitrate) * 128; 
+		bytes = (time * bitrate) * 128;
 	}
-	
+
 	if (bytes_out != NULL) {
 		*bytes_out = bytes;
 	}
@@ -1003,14 +1003,13 @@ rb_daap_source_get_headers (RBDAAPSource
 	return rb_daap_connection_get_headers (source->priv->connection, uri, bytes);
 }
 
-
-static char * 
+static char *
 rb_daap_source_get_browser_key (RBSource *source)
 {
 	return g_strdup (CONF_STATE_SHOW_BROWSER);
 }
 
-static const char * 
+static const char *
 rb_daap_source_get_paned_key (RBBrowserSource *source)
 {
 	return CONF_STATE_PANED_POSITION;
@@ -1045,7 +1044,6 @@ rb_daap_source_get_status (RBSource *sou
 
 		return;
 	}
-	
+
 	RB_SOURCE_CLASS (rb_daap_source_parent_class)->impl_get_status (source, text, progress_text, progress);
 }
-
Index: sources/rb-ipod-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-ipod-source.c,v
retrieving revision 1.58
diff -p -u -r1.58 rb-ipod-source.c
--- sources/rb-ipod-source.c	11 Jul 2006 11:29:23 -0000	1.58
+++ sources/rb-ipod-source.c	13 Jul 2006 23:40:24 -0000
@@ -19,13 +19,12 @@
  *
  */
 
-#include <config.h>
+#include "config.h"
 
-
-#include <gtk/gtktreeview.h>
 #include <string.h>
-#include "rhythmdb.h"
-#include <libgnome/gnome-i18n.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #ifdef HAVE_HAL
 #include <libhal.h>
 #include <dbus/dbus.h>
@@ -34,6 +33,7 @@
 #include <libgnomevfs/gnome-vfs-volume.h>
 #include <libgnomevfs/gnome-vfs-volume-monitor.h>
 #include <gpod/itdb.h>
+
 #include "eel-gconf-extensions.h"
 #include "rb-ipod-source.h"
 #include "rb-debug.h"
Index: sources/rb-iradio-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-iradio-source.c,v
retrieving revision 1.123
diff -p -u -r1.123 rb-iradio-source.c
--- sources/rb-iradio-source.c	5 Jul 2006 14:25:18 -0000	1.123
+++ sources/rb-iradio-source.c	13 Jul 2006 23:40:24 -0000
@@ -1,5 +1,5 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * 
+ *
  *  arch-tag: Implementation of Internet Radio source object
  *
  *  Copyright (C) 2002,2003 Colin Walters <walters@debian.org>
@@ -137,7 +137,7 @@ struct RBIRadioSourcePrivate
 	char *selected_genre;
 
 	gboolean firstrun_done;
-	
+
 	RhythmDBEntryType entry_type;
 };
 
@@ -201,7 +201,6 @@ rb_iradio_source_class_init (RBIRadioSou
 							     RHYTHMDB_TYPE_ENTRY_TYPE,
 							     G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
-
 	g_type_class_add_private (klass, sizeof (RBIRadioSourcePrivate));
 }
 
@@ -216,7 +215,7 @@ rb_iradio_source_init (RBIRadioSource *s
 	source->priv->vbox = gtk_vbox_new (FALSE, 5);
 
 	gtk_container_add (GTK_CONTAINER (source), source->priv->vbox);
-	
+
 	gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &size, NULL);
 	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
 					   "stock_channel",
@@ -291,6 +290,7 @@ rb_iradio_source_constructor (GType type
 	source->priv->stations = rb_entry_view_new (source->priv->db, shell_player,
 						    CONF_STATE_IRADIO_SORTING,
 						    FALSE, FALSE);
+
 	rb_entry_view_append_column (source->priv->stations, RB_ENTRY_VIEW_COL_TITLE, TRUE);
 	rb_entry_view_append_column (source->priv->stations, RB_ENTRY_VIEW_COL_GENRE, FALSE);
 /* 	rb_entry_view_append_column (source->priv->stations, RB_ENTRY_VIEW_COL_QUALITY, FALSE); */
@@ -301,12 +301,12 @@ rb_iradio_source_constructor (GType type
 				 "sort-order-changed",
 				 G_CALLBACK (rb_iradio_source_songs_view_sort_order_changed_cb),
 				 source, 0);
-	
+
 	/* set up drag and drop for the song tree view.
 	 * we don't use RBEntryView's DnD support because it does too much.
 	 * we just want to be able to drop stations in to add them.
 	 */
-	g_signal_connect_object (G_OBJECT (source->priv->stations), 
+	g_signal_connect_object (G_OBJECT (source->priv->stations),
 				 "drag_data_received",
 				 G_CALLBACK (stations_view_drag_data_received_cb),
 				 source, 0);
@@ -321,7 +321,7 @@ rb_iradio_source_constructor (GType type
 				 source, 0);
 	g_signal_connect_object (G_OBJECT (source->priv->stations), "show_popup",
 				 G_CALLBACK (rb_iradio_source_songs_show_popup_cb), source, 0);
-	
+
 	/* set up genre entry view */
 	source->priv->genres = rb_property_view_new (source->priv->db,
 						     RHYTHMDB_PROP_GENRE,
@@ -339,7 +339,6 @@ rb_iradio_source_constructor (GType type
 		      GTK_POLICY_AUTOMATIC, NULL);
 	g_object_ref (G_OBJECT (source->priv->genres));
 
-
 	gtk_paned_pack2 (GTK_PANED (source->priv->paned),
 			 GTK_WIDGET (source->priv->stations), TRUE, FALSE);
 
@@ -410,7 +409,7 @@ rb_iradio_source_new (RBShell *shell)
 					  "shell", shell,
 					  NULL));
 
-	rb_shell_register_entry_type_for_source (shell, source, 
+	rb_shell_register_entry_type_for_source (shell, source,
 						 RHYTHMDB_ENTRY_TYPE_IRADIO_STATION);
 
 	return source;
@@ -420,7 +419,7 @@ static char *
 guess_uri_scheme (const char *uri)
 {
 	const char *scheme;
-	
+
 	/* if the URI has no scheme, it might be an absolute path, or it might be
 	 * host:port for HTTP.
 	 */
@@ -436,7 +435,6 @@ guess_uri_scheme (const char *uri)
 	return NULL;
 }
 
-
 void
 rb_iradio_source_add_station (RBIRadioSource *source,
 			      const char *uri, const char *title, const char *genre)
@@ -451,7 +449,7 @@ rb_iradio_source_add_station (RBIRadioSo
 
 	entry = rhythmdb_entry_lookup_by_location (source->priv->db, uri);
 	if (entry) {
-		rb_debug ("uri %s already in db", uri); 
+		rb_debug ("uri %s already in db", uri);
 		g_free (real_uri);
 		return;
 	}
@@ -470,18 +468,18 @@ rb_iradio_source_add_station (RBIRadioSo
 
 	rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_TITLE, &val);
 	g_value_reset (&val);
-		
+
 	if ((!genre) || (strcmp (genre, "") == 0))
 		genre = _("Unknown");
 	g_value_set_string (&val, genre);
 	rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_GENRE, &val);
 	g_value_unset (&val);
-	
+
 	g_value_init (&val, G_TYPE_DOUBLE);
 	g_value_set_double (&val, 0.0);
 	rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_RATING, &val);
 	g_value_unset (&val);
-	
+
 	rhythmdb_commit (source->priv->db);
 
 	g_free (real_uri);
@@ -552,7 +550,7 @@ rb_iradio_source_async_update_play_stati
 						  source->priv->async_update_entry);
 	rhythmdb_entry_unref (source->priv->db, source->priv->async_update_entry);
 	source->priv->async_update_entry = NULL;
-		
+
 	GDK_THREADS_LEAVE ();
 
 	return FALSE;
@@ -677,7 +675,7 @@ genre_selection_reset_cb (RBPropertyView
 {
 	if (iradio_source->priv->setting_new_query)
 		return;
-	
+
 	g_free (iradio_source->priv->selected_genre);
 	iradio_source->priv->selected_genre = NULL;
 
@@ -718,7 +716,7 @@ rb_iradio_source_do_query (RBIRadioSourc
 	/* construct and run the query for the search box.
 	 * this is used as the model for the genre view.
 	 */
-	
+
 	query = rhythmdb_query_parse (source->priv->db,
 				      RHYTHMDB_QUERY_PROP_EQUALS,
 				      RHYTHMDB_PROP_TYPE,
@@ -747,13 +745,13 @@ rb_iradio_source_do_query (RBIRadioSourc
 	genre_model = rb_property_view_get_model (source->priv->genres);
 	g_object_set (G_OBJECT (genre_model), "query-model", genre_query_model, NULL);
 
-	rhythmdb_do_full_query_parsed (source->priv->db, 
-				       RHYTHMDB_QUERY_RESULTS (genre_query_model), 
+	rhythmdb_do_full_query_parsed (source->priv->db,
+				       RHYTHMDB_QUERY_RESULTS (genre_query_model),
 				       query);
 
 	rhythmdb_query_free (query);
 	query = NULL;
-	
+
 	/* check the selected genre is still available, and if not, select 'all' */
 	if (source->priv->selected_genre != NULL) {
 		GList *sel = NULL;
@@ -767,14 +765,14 @@ rb_iradio_source_do_query (RBIRadioSourc
 		sel = g_list_prepend (sel, source->priv->selected_genre);
 		rb_property_view_set_selection (source->priv->genres, sel);
 		g_list_free (sel);
-	} 
+	}
 	g_object_unref (G_OBJECT (genre_model));
 
 	/* if a genre is selected, construct a new query for it, and create
 	 * a new model based on the search box query model.  otherwise, just
 	 * reuse the search box query model.
 	 */
-	
+
 	if (source->priv->selected_genre != NULL) {
 		rb_debug ("matching on genre \"%s\"", source->priv->selected_genre);
 		station_query_model = rhythmdb_query_model_new_empty (source->priv->db);
@@ -784,7 +782,7 @@ rb_iradio_source_do_query (RBIRadioSourc
 					      source->priv->selected_genre,
 					      RHYTHMDB_QUERY_END);
 
-		g_object_set (station_query_model, 
+		g_object_set (station_query_model,
 			      "query", query,
 			      "base-model", genre_query_model,
 			      NULL);
@@ -811,7 +809,6 @@ handle_playlist_entry_cb (TotemPlParser 
 	rb_iradio_source_add_station (source, uri, title, genre);
 }
 
-
 void
 rb_iradio_source_add_from_playlist (RBIRadioSource *source,
 				    const char     *uri)
@@ -866,7 +863,7 @@ static void
 stations_view_drag_data_received_cb (GtkWidget *widget,
 				     GdkDragContext *dc,
 				     gint x, gint y,
-				     GtkSelectionData *selection_data, 
+				     GtkSelectionData *selection_data,
 				     guint info, guint time,
 				     RBIRadioSource *source)
 {
@@ -909,7 +906,7 @@ stations_view_drag_data_received_cb (Gtk
 		}
 
 		g_free (uri);
-		
+
 		if (i != NULL)
 			i = i->next;
 	}
@@ -960,4 +957,3 @@ rb_iradio_source_cmd_new_station (GtkAct
 
 	gtk_widget_destroy (dialog);
 }
-
Index: sources/rb-library-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-library-source.c,v
retrieving revision 1.175
diff -p -u -r1.175 rb-library-source.c
--- sources/rb-library-source.c	30 Jun 2006 04:22:27 -0000	1.175
+++ sources/rb-library-source.c	13 Jul 2006 23:40:25 -0000
@@ -216,7 +216,7 @@ rb_library_source_dispose (GObject *obje
 		g_object_unref (source->priv->db);
 		source->priv->db = NULL;
 	}
-	
+
 	G_OBJECT_CLASS (rb_library_source_parent_class)->dispose (object);
 }
 
@@ -277,7 +277,7 @@ rb_library_source_constructor (GType typ
 				    (GConfClientNotifyFunc) rb_library_source_ui_pref_changed, source);
 
 	songs = rb_source_get_entry_view (RB_SOURCE (source));
-	
+
 	rb_entry_view_append_column (songs, RB_ENTRY_VIEW_COL_RATING, FALSE);
 	rb_entry_view_append_column (songs, RB_ENTRY_VIEW_COL_LAST_PLAYED, FALSE);
 	rb_entry_view_append_column (songs, RB_ENTRY_VIEW_COL_FIRST_SEEN, FALSE);
@@ -333,7 +333,7 @@ static void
 rb_library_source_location_button_clicked_cb (GtkButton *button, RBLibrarySource *source)
 {
 	GtkWidget *dialog;
-	
+
 	dialog = rb_file_chooser_new (_("Choose Library Location"), GTK_WINDOW (source->priv->shell_prefs),
 				      GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, FALSE);
 	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
@@ -344,9 +344,9 @@ rb_library_source_location_button_clicke
 		if (uri == NULL) {
 			uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (dialog));
 		}
-		
+
 		path = gnome_vfs_format_uri_for_display (uri);
-		
+
 		gtk_entry_set_text (GTK_ENTRY (source->priv->library_location_entry), path);
 		rb_library_source_library_location_cb (GTK_ENTRY (source->priv->library_location_entry),
 						       NULL, source);
@@ -370,10 +370,10 @@ impl_get_config_widget (RBSource *asourc
 
 	if (source->priv->config_widget)
 		return source->priv->config_widget;
-	
+
 	g_object_ref (G_OBJECT (prefs));
 	source->priv->shell_prefs = prefs;
-	
+
 	xml = rb_glade_xml_new ("library-prefs.glade", "library_vbox", source);
 	source->priv->config_widget =
 		glade_xml_get_widget (xml, "library_vbox");
@@ -452,7 +452,7 @@ impl_get_config_widget (RBSource *asourc
 #endif
 
 	g_object_unref (G_OBJECT (xml));
-	
+
 	rb_library_source_preferences_sync (source);
 
 	return source->priv->config_widget;
@@ -580,7 +580,7 @@ rb_library_source_library_location_cb (G
 	g_free (uri);
 	if (list)
 		g_slist_free (list);
-	
+
 	/* don't do the first-run druid if the user sets the library location */
 	if (list)
 		eel_gconf_set_boolean (CONF_FIRST_TIME, TRUE);
@@ -609,7 +609,6 @@ impl_get_paned_key (RBBrowserSource *sta
 	return CONF_STATE_PANED_POSITION;
 }
 
-
 static void
 rb_library_source_add_location_entry_changed_cb (GtkEntry *entry,
 						 GtkWidget *target)
@@ -774,7 +773,7 @@ sanitize_path (const char *str)
 	/* Skip leading periods, otherwise files disappear... */
 	while (*str == '.')
 		str++;
-  
+
 	s = g_strdup(str);
 	/* Replace path seperators with a hyphen */
 	g_strdelimit (s, "/", '-');
@@ -870,7 +869,7 @@ filepath_parse_pattern (const char *patt
 			default:
 				string = g_strdup_printf ("%%a%c", *p);
 			}
-			
+
 			break;
 
 		case 't':
@@ -911,7 +910,7 @@ filepath_parse_pattern (const char *patt
  			}
 
 			break;
-			
+
 		default:
 			string = g_strdup_printf ("%%%c", *p);
 		}
@@ -969,7 +968,7 @@ layout_example_label_update (RBLibrarySo
 			      profile ? gm_audio_profile_get_extension (profile) : "ogg",
 			      "</i></small>", NULL);
 	g_free (example);
-  
+
 	gtk_label_set_markup (GTK_LABEL (source->priv->layout_example_label), format);
 	g_free (format);
 }
@@ -1013,11 +1012,11 @@ rb_library_source_layout_filename_change
 {
 	char *value;
 	int i = 0;
-  
+
 	g_return_if_fail (strcmp (entry->key, CONF_LIBRARY_LAYOUT_FILENAME) == 0);
 
 	rb_debug ("layout filename changed");
-  
+
 	if (entry->value == NULL) {
 		value = g_strdup (library_layout_filenames[0].path);
 	} else if (entry->value->type == GCONF_VALUE_STRING) {
@@ -1090,7 +1089,7 @@ build_filename (RBLibrarySource *source,
 
 	if (extension == NULL) {
 		char *tmp;
-		
+
 		/* use the old extension. strip anything after a '?' for http/daap/etc */
 		extension = g_strdup (g_utf8_strrchr (rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION), -1, '.') + 1);
 
@@ -1098,7 +1097,7 @@ build_filename (RBLibrarySource *source,
 		if (tmp)
 			*tmp = '\0';
 	}
-	
+
 	realfile = filepath_parse_pattern (layout_filename, entry);
 	if (extension) {
 		filename = g_strdup_printf ("%s.%s", realfile, extension);
@@ -1132,7 +1131,6 @@ impl_can_paste (RBSource *asource)
 		     (eel_gconf_get_string (CONF_LIBRARY_LAYOUT_FILENAME) != NULL) &&
 		     (eel_gconf_get_string (CONF_LIBRARY_PREFERRED_FORMAT) != NULL));
 
-
 	g_slist_free (list);
 	return can_paste;
 #else
@@ -1181,7 +1179,7 @@ impl_paste (RBSource *asource, GList *en
 		if (entry_type == RHYTHMDB_ENTRY_TYPE_SONG)
 			/* copying to ourselves would be silly */
 			continue;
-		
+
 		/* see if the responsible source lets us copy */
 		if (!rb_source_can_copy (rb_shell_get_source_by_entry_type (shell, entry_type)))
 			continue;
@@ -1215,7 +1213,7 @@ rb_library_source_add_child_source (cons
 	uri = gnome_vfs_uri_new (path);
 	name = gnome_vfs_uri_extract_short_name (uri);
 	gnome_vfs_uri_unref (uri);
-	
+
 	source = rb_auto_playlist_source_new (shell, name, FALSE);
 	query = rhythmdb_query_parse (library_source->priv->db,
 				      RHYTHMDB_QUERY_PROP_EQUALS, RHYTHMDB_PROP_TYPE, RHYTHMDB_ENTRY_TYPE_SONG,
@@ -1227,7 +1225,7 @@ rb_library_source_add_child_source (cons
 	rhythmdb_query_free (query);
 
 	g_object_get (G_OBJECT (library_source), "icon", &icon, NULL);
-	g_object_set (G_OBJECT (source), "icon", g_object_ref (icon), NULL);
+	g_object_set (G_OBJECT (source), "icon", icon, NULL);
 
 	rb_shell_append_source (shell, source, RB_SOURCE (library_source));
 	library_source->priv->child_sources = g_list_prepend (library_source->priv->child_sources, source);
@@ -1253,4 +1251,3 @@ rb_library_source_sync_child_sources (RB
 	g_slist_foreach (list, (GFunc) g_free, NULL);
 	g_slist_free (list);
 }
-
Index: sources/rb-play-queue-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-play-queue-source.c,v
retrieving revision 1.14
diff -p -u -r1.14 rb-play-queue-source.c
--- sources/rb-play-queue-source.c	29 May 2006 01:16:07 -0000	1.14
+++ sources/rb-play-queue-source.c	13 Jul 2006 23:40:25 -0000
@@ -18,11 +18,12 @@
  *
  */
 
-#include <config.h>
+#include "config.h"
+
+#include <libxml/tree.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
 #include <libgnomevfs/gnome-vfs-uri.h>
-#include <libxml/tree.h>
 
 #include "rb-play-queue-source.h"
 #include "rb-playlist-xml.h"
@@ -41,9 +42,6 @@ static void rb_play_queue_source_track_i
 							    GtkTreeModel *tree_model,
 							    GtkTreeIter *iter,
 							    RBPlaylistSource *source);
-static void rb_play_queue_sync_playing_state (GObject *entry_view,
-					      GParamSpec *pspec,
-					      RBPlayQueueSource *source);
 static void rb_play_queue_source_row_inserted_cb (GtkTreeModel *model,
 						  GtkTreePath *path,
 						  GtkTreeIter *iter,
@@ -94,6 +92,17 @@ static GtkActionEntry rb_play_queue_sour
 };
 
 static void
+rb_play_queue_sync_playing_state (GObject *entry_view,
+				  GParamSpec *pspec,
+				  RBPlayQueueSource *source)
+{
+	int state;
+	RBPlayQueueSourcePrivate *priv = RB_PLAY_QUEUE_SOURCE_GET_PRIVATE (source);
+	g_object_get (entry_view, "playing-state", &state, NULL);
+	rb_entry_view_set_state (priv->sidebar, state);
+}
+
+static void
 rb_play_queue_source_class_init (RBPlayQueueSourceClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -136,7 +145,7 @@ rb_play_queue_source_constructor (GType 
 	GObjectClass *parent_class = G_OBJECT_CLASS (rb_play_queue_source_parent_class);
 	RBPlayQueueSource *source = RB_PLAY_QUEUE_SOURCE (
 			parent_class->constructor (type, n_construct_properties, construct_properties));
-	RBPlayQueueSourcePrivate *priv = RB_PLAY_QUEUE_SOURCE_GET_PRIVATE (source); 
+	RBPlayQueueSourcePrivate *priv = RB_PLAY_QUEUE_SOURCE_GET_PRIVATE (source);
 	GObject *shell_player;
 	RBShell *shell;
 	RhythmDB *db = rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source));
@@ -152,7 +161,7 @@ rb_play_queue_source_constructor (GType 
 							       rb_play_queue_source_actions,
 							       G_N_ELEMENTS (rb_play_queue_source_actions),
 							       source);
-		
+
 	priv->sidebar = rb_entry_view_new (db, shell_player, NULL, TRUE, TRUE);
 
 	g_object_set (G_OBJECT (priv->sidebar), "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
@@ -190,7 +199,7 @@ rb_play_queue_source_constructor (GType 
 				 source, 0);
 
 	rb_play_queue_source_update_count (source, GTK_TREE_MODEL (model), 0);
-	
+
 	return G_OBJECT (source);
 }
 
@@ -268,7 +277,7 @@ rb_play_queue_source_clear_queue (RBPlay
 }
 
 static void
-impl_show_entry_view_popup (RBPlaylistSource *source, 
+impl_show_entry_view_popup (RBPlaylistSource *source,
 			    RBEntryView *view,
 			    gboolean over_entry)
 {
@@ -307,18 +316,7 @@ rb_play_queue_source_track_info_cell_dat
 	g_free (markup);
 }
 
-static void 
-rb_play_queue_sync_playing_state (GObject *entry_view,
-				  GParamSpec *pspec,
-				  RBPlayQueueSource *source)
-{
-	int state;
-	RBPlayQueueSourcePrivate *priv = RB_PLAY_QUEUE_SOURCE_GET_PRIVATE (source);
-	g_object_get (entry_view, "playing-state", &state, NULL);
-	rb_entry_view_set_state (priv->sidebar, state);
-}
-
-static void 
+static void
 rb_play_queue_source_row_inserted_cb (GtkTreeModel *model,
 				      GtkTreePath *path,
 				      GtkTreeIter *iter,
@@ -327,7 +325,7 @@ rb_play_queue_source_row_inserted_cb (Gt
 	rb_play_queue_source_update_count (source, model, 0);
 }
 
-static void 
+static void
 rb_play_queue_source_row_deleted_cb (GtkTreeModel *model,
 				     GtkTreePath *path,
 				     RBPlayQueueSource *source)
@@ -335,7 +333,7 @@ rb_play_queue_source_row_deleted_cb (Gtk
 	rb_play_queue_source_update_count (source, model, -1);
 }
 
-static void 
+static void
 rb_play_queue_source_update_count (RBPlayQueueSource *source,
 				   GtkTreeModel *model,
 				   gint offset)
@@ -361,7 +359,7 @@ rb_play_queue_source_update_count (RBPla
 	g_object_set (G_OBJECT (action), "sensitive", (count > 0), NULL);
 }
 
-static void 
+static void
 impl_save_contents_to_xml (RBPlaylistSource *source,
 			   xmlNodePtr node)
 {
Index: sources/rb-playlist-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-playlist-source.c,v
retrieving revision 1.123
diff -p -u -r1.123 rb-playlist-source.c
--- sources/rb-playlist-source.c	10 Jul 2006 02:00:36 -0000	1.123
+++ sources/rb-playlist-source.c	13 Jul 2006 23:40:25 -0000
@@ -81,7 +81,6 @@ static void rb_playlist_source_drop_cb (
 				     guint time,
 				     gpointer user_data);
 
-
 static void rb_playlist_source_row_deleted (GtkTreeModel *model,
 					    GtkTreePath *path,
 					    RBPlaylistSource *playlist);
@@ -129,7 +128,6 @@ static const GtkTargetEntry target_uri [
 
 G_DEFINE_ABSTRACT_TYPE (RBPlaylistSource, rb_playlist_source, RB_TYPE_SOURCE);
 
-
 static void
 rb_playlist_source_class_init (RBPlaylistSourceClass *klass)
 {
@@ -227,9 +225,8 @@ rb_playlist_source_constructor (GType ty
 				 G_CALLBACK (rb_playlist_source_entry_added_cb),
 				 source, 0);
 
-	source->priv->songs = rb_entry_view_new (source->priv->db, shell_player, 
+	source->priv->songs = rb_entry_view_new (source->priv->db, shell_player,
 					 	 NULL, TRUE, TRUE);
-
 	rb_playlist_source_set_query_model (source, rhythmdb_query_model_new_empty (source->priv->db));
 
 	{
@@ -238,7 +235,7 @@ rb_playlist_source_constructor (GType ty
 
 		GtkTreeViewColumn *column = gtk_tree_view_column_new ();
 		GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
-		
+
 		g_object_set(renderer,
 			     "style", PANGO_STYLE_OBLIQUE,
 			     "weight", PANGO_WEIGHT_LIGHT,
@@ -262,7 +259,6 @@ rb_playlist_source_constructor (GType ty
 						    "PlaylistTrack", NULL, 0, 0);
 	}
 
-
 	rb_entry_view_append_column (source->priv->songs, RB_ENTRY_VIEW_COL_TRACK_NUMBER, FALSE);
 	rb_entry_view_append_column (source->priv->songs, RB_ENTRY_VIEW_COL_TITLE, TRUE);
 	rb_entry_view_append_column (source->priv->songs, RB_ENTRY_VIEW_COL_GENRE, FALSE);
@@ -280,7 +276,7 @@ rb_playlist_source_constructor (GType ty
 	rb_playlist_source_setup_entry_view (source, source->priv->songs);
 
 	gtk_container_add (GTK_CONTAINER (source), GTK_WIDGET (source->priv->songs));
-		
+
 	gtk_widget_show_all (GTK_WIDGET (source));
 
 	return G_OBJECT (source);
@@ -386,7 +382,6 @@ rb_playlist_source_songs_show_popup_cb (
 		klass->impl_show_entry_view_popup (source, view, over_entry);
 }
 
-
 static char *
 impl_get_browser_key (RBSource *source)
 {
@@ -484,7 +479,7 @@ playlist_iter_func (GtkTreeModel *model,
 #endif /* TOTEM_PL_PARSER_CHECK_VERSION */
 
 void
-rb_playlist_source_save_playlist (RBPlaylistSource *source, 
+rb_playlist_source_save_playlist (RBPlaylistSource *source,
 				  const char *uri,
 				  gboolean m3u_format)
 {
@@ -498,7 +493,7 @@ rb_playlist_source_save_playlist (RBPlay
 	g_object_get (G_OBJECT (source), "name", &name, NULL);
 
 	totem_pl_parser_write_with_title (playlist, GTK_TREE_MODEL (source->priv->model),
-					  playlist_iter_func, uri, name, 
+					  playlist_iter_func, uri, name,
 					  m3u_format ? TOTEM_PL_PARSER_M3U : TOTEM_PL_PARSER_PLS,
 					  NULL, &error);
 	g_free (name);
@@ -640,7 +635,6 @@ rb_playlist_source_save_to_xml (RBPlayli
 	source->priv->dirty = FALSE;
 }
 
-
 static void
 rb_playlist_source_row_deleted (GtkTreeModel *model,
 				GtkTreePath *path,
@@ -658,7 +652,7 @@ rb_playlist_source_row_deleted (GtkTreeM
 }
 
 static void
-rb_playlist_source_entry_added_cb (RhythmDB *db, 
+rb_playlist_source_entry_added_cb (RhythmDB *db,
 				   RhythmDBEntry *entry,
 				   RBPlaylistSource *source)
 {
@@ -726,7 +720,7 @@ rb_playlist_source_set_query_model (RBPl
 	}
 
 	rb_entry_view_set_model (source->priv->songs, RHYTHMDB_QUERY_MODEL (source->priv->model));
-	
+
 	g_object_set (G_OBJECT (source), "query-model", source->priv->model, NULL);
 }
 
@@ -767,5 +761,3 @@ rb_playlist_source_add_to_map (RBPlaylis
 			     g_strdup (location), GINT_TO_POINTER (1));
 	return TRUE;
 }
-
-
Index: sources/rb-podcast-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-podcast-source.c,v
retrieving revision 1.70
diff -p -u -r1.70 rb-podcast-source.c
--- sources/rb-podcast-source.c	19 Jun 2006 04:40:04 -0000	1.70
+++ sources/rb-podcast-source.c	13 Jul 2006 23:40:25 -0000
@@ -1,5 +1,5 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * 
+ *
  *  arch-tag: Implementation of Internet Podcast source object
  *
  *  Copyright (C) 2005 Renato Araujo Oliveira Filho <renato.filho@indt.org.br>
@@ -66,7 +66,7 @@ static void rb_podcast_source_class_init
 
 static void rb_podcast_source_init 			(RBPodcastSource *source);
 
-static GObject *rb_podcast_source_constructor 		(GType type, 
+static GObject *rb_podcast_source_constructor 		(GType type,
 							 guint n_construct_properties,
 					      		 GObjectConstructParam *construct_properties);
 
@@ -94,7 +94,7 @@ static void rb_podcast_source_feeds_show
 static void paned_size_allocate_cb 			(GtkWidget *widget,
 				    			 GtkAllocation *allocation,
 		                    			 RBPodcastSource *source);
-				    
+
 static void rb_podcast_source_state_pref_changed 	(GConfClient *client,
 						 	 guint cnxn_id,
 						 	 GConfEntry *entry,
@@ -105,29 +105,26 @@ static void rb_podcast_source_show_brows
 
 static void rb_podcast_source_state_prefs_sync 		(RBPodcastSource *source);
 
-
-static void feed_select_change_cb 			(RBPropertyView *propview, 
+static void feed_select_change_cb 			(RBPropertyView *propview,
 							 GList *feeds,
 			 			       	 RBPodcastSource *podcast_source);
-							 
 
-static void rb_podcast_source_posts_view_sort_order_changed_cb (RBEntryView *view, 
+static void rb_podcast_source_posts_view_sort_order_changed_cb (RBEntryView *view,
 								RBPodcastSource *source);
 
-static void rb_podcast_source_download_status_changed_cb(RBPodcastManager *download, 
-							 RhythmDBEntry *entry, 
-							 gulong status, 
+static void rb_podcast_source_download_status_changed_cb(RBPodcastManager *download,
+							 RhythmDBEntry *entry,
+							 gulong status,
 							 RBPodcastSource *source);
 
-static void rb_podcast_source_btn_file_change_cb 	(GtkFileChooserButton *widget, 
+static void rb_podcast_source_btn_file_change_cb 	(GtkFileChooserButton *widget,
 							 const char *key);
 
-
 static void posts_view_drag_data_received_cb 		(GtkWidget *widget,
 					      		 GdkDragContext *dc,
   				              		 gint x,
 							 gint y,
-				              		 GtkSelectionData *selection_data, 
+				              		 GtkSelectionData *selection_data,
 				              		 guint info,
 							 guint time,
 				              		 RBPodcastSource *source);
@@ -186,15 +183,15 @@ static void rb_podcast_source_feed_title
 							 GtkTreeIter *iter,
 						     	 RBPodcastSource *source);
 
-static void rb_podcast_source_start_download_cb 	(RBPodcastManager *pd, 
+static void rb_podcast_source_start_download_cb 	(RBPodcastManager *pd,
 							 RhythmDBEntry *entry,
 							 RBPodcastSource *source);
-	
-static void rb_podcast_source_finish_download_cb 	(RBPodcastManager *pd, 
+
+static void rb_podcast_source_finish_download_cb 	(RBPodcastManager *pd,
 							 RhythmDBEntry *entry,
 							 RBPodcastSource *source);
 
-static void rb_podcast_source_feed_updates_avaliable_cb (RBPodcastManager *pd, 
+static void rb_podcast_source_feed_updates_avaliable_cb (RBPodcastManager *pd,
 							 RhythmDBEntry *entry,
 							 RBPodcastSource *source);
 
@@ -225,25 +222,21 @@ static void rb_podcast_source_do_query		
 							 RBPodcastQueryType type);
 static GtkWidget *impl_get_config_widget 		(RBSource *source,
 							 RBShellPreferences *prefs);
-static gboolean impl_receive_drag 			(RBSource *source, 
+static gboolean impl_receive_drag 			(RBSource *source,
 							 GtkSelectionData *data);
 static gboolean impl_can_add_to_queue			(RBSource *source);
 static void impl_add_to_queue				(RBSource *source, RBSource *queue);
 static GList *impl_get_ui_actions			(RBSource *source);
 static GList *impl_get_search_actions			(RBSource *source);
-static void impl_get_status				(RBSource *source, 
-							 char **text, 
-							 char **progress_text, 
+static void impl_get_status				(RBSource *source,
+							 char **text,
+							 char **progress_text,
 							 float *progress);
 
-
-
-
 #define CMD_PATH_SHOW_BROWSER "/commands/ShowBrowser"
 #define CMD_PATH_CURRENT_STATION "/commands/CurrentStation"
 #define CMD_PATH_SONG_INFO    "/commands/SongInfo"
 
-
 #define CONF_UI_PODCAST_DIR 			CONF_PREFIX "/ui/podcast"
 #define CONF_UI_PODCAST_COLUMNS_SETUP 		CONF_PREFIX "/ui/podcast/columns_setup"
 #define CONF_STATE_PODCAST_PREFIX		CONF_PREFIX "/state/podcast"
@@ -258,7 +251,7 @@ static void impl_get_status				(RBSource
 struct RBPodcastSourcePrivate
 {
 	gboolean disposed;
-	
+
 	RhythmDB *db;
 
 	guint toolbar_ui_merge_id;
@@ -266,7 +259,7 @@ struct RBPodcastSourcePrivate
 	GtkWidget *vbox;
 	GtkWidget *config_widget;
 	GtkWidget *paned;
-	
+
 	RBPropertyView *feeds;
 	RBEntryView *posts;
 	GtkActionGroup *action_group;
@@ -277,9 +270,9 @@ struct RBPodcastSourcePrivate
 	RhythmDBPropType search_prop;
 
 	gboolean initialized;
-	
+
 	RhythmDBEntryType entry_type;
-	RBPodcastManager *podcast_mg;	
+	RBPodcastManager *podcast_mg;
 };
 
 #define RB_PODCAST_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_PODCAST_SOURCE, RBPodcastSourcePrivate))
@@ -323,7 +316,6 @@ static const GtkTargetEntry posts_view_d
 	{  "application/rss+xml", 0, 2 },
 };
 
-
 enum
 {
 	PROP_0,
@@ -333,7 +325,6 @@ enum
 
 G_DEFINE_TYPE (RBPodcastSource, rb_podcast_source, RB_TYPE_SOURCE)
 
-
 static void
 rb_podcast_source_class_init (RBPodcastSourceClass *klass)
 {
@@ -369,7 +360,7 @@ rb_podcast_source_class_init (RBPodcastS
 	source_class->impl_show_popup = impl_show_popup;
 	source_class->impl_song_properties = impl_song_properties;
 	source_class->impl_get_status = impl_get_status;
-	
+
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
 					 g_param_spec_boxed ("entry-type",
@@ -404,7 +395,7 @@ rb_podcast_source_init (RBPodcastSource 
 	source->priv->vbox = gtk_vbox_new (FALSE, 5);
 
 	gtk_container_add (GTK_CONTAINER (source), source->priv->vbox);
-	
+
 	pixbuf = gtk_widget_render_icon (dummy,
 					 RB_STOCK_PODCAST,
 					 GTK_ICON_SIZE_LARGE_TOOLBAR,
@@ -428,8 +419,10 @@ rb_podcast_source_dispose (GObject *obje
 
 	if (source->priv->disposed)
 		return;
-	
+
 	source->priv->disposed = TRUE;
+
+	G_OBJECT_CLASS (rb_podcast_source_parent_class)->dispose (object);
 }
 
 static void
@@ -446,12 +439,13 @@ rb_podcast_source_finalize (GObject *obj
 
 	rb_debug ("finalizing podcast source");
 
+	g_object_unref (source->priv->feeds);
 	g_object_unref (source->priv->podcast_mg);
 
 	if (source->priv->selected_feeds) {
 		g_list_foreach (source->priv->selected_feeds, (GFunc) g_free, NULL);
 	        g_list_free (source->priv->selected_feeds);
-	}	
+	}
 
        if (source->priv->cached_all_query)
 		g_object_unref (G_OBJECT (source->priv->cached_all_query));
@@ -470,7 +464,7 @@ search_action_to_prop (GtkAction *action
 	if (name == NULL) {
 		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "PodcastSearchAll") == 0) {
-		prop = RHYTHMDB_PROP_SEARCH_MATCH;		
+		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "PodcastSearchFeeds") == 0) {
 		prop = RHYTHMDB_PROP_ALBUM_FOLDED;
 	} else if (strcmp (name, "PodcastSearchEpisodes") == 0) {
@@ -537,29 +531,28 @@ rb_podcast_source_constructor (GType typ
 					    shell);
 
 	source->priv->paned = gtk_vpaned_new ();
-	
+
 	gtk_idle_add ((GtkFunction) rb_podcast_source_load_finish_cb, source);
 
 	source->priv->podcast_mg = rb_podcast_manager_new (source->priv->db);
 
 	g_object_unref (shell);
-	
 
 	/* set up posts view */
-	source->priv->posts = rb_entry_view_new (source->priv->db, 
+	source->priv->posts = rb_entry_view_new (source->priv->db,
 						 rb_shell_get_player (shell),
 						 CONF_STATE_PODCAST_SORTING_POSTS,
 						 TRUE, FALSE);
+
 	g_signal_connect_object (G_OBJECT (source->priv->posts),
 				 "entry-activated",
 				 G_CALLBACK (rb_podcast_source_entry_activated_cb),
 				 source, 0);
 
-
 	/* Podcast date column */
 	column = gtk_tree_view_column_new ();
 	renderer = gtk_cell_renderer_text_new();
-	
+
 	gtk_tree_view_column_pack_start (column, renderer, TRUE);
 
 	gtk_tree_view_column_set_clickable (column, TRUE);
@@ -572,48 +565,45 @@ rb_podcast_source_constructor (GType typ
 		sample_strings[2] = NULL;
 		rb_entry_view_set_fixed_column_width (source->priv->posts, column, renderer, sample_strings);
 	}
-	
+
 	gtk_tree_view_column_set_cell_data_func (column, renderer,
 						 (GtkTreeCellDataFunc) rb_podcast_source_post_date_cell_data_func,
 						 source, NULL);
-	
-	rb_entry_view_append_column_custom (source->priv->posts, column, 
-					    _("_Date"), "Date", 
+
+	rb_entry_view_append_column_custom (source->priv->posts, column,
+					    _("_Date"), "Date",
 					    (GCompareDataFunc) rb_podcast_source_post_date_cell_sort_func, 0);
-						    
 
 	rb_entry_view_append_column (source->priv->posts, RB_ENTRY_VIEW_COL_TITLE, TRUE);
-	
+
 	/* COLUMN FEED */
 	column = gtk_tree_view_column_new ();
 	renderer = gtk_cell_renderer_text_new();
-	
+
 	gtk_tree_view_column_pack_start (column, renderer, TRUE);
 
 	gtk_tree_view_column_set_clickable (column, TRUE);
 	gtk_tree_view_column_set_resizable (column, TRUE);
 	gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
 	gtk_tree_view_column_set_expand (column, TRUE);
-	
+
 	gtk_tree_view_column_set_cell_data_func (column, renderer,
 						 (GtkTreeCellDataFunc) rb_podcast_source_post_feed_cell_data_func,
 						 source, NULL);
-	
-	rb_entry_view_append_column_custom (source->priv->posts, column, 
-					    _("_Feed"), "Feed", 
+
+	rb_entry_view_append_column_custom (source->priv->posts, column,
+					    _("_Feed"), "Feed",
 					    (GCompareDataFunc) rb_podcast_source_post_feed_cell_sort_func, 0);
 
-	
 	rb_entry_view_append_column (source->priv->posts, RB_ENTRY_VIEW_COL_DURATION, FALSE);
 	rb_entry_view_append_column (source->priv->posts, RB_ENTRY_VIEW_COL_RATING, FALSE);
 	rb_entry_view_append_column (source->priv->posts, RB_ENTRY_VIEW_COL_PLAY_COUNT, FALSE);
 	rb_entry_view_append_column (source->priv->posts, RB_ENTRY_VIEW_COL_LAST_PLAYED, FALSE);
 
-
 	/* Status column */
 	column = gtk_tree_view_column_new ();
 	renderer = gtk_cell_renderer_progress_new();
-	
+
 	gtk_tree_view_column_pack_start (column, renderer, TRUE);
 
 	gtk_tree_view_column_set_clickable (column, TRUE);
@@ -627,19 +617,19 @@ rb_podcast_source_constructor (GType typ
 		status_strings[3] = _("Failed");
 		status_strings[4] = "100 %";
 		status_strings[5] = NULL;
-		
-		rb_entry_view_set_fixed_column_width (source->priv->posts, 
-						      column, 
-						      renderer, 
+
+		rb_entry_view_set_fixed_column_width (source->priv->posts,
+						      column,
+						      renderer,
 						      status_strings);
 	}
-	
+
 	gtk_tree_view_column_set_cell_data_func (column, renderer,
 						 (GtkTreeCellDataFunc) rb_podcast_source_post_status_cell_data_func,
 						 source, NULL);
-	
-	rb_entry_view_append_column_custom (source->priv->posts, column, 
-					    _("Status"), "Status", 
+
+	rb_entry_view_append_column_custom (source->priv->posts, column,
+					    _("Status"), "Status",
 					    (GCompareDataFunc) rb_podcast_source_post_status_cell_sort_func, 0);
 
 	g_signal_connect_object (G_OBJECT (source->priv->posts),
@@ -647,69 +637,66 @@ rb_podcast_source_constructor (GType typ
 				 G_CALLBACK (rb_podcast_source_posts_view_sort_order_changed_cb),
 				 source, 0);
 
-
-
 	g_signal_connect (G_OBJECT (source->priv->podcast_mg),
 			  "status_changed",
 			  G_CALLBACK (rb_podcast_source_download_status_changed_cb),
 			  source);
-	
-	g_signal_connect_object (G_OBJECT (source->priv->podcast_mg), 
+
+	g_signal_connect_object (G_OBJECT (source->priv->podcast_mg),
 			  	 "process_error",
 			 	 G_CALLBACK (rb_podcast_source_download_process_error_cb),
 			  	 source, 0);
-	
+
 	g_signal_connect_object (G_OBJECT (source->priv->posts),
 				 "size_allocate",
 				 G_CALLBACK (paned_size_allocate_cb),
 				 source, 0);
-	
+
 	g_signal_connect_object (G_OBJECT (source->priv->posts), "show_popup",
 				 G_CALLBACK (rb_podcast_source_songs_show_popup_cb), source, 0);
-	
 
 	/* configure feed view */
-	source->priv->feeds = rb_property_view_new (source->priv->db,  RHYTHMDB_PROP_LOCATION, _("Feed"));	
+	source->priv->feeds = rb_property_view_new (source->priv->db,  RHYTHMDB_PROP_LOCATION, _("Feed"));
 	rb_property_view_set_selection_mode (RB_PROPERTY_VIEW (source->priv->feeds), GTK_SELECTION_MULTIPLE);
-	
+
 	query_model = rhythmdb_query_model_new_empty (source->priv->db);
 	feed_model = rb_property_view_get_model (RB_PROPERTY_VIEW (source->priv->feeds));
 	g_object_set (G_OBJECT (feed_model), "query-model", query_model, NULL);
 	g_object_unref (G_OBJECT (feed_model));
-	
+
 	if (source->priv->entry_type == RHYTHMDB_ENTRY_TYPE_INVALID ||
 	    source->priv->entry_type == NULL)
 		source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_PODCAST_POST;
-	
+
 	query = rhythmdb_query_parse (source->priv->db,
 				      RHYTHMDB_QUERY_PROP_EQUALS,
 				      RHYTHMDB_PROP_TYPE,
 				      RHYTHMDB_ENTRY_TYPE_PODCAST_FEED,
 				      RHYTHMDB_QUERY_END);
-	rhythmdb_do_full_query_parsed (source->priv->db, 
-				       RHYTHMDB_QUERY_RESULTS (query_model), 
+	rhythmdb_do_full_query_parsed (source->priv->db,
+				       RHYTHMDB_QUERY_RESULTS (query_model),
 				       query);
 
 	rhythmdb_query_free (query);
-	
+
 	/* column title */
 	column = gtk_tree_view_column_new ();
 	renderer = gtk_cell_renderer_text_new ();
 
 	gtk_tree_view_column_pack_start (column, renderer, TRUE);
 
-	gtk_tree_view_column_set_cell_data_func (column, 
+	gtk_tree_view_column_set_cell_data_func (column,
 						 renderer,
 						 (GtkTreeCellDataFunc) rb_podcast_source_feed_title_cell_data_func,
 						 source, NULL);
-	
+
 	gtk_tree_view_column_set_title (column, _("Feed"));
 	gtk_tree_view_column_set_reorderable (column, FALSE);
 	gtk_tree_view_column_set_visible (column, TRUE);
 	rb_property_view_append_column_custom (source->priv->feeds, column);
 
 	g_signal_connect_object (G_OBJECT (source->priv->feeds), "show_popup",
-				 G_CALLBACK (rb_podcast_source_feeds_show_popup_cb), 
+				 G_CALLBACK (rb_podcast_source_feeds_show_popup_cb),
 				 source, 0);
 
 	g_signal_connect_object (G_OBJECT (source->priv->feeds),
@@ -725,7 +712,7 @@ rb_podcast_source_constructor (GType typ
 	g_object_ref (G_OBJECT (source->priv->feeds));
 
 	/* set up drag and drop */
-	g_signal_connect_object (G_OBJECT (source->priv->feeds), 
+	g_signal_connect_object (G_OBJECT (source->priv->feeds),
 				 "drag_data_received",
 				 G_CALLBACK (posts_view_drag_data_received_cb),
 				 source, 0);
@@ -734,8 +721,8 @@ rb_podcast_source_constructor (GType typ
 			   GTK_DEST_DEFAULT_ALL,
 			   posts_view_drag_types, 2,
 			   GDK_ACTION_COPY | GDK_ACTION_MOVE);
-	
-	g_signal_connect_object (G_OBJECT (source->priv->posts), 
+
+	g_signal_connect_object (G_OBJECT (source->priv->posts),
 				 "drag_data_received",
 				 G_CALLBACK (posts_view_drag_data_received_cb),
 				 source, 0);
@@ -746,24 +733,21 @@ rb_podcast_source_constructor (GType typ
 			   GDK_ACTION_COPY | GDK_ACTION_MOVE);
 
 	/* set up propiets page */
-	
+
 	gtk_paned_pack2 (GTK_PANED (source->priv->paned),
 			 GTK_WIDGET (source->priv->posts), TRUE, FALSE);
 
 	gtk_box_pack_start_defaults (GTK_BOX (source->priv->vbox), source->priv->paned);
 
-
 	rb_podcast_source_state_prefs_sync (source);
-	
-	
+
 	eel_gconf_notification_add (CONF_STATE_PODCAST_PREFIX,
 				    (GConfClientNotifyFunc) rb_podcast_source_state_pref_changed,
 				    source);
-	
+
 	gtk_widget_show_all (GTK_WIDGET (source));
 
 	rb_podcast_source_do_query (source, RB_PODCAST_QUERY_TYPE_ALL);
-	
 
 	return G_OBJECT (source);
 }
@@ -782,7 +766,7 @@ rb_podcast_source_set_property (GObject 
 		break;
 	case PROP_PODCAST_MANAGER:
 		source->priv->podcast_mg = g_value_get_object (value);
-		break;		
+		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -803,7 +787,7 @@ rb_podcast_source_get_property (GObject 
 		break;
 	case PROP_PODCAST_MANAGER:
 		g_value_set_object (value, source->priv->podcast_mg);
-	        break;	
+	        break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -819,11 +803,11 @@ rb_podcast_source_new (RBShell *shell)
 					  "shell", shell,
 					  NULL));
 
-	rb_shell_register_entry_type_for_source (shell, source, 
+	rb_shell_register_entry_type_for_source (shell, source,
 						 RHYTHMDB_ENTRY_TYPE_PODCAST_FEED);
-	rb_shell_register_entry_type_for_source (shell, source, 
+	rb_shell_register_entry_type_for_source (shell, source,
 						 RHYTHMDB_ENTRY_TYPE_PODCAST_POST);
-	
+
 	return source;
 }
 
@@ -887,11 +871,11 @@ impl_delete (RBSource *asource)
 	RBShell *shell;
 
 	rb_debug ("Delete episode action");
-	
+
 	g_object_get (G_OBJECT (source), "shell", &shell, NULL);
 	g_object_get (G_OBJECT (shell), "window", &window, NULL);
 	g_object_unref (G_OBJECT (shell));
-	
+
 	dialog = gtk_message_dialog_new (window,
 			                 GTK_DIALOG_DESTROY_WITH_PARENT,
 					 GTK_MESSAGE_WARNING,
@@ -906,16 +890,16 @@ impl_delete (RBSource *asource)
 
 	gtk_window_set_title (GTK_WINDOW (dialog), "");
 
-	gtk_dialog_add_buttons (GTK_DIALOG (dialog), 
-	                        _("Delete _Episode Only"), 
+	gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+	                        _("Delete _Episode Only"),
 	                        GTK_RESPONSE_NO,
-	                        GTK_STOCK_CANCEL, 
-	                        GTK_RESPONSE_CANCEL, 
+	                        GTK_STOCK_CANCEL,
+	                        GTK_RESPONSE_CANCEL,
 	                        NULL);
 	button = gtk_dialog_add_button (GTK_DIALOG (dialog),
 	                                _("_Delete Episode And File"),
 			                GTK_RESPONSE_YES);
-	
+
 	gtk_window_set_focus (GTK_WINDOW (dialog), button);
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 
@@ -925,9 +909,9 @@ impl_delete (RBSource *asource)
 	if (ret == GTK_RESPONSE_CANCEL || ret == GTK_RESPONSE_DELETE_EVENT)
 		return;
 
-	rb_podcast_manager_set_remove_files (source->priv->podcast_mg, 
+	rb_podcast_manager_set_remove_files (source->priv->podcast_mg,
 					     (ret == GTK_RESPONSE_YES));
-	
+
 	for (l = rb_entry_view_get_selected_entries (source->priv->posts); l != NULL;
 	     l = g_list_next (l)) {
 		rhythmdb_entry_delete (source->priv->db, l->data);
@@ -996,7 +980,6 @@ rb_podcast_source_download_status_change
 
 }
 
-
 static void
 rb_podcast_source_songs_show_popup_cb (RBEntryView *view,
 				       gboolean over_entry,
@@ -1024,7 +1007,7 @@ rb_podcast_source_songs_show_popup_cb (R
 			else if (status == RHYTHMDB_PODCAST_STATUS_PAUSED ||
 				 status == RHYTHMDB_PODCAST_STATUS_ERROR)
 				 downloadable = TRUE;
-					
+
 			lst = lst->next;
 		}
 
@@ -1038,7 +1021,6 @@ rb_podcast_source_songs_show_popup_cb (R
 	}
 }
 
-
 static void
 rb_podcast_source_feeds_show_popup_cb (RBPropertyView *view,
 				       RBPodcastSource *source)
@@ -1056,7 +1038,7 @@ rb_podcast_source_feeds_show_popup_cb (R
 		act_update = gtk_action_group_get_action (source->priv->action_group, "PodcastFeedUpdate");
 		act_properties = gtk_action_group_get_action (source->priv->action_group, "PodcastFeedProperties");
 		act_delete = gtk_action_group_get_action (source->priv->action_group, "PodcastFeedDelete");
-		
+
 		if (lst) {
 			gtk_action_set_visible (act_properties, TRUE);
 			gtk_action_set_visible (act_delete, TRUE);
@@ -1070,8 +1052,6 @@ rb_podcast_source_feeds_show_popup_cb (R
 	}
 }
 
-
-
 static void
 feed_select_change_cb (RBPropertyView *propview,
 		       GList *feeds,
@@ -1079,25 +1059,23 @@ feed_select_change_cb (RBPropertyView *p
 {
 	if (rb_string_list_equal (feeds, source->priv->selected_feeds))
 		return;
-	
+
 	if (source->priv->selected_feeds) {
 		g_list_foreach (source->priv->selected_feeds, (GFunc) g_free, NULL);
 	        g_list_free (source->priv->selected_feeds);
-	}	
+	}
 
 	source->priv->selected_feeds = rb_string_list_copy (feeds);
-	
+
 	rb_podcast_source_do_query (source, RB_PODCAST_QUERY_TYPE_ALBUM);
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
 
-
-
 static void
 rb_podcast_source_show_browser (RBPodcastSource *source,
 			       gboolean show)
 {
-	
+
 	GtkWidget *feedswidget = GTK_WIDGET (source->priv->feeds);
 
 	if (show == TRUE) {
@@ -1108,12 +1086,11 @@ rb_podcast_source_show_browser (RBPodcas
 		gtk_widget_hide (feedswidget);
 		if (g_list_find (children, feedswidget))
 		    gtk_container_remove (GTK_CONTAINER (source->priv->paned), feedswidget);
-		
+
 		g_list_free (children);
 	}
 }
 
-
 static GPtrArray *
 construct_query_from_selection (RBPodcastSource *source)
 {
@@ -1158,8 +1135,8 @@ construct_query_from_selection (RBPodcas
 	}
 
 	if (source->priv->selected_feeds) {
-		GPtrArray *subquery = g_ptr_array_new ();	
-		GList *l;	       
+		GPtrArray *subquery = g_ptr_array_new ();
+		GList *l;
 
 		for (l = source->priv->selected_feeds; l != NULL; l = g_list_next (l)) {
 			const char *location;
@@ -1177,7 +1154,7 @@ construct_query_from_selection (RBPodcas
 				rhythmdb_query_append (source->priv->db, subquery,
 						       RHYTHMDB_QUERY_DISJUNCTION);
 		}
-		
+
 		rhythmdb_query_append (source->priv->db, query,
 				       RHYTHMDB_QUERY_SUBQUERY, subquery,
 				       RHYTHMDB_QUERY_END);
@@ -1194,7 +1171,7 @@ rb_podcast_source_do_query (RBPodcastSou
 	gboolean is_all_query;
 
 	rb_debug ("select entry filter");
-	
+
 	is_all_query  = ((qtype == RB_PODCAST_QUERY_TYPE_ALL) ||
 			 ((source->priv->selected_feeds == NULL) &&
 			 (source->priv->search_text == NULL)));
@@ -1219,9 +1196,9 @@ rb_podcast_source_do_query (RBPodcastSou
 	rhythmdb_do_full_query_async_parsed (source->priv->db,
 					     RHYTHMDB_QUERY_RESULTS (query_model),
 					     query);
-		
+
 	rhythmdb_query_free (query);
-	
+
 	if (!is_all_query)
 		g_object_unref (G_OBJECT (query_model));
 }
@@ -1233,7 +1210,6 @@ impl_show_popup (RBSource *source)
 	return TRUE;
 }
 
-
 static GtkWidget *
 impl_get_config_widget (RBSource *asource, RBShellPreferences *prefs)
 {
@@ -1246,13 +1222,12 @@ impl_get_config_widget (RBSource *asourc
 	if (source->priv->config_widget)
 		return source->priv->config_widget;
 
-
 	xml = rb_glade_xml_new ("podcast-prefs.glade", "podcast_vbox", source);
 	source->priv->config_widget = glade_xml_get_widget (xml, "podcast_vbox");
-	
+
 	btn_file = glade_xml_get_widget (xml, "location_chooser");
 	download_dir = rb_podcast_manager_get_podcast_dir (source->priv->podcast_mg);
-	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (btn_file), 
+	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (btn_file),
 						 download_dir);
 	g_free (download_dir);
 
@@ -1268,26 +1243,25 @@ impl_get_config_widget (RBSource *asourc
 			  "changed",
 			  G_CALLBACK (rb_podcast_source_cb_interval_changed_cb),
 			  source);
-				
+
 	return source->priv->config_widget;
 }
 
-static void 
+static void
 rb_podcast_source_btn_file_change_cb (GtkFileChooserButton *widget, const char *key)
 {
 	char *uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (widget));
-	
+
 	eel_gconf_set_string (key, gnome_vfs_get_local_path_from_uri (uri));
 	g_free (uri);
 }
 
-
 static void
 posts_view_drag_data_received_cb (GtkWidget *widget,
 				  GdkDragContext *dc,
 				  gint x,
 				  gint y,
-				  GtkSelectionData *selection_data, 
+				  GtkSelectionData *selection_data,
 				  guint info,
 				  guint time,
 				  RBPodcastSource *source)
@@ -1295,7 +1269,7 @@ posts_view_drag_data_received_cb (GtkWid
 	impl_receive_drag (RB_SOURCE (source), selection_data);
 }
 
-void 
+void
 rb_podcast_source_add_feed (RBPodcastSource *source, const char *uri)
 {
 	rb_podcast_manager_subscribe_feed (source->priv->podcast_mg, uri);
@@ -1308,10 +1282,10 @@ rb_podcast_source_cmd_download_post (Gtk
 	GList *lst;
 	GValue val = {0, };
 	RBEntryView *posts;
-	
+
 	rb_debug ("Add to download action");
 	posts = source->priv->posts;
-	
+
 	lst = rb_entry_view_get_selected_entries (posts);
 	g_value_init (&val, G_TYPE_ULONG);
 
@@ -1325,7 +1299,7 @@ rb_podcast_source_cmd_download_post (Gtk
 			rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_STATUS, &val);
 			rb_podcast_manager_download_entry (source->priv->podcast_mg, entry);
 		}
-			
+
 		lst = lst->next;
 	}
 	g_value_unset (&val);
@@ -1339,10 +1313,10 @@ rb_podcast_source_cmd_cancel_download (G
 	GList *lst;
 	GValue val = {0, };
 	RBEntryView *posts;
-	
+
 	rb_debug ("Add to download action");
 	posts = source->priv->posts;
-	
+
 	lst = rb_entry_view_get_selected_entries (posts);
 	g_value_init (&val, G_TYPE_ULONG);
 
@@ -1356,7 +1330,7 @@ rb_podcast_source_cmd_cancel_download (G
 			rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_STATUS, &val);
 			rb_podcast_manager_cancel_download (source->priv->podcast_mg, entry);
 		}
-			
+
 		lst = lst->next;
 	}
 	g_value_unset (&val);
@@ -1391,29 +1365,29 @@ rb_podcast_source_cmd_delete_feed (GtkAc
 						    "they will be permanently lost.  Please note that "
 						    "you can delete the feed but keep the downloaded "
 						    "files by choosing to delete the feed only."));
-	
+
 	gtk_window_set_title (GTK_WINDOW (dialog), "");
 
-	gtk_dialog_add_buttons (GTK_DIALOG (dialog), 
-	                        _("Delete _Feed Only"), 
+	gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+	                        _("Delete _Feed Only"),
 	                        GTK_RESPONSE_NO,
-	                        GTK_STOCK_CANCEL, 
-	                        GTK_RESPONSE_CANCEL, 
+	                        GTK_STOCK_CANCEL,
+	                        GTK_RESPONSE_CANCEL,
 	                        NULL);
 
 	button = gtk_dialog_add_button (GTK_DIALOG (dialog),
 	                                _("_Delete Feed And Files"),
 			                GTK_RESPONSE_YES);
-	
+
 	gtk_window_set_focus (GTK_WINDOW (dialog), button);
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
-	
+
 	ret = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 
 	if (ret == GTK_RESPONSE_CANCEL || ret == GTK_RESPONSE_DELETE_EVENT)
 		return;
-	
+
 	feeds = rb_string_list_copy (source->priv->selected_feeds);
 	for (l = feeds; l != NULL; l = g_list_next (l)) {
 		const char *location = l->data;
@@ -1437,7 +1411,7 @@ rb_podcast_source_cmd_properties_feed (G
 
 	location = (char *) source->priv->selected_feeds->data;
 
-	entry = rhythmdb_entry_lookup_by_location (source->priv->db, 
+	entry = rhythmdb_entry_lookup_by_location (source->priv->db,
 						   location);
 
 	if (entry != NULL) {
@@ -1449,13 +1423,13 @@ rb_podcast_source_cmd_properties_feed (G
 			rb_debug ("no selection!");
 	}
 }
-	
+
 static void
 rb_podcast_source_cmd_update_feed (GtkAction *action,
 			     	   RBPodcastSource *source)
 {
 	GList *feeds, *l;
-	
+
 	rb_debug ("Update action");
 
 	feeds = rb_string_list_copy (source->priv->selected_feeds);
@@ -1491,7 +1465,7 @@ rb_podcast_source_post_status_cell_data_
 	switch (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_STATUS)) {
 	case RHYTHMDB_PODCAST_STATUS_COMPLETE:
 		g_object_set (G_OBJECT (renderer), "text", _("Downloaded"), NULL);
-		value = 100;  
+		value = 100;
 		break;
 	case RHYTHMDB_PODCAST_STATUS_ERROR:
 		g_object_set (G_OBJECT (renderer), "text", _("Failed"), NULL);
@@ -1511,7 +1485,7 @@ rb_podcast_source_post_status_cell_data_
 
 			value = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_STATUS);
 			s = g_strdup_printf ("%u %%", value);
-			
+
 			g_object_set (G_OBJECT (renderer), "text", s, NULL);
 			g_free (s);
 		}
@@ -1537,7 +1511,7 @@ rb_podcast_source_post_feed_cell_data_fu
 
 	gtk_tree_model_get (tree_model, iter, 0, &entry, -1);
 	album = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM);
-		
+
 	g_object_set (G_OBJECT (renderer), "text", album, NULL);
 }
 
@@ -1618,7 +1592,6 @@ rb_podcast_source_feed_title_cell_data_f
 	g_free (title);
 }
 
-
 static void
 rb_podcast_source_post_date_cell_data_func (GtkTreeViewColumn *column,
 					    GtkCellRenderer *renderer,
@@ -1642,14 +1615,11 @@ rb_podcast_source_post_date_cell_data_fu
 		localtime_r (&time, &time_tm);
 		str = eel_strdup_strftime (_("%Y-%m-%d %H:%M"), &time_tm);
 	}
-	
+
 	g_object_set (G_OBJECT (renderer), "text", str, NULL);
 	g_free (str);
 }
 
-
-
-
 static void
 rb_podcast_source_cb_interval_changed_cb (GtkComboBox *box, gpointer cb_data)
 {
@@ -1660,13 +1630,13 @@ rb_podcast_source_cb_interval_changed_cb
 	rb_podcast_manager_start_sync (RB_PODCAST_SOURCE (cb_data)->priv->podcast_mg);
 }
 
-static gboolean 
+static gboolean
 rb_podcast_source_load_finish_cb  (gpointer cb_data)
 {
 	RBPodcastSource *source  = RB_PODCAST_SOURCE (cb_data);
-	
+
 	rb_podcast_manager_start_sync (source->priv->podcast_mg);
-	
+
 	g_signal_connect_after (G_OBJECT (source->priv->podcast_mg),
 	 		        "start_download",
 			  	G_CALLBACK (rb_podcast_source_start_download_cb),
@@ -1721,9 +1691,9 @@ impl_receive_drag (RBSource *asource, Gt
 			if (i == NULL)
 				break;
 		}
-		
+
 		uri = i->data;
-		if ((uri != NULL) && 
+		if ((uri != NULL) &&
 		    (!rhythmdb_entry_lookup_by_location (source->priv->db, uri))) {
 			rb_podcast_source_add_feed (source, uri);
 		}
@@ -1738,7 +1708,6 @@ impl_receive_drag (RBSource *asource, Gt
 	return TRUE;
 }
 
-
 static void
 rb_podcast_source_start_download_cb (RBPodcastManager *pd,
 				     RhythmDBEntry *entry,
@@ -1784,7 +1753,7 @@ rb_podcast_source_get_shell (RBPodcastSo
 	return shell;
 }
 
-void 
+void
 rb_podcast_source_shutdown	(RBPodcastSource *source)
 {
 	rb_debug ("podcast source shutdown");
@@ -1874,11 +1843,11 @@ static void rb_podcast_source_entry_acti
 						  RBPodcastSource *source)
 {
 	GValue val = {0,};
-	
+
 	/* check to see if it has already been downloaded */
 	if (rb_podcast_manager_entry_downloaded (entry))
 		return;
-	
+
 	g_value_init (&val, G_TYPE_ULONG);
 	g_value_set_ulong (&val, RHYTHMDB_PODCAST_STATUS_WAITING);
 	rhythmdb_entry_set (source->priv->db, entry, RHYTHMDB_PROP_STATUS, &val);
@@ -1891,12 +1860,15 @@ static void rb_podcast_source_entry_acti
 static gboolean
 impl_can_add_to_queue (RBSource *source)
 {
-	RBEntryView *songs = rb_source_get_entry_view (source);
-	GList *selection = rb_entry_view_get_selected_entries (songs);
+	RBEntryView *songs;
+	GList *selection;
 	GList *iter;
 	gboolean ok = FALSE;
 
-	if (selection == NULL) 
+	songs = rb_source_get_entry_view (source);
+	selection = rb_entry_view_get_selected_entries (songs);
+
+	if (selection == NULL)
 		return FALSE;
 
 	/* If at least one entry has been downloaded, enable add to queue.
@@ -1914,18 +1886,21 @@ impl_can_add_to_queue (RBSource *source)
 static void
 impl_add_to_queue (RBSource *source, RBSource *queue)
 {
-	RBEntryView *songs = rb_source_get_entry_view (source);
-	GList *selection = rb_entry_view_get_selected_entries (songs);
+	RBEntryView *songs;
+	GList *selection;
 	GList *iter;
 
-	if (selection == NULL) 
+	songs = rb_source_get_entry_view (source);
+	selection = rb_entry_view_get_selected_entries (songs);
+
+	if (selection == NULL)
 		return;
 
 	for (iter = selection; iter; iter = iter->next) {
 		RhythmDBEntry *entry = (RhythmDBEntry *)iter->data;
 		if (!rb_podcast_manager_entry_downloaded (entry))
 			continue;
-		rb_static_playlist_source_add_entry (RB_STATIC_PLAYLIST_SOURCE (queue), 
+		rb_static_playlist_source_add_entry (RB_STATIC_PLAYLIST_SOURCE (queue),
 						     entry, -1);
 	}
 
@@ -1961,7 +1936,7 @@ rb_podcast_source_cmd_new_podcast (GtkAc
 {
 	GtkWidget *dialog;
 	GObject *object;
-	
+
 	rb_debug ("Got new podcast command");
 	g_object_get (G_OBJECT (source), "podcast-manager", &object, NULL);
 	dialog = rb_new_podcast_dialog_new (RB_PODCAST_MANAGER (object));
@@ -1981,8 +1956,8 @@ impl_get_status (RBSource *source, char 
 
 	g_object_get (G_OBJECT (source), "query-model", &query_model, NULL);
 	if (query_model) {
-		*text = rhythmdb_query_model_compute_status_normal (query_model, 
-								    "%d episode", 
+		*text = rhythmdb_query_model_compute_status_normal (query_model,
+								    "%d episode",
 								    "%d episodes");
 		if (rhythmdb_query_model_has_pending_changes (query_model))
 			*progress = -1.0f;
@@ -1991,4 +1966,3 @@ impl_get_status (RBSource *source, char 
 		*text = g_strdup ("");
 	}
 }
-
Index: sources/rb-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-source.c,v
retrieving revision 1.73
diff -p -u -r1.73 rb-source.c
--- sources/rb-source.c	12 Jul 2006 23:30:07 -0000	1.73
+++ sources/rb-source.c	13 Jul 2006 23:40:25 -0000
@@ -394,14 +394,15 @@ rb_source_set_property (GObject *object,
 		break;
 	case PROP_QUERY_MODEL:
 		model = g_value_get_object (value);
+
 		if (priv->query_model == model)
 			return;
 
 		if (priv->query_model) {
-			g_signal_handlers_disconnect_by_func (G_OBJECT (model),
+			g_signal_handlers_disconnect_by_func (G_OBJECT (priv->query_model),
 							      G_CALLBACK (rb_source_post_entry_deleted_cb),
 							      source);
-			g_signal_handlers_disconnect_by_func (G_OBJECT (model),
+			g_signal_handlers_disconnect_by_func (G_OBJECT (priv->query_model),
 							      G_CALLBACK (rb_source_row_inserted_cb),
 							      source);
 			g_object_unref (G_OBJECT (priv->query_model));
Index: sources/rb-sourcelist.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-sourcelist.c,v
retrieving revision 1.38
diff -p -u -r1.38 rb-sourcelist.c
--- sources/rb-sourcelist.c	12 Jul 2006 23:30:07 -0000	1.38
+++ sources/rb-sourcelist.c	13 Jul 2006 23:40:25 -0000
@@ -86,10 +86,10 @@ static void rb_sourcelist_get_property (
 					guint prop_id,
 					GValue *value,
 					GParamSpec *pspec);
-static gboolean rb_sourcelist_source_to_iter (RBSourceList *sourcelist, 
+static gboolean rb_sourcelist_source_to_iter (RBSourceList *sourcelist,
 					      RBSource *source,
 					      GtkTreeIter *iter);
-static gboolean rb_sourcelist_visible_source_to_iter (RBSourceList *sourcelist, 
+static gboolean rb_sourcelist_visible_source_to_iter (RBSourceList *sourcelist,
 						      RBSource *source,
 						      GtkTreeIter *iter);
 static void rb_sourcelist_selection_changed_cb (GtkTreeSelection *selection,
@@ -106,7 +106,7 @@ static gboolean key_release_cb (GtkTreeV
 				RBSourceList *sourcelist);
 static gboolean popup_menu_cb (GtkTreeView *treeview, RBSourceList *sourcelist);
 static void name_notify_cb (GObject *obj, GParamSpec *pspec, gpointer data);
-static void visibility_notify_cb (GObject *obj, GParamSpec *pspec, 
+static void visibility_notify_cb (GObject *obj, GParamSpec *pspec,
 				  gpointer data);
 static void icon_notify_cb (GObject *obj, GParamSpec *pspec, gpointer data);
 static void source_name_edited_cb (GtkCellRendererText *renderer, const char *pathstr,
@@ -118,8 +118,7 @@ static void rb_sourcelist_update_expande
 
 static guint rb_sourcelist_signals[LAST_SIGNAL] = { 0 };
 
-G_DEFINE_TYPE (RBSourceList, rb_sourcelist, GTK_TYPE_SCROLLED_WINDOW) 
-
+G_DEFINE_TYPE (RBSourceList, rb_sourcelist, GTK_TYPE_SCROLLED_WINDOW)
 
 static void
 rb_sourcelist_class_init (RBSourceListClass *class)
@@ -303,7 +302,7 @@ rb_sourcelist_set_property (GObject *obj
 	}
 }
 
-static void 
+static void
 rb_sourcelist_get_property (GObject *object,
 			    guint prop_id,
 			    GValue *value,
@@ -324,7 +323,6 @@ rb_sourcelist_get_property (GObject *obj
 	}
 }
 
-
 GtkWidget *
 rb_sourcelist_new (RBShell *shell)
 {
@@ -351,7 +349,7 @@ rb_sourcelist_append (RBSourceList *sour
 		      RBSource *parent)
 {
 	GtkTreeIter iter;
-	PangoAttrList *attrs = pango_attr_list_new ();
+	PangoAttrList *attrs;
 	const char *name;
 	GdkPixbuf *pixbuf;
 	gboolean visible;
@@ -409,8 +407,8 @@ rb_sourcelist_append (RBSourceList *sour
 				if (!gtk_tree_model_iter_next (sourcelist->priv->real_model, &group_iter))
 					break;
 
-				gtk_tree_model_get (sourcelist->priv->real_model, 
-						    &group_iter, 
+				gtk_tree_model_get (sourcelist->priv->real_model,
+						    &group_iter,
 						    RB_SOURCELIST_MODEL_COLUMN_NAME, &check_name,
 						    -1);
 
@@ -421,10 +419,15 @@ rb_sourcelist_append (RBSourceList *sour
 			rb_debug ("inserting source %p in group %d", source, group);
 			gtk_tree_model_get_iter (sourcelist->priv->real_model, &group_iter, group_path);
 		}
-		gtk_tree_store_insert_before (GTK_TREE_STORE (sourcelist->priv->real_model), 
+
+		gtk_tree_store_insert_before (GTK_TREE_STORE (sourcelist->priv->real_model),
 					      &iter, NULL, &group_iter);
+
+		gtk_tree_path_free (group_path);
 	}
 
+	attrs = pango_attr_list_new ();
+
 	gtk_tree_store_set (GTK_TREE_STORE (sourcelist->priv->real_model), &iter,
 			    RB_SOURCELIST_MODEL_COLUMN_PIXBUF, pixbuf,
 			    RB_SOURCELIST_MODEL_COLUMN_NAME, name,
@@ -433,6 +436,8 @@ rb_sourcelist_append (RBSourceList *sour
 			    RB_SOURCELIST_MODEL_COLUMN_VISIBILITY, visible,
 			    -1);
 
+	pango_attr_list_unref (attrs);
+
 	if (pixbuf != NULL) {
 		g_object_unref (pixbuf);
 	}
@@ -454,7 +459,7 @@ match_source_to_iter (GtkTreeModel *mode
 		      SourcePath *sp)
 {
 	RBSource *target = NULL;
-	
+
 	gtk_tree_model_get (model, iter, RB_SOURCELIST_MODEL_COLUMN_SOURCE, &target, -1);
 	if (target == sp->source) {
 		sp->path = gtk_tree_path_copy (path);
@@ -470,11 +475,11 @@ rb_sourcelist_source_to_iter (RBSourceLi
 {
 	SourcePath *sp = g_new0 (SourcePath,1);
 	gboolean ret = FALSE;
-	
+
 	sp->source = source;
-	
+
 	gtk_tree_model_foreach (sourcelist->priv->real_model, (GtkTreeModelForeachFunc) match_source_to_iter, sp);
-	
+
 	if (sp->path) {
 		ret = gtk_tree_model_get_iter (sourcelist->priv->real_model, iter, sp->path);
 	}
@@ -492,9 +497,9 @@ rb_sourcelist_visible_source_to_iter (RB
 {
 	SourcePath *sp = g_new0 (SourcePath,1);
 	gboolean ret = FALSE;
-	
+
 	sp->source = source;
-	
+
 	gtk_tree_model_foreach (sourcelist->priv->filter_model, (GtkTreeModelForeachFunc) match_source_to_iter, sp);
 
 	if (sp->path) {
@@ -513,20 +518,20 @@ rb_sourcelist_edit_source_name (RBSource
 {
 	GtkTreeIter iter;
 	GtkTreePath *path;
-	
+
 	g_assert (rb_sourcelist_visible_source_to_iter (sourcelist, source, &iter));
 	path = gtk_tree_model_get_path (GTK_TREE_MODEL (sourcelist->priv->filter_model),
 					&iter);
-	
+
 	/* Make cell editable just for the moment.
 	   We'll turn it off once editing is done. */
 	g_object_set (G_OBJECT (sourcelist->priv->title_renderer), "editable", TRUE, NULL);
-	
+
 	gtk_tree_view_set_cursor_on_cell (GTK_TREE_VIEW (sourcelist->priv->treeview),
 					  path, sourcelist->priv->main_column,
 					  sourcelist->priv->title_renderer,
 					  TRUE);
-	
+
 	gtk_tree_path_free (path);
 }
 
@@ -596,7 +601,7 @@ rb_sourcelist_selection_changed_cb (GtkT
 	if (!gtk_tree_selection_get_selected (sourcelist->priv->selection,
 					      &cindy, &iter))
 		return;
-	
+
 	gtk_tree_model_get (cindy, &iter,
 			    RB_SOURCELIST_MODEL_COLUMN_SOURCE, &target, -1);
 	if (target == NULL)
@@ -663,7 +668,7 @@ button_press_cb (GtkTreeView *treeview,
 {
 	GtkTreeIter iter;
 	GtkTreePath *path;
-	
+
 	if (event->button != 3)
 		return FALSE;
 
@@ -697,7 +702,7 @@ key_release_cb (GtkTreeView *treeview,
 
 	if (!gtk_tree_selection_get_selected (sourcelist->priv->selection, NULL, &iter))
 		return FALSE;
-	
+
 	gtk_tree_model_get (sourcelist->priv->filter_model, &iter,
 			    RB_SOURCELIST_MODEL_COLUMN_SOURCE, &target, -1);
 	if (target == NULL)
@@ -712,7 +717,6 @@ key_release_cb (GtkTreeView *treeview,
 	return FALSE;
 }
 
-
 static gboolean
 popup_menu_cb (GtkTreeView *treeview,
 	       RBSourceList *sourcelist)
@@ -727,7 +731,7 @@ name_notify_cb (GObject *obj, GParamSpec
 	RBSource *source = RB_SOURCE (obj);
 	GtkTreeIter iter;
 	gchar *name;
-	
+
 	if (rb_sourcelist_source_to_iter (sourcelist, source, &iter)) {
 		g_object_get (obj, "name", &name, NULL);
 		gtk_tree_store_set (GTK_TREE_STORE (sourcelist->priv->real_model),
@@ -737,7 +741,7 @@ name_notify_cb (GObject *obj, GParamSpec
 
 	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (sourcelist->priv->treeview));
 }
-	
+
 static void
 visibility_notify_cb (GObject *obj, GParamSpec *pspec, gpointer data)
 {
@@ -784,7 +788,7 @@ icon_notify_cb (GObject *obj, GParamSpec
 	RBSource *source = RB_SOURCE (obj);
 	GtkTreeIter iter;
 	GdkPixbuf *pixbuf;
-	
+
 	if (rb_sourcelist_source_to_iter (sourcelist, source, &iter)) {
 		g_object_get (obj, "icon", &pixbuf, NULL);
 		gtk_tree_store_set (GTK_TREE_STORE (sourcelist->priv->real_model),
@@ -805,7 +809,7 @@ rb_sourcelist_title_cell_data_func (GtkT
 {
 	char *str;
 	gboolean playing;
-	
+
 	gtk_tree_model_get (GTK_TREE_MODEL (sourcelist->priv->filter_model), iter,
 			    RB_SOURCELIST_MODEL_COLUMN_NAME, &str,
 			    RB_SOURCELIST_MODEL_COLUMN_PLAYING, &playing,
@@ -828,9 +832,9 @@ source_name_edited_cb (GtkCellRendererTe
 
 	if (text[0] == '\0')
 		return;
-	
-	path = gtk_tree_path_new_from_string (pathstr);	
-	
+
+	path = gtk_tree_path_new_from_string (pathstr);
+
 	g_return_if_fail (gtk_tree_model_get_iter (GTK_TREE_MODEL (sourcelist->priv->filter_model),
 						   &iter, path));
 	gtk_tree_model_get (sourcelist->priv->filter_model,
Index: sources/rb-static-playlist-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-static-playlist-source.c,v
retrieving revision 1.24
diff -p -u -r1.24 rb-static-playlist-source.c
--- sources/rb-static-playlist-source.c	19 Jun 2006 04:40:04 -0000	1.24
+++ sources/rb-static-playlist-source.c	13 Jul 2006 23:40:25 -0000
@@ -56,7 +56,6 @@ static GPtrArray *construct_query_from_s
 static void impl_save_contents_to_xml (RBPlaylistSource *source,
 				       xmlNodePtr node);
 
-
 /* browser stuff */
 static GList *impl_get_property_views (RBSource *source);
 void rb_static_playlist_source_browser_views_activated_cb (GtkWidget *widget,
@@ -95,7 +94,6 @@ G_DEFINE_TYPE (RBStaticPlaylistSource, r
 								RB_TYPE_STATIC_PLAYLIST_SOURCE, \
 								RBStaticPlaylistSourcePrivate))
 
-
 typedef struct
 {
 	RhythmDBQueryModel *base_model;
@@ -111,8 +109,6 @@ typedef struct
 	RhythmDBPropType search_prop;
 } RBStaticPlaylistSourcePrivate;
 
-
-	
 static void
 rb_static_playlist_source_class_init (RBStaticPlaylistSourceClass *klass)
 {
@@ -120,7 +116,7 @@ rb_static_playlist_source_class_init (RB
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	RBSourceClass *source_class = RB_SOURCE_CLASS (klass);
 	RBPlaylistSourceClass *playlist_class = RB_PLAYLIST_SOURCE_CLASS (klass);
-	
+
 	object_class->constructor = rb_static_playlist_source_constructor;
 	object_class->dispose = rb_static_playlist_source_dispose;
 	object_class->finalize = rb_static_playlist_source_finalize;
@@ -141,13 +137,13 @@ rb_static_playlist_source_class_init (RB
 	source_class->impl_get_search_actions = impl_get_search_actions;
 
 	playlist_class->impl_save_contents_to_xml = impl_save_contents_to_xml;
-	
+
 	gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &size, NULL);
 	klass->pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
 						  GNOME_MEDIA_PLAYLIST,
 						  size,
 						  0, NULL);
-	
+
 	g_type_class_add_private (klass, sizeof (RBStaticPlaylistSourcePrivate));
 }
 
@@ -218,7 +214,7 @@ rb_static_playlist_source_constructor (G
 	g_object_unref (G_OBJECT (shell));
 
 	g_object_get (G_OBJECT (source), "entry-type", &entry_type, NULL);
-	priv->browser = rb_library_browser_new (rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source)), 
+	priv->browser = rb_library_browser_new (rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source)),
 						entry_type);
 	g_boxed_free (RHYTHMDB_TYPE_ENTRY_TYPE, entry_type);
 	gtk_paned_pack1 (GTK_PANED (priv->paned), GTK_WIDGET (priv->browser), TRUE, FALSE);
@@ -228,13 +224,14 @@ rb_static_playlist_source_constructor (G
 
 	rb_library_browser_set_model (priv->browser, priv->base_model, FALSE);
 	rb_static_playlist_source_do_query (source);
-			 
+
 	/* reparent the entry view */
 	songs = rb_source_get_entry_view (RB_SOURCE (source));
 	g_object_ref (G_OBJECT (songs));
 	gtk_container_remove (GTK_CONTAINER (source), GTK_WIDGET (songs));
 	gtk_paned_pack2 (GTK_PANED (priv->paned), GTK_WIDGET (songs), TRUE, FALSE);
 	gtk_container_add (GTK_CONTAINER (source), priv->paned);
+	g_object_unref (songs);
 
 	/* watch these to find out when things are dropped into the entry view */
 	g_signal_connect_object (G_OBJECT (priv->base_model), "row-inserted",
@@ -274,18 +271,18 @@ rb_static_playlist_source_load_from_xml 
 
 		if (xmlNodeIsText (child))
 			continue;
-	
+
 		if (xmlStrcmp (child->name, RB_PLAYLIST_LOCATION))
 			continue;
-	
+
 		location = xmlNodeGetContent (child);
 		rb_static_playlist_source_add_location (source,
 						        (char *) location, -1);
+		xmlFree (location);
 	}
 }
 
-
-RBSource *	
+RBSource *
 rb_static_playlist_source_new_from_xml (RBShell *shell, xmlNodePtr node)
 {
 	RBSource *psource = rb_static_playlist_source_new (shell,
@@ -341,7 +338,7 @@ impl_reset_filters (RBSource *source)
 {
 	RBStaticPlaylistSourcePrivate *priv = RB_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source);
 	gboolean changed = FALSE;
-	
+
 	if (rb_library_browser_reset (priv->browser))
 		changed = TRUE;
 
@@ -379,7 +376,7 @@ impl_search (RBSource *source, const cha
 		priv->search_text = g_strdup (search_text);
 	}
 	g_free (old_search_text);
-	
+
 	rb_debug ("doing search for \"%s\"", priv->search_text ? priv->search_text : "(NULL)");
 
 	rb_static_playlist_source_do_query (RB_STATIC_PLAYLIST_SOURCE (source));
@@ -395,7 +392,6 @@ impl_get_property_views (RBSource *sourc
 	return ret;
 }
 
-
 static void
 impl_browser_toggled (RBSource *source, gboolean enabled)
 {
@@ -436,7 +432,7 @@ rb_static_playlist_source_do_query (RBSt
 	RBPlaylistSource *psource = RB_PLAYLIST_SOURCE (source);
 	RhythmDB *db = rb_playlist_source_get_db (psource);
 	GPtrArray *query;
-	
+
 	if (priv->filter_model)
 		g_object_unref (priv->filter_model);
 	priv->filter_model = rhythmdb_query_model_new_empty (db);
@@ -451,18 +447,18 @@ rb_static_playlist_source_do_query (RBSt
 }
 
 static void
-rb_static_playlist_source_browser_changed_cb (RBLibraryBrowser *browser, 
+rb_static_playlist_source_browser_changed_cb (RBLibraryBrowser *browser,
 					      GParamSpec *pspec,
 					      RBStaticPlaylistSource *source)
 {
 	RBEntryView *songs = rb_source_get_entry_view (RB_SOURCE (source));
 	RhythmDBQueryModel *query_model;
-	
+
 	g_object_get (G_OBJECT (browser), "output-model", &query_model, NULL);
 	rb_entry_view_set_model (songs, query_model);
 	rb_playlist_source_set_query_model (RB_PLAYLIST_SOURCE (source), query_model);
 	g_object_unref (G_OBJECT (query_model));
-	
+
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
 
@@ -476,14 +472,14 @@ impl_receive_drag (RBSource *asource, Gt
 		list = rb_uri_list_parse ((char *)data->data);
 		if (list != NULL) {
 			rb_static_playlist_source_add_list_uri (source, list);
-		} else 
+		} else
 			return FALSE;
 	}
 
         return TRUE;
 }
 
-static void 
+static void
 impl_save_contents_to_xml (RBPlaylistSource *source,
 			   xmlNodePtr node)
 {
@@ -491,11 +487,11 @@ impl_save_contents_to_xml (RBPlaylistSou
 	GtkTreeIter iter;
 
 	xmlSetProp (node, RB_PLAYLIST_TYPE, RB_PLAYLIST_STATIC);
-	
+
 	if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->base_model), &iter))
 		return;
 
-	do { 
+	do {
 		xmlNodePtr child_node = xmlNewChild (node, NULL, RB_PLAYLIST_LOCATION, NULL);
 		RhythmDBEntry *entry;
 		xmlChar *encoded;
@@ -584,13 +580,12 @@ rb_static_playlist_source_add_location_i
 }
 
 static void
-rb_static_playlist_source_add_location_swapped (const char *uri, 
+rb_static_playlist_source_add_location_swapped (const char *uri,
 						RBStaticPlaylistSource *source)
 {
 	rb_static_playlist_source_add_location_internal (source, uri, -1);
 }
 
-
 void
 rb_static_playlist_source_add_location (RBStaticPlaylistSource *source,
 					const char *location,
@@ -680,7 +675,6 @@ rb_static_playlist_source_move_entry (RB
 	rb_playlist_source_mark_dirty (psource);
 }
 
-
 static void
 rb_static_playlist_source_non_entry_dropped (GtkTreeModel *model,
 					     const char *uri,
@@ -730,7 +724,7 @@ search_action_to_prop (GtkAction *action
 	if (name == NULL) {
 		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "StaticPlaylistSearchAll") == 0) {
-		prop = RHYTHMDB_PROP_SEARCH_MATCH;		
+		prop = RHYTHMDB_PROP_SEARCH_MATCH;
 	} else if (strcmp (name, "StaticPlaylistSearchArtists") == 0) {
 		prop = RHYTHMDB_PROP_ARTIST_FOLDED;
 	} else if (strcmp (name, "StaticPlaylistSearchAlbums") == 0) {
Index: widgets/bacon-volume.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/bacon-volume.c,v
retrieving revision 1.3
diff -p -u -r1.3 bacon-volume.c
--- widgets/bacon-volume.c	20 Apr 2006 20:43:31 -0000	1.3
+++ widgets/bacon-volume.c	13 Jul 2006 23:40:26 -0000
@@ -598,6 +598,9 @@ bacon_volume_scale_value_changed (GtkRan
   gtk_icon_size_lookup (button->size, &w, &h);
   buf = gtk_icon_theme_load_icon (button->theme, s, w, 0, NULL);
   gtk_image_set_from_pixbuf (GTK_IMAGE (button->image), buf);
+  if (buf != NULL) {
+    g_object_unref (buf);
+  }
 #endif
 
   /* signal */
Index: widgets/rb-entry-view.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/rb-entry-view.c,v
retrieving revision 1.149
diff -p -u -r1.149 rb-entry-view.c
--- widgets/rb-entry-view.c	22 Jun 2006 10:27:41 -0000	1.149
+++ widgets/rb-entry-view.c	13 Jul 2006 23:40:26 -0000
@@ -118,12 +118,11 @@ static void rb_entry_view_playing_song_c
 						RhythmDBEntry *entry,
 						RBEntryView *view);
 
-
 struct RBEntryViewPrivate
 {
 	RhythmDB *db;
 	RBShellPlayer *shell_player;
-	
+
 	RhythmDBQueryModel *model;
 
 	GtkWidget *treeview;
@@ -138,11 +137,10 @@ struct RBEntryViewPrivate
 	gboolean is_drag_source;
 	gboolean is_drag_dest;
 
-	GdkPixbuf *playing_col_pixbuf;
 	GdkPixbuf *playing_pixbuf;
 	GdkPixbuf *paused_pixbuf;
 	GdkPixbuf *error_pixbuf;
-	
+
 	char *sorting_key;
 	guint sorting_gconf_notification_id;
 	GtkTreeViewColumn *sorting_column;
@@ -209,7 +207,6 @@ type_ahead_search_func (GtkTreeModel *mo
 	return res;
 }
 
-
 static void
 rb_entry_view_class_init (RBEntryViewClass *klass)
 {
@@ -271,7 +268,7 @@ rb_entry_view_class_init (RBEntryViewCla
 					 g_param_spec_int ("playing-state",
 						 	   "playing state",
 							   "playback state for this entry view",
-							   RB_ENTRY_VIEW_NOT_PLAYING, 
+							   RB_ENTRY_VIEW_NOT_PLAYING,
 							   RB_ENTRY_VIEW_PAUSED,
 							   RB_ENTRY_VIEW_NOT_PLAYING,
 							   G_PARAM_READWRITE));
@@ -361,32 +358,26 @@ rb_entry_view_class_init (RBEntryViewCla
 static void
 rb_entry_view_init (RBEntryView *view)
 {
-	GtkIconTheme* icon_theme;
-	
+	GtkIconTheme *icon_theme;
+
 	view->priv = RB_ENTRY_VIEW_GET_PRIVATE (view);
 
 	icon_theme = gtk_icon_theme_get_default ();
 
-	view->priv->playing_col_pixbuf = gtk_icon_theme_load_icon (icon_theme,
-                                   			       "stock_volume-max", 
-                                   			       16,
-                                   			       0, 
-                                   			       NULL);
-
 	view->priv->playing_pixbuf = gtk_icon_theme_load_icon (icon_theme,
-                                   			       "stock_media-play", 
+                                   			       "stock_media-play",
                                    			       16,
-                                   			       0, 
+                                   			       0,
                                    			       NULL);
 	view->priv->paused_pixbuf = gtk_icon_theme_load_icon (icon_theme,
-                                   			      "stock_media-pause", 
+                                   			      "stock_media-pause",
                                    			      16,
-                                   			      0, 
+                                   			      0,
                                    			      NULL);
 	view->priv->error_pixbuf = gtk_icon_theme_load_icon (icon_theme,
-                                   			     "stock_dialog-error", 
+                                   			     "stock_dialog-error",
                                    			     16,
-                                   			     0, 
+                                   			     0,
                                    			     NULL);
 
 	view->priv->propid_column_map = g_hash_table_new (NULL, NULL);
@@ -420,19 +411,17 @@ rb_entry_view_finalize (GObject *object)
 
 	if (view->priv->playing_pixbuf)
 		g_object_unref (G_OBJECT (view->priv->playing_pixbuf));
-	if (view->priv->playing_col_pixbuf)
-		g_object_unref (G_OBJECT (view->priv->playing_col_pixbuf));
 	if (view->priv->paused_pixbuf)
 		g_object_unref (G_OBJECT (view->priv->paused_pixbuf));
 	if (view->priv->error_pixbuf)
 		g_object_unref (G_OBJECT (view->priv->error_pixbuf));
 
 	g_free (view->priv->sorting_key);
+	g_free (view->priv->sorting_column_name);
 
 	G_OBJECT_CLASS (rb_entry_view_parent_class)->finalize (object);
 }
 
-
 static void
 rb_entry_view_set_property (GObject *object,
 			   guint prop_id,
@@ -460,7 +449,7 @@ rb_entry_view_set_property (GObject *obj
 	case PROP_MODEL:
 	{
 		RhythmDBQueryModel *new_model;
-		
+
 		if (view->priv->model) {
 			g_signal_handlers_disconnect_by_func (G_OBJECT (view->priv->model),
 							      G_CALLBACK (rb_entry_view_row_inserted_cb),
@@ -523,7 +512,7 @@ rb_entry_view_set_property (GObject *obj
 	}
 }
 
-static void 
+static void
 rb_entry_view_get_property (GObject *object,
 			   guint prop_id,
 			   GValue *value,
@@ -559,7 +548,7 @@ rb_entry_view_get_property (GObject *obj
 
 RBEntryView *
 rb_entry_view_new (RhythmDB *db, GObject *shell_player,
-		   const char *sort_key, gboolean is_drag_source, 
+		   const char *sort_key, gboolean is_drag_source,
 		   gboolean is_drag_dest)
 {
 	RBEntryView *view;
@@ -678,7 +667,6 @@ rb_entry_view_play_count_cell_data_func 
 	else
 		str = g_strdup_printf ("%ld", i);
 
-
 	g_object_set (G_OBJECT (renderer), "text", str, NULL);
 	if (i != 0)
 		g_free (str);
@@ -713,10 +701,10 @@ rb_entry_view_year_cell_data_func (GtkTr
 
 	entry = rhythmdb_query_model_iter_to_entry (data->view->priv->model, iter);
 	julian = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_DATE);
-	
+
 	if (julian > 0) {
 		date = g_date_new_julian (julian);
-		g_date_strftime (str, sizeof (str), "%Y", date);	
+		g_date_strftime (str, sizeof (str), "%Y", date);
 		g_object_set (G_OBJECT (renderer), "text", str, NULL);
 		g_date_free (date);
 	} else {
@@ -787,7 +775,7 @@ rb_entry_view_sync_sorting (RBEntryView 
 	const char *column_name;
 
 	rb_entry_view_get_sorting_order (view, &column_name, &direction);
-	
+
 	if (!column_name)
 		return;
 
@@ -796,18 +784,18 @@ rb_entry_view_sync_sorting (RBEntryView 
 		return;
 
 	rb_debug("Updating EntryView sort order to %s:%d", column_name, direction);
-	
+
 	/* remove the old sorting indicator */
 	if (view->priv->sorting_column)
 		gtk_tree_view_column_set_sort_indicator (view->priv->sorting_column, FALSE);
-	
+
 	/* set the sorting order and indicator of the new sorting column */
 	view->priv->sorting_column = column;
 	gtk_tree_view_column_set_sort_indicator (column, TRUE);
 	gtk_tree_view_column_set_sort_order (column, direction);
 
 	rb_debug ("emitting sort order changed");
-	g_signal_emit (G_OBJECT (view), rb_entry_view_signals[SORT_ORDER_CHANGED], 0); 
+	g_signal_emit (G_OBJECT (view), rb_entry_view_signals[SORT_ORDER_CHANGED], 0);
 }
 
 const char *
@@ -829,10 +817,10 @@ rb_entry_view_get_sorting_type (RBEntryV
 	default:
 		g_assert_not_reached ();
 	}
-	
+
 	sorttype = g_strdup(key->str);
 	g_string_free (key, TRUE);
-	
+
 	return sorttype;
 }
 
@@ -845,27 +833,27 @@ rb_entry_view_set_sorting_type (RBEntryV
 		rb_debug ("malformed sort data: %s", (sorttype) ? sorttype : "(null)");
 		return;
 	}
-	
+
 	strs = g_strsplit (sorttype, ",", 0);
-	
+
 	g_free(view->priv->sorting_column_name);
 	view->priv->sorting_column_name = g_strdup(strs[0]);
-	
+
 	if (!strcmp ("ascending", strs[1]))
 		view->priv->sorting_order = GTK_SORT_ASCENDING;
 	else if (!strcmp ("descending", strs[1]))
-		view->priv->sorting_order = GTK_SORT_DESCENDING;		
+		view->priv->sorting_order = GTK_SORT_DESCENDING;
 	else {
 		g_warning ("atttempting to sort in unknown direction");
 		view->priv->sorting_order = GTK_SORT_ASCENDING;
 	}
-	
+
 	g_strfreev (strs);
-	
+
 	rb_entry_view_sync_sorting (view);
 }
 
-void 
+void
 rb_entry_view_get_sorting_order (RBEntryView *view, const char **column_name, gint *sort_order)
 {
 	*column_name = g_strdup (view->priv->sorting_column_name);
@@ -881,7 +869,7 @@ rb_entry_view_set_sorting_order (RBEntry
 	g_free (view->priv->sorting_column_name);
 	view->priv->sorting_column_name = g_strdup (column_name);
 	view->priv->sorting_order = sort_order;
-	
+
 	rb_entry_view_sync_sorting (view);
 }
 
@@ -892,20 +880,20 @@ rb_entry_view_column_clicked_cb (GtkTree
 	char *clicked_column;
 
 	rb_debug ("sorting on column %p", column);
-	
+
 	/* identify the clicked column, and then update the sorting order */
 	clicked_column = (char*) g_object_get_data (G_OBJECT (column), "rb-entry-view-key");
 	sort_order = view->priv->sorting_order;
-	
+
 	if (view->priv->sorting_column_name
 	    && !strcmp(clicked_column, view->priv->sorting_column_name)
 	    && (sort_order == GTK_SORT_ASCENDING))
 		sort_order = GTK_SORT_DESCENDING;
 	else
 		sort_order = GTK_SORT_ASCENDING;
-	
+
 	rb_entry_view_set_sorting_order (view, clicked_column, sort_order);
-	
+
 	/* update the sort order in GConf */
 	if (view->priv->sorting_key)
 		eel_gconf_set_string (view->priv->sorting_key, rb_entry_view_get_sorting_type(view));
@@ -958,7 +946,7 @@ rb_entry_view_append_column (RBEntryView
 	case RB_ENTRY_VIEW_COL_ARTIST:
 		propid = RHYTHMDB_PROP_ARTIST;
 		cell_data->propid = propid;
-		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;				
+		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;
 		sort_propid = RHYTHMDB_PROP_ARTIST_SORT_KEY;
 		sort_func = (GCompareDataFunc) rhythmdb_query_model_artist_sort_func;
 		title = _("Art_ist");
@@ -978,7 +966,7 @@ rb_entry_view_append_column (RBEntryView
 	case RB_ENTRY_VIEW_COL_GENRE:
 		propid = RHYTHMDB_PROP_GENRE;
 		cell_data->propid = propid;
-		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;				
+		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;
 		sort_propid = RHYTHMDB_PROP_GENRE_SORT_KEY;
 		sort_func = (GCompareDataFunc) rhythmdb_query_model_genre_sort_func;
 		title = _("_Genre");
@@ -1059,7 +1047,7 @@ rb_entry_view_append_column (RBEntryView
 	case RB_ENTRY_VIEW_COL_LAST_PLAYED:
 		propid = RHYTHMDB_PROP_LAST_PLAYED;
 		cell_data->propid = RHYTHMDB_PROP_LAST_PLAYED_STR;
-		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;				
+		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;
 		sort_propid = RHYTHMDB_PROP_LAST_PLAYED;
 		sort_func = (GCompareDataFunc) rhythmdb_query_model_ulong_sort_func;
 		title = _("_Last Played");
@@ -1071,7 +1059,7 @@ rb_entry_view_append_column (RBEntryView
 	case RB_ENTRY_VIEW_COL_FIRST_SEEN:
 		propid = RHYTHMDB_PROP_FIRST_SEEN;
 		cell_data->propid = RHYTHMDB_PROP_FIRST_SEEN_STR;
-		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;				
+		cell_data_func = (GtkTreeCellDataFunc) rb_entry_view_string_cell_data_func;
 		sort_propid = RHYTHMDB_PROP_FIRST_SEEN;
 		sort_func = (GCompareDataFunc) rhythmdb_query_model_ulong_sort_func;
 		title = _("_Date Added");
@@ -1113,7 +1101,7 @@ rb_entry_view_append_column (RBEntryView
 		propid = -1;
 		break;
 	}
-	
+
 	if (sort_propid == RHYTHMDB_NUM_PROPERTIES)
 		sort_propid = propid;
 
@@ -1122,11 +1110,13 @@ rb_entry_view_append_column (RBEntryView
 		gtk_tree_view_column_pack_start (column, renderer, TRUE);
 		gtk_tree_view_column_set_cell_data_func (column, renderer,
 							 cell_data_func, cell_data, g_free);
+	} else {
+		g_free (cell_data);
 	}
 
-	/* 
-	 * Columns must either be expanding (ellipsized) or have a 
-	 * fixed minimum width specified.  Otherwise, gtk+ gives them a 
+	/*
+	 * Columns must either be expanding (ellipsized) or have a
+	 * fixed minimum width specified.  Otherwise, gtk+ gives them a
 	 * width of 0.
 	 */
 	if (ellipsize) {
@@ -1145,8 +1135,8 @@ rb_entry_view_append_column (RBEntryView
 	gtk_tree_view_column_set_clickable (column, TRUE);
 
 	if (always_visible)
-		g_object_set_qdata (G_OBJECT (column), 
-				    rb_entry_view_column_always_visible, 
+		g_object_set_qdata (G_OBJECT (column),
+				    rb_entry_view_column_always_visible,
 				    GINT_TO_POINTER (1));
 
 	g_hash_table_insert (view->priv->propid_column_map, GINT_TO_POINTER (propid), column);
@@ -1212,7 +1202,7 @@ rb_entry_view_set_columns_clickable (RBE
 		/* only columns we can sort on should be clickable */
 		GtkTreeViewColumn *column = (GtkTreeViewColumn *) tem->data;
 		if (g_hash_table_lookup (view->priv->column_sort_data_map, column) != NULL)
-			gtk_tree_view_column_set_clickable (tem->data, clickable); 
+			gtk_tree_view_column_set_clickable (tem->data, clickable);
 	}
 	g_list_free (columns);
 }
@@ -1232,7 +1222,7 @@ rb_entry_view_constructor (GType type, g
 	gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (view->priv->treeview), TRUE);
 
 	gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (view->priv->treeview),
-					     type_ahead_search_func, 
+					     type_ahead_search_func,
 					     NULL, NULL);
 
 	g_signal_connect_object (G_OBJECT (view->priv->treeview),
@@ -1260,7 +1250,7 @@ rb_entry_view_constructor (GType type, g
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view->priv->treeview), TRUE);
 	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view->priv->treeview), TRUE);
 	gtk_tree_selection_set_mode (view->priv->selection, GTK_SELECTION_MULTIPLE);
-	
+
 	if (view->priv->is_drag_source)
 		rb_tree_dnd_add_drag_source_support (GTK_TREE_VIEW (view->priv->treeview),
 						     GDK_BUTTON1_MASK,
@@ -1284,7 +1274,7 @@ rb_entry_view_constructor (GType type, g
 		gint width;
 
 		tooltip = gtk_tooltips_new ();
-		
+
 		/* Playing icon column */
 		column = GTK_TREE_VIEW_COLUMN (gtk_tree_view_column_new ());
 		renderer = rb_cell_renderer_pixbuf_new ();
@@ -1295,13 +1285,10 @@ rb_entry_view_constructor (GType type, g
 							 view,
 							 NULL);
 
-		image_widget = gtk_image_new_from_pixbuf (view->priv->playing_col_pixbuf);
-		g_object_ref (G_OBJECT (image_widget));
-		gtk_object_sink (GTK_OBJECT (image_widget));
+		image_widget = gtk_image_new_from_icon_name ("stock_volume-max", GTK_ICON_SIZE_MENU);
 		gtk_tree_view_column_set_widget (column, image_widget);
 		gtk_widget_show (image_widget);
 
-
 		gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
 		gtk_tree_view_column_set_clickable (column, FALSE);
 		gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, NULL);
@@ -1316,26 +1303,26 @@ rb_entry_view_constructor (GType type, g
 				       _("Now Playing"), NULL);
 	}
 
-	view->priv->gconf_notification_id = 
+	view->priv->gconf_notification_id =
 		eel_gconf_notification_add (CONF_UI_COLUMNS_SETUP,
 					    rb_entry_view_columns_config_changed_cb,
 					    view);
 	if (view->priv->sorting_key)
-		view->priv->sorting_gconf_notification_id = 
+		view->priv->sorting_gconf_notification_id =
 			eel_gconf_notification_add (view->priv->sorting_key,
 						    rb_entry_view_sort_key_changed_cb,
 						    view);
-	
+
 	if (view->priv->sorting_key)
 		rb_entry_view_set_sorting_type (view, eel_gconf_get_string (view->priv->sorting_key));
-	
+
 	{
 		RhythmDBQueryModel *query_model;
 		query_model = rhythmdb_query_model_new_empty (view->priv->db);
 		rb_entry_view_set_model (view, RHYTHMDB_QUERY_MODEL (query_model));
 		g_object_unref (G_OBJECT (query_model));
 	}
-		
+
 	return G_OBJECT (view);
 }
 
@@ -1393,25 +1380,25 @@ rb_entry_view_playing_song_changed (RBSh
 {
  	gboolean realized, visible;
   	GtkTreeIter iter;
-  
+
  	g_return_if_fail (RB_IS_ENTRY_VIEW (view));
-  
+
 	if (view->priv->playing_entry != NULL) {
 		if (view->priv->playing_state != RB_ENTRY_VIEW_NOT_PLAYING)
 			rb_entry_view_emit_row_changed (view, view->priv->playing_entry);
 		g_object_unref (G_OBJECT (view->priv->playing_model));
 	}
- 	
+
  	view->priv->playing_entry = entry;
  	g_object_ref (G_OBJECT (view->priv->model));
  	view->priv->playing_model = view->priv->model;
- 
+
  	if (view->priv->playing_state != RB_ENTRY_VIEW_NOT_PLAYING) {
 		if (view->priv->playing_entry != NULL) {
-			view->priv->playing_entry_in_view = 
+			view->priv->playing_entry_in_view =
 				rb_entry_view_emit_row_changed (view, view->priv->playing_entry);
 		}
-	 
+
 		if (view->priv->playing_entry
 		    && view->priv->playing_entry_in_view) {
 		    rb_entry_view_entry_is_visible (view, view->priv->playing_entry,
@@ -1466,12 +1453,12 @@ rb_entry_view_button_press_cb (GtkTreeVi
 			entry = rhythmdb_query_model_tree_path_to_entry (view->priv->model, path);
 
 			selected = rb_entry_view_get_selected_entries (view);
-			
+
 			if (!g_list_find (selected, entry))
 				rb_entry_view_select_entry (view, entry);
 
 			g_list_free (selected);
-			
+
 		}
 		g_signal_emit (G_OBJECT (view), rb_entry_view_signals[SHOW_POPUP], 0, (path != NULL));
 		return TRUE;
@@ -1586,7 +1573,7 @@ rb_entry_view_rows_reordered_cb (GtkTree
 	GList *i;
 	gint model_size;
 	gboolean scrolled = FALSE;
-	
+
 	rb_debug ("rows reordered");
 
 	model_size = gtk_tree_model_iter_n_children (model, NULL);
@@ -1620,7 +1607,7 @@ rb_entry_view_rows_reordered_cb (GtkTree
 					break;
 				}
 			}
-			
+
 		}
 	}
 
@@ -1664,7 +1651,7 @@ rb_entry_view_scroll_to_entry (RBEntryVi
 			       RhythmDBEntry *entry)
 {
 	GtkTreeIter iter;
-	
+
 	if (rhythmdb_query_model_entry_to_iter (view->priv->model,
 						entry, &iter)) {
 		rb_entry_view_scroll_to_iter (view, &iter);
@@ -1812,7 +1799,7 @@ set_column_visibility (guint propid, Gtk
 {
 	gboolean visible;
 
-	if (g_object_get_qdata (G_OBJECT (column), 
+	if (g_object_get_qdata (G_OBJECT (column),
 				rb_entry_view_column_always_visible) == GINT_TO_POINTER (1))
 		visible = TRUE;
 	else
@@ -1883,12 +1870,11 @@ rb_entry_view_emit_row_changed (RBEntryV
 	return TRUE;
 }
 
-
 void
 rb_entry_view_set_fixed_column_width (RBEntryView *view,
 				      GtkTreeViewColumn *column,
-				      GtkCellRenderer *renderer, 
-				      const gchar **strings) 
+				      GtkCellRenderer *renderer,
+				      const gchar **strings)
 {
 	gint max_width = 0;
 	int i = 0;
@@ -1916,7 +1902,7 @@ const char *
 rb_entry_view_get_time_date_column_sample ()
 {
 	static const char *sample = NULL;
-	/* 
+	/*
 	 * Currently, Japanese is the only translation that uses
 	 * anything other than %Y, %m ,%d, %H, and %M to format dates.
 	 * It uses %B (month name) and %e (days), and the values for
@@ -2011,4 +1997,3 @@ rb_entry_view_state_get_type (void)
 
 	return etype;
 }
-
Index: widgets/rb-song-info.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/rb-song-info.c,v
retrieving revision 1.65
diff -p -u -r1.65 rb-song-info.c
--- widgets/rb-song-info.c	9 Jul 2006 03:52:44 -0000	1.65
+++ widgets/rb-song-info.c	13 Jul 2006 23:40:26 -0000
@@ -57,13 +57,13 @@ static GObject *rb_song_info_constructor
 
 static void rb_song_info_show (GtkWidget *widget);
 static void rb_song_info_finalize (GObject *object);
-static void rb_song_info_set_property (GObject *object, 
+static void rb_song_info_set_property (GObject *object,
 				       guint prop_id,
-				       const GValue *value, 
+				       const GValue *value,
 				       GParamSpec *pspec);
-static void rb_song_info_get_property (GObject *object, 
+static void rb_song_info_get_property (GObject *object,
 				       guint prop_id,
-				       GValue *value, 
+				       GValue *value,
 				       GParamSpec *pspec);
 static void rb_song_info_response_cb (GtkDialog *dialog,
 				      int response_id,
@@ -145,7 +145,7 @@ enum
 	LAST_SIGNAL
 };
 
-enum 
+enum
 {
 	PROP_0,
 	PROP_SOURCE,
@@ -252,16 +252,16 @@ rb_song_info_construct_single (RBSongInf
 	song_info->priv->backward = gtk_dialog_add_button (GTK_DIALOG (song_info),
 							   GTK_STOCK_GO_BACK,
 							   GTK_RESPONSE_NONE);
-	
+
 	g_signal_connect_object (G_OBJECT (song_info->priv->backward),
 				 "clicked",
 				 G_CALLBACK (rb_song_info_backward_clicked_cb),
 				 song_info, 0);
-	
+
 	song_info->priv->forward = gtk_dialog_add_button (GTK_DIALOG (song_info),
 							   GTK_STOCK_GO_FORWARD,
 							   GTK_RESPONSE_NONE);
-	
+
 	g_signal_connect_object (G_OBJECT (song_info->priv->forward),
 				 "clicked",
 				 G_CALLBACK (rb_song_info_forward_clicked_cb),
@@ -383,7 +383,7 @@ rb_song_info_constructor (GType type, gu
 		gtk_container_add (GTK_CONTAINER (GTK_DIALOG (song_info)->vbox),
 				   glade_xml_get_widget (xml, "song_info_notebook"));
 	}
-	
+
 	glade_xml_signal_autoconnect (xml);
 
 	song_info->priv->artist = glade_xml_get_widget (xml, "song_info_artist");
@@ -397,7 +397,7 @@ rb_song_info_constructor (GType type, gu
 	rb_song_info_add_completion (GTK_ENTRY (song_info->priv->genre), song_info->priv->genres);
 	rb_song_info_add_completion (GTK_ENTRY (song_info->priv->artist), song_info->priv->artists);
 	rb_song_info_add_completion (GTK_ENTRY (song_info->priv->album), song_info->priv->albums);
-	
+
 	rb_glade_boldify_label (xml, "album_label");
 	rb_glade_boldify_label (xml, "artist_label");
 	rb_glade_boldify_label (xml, "genre_label");
@@ -502,12 +502,23 @@ rb_song_info_set_property (GObject *obje
 	{
 	case PROP_SOURCE:
 	{
-		RhythmDB* old_db = song_info->priv->db;
+		RhythmDB *old_db = song_info->priv->db;
+
+		if (song_info->priv->source != NULL) {
+			g_signal_handlers_disconnect_by_func (song_info->priv->source,
+							      rb_song_info_query_model_changed_cb,
+							      song_info);
+			g_object_unref (song_info->priv->source);
+			g_object_unref (song_info->priv->query_model);
+			g_object_unref (song_info->priv->db);
+		}
 
 		song_info->priv->source = g_value_get_object (value);
+
 		g_object_ref (G_OBJECT (song_info->priv->source));
 		g_object_get (G_OBJECT (song_info->priv->source),
 			      "query-model", &song_info->priv->query_model, NULL);
+
 		g_signal_connect_object (G_OBJECT (song_info->priv->source),
 					 "notify::query-model",
 					 G_CALLBACK (rb_song_info_query_model_changed_cb),
@@ -516,24 +527,24 @@ rb_song_info_set_property (GObject *obje
 		g_object_get (G_OBJECT (song_info->priv->query_model), "db",
 			      &song_info->priv->db, NULL);
 
-		if(old_db != song_info->priv->db) {
-			if(song_info->priv->albums) {
-				g_object_unref(song_info->priv->albums);
+		if (old_db != song_info->priv->db) {
+			if (song_info->priv->albums) {
+				g_object_unref (song_info->priv->albums);
 			}
-			if(song_info->priv->artists) {
-				g_object_unref(song_info->priv->artists);
+			if (song_info->priv->artists) {
+				g_object_unref (song_info->priv->artists);
 			}
-			if(song_info->priv->genres) {
-				g_object_unref(song_info->priv->genres);
+			if (song_info->priv->genres) {
+				g_object_unref (song_info->priv->genres);
 			}
 
-			song_info->priv->albums  = rhythmdb_property_model_new(song_info->priv->db, RHYTHMDB_PROP_ALBUM);
-			song_info->priv->artists = rhythmdb_property_model_new(song_info->priv->db, RHYTHMDB_PROP_ARTIST);
-			song_info->priv->genres  = rhythmdb_property_model_new(song_info->priv->db, RHYTHMDB_PROP_GENRE);
-
-			g_object_set(song_info->priv->albums,  "query-model", song_info->priv->query_model, NULL);
-			g_object_set(song_info->priv->artists, "query-model", song_info->priv->query_model, NULL);
-			g_object_set(song_info->priv->genres,  "query-model", song_info->priv->query_model, NULL);
+			song_info->priv->albums  = rhythmdb_property_model_new (song_info->priv->db, RHYTHMDB_PROP_ALBUM);
+			song_info->priv->artists = rhythmdb_property_model_new (song_info->priv->db, RHYTHMDB_PROP_ARTIST);
+			song_info->priv->genres  = rhythmdb_property_model_new (song_info->priv->db, RHYTHMDB_PROP_GENRE);
+
+			g_object_set (song_info->priv->albums,  "query-model", song_info->priv->query_model, NULL);
+			g_object_set (song_info->priv->artists, "query-model", song_info->priv->query_model, NULL);
+			g_object_set (song_info->priv->genres,  "query-model", song_info->priv->query_model, NULL);
 
 			if(song_info->priv->album) {
 				GtkEntryCompletion* comp = gtk_entry_get_completion (GTK_ENTRY (song_info->priv->album));
@@ -595,13 +606,13 @@ rb_song_info_new (RBSource *source, RBEn
 	if (!entry_view)
 		entry_view = rb_source_get_entry_view (source);
 
-	if (rb_entry_view_have_selection (entry_view) == FALSE) 
+	if (rb_entry_view_have_selection (entry_view) == FALSE)
 		return NULL;
 
 	/* create the dialog */
-	song_info = g_object_new (RB_TYPE_SONG_INFO, 
-				  "source", source, 
-				  "entry-view", entry_view, 
+	song_info = g_object_new (RB_TYPE_SONG_INFO,
+				  "source", source,
+				  "entry-view", entry_view,
 				  NULL);
 
 	g_return_val_if_fail (song_info->priv != NULL, NULL);
@@ -666,7 +677,6 @@ rb_song_info_set_entry_rating (RBSongInf
 	rhythmdb_entry_set (info->priv->db, entry, RHYTHMDB_PROP_RATING, &value);
 	g_value_unset (&value);
 }
-	
 
 static void
 rb_song_info_rated_cb (RBRating *rating,
@@ -713,7 +723,7 @@ rb_song_info_populate_num_field (GtkEntr
 	g_free (tmp);
 }
 
-static void 
+static void
 rb_song_info_populate_dialog_multiple (RBSongInfo *song_info)
 {
 	gboolean mixed_artists = FALSE;
@@ -797,13 +807,13 @@ rb_song_info_populate_dialog_multiple (R
 		g_object_set (G_OBJECT (song_info->priv->rating), "rating", rating, NULL);
 }
 
-static void 
+static void
 rb_song_info_populate_dialog (RBSongInfo *song_info)
 {
 	const char *text;
 	char *tmp;
 	gulong num;
-	
+
 	g_assert (song_info->priv->current_entry);
 
 	/* update the buttons sensitivity */
@@ -811,7 +821,7 @@ rb_song_info_populate_dialog (RBSongInfo
 
 	text = rhythmdb_entry_get_string (song_info->priv->current_entry, RHYTHMDB_PROP_TITLE);
 	gtk_entry_set_text (GTK_ENTRY (song_info->priv->title), text);
-	
+
 	tmp = g_strdup_printf (_("%s Properties"), text);
 	gtk_window_set_title (GTK_WINDOW (song_info), tmp);
 	g_free (tmp);
@@ -915,22 +925,22 @@ rb_song_info_update_location (RBSongInfo
 	if (text != NULL) {
 		char *tmp, *tmp_utf8;
 		char *basename, *dir, *desktopdir;
-		
+
 		basename = g_path_get_basename (text);
 		tmp = gnome_vfs_unescape_string_for_display (basename);
 		g_free (basename);
 		tmp_utf8 = g_filename_to_utf8 (tmp, -1, NULL, NULL, NULL);
 		g_free (tmp);
 		if (tmp_utf8 != NULL) {
-			gtk_entry_set_text (GTK_ENTRY (song_info->priv->name), 
+			gtk_entry_set_text (GTK_ENTRY (song_info->priv->name),
 					    tmp_utf8);
 		} else {
-			gtk_entry_set_text (GTK_ENTRY (song_info->priv->name), 
+			gtk_entry_set_text (GTK_ENTRY (song_info->priv->name),
 					    _("Unknown file name"));
 		}
 
 		g_free (tmp_utf8);
-	
+
 		tmp = gnome_vfs_get_local_path_from_uri (text);
 		if (tmp == NULL)
 			tmp = g_strdup (text);
@@ -950,10 +960,10 @@ rb_song_info_update_location (RBSongInfo
 		g_free (desktopdir);
 
 		if (tmp_utf8 != NULL) {
-			gtk_entry_set_text (GTK_ENTRY (song_info->priv->location), 
+			gtk_entry_set_text (GTK_ENTRY (song_info->priv->location),
 					    tmp_utf8);
 		} else {
-			gtk_entry_set_text (GTK_ENTRY (song_info->priv->location), 
+			gtk_entry_set_text (GTK_ENTRY (song_info->priv->location),
 					    _("Unknown location"));
 		}
 		g_free (tmp_utf8);
@@ -967,7 +977,7 @@ rb_song_info_backward_clicked_cb (GtkWid
 	RhythmDBEntry *new_entry;
 
 	rb_song_info_sync_entries (RB_SONG_INFO (song_info));
-	new_entry = 
+	new_entry =
 		rhythmdb_query_model_get_previous_from_entry (song_info->priv->query_model,
 							      song_info->priv->current_entry);
 	g_return_if_fail (new_entry != NULL);
@@ -987,7 +997,7 @@ rb_song_info_forward_clicked_cb (GtkWidg
 	RhythmDBEntry *new_entry;
 
 	rb_song_info_sync_entries (RB_SONG_INFO (song_info));
-	new_entry = 
+	new_entry =
 		rhythmdb_query_model_get_next_from_entry (song_info->priv->query_model,
 							  song_info->priv->current_entry);
 	g_return_if_fail (new_entry != NULL);
@@ -1013,16 +1023,16 @@ rb_song_info_update_buttons (RBSongInfo 
 
 	if (!song_info->priv->current_entry)
 		return;
-	
+
 	/* backward */
 	entry = rhythmdb_query_model_get_previous_from_entry (song_info->priv->query_model,
 							      song_info->priv->current_entry);
-	
+
 	gtk_widget_set_sensitive (song_info->priv->backward, entry != NULL);
 	/* forward */
 	entry = rhythmdb_query_model_get_next_from_entry (song_info->priv->query_model,
 							  song_info->priv->current_entry);
-	
+
 	gtk_widget_set_sensitive (song_info->priv->forward, entry != NULL);
 }
 
@@ -1086,7 +1096,7 @@ rb_song_info_query_model_changed_cb (GOb
 	g_signal_connect_object (G_OBJECT (song_info->priv->query_model),
 				 "rows-reordered", G_CALLBACK (rb_song_info_query_model_reordered_cb),
 				 song_info, 0);
-	
+
 	/* update next button sensitivity */
 	rb_song_info_update_buttons (song_info);
 }
@@ -1147,7 +1157,7 @@ rb_song_info_sync_entries_multiple (RBSo
 {
 	const char *genre = gtk_entry_get_text (GTK_ENTRY (dialog->priv->genre));
 	const char *artist = gtk_entry_get_text (GTK_ENTRY (dialog->priv->artist));
-	const char *album = gtk_entry_get_text (GTK_ENTRY (dialog->priv->album));	
+	const char *album = gtk_entry_get_text (GTK_ENTRY (dialog->priv->album));
 	const char *year_str = gtk_entry_get_text (GTK_ENTRY (dialog->priv->year));
 	const char *discn_str = gtk_entry_get_text (GTK_ENTRY (dialog->priv->disc_cur));
 
@@ -1164,10 +1174,10 @@ rb_song_info_sync_entries_multiple (RBSo
 		g_value_set_string (&val, album);
 		for (tem = dialog->priv->selected_entries; tem; tem = tem->next) {
 			const char *entry_album;
-			
+
 			entry = (RhythmDBEntry *)tem->data;
 			entry_album = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM);
-			
+
 			if (strcmp (album, entry_album) == 0)
 				continue;
 			rhythmdb_entry_set (dialog->priv->db, entry,
@@ -1176,16 +1186,16 @@ rb_song_info_sync_entries_multiple (RBSo
 		}
 		g_value_unset (&val);
 	}
-	
+
 	if (strlen (artist) > 0) {
 		g_value_init (&val, G_TYPE_STRING);
 		g_value_set_string (&val, artist);
 		for (tem = dialog->priv->selected_entries; tem; tem = tem->next) {
 			const char *entry_artist;
-			
+
 			entry = (RhythmDBEntry *)tem->data;
 			entry_artist = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST);
-			
+
 			if (strcmp (artist, entry_artist) == 0)
 				continue;
 			rhythmdb_entry_set (dialog->priv->db, entry,
@@ -1203,7 +1213,7 @@ rb_song_info_sync_entries_multiple (RBSo
 
 			entry = (RhythmDBEntry *)tem->data;
 			entry_genre = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_GENRE);
-			
+
 			if (strcmp (genre, entry_genre) == 0)
 				continue;
 			rhythmdb_entry_set (dialog->priv->db, entry,
@@ -1239,7 +1249,7 @@ rb_song_info_sync_entries_multiple (RBSo
 			g_date_free (date);
 
 	}
-	
+
 	discn = g_ascii_strtoull (discn_str, &endptr, 10);
 	if (endptr != discn_str) {
 		GType type;
@@ -1250,7 +1260,7 @@ rb_song_info_sync_entries_multiple (RBSo
 
 		for (tem = dialog->priv->selected_entries; tem; tem = tem->next) {
 			gulong entry_disc_num;
-			
+
 			entry = (RhythmDBEntry *)tem->data;
 			entry_disc_num = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_DISC_NUMBER);
 
@@ -1263,7 +1273,6 @@ rb_song_info_sync_entries_multiple (RBSo
 		g_value_unset (&val);
 	}
 
-
 	if (changed)
 		rhythmdb_commit (dialog->priv->db);
 }
@@ -1274,7 +1283,7 @@ rb_song_info_sync_entry_single (RBSongIn
 	const char *title;
 	const char *genre;
 	const char *artist;
-	const char *album;	
+	const char *album;
 	const char *tracknum_str;
 	const char *discnum_str;
 	const char *year_str;
@@ -1292,7 +1301,7 @@ rb_song_info_sync_entry_single (RBSongIn
 	title = gtk_entry_get_text (GTK_ENTRY (dialog->priv->title));
 	genre = gtk_entry_get_text (GTK_ENTRY (dialog->priv->genre));
 	artist = gtk_entry_get_text (GTK_ENTRY (dialog->priv->artist));
-	album = gtk_entry_get_text (GTK_ENTRY (dialog->priv->album));	
+	album = gtk_entry_get_text (GTK_ENTRY (dialog->priv->album));
 	tracknum_str = gtk_entry_get_text (GTK_ENTRY (dialog->priv->track_cur));
 	discnum_str = gtk_entry_get_text (GTK_ENTRY (dialog->priv->disc_cur));
 	year_str = gtk_entry_get_text (GTK_ENTRY (dialog->priv->year));
@@ -1311,7 +1320,7 @@ rb_song_info_sync_entry_single (RBSongIn
 		g_value_unset (&val);
 		changed = TRUE;
 	}
-	
+
 	discnum = g_ascii_strtoull (discnum_str, &endptr, 10);
 	entry_val = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_DISC_NUMBER);
 	if ((endptr != discnum_str) && (discnum != entry_val)) {
@@ -1323,14 +1332,14 @@ rb_song_info_sync_entry_single (RBSongIn
 		g_value_unset (&val);
 		changed = TRUE;
 	}
-	
+
 	year = g_ascii_strtoull (year_str, &endptr, 10);
 	entry_val = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_YEAR);
-	if ((endptr != year_str) && 
-	    (year != entry_val || 
+	if ((endptr != year_str) &&
+	    (year != entry_val ||
 	     (entry_val == 0 && year > 0))) {
 		GDate *date = NULL;
-	
+
 		if (year > 0) {
 			if (entry_val > 0) {
 				gulong julian;
@@ -1349,13 +1358,12 @@ rb_song_info_sync_entry_single (RBSongIn
 		g_value_set_ulong (&val, (date ? g_date_get_julian (date) : 0));
 		rhythmdb_entry_set (dialog->priv->db, entry, RHYTHMDB_PROP_DATE, &val);
 		changed = TRUE;
-		
+
 		g_value_unset (&val);
 		if (date)
 			g_date_free (date);
 	}
 
-
 	entry_string = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE);
 	if (strcmp (title, entry_string)) {
 		type = rhythmdb_get_property_type (dialog->priv->db,
@@ -1412,7 +1420,7 @@ rb_song_info_sync_entry_single (RBSongIn
 
 	if (changed)
 		rhythmdb_commit (dialog->priv->db);
-}	
+}
 
 static void
 rb_song_info_sync_entries (RBSongInfo *dialog)
