rhythmbox r5904 - in trunk: . plugins/audiocd
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5904 - in trunk: . plugins/audiocd
- Date: Wed, 10 Sep 2008 15:17:59 +0000 (UTC)
Author: hadess
Date: Wed Sep 10 15:17:59 2008
New Revision: 5904
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5904&view=rev
Log:
2008-09-10 Bastien Nocera <hadess hadess net>
* plugins/audiocd/rb-audiocd-source.c (impl_want_uri): Fix audiocd
activation from nautilus
Modified:
trunk/ChangeLog
trunk/plugins/audiocd/rb-audiocd-source.c
Modified: trunk/plugins/audiocd/rb-audiocd-source.c
==============================================================================
--- trunk/plugins/audiocd/rb-audiocd-source.c (original)
+++ trunk/plugins/audiocd/rb-audiocd-source.c Wed Sep 10 15:17:59 2008
@@ -762,15 +762,17 @@
impl_want_uri (RBSource *source, const char *uri)
{
GVolume *volume;
- const char *uri_path;
- char *device_path;
+ GMount *mount;
+ GFile *file;
int retval;
retval = 0;
- if (g_str_has_prefix (uri, "cdda://") == FALSE)
+ file = g_file_new_for_uri (uri);
+ if (g_file_has_uri_scheme (file, "cdda") == FALSE) {
+ g_object_unref (file);
return 0;
- uri_path = uri + strlen ("cdda://");
+ }
g_object_get (G_OBJECT (source),
"volume", &volume,
@@ -778,11 +780,17 @@
if (volume == NULL)
return 0;
- device_path = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
- if (device_path != NULL && strcmp (device_path, uri_path) == 0) {
- retval = 100;
+ mount = g_volume_get_mount (volume);
+ if (mount) {
+ GFile *root;
+
+ root = g_mount_get_root (mount);
+ retval = g_file_equal (root, file) ? 100 : 0;
+ g_object_unref (mount);
+ g_object_unref (root);
}
- g_free (device_path);
+ g_object_unref (file);
+
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]