Index: src/totem-playlist.c
===================================================================
RCS file: /cvs/gnome/totem/src/totem-playlist.c,v
retrieving revision 1.106
diff -p -u -B -r1.106 totem-playlist.c
--- src/totem-playlist.c	2 Nov 2006 16:06:42 -0000	1.106
+++ src/totem-playlist.c	3 Nov 2006 14:58:30 -0000
@@ -69,7 +69,6 @@ struct TotemPlaylistPrivate
 
 	/* This is the playing icon */
 	GdkPixbuf *icon;
-	GtkIconTheme *theme;
 
 	GtkActionGroup *action_group;
 	GtkUIManager *ui_manager;
@@ -81,14 +80,7 @@ struct TotemPlaylistPrivate
 	char *path;
 	char *save_path;
 
-	/* Repeat mode */
-	gboolean repeat;
-
-	/* Reorder Flag */
-	gboolean drag_started;
-
 	/* Shuffle mode */
-	gboolean shuffle;
 	int *shuffled;
 	int current_shuffled, shuffle_len;
 
@@ -96,7 +88,16 @@ struct TotemPlaylistPrivate
 
 	int x, y;
 
-	gboolean disable_save_to_disk;
+	guint disable_save_to_disk : 1;
+
+	/* Repeat mode */
+	guint repeat : 1;
+
+	/* Reorder Flag */
+	guint drag_started : 1;
+
+	/* Shuffle mode */
+	guint shuffle : 1;
 };
 
 /* Signals */
@@ -143,8 +144,6 @@ static const GtkActionEntry entries[] = 
 	{ "copy-location", GTK_STOCK_COPY, N_("_Copy location"), NULL, N_("Copy the location to the clipboard"), G_CALLBACK (playlist_copy_location_action_activated) }
 };
 
-static GtkWidgetClass *parent_class = NULL;
-
 static void totem_playlist_class_init (TotemPlaylistClass *class);
 static void totem_playlist_init       (TotemPlaylist      *playlist);
 
@@ -646,7 +645,7 @@ drag_begin_cb (GtkWidget *treeview, GdkD
 {
 	TotemPlaylist *playlist = (TotemPlaylist *)data;
 
-	playlist->_priv->drag_started= TRUE;
+	playlist->_priv->drag_started = TRUE;
 
 	return;
 }
@@ -690,23 +689,31 @@ selection_changed (GtkTreeSelection *tre
 }
 
 static void
-load_icon (TotemPlaylist *playlist)
+totem_playlist_style_set (GtkWidget *widget,
+			  GtkStyle *previous_style)
 {
+	TotemPlaylist *playlist = TOTEM_PLAYLIST (widget);
+	TotemPlaylistPrivate *priv = playlist->_priv;
 	gint w, h;
+	GError *error = NULL;
+	GtkIconTheme *theme;
+	const char icon_name[] = "audio-volume-medium";
 
-	if (playlist->_priv->icon != NULL) {
-		g_object_unref (G_OBJECT (playlist->_priv->icon));
+	GTK_WIDGET_CLASS (totem_playlist_parent_class)->style_set (widget, previous_style);
+
+	if (priv->icon != NULL) {
+		g_object_unref (priv->icon);
 	}
 
-	gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
-	playlist->_priv->icon = gtk_icon_theme_load_icon
-		(playlist->_priv->theme, "audio-volume-medium", w, 0, NULL);
-}
+	gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (widget),
+					   GTK_ICON_SIZE_MENU, &w, &h);
 
-static void
-icon_theme_changed (GtkIconTheme *theme, TotemPlaylist *playlist)
-{
-	load_icon (playlist);
+	theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
+	priv->icon = gtk_icon_theme_load_icon (theme, icon_name, w, 0, &error);
+	if (error) {
+		g_print ("Couldn't load themed icon '%s': %s\n", icon_name, error->message);
+		g_error_free (error);
+	}
 }
 
 /* This function checks if the current item is NULL, and try to update it
@@ -1323,7 +1330,7 @@ update_repeat_cb (GConfClient *client, g
 	gboolean repeat;
 
 	repeat = gconf_value_get_bool (entry->value);
-	playlist->_priv->repeat = repeat;
+	playlist->_priv->repeat = repeat != FALSE;
 
 	g_signal_emit (G_OBJECT (playlist),
 			totem_playlist_table_signals[CHANGED], 0,
@@ -1430,7 +1437,7 @@ update_lockdown (GConfClient *client, gu
 {
 	playlist->_priv->disable_save_to_disk = gconf_client_get_bool
 			(playlist->_priv->gc,
-			"/desktop/gnome/lockdown/disable_save_to_disk", NULL);
+			"/desktop/gnome/lockdown/disable_save_to_disk", NULL) != FALSE;
 	totem_playlist_update_save_button (playlist);
 }
 
@@ -1441,7 +1448,7 @@ init_config (TotemPlaylist *playlist)
 
 	playlist->_priv->disable_save_to_disk = gconf_client_get_bool
 	       		(playlist->_priv->gc,
-			"/desktop/gnome/lockdown/disable_save_to_disk", NULL);
+			"/desktop/gnome/lockdown/disable_save_to_disk", NULL) != FALSE;
 	totem_playlist_update_save_button (playlist);
 
 	gconf_client_add_dir (playlist->_priv->gc, GCONF_PREFIX,
@@ -1461,9 +1468,9 @@ init_config (TotemPlaylist *playlist)
 			playlist, NULL, NULL);
 
 	playlist->_priv->repeat = gconf_client_get_bool (playlist->_priv->gc,
-			GCONF_PREFIX"/repeat", NULL);
+			GCONF_PREFIX"/repeat", NULL) != FALSE;
 	playlist->_priv->shuffle = gconf_client_get_bool (playlist->_priv->gc,
-			GCONF_PREFIX"/shuffle", NULL);
+			GCONF_PREFIX"/shuffle", NULL) != FALSE;
 }
 
 static void
@@ -1475,25 +1482,6 @@ totem_playlist_entry_parsed (TotemPlPars
 }
 
 static void
-totem_playlist_realize (GtkWidget *widget, TotemPlaylist *playlist)
-{
-	playlist->_priv->theme = gtk_icon_theme_get_for_screen
-		(gtk_widget_get_screen (GTK_WIDGET (widget)));
-	g_signal_connect (G_OBJECT (playlist->_priv->theme), "changed",
-			G_CALLBACK (icon_theme_changed), playlist);
-	load_icon (playlist);
-}
-
-static void
-totem_playlist_unrealize (GtkWidget *widget, TotemPlaylist *playlist)
-{
-	if (playlist->_priv->theme != NULL) {
-		g_object_unref (playlist->_priv->theme);
-		playlist->_priv->theme = NULL;
-	}
-}
-
-static void
 totem_playlist_init (TotemPlaylist *playlist)
 {
 	playlist->_priv = g_new0 (TotemPlaylistPrivate, 1);
@@ -1508,15 +1496,6 @@ totem_playlist_init (TotemPlaylist *play
 			"entry",
 			G_CALLBACK (totem_playlist_entry_parsed),
 			playlist);
-
-	g_signal_connect (G_OBJECT (playlist),
-			"realize",
-			G_CALLBACK (totem_playlist_realize),
-			playlist);
-	g_signal_connect (G_OBJECT (playlist),
-			"unrealize",
-			G_CALLBACK (totem_playlist_unrealize),
-			playlist);
 }
 
 static void
@@ -1542,9 +1521,7 @@ totem_playlist_finalize (GObject *object
 		g_object_unref (G_OBJECT (playlist->_priv->action_group));
 	}
 
-	if (G_OBJECT_CLASS (parent_class)->finalize != NULL) {
-		(* G_OBJECT_CLASS (parent_class)->finalize) (object);
-	}
+	G_OBJECT_CLASS (totem_playlist_parent_class)->finalize (object);
 }
 
 GtkWidget*
@@ -2268,9 +2245,12 @@ totem_playlist_set_current (TotemPlaylis
 static void
 totem_playlist_class_init (TotemPlaylistClass *klass)
 {
-	parent_class = gtk_type_class (gtk_dialog_get_type ());
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+	object_class->finalize = totem_playlist_finalize;
 
-	G_OBJECT_CLASS (klass)->finalize = totem_playlist_finalize;
+	widget_class->style_set = totem_playlist_style_set;
 
 	/* Signals */
 	totem_playlist_table_signals[CHANGED] =
Index: src/totem-playlist.h
===================================================================
RCS file: /cvs/gnome/totem/src/totem-playlist.h,v
retrieving revision 1.16
diff -p -u -B -r1.16 totem-playlist.h
--- src/totem-playlist.h	11 Sep 2006 21:29:49 -0000	1.16
+++ src/totem-playlist.h	3 Nov 2006 14:58:30 -0000
@@ -30,6 +30,7 @@
 
 G_BEGIN_DECLS
 
+/* WhyTF is this using GTK namespace? */
 #define GTK_TYPE_PLAYLIST            (totem_playlist_get_type ())
 #define TOTEM_PLAYLIST(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_PLAYLIST, TotemPlaylist))
 #define TOTEM_PLAYLIST_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PLAYLIST, TotemPlaylistClass))
