rpms/rhythmbox/devel rb-activate-generic-players-from-uri.patch, NONE, 1.1 rhythmbox.spec, 1.171, 1.172

Bastien Nocera (hadess) fedora-extras-commits at redhat.com
Mon Mar 3 23:18:24 UTC 2008


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16176

Modified Files:
	rhythmbox.spec 
Added Files:
	rb-activate-generic-players-from-uri.patch 
Log Message:
* Mon Mar 03 2008 - Bastien Nocera <bnocera at redhat.com> - 0.11.4-10
- Add a patch to fix activating audio players with a directory instead
  of a device path (GNOME bug #519737)


rb-activate-generic-players-from-uri.patch:

--- NEW FILE rb-activate-generic-players-from-uri.patch ---
Index: sources/rb-removable-media-source.c
===================================================================
--- sources/rb-removable-media-source.c	(revision 5601)
+++ sources/rb-removable-media-source.c	(working copy)
@@ -62,6 +62,8 @@
 static void impl_paste (RBSource *source, GList *entries);
 #endif
 static gboolean impl_receive_drag (RBSource *asource, GtkSelectionData *data);
+static guint impl_want_uri (RBSource *source, const char *uri);
+static gboolean impl_uri_is_source (RBSource *source, const char *uri);
 
 typedef struct
 {
@@ -102,6 +104,8 @@
 	source_class->impl_delete = NULL;
 	source_class->impl_get_config_widget = NULL;
 	source_class->impl_show_popup = (RBSourceFeatureFunc) rb_false_function;
+	source_class->impl_want_uri = impl_want_uri;
+	source_class->impl_uri_is_source = impl_uri_is_source;
 
 	browser_source_class->impl_get_paned_key = NULL;
 	browser_source_class->impl_has_drop_support = (RBBrowserSourceFeatureFunc) rb_false_function;
@@ -367,6 +371,50 @@
 
 #endif
 
+static guint
+impl_want_uri (RBSource *source, const char *uri)
+{
+	GnomeVFSVolume *volume;
+	char *activation_uri;
+	int retval, len;
+
+	retval = 0;
+
+	/* A default version for use with the audio players
+	 * that use mass storage */
+	if (g_str_has_prefix (uri, "file://") == FALSE)
+		return 0;
+
+	g_object_get (G_OBJECT (source),
+		      "volume", &volume,
+		      NULL);
+	if (volume == NULL)
+		return 0;
+
+	activation_uri = gnome_vfs_volume_get_activation_uri (volume);
+	if (activation_uri == NULL)
+		return 0;
+
+	len = strlen (uri);
+	if (uri[len - 1] == '/') {
+		if (strncmp (uri, activation_uri, len - 1) == 0)
+			retval = 100;
+	} else if (strcmp (uri, activation_uri) == 0)
+		retval = 100;
+
+	g_free (activation_uri);
+
+	return retval;
+}
+
+static gboolean
+impl_uri_is_source (RBSource *source, const char *uri)
+{
+	if (impl_want_uri (source, uri) == 100)
+		return TRUE;
+	return FALSE;
+}
+
 static RhythmDB *
 get_db_for_source (RBSource *source)
 {
Index: shell/rb-shell.c
===================================================================
--- shell/rb-shell.c	(revision 5601)
+++ shell/rb-shell.c	(working copy)
@@ -3327,6 +3327,14 @@
 								     uri, error))
 					return FALSE;
 			}
+		} else if (result == TOTEM_PL_PARSER_RESULT_IGNORED && rb_uri_is_local (uri)) {
+			/* That happens for directories */
+			playlist_source = rb_shell_guess_source_for_uri (shell, uri);
+			if (playlist_source == NULL || rb_source_want_uri (playlist_source, uri) < 100) {
+				rb_debug ("%s is a directory, but doesn't have a source, adding as a dir", uri);
+				if (!rb_shell_add_uri (shell, uri, NULL, NULL, error))
+					return FALSE;
+			}
 		} else {
 			rb_debug ("%s didn't parse as a playlist", uri);
 			if (!rb_shell_add_uri (shell, uri, NULL, NULL, error))


Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- rhythmbox.spec	19 Feb 2008 03:39:57 -0000	1.171
+++ rhythmbox.spec	3 Mar 2008 23:17:47 -0000	1.172
@@ -3,7 +3,7 @@
 Name: rhythmbox
 Summary: Music Management Application 
 Version: 0.11.4
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2+ and GFDL+
 Group: Applications/Multimedia
 URL: http://www.gnome.org/projects/rhythmbox/
@@ -49,7 +49,8 @@
 # For the libsoup 2.4 patch
 BuildRequires: intltool autoconf automake17 libtool gettext check-devel
 
-ExcludeArch:    s390 s390x
+# Added ppc and ppc64 for https://bugzilla.redhat.com/show_bug.cgi?id=435771
+ExcludeArch:    s390 s390x ppc ppc64
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=428034
 Patch0: rb-disable-power-plugin-by-default.patch
@@ -64,6 +65,9 @@
 
 Patch5: rb-automake-warning.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=519737
+Patch6: rb-activate-generic-players-from-uri.patch
+
 %description
 Rhythmbox is an integrated music management application based on the powerful
 GStreamer media framework. It has a number of features, including an easy to
@@ -97,6 +101,7 @@
 %patch3 -p1 -b .soup24
 %patch4 -p0 -b .gsd
 %patch5 -p0 -b .automake
+%patch6 -p0 -b .player-activate
 
 %build
 autoconf
@@ -214,6 +219,10 @@
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Mon Mar 03 2008 - Bastien Nocera <bnocera at redhat.com> - 0.11.4-10
+- Add a patch to fix activating audio players with a directory instead
+  of a device path (GNOME bug #519737)
+
 * Mon Feb 18 2008 Matthias Clasen <mclasen at redhat.com> - 0.11.4-9
 - Fix the media player patch to work
 




More information about the fedora-extras-commits mailing list