rhythmbox r5857 - in trunk: . plugins/audioscrobbler



Author: jmatthew
Date: Thu Aug 14 11:35:53 2008
New Revision: 5857
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5857&view=rev

Log:
2008-08-14  Jonathan Matthew  <jonathan d14n org>

	* plugins/audioscrobbler/rb-lastfm-source.c:
	(rb_lastfm_source_class_init), (rb_lastfm_source_set_property),
	(rb_lastfm_source_get_property), (rb_lastfm_source_new):
	Make the track entry type the main entry type for the last.fm source,
	and only register that type with the shell.  The shell can only handle
	the main entry type being registered, and crashes when a source that
	does otherwise is created for the second time.  Fixes #546609.


Modified:
   trunk/ChangeLog
   trunk/plugins/audioscrobbler/rb-lastfm-source.c

Modified: trunk/plugins/audioscrobbler/rb-lastfm-source.c
==============================================================================
--- trunk/plugins/audioscrobbler/rb-lastfm-source.c	(original)
+++ trunk/plugins/audioscrobbler/rb-lastfm-source.c	Thu Aug 14 11:35:53 2008
@@ -266,7 +266,7 @@
 {
 	PROP_0,
 	PROP_ENTRY_TYPE,
-	PROP_TRACK_ENTRY_TYPE,
+	PROP_STATION_ENTRY_TYPE,
 	PROP_PROXY_CONFIG,
 	PROP_PLAY_ORDER
 };
@@ -324,14 +324,14 @@
 					 PROP_ENTRY_TYPE,
 					 g_param_spec_boxed ("entry-type",
 							     "Entry type",
-							     "Entry type for last.fm stations",
+							     "Entry type for last.fm tracks",
 							     RHYTHMDB_TYPE_ENTRY_TYPE,
 							     G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class,
-					 PROP_TRACK_ENTRY_TYPE,
-					 g_param_spec_boxed ("track-entry-type",
+					 PROP_STATION_ENTRY_TYPE,
+					 g_param_spec_boxed ("station-entry-type",
 							     "Entry type",
-							     "Entry type for last.fm tracks",
+							     "Entry type for last.fm stations",
 							     RHYTHMDB_TYPE_ENTRY_TYPE,
 							     G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class,
@@ -587,11 +587,11 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		source->priv->station_entry_type = g_value_get_boxed (value);
-		break;
-	case PROP_TRACK_ENTRY_TYPE:
 		source->priv->track_entry_type = g_value_get_boxed (value);
 		break;
+	case PROP_STATION_ENTRY_TYPE:
+		source->priv->station_entry_type = g_value_get_boxed (value);
+		break;
 	case PROP_PROXY_CONFIG:
 		source->priv->proxy_config = g_value_get_object (value);
 		g_object_ref (G_OBJECT (source->priv->proxy_config));
@@ -612,11 +612,11 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		g_value_set_boxed (value, source->priv->station_entry_type);
-		break;
-	case PROP_TRACK_ENTRY_TYPE:
 		g_value_set_boxed (value, source->priv->track_entry_type);
 		break;
+	case PROP_STATION_ENTRY_TYPE:
+		g_value_set_boxed (value, source->priv->station_entry_type);
+		break;
 	case PROP_PLAY_ORDER:
 		g_value_set_object (value, source->priv->play_order);
 		break;
@@ -677,12 +677,12 @@
 	source = RB_SOURCE (g_object_new (RB_TYPE_LASTFM_SOURCE,
 					  "name", _("Last.fm"),
 					  "shell", shell,
-					  "entry-type", station_entry_type,
-					  "track-entry-type", track_entry_type,
+					  "station-entry-type", station_entry_type,
+					  "entry-type", track_entry_type,
 					  "proxy-config", proxy_config,
 					  "source-group", RB_SOURCE_GROUP_LIBRARY,
 					  NULL));
-	rb_shell_register_entry_type_for_source (shell, source, station_entry_type);
+
 	rb_shell_register_entry_type_for_source (shell, source, track_entry_type);
 
 	g_object_unref (db);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]