rpms/rhythmbox/devel rb-ddkit-monitor.patch, NONE, 1.1 rhythmbox.spec, 1.239, 1.240
Bastien Nocera
hadess at fedoraproject.org
Thu Apr 9 16:49:04 UTC 2009
Author: hadess
Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7204
Modified Files:
rhythmbox.spec
Added Files:
rb-ddkit-monitor.patch
Log Message:
* Thu Apr 09 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-4
- Fix iPod detection with the DeviceKit-disks gvfs monitor (#493640)
rb-ddkit-monitor.patch:
--- NEW FILE rb-ddkit-monitor.patch ---
Index: lib/rb-util.c
===================================================================
--- lib/rb-util.c (revision 6281)
+++ lib/rb-util.c (working copy)
@@ -38,6 +38,11 @@
#include <gobject/gvaluecollector.h>
#include <gio/gio.h>
+#ifdef HAVE_HAL
+#include <libhal.h>
+#include <dbus/dbus.h>
+#endif
+
#include "rb-util.h"
#include "rb-debug.h"
@@ -991,3 +996,39 @@
return gdk_pixbuf_scale_simple (pixbuf, d_width, d_height, GDK_INTERP_BILINEAR);
}
+#ifdef HAVE_HAL
+char *
+rhythmbox_get_volume_udi (GVolume *volume, gpointer ctx)
+{
+ char *udi, *dev, **udis;
+ int num_udis;
+
+ g_return_val_if_fail (volume != NULL, NULL);
+ g_return_val_if_fail (G_IS_VOLUME (volume), NULL);
+ g_return_val_if_fail (ctx != NULL, NULL);
+
+ udi = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_HAL_UDI);
+ if (udi != NULL)
+ return udi;
+
+ dev = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ udis = libhal_manager_find_device_string_match ((LibHalContext *) ctx,
+ "block.device", dev,
+ &num_udis, NULL);
+
+ if (udis != NULL || num_udis < 1)
+ return NULL;
+
+ udi = g_strdup (udis[0]);
+ libhal_free_string_array (udis);
+
+ return udi;
+}
+#else
+char *
+rhythmbox_get_volume_udi (GVolume *volume, gpointer ctx)
+{
+ return NULL;
+}
+#endif /* HAVE_HAL */
+
Index: lib/rb-util.h
===================================================================
--- lib/rb-util.h (revision 6281)
+++ lib/rb-util.h (working copy)
@@ -100,6 +100,8 @@
GdkPixbuf *rb_scale_pixbuf_to_size (GdkPixbuf *pixbuf,
GtkIconSize size);
+char *rhythmbox_get_volume_udi (GVolume *volume, gpointer ctx);
+
G_END_DECLS
#endif /* __RB_UTIL_H */
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am (revision 6281)
+++ lib/Makefile.am (working copy)
@@ -49,9 +49,10 @@
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
$(SOUP_CFLAGS) \
+ $(HAL_CFLAGS) \
$(RHYTHMBOX_CFLAGS)
-librb_la_LIBADD = $(SOUP_LIBS) -lSM -lICE
+librb_la_LIBADD = $(SOUP_LIBS) $(HAL_LIBS) -lSM -lICE
BUILT_SOURCES=
Index: plugins/generic-player/rb-nokia770-source.c
===================================================================
--- plugins/generic-player/rb-nokia770-source.c (revision 6281)
+++ plugins/generic-player/rb-nokia770-source.c (working copy)
@@ -136,14 +136,12 @@
}
-#ifdef HAVE_HAL
-
static gboolean
-hal_udi_is_nokia770 (const char *udi)
+volume_is_nokia770 (GVolume *volume)
{
LibHalContext *ctx;
DBusConnection *conn;
- char *parent_udi;
+ char *parent_udi, *udi;
char *parent_name;
gboolean result;
DBusError error;
@@ -153,6 +151,7 @@
dbus_error_init (&error);
conn = NULL;
+ udi = NULL;
parent_udi = NULL;
parent_name = NULL;
@@ -169,6 +168,10 @@
if (!libhal_ctx_init (ctx, &error) || dbus_error_is_set (&error))
goto end;
+ udi = rhythmbox_get_volume_udi (volume, ctx);
+ if (udi == NULL)
+ goto end;
+
inited = TRUE;
parent_udi = libhal_device_get_property_string (ctx,
udi,
@@ -206,6 +209,7 @@
}
end:
+ g_free (udi);
g_free (parent_name);
g_free (parent_udi);
@@ -225,25 +229,20 @@
return result;
}
-#endif
gboolean
rb_nokia770_is_mount_player (GMount *mount)
{
- gboolean result = FALSE;
- gchar *str;
+ gboolean result;
GVolume *volume;
volume = g_mount_get_volume (mount);
- if (volume != NULL) {
- str = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_HAL_UDI);
- if (str != NULL) {
- result = hal_udi_is_nokia770 (str);
- g_free (str);
- }
- g_object_unref (volume);
- }
+ if (volume == NULL)
+ return FALSE;
+ result = volume_is_nokia770 (volume);
+ g_object_unref (volume);
+
return result;
}
Index: plugins/generic-player/rb-psp-source.c
===================================================================
--- plugins/generic-player/rb-psp-source.c (revision 6281)
+++ plugins/generic-player/rb-psp-source.c (working copy)
@@ -272,11 +272,11 @@
}
static gboolean
-hal_udi_is_psp (const char *udi)
+volume_is_psp (GVolume *volume)
{
LibHalContext *ctx;
DBusConnection *conn;
- char *parent_udi;
+ char *parent_udi, *udi;
char *parent_name;
gboolean result;
DBusError error;
@@ -285,6 +285,7 @@
result = FALSE;
dbus_error_init (&error);
+ udi = NULL;
parent_udi = NULL;
parent_name = NULL;
@@ -302,6 +303,10 @@
if (!libhal_ctx_init (ctx, &error) || dbus_error_is_set (&error))
goto end;
+ udi = rhythmbox_get_volume_udi (volume, ctx);
+ if (udi == NULL)
+ goto end;
+
inited = TRUE;
parent_udi = libhal_device_get_property_string (ctx, udi,
"info.parent", &error);
@@ -318,6 +323,7 @@
}
end:
+ g_free (udi);
g_free (parent_udi);
g_free (parent_name);
@@ -342,19 +348,15 @@
rb_psp_is_mount_player (GMount *mount)
{
GVolume *volume;
- gboolean result = FALSE;
+ gboolean result;
volume = g_mount_get_volume (mount);
- if (volume != NULL) {
- char *str;
+ if (volume == NULL)
+ return FALSE;
- str = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_HAL_UDI);
- if (str != NULL) {
- result = hal_udi_is_psp (str);
- g_free (str);
- }
- g_object_unref (volume);
- }
+ result = volume_is_psp (volume);
+ g_object_unref (volume);
+
return result;
}
Index: plugins/generic-player/rb-generic-player-source.c
===================================================================
--- plugins/generic-player/rb-generic-player-source.c (revision 6281)
+++ plugins/generic-player/rb-generic-player-source.c (working copy)
@@ -1468,7 +1468,7 @@
return NULL;
}
- udi = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_HAL_UDI);
+ udi = rhythmbox_get_volume_udi (volume, ctx);
if (udi == NULL) {
g_object_unref (volume);
Index: plugins/ipod/rb-ipod-helpers.c
===================================================================
--- plugins/ipod/rb-ipod-helpers.c (revision 6281)
+++ plugins/ipod/rb-ipod-helpers.c (working copy)
@@ -44,6 +44,7 @@
#endif
#include "rb-ipod-helpers.h"
+#include "rb-util.h"
#include "rb-debug.h"
#include "rb-dialog.h"
@@ -402,11 +403,11 @@
#ifdef HAVE_HAL
static gboolean
-hal_udi_is_ipod (const char *udi)
+volume_is_ipod (GVolume *volume)
{
LibHalContext *ctx;
DBusConnection *conn;
- char *parent_udi;
+ char *parent_udi, *udi;
char **methods_list;
guint i;
gboolean result;
@@ -416,6 +417,7 @@
result = FALSE;
dbus_error_init (&error);
+ udi = NULL;
conn = NULL;
parent_udi = NULL;
methods_list = NULL;
@@ -436,6 +438,10 @@
if (!libhal_ctx_init (ctx, &error) || dbus_error_is_set (&error))
goto end;
+ udi = rhythmbox_get_volume_udi (volume, ctx);
+ if (udi == NULL)
+ goto end;
+
inited = TRUE;
parent_udi = libhal_device_get_property_string (ctx, udi,
"info.parent", &error);
@@ -453,6 +459,7 @@
}
end:
+ g_free (udi);
g_free (parent_udi);
libhal_free_string_array (methods_list);
@@ -476,24 +483,16 @@
gboolean
rb_ipod_helpers_is_ipod (GMount *mount)
{
- gchar *udi;
- gboolean result;
+ gboolean result;
GVolume *volume;
volume = g_mount_get_volume (mount);
if (volume == NULL)
return FALSE;
- udi = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_HAL_UDI);
+ result = volume_is_ipod (volume);
g_object_unref (volume);
- if (udi == NULL) {
- return FALSE;
- }
-
- result = hal_udi_is_ipod (udi);
- g_free (udi);
-
return result;
}
Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -r1.239 -r1.240
--- rhythmbox.spec 25 Mar 2009 13:47:33 -0000 1.239
+++ rhythmbox.spec 9 Apr 2009 16:48:33 -0000 1.240
@@ -3,7 +3,7 @@
Name: rhythmbox
Summary: Music Management Application
Version: 0.12.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+ with exceptions and GFDL
Group: Applications/Multimedia
URL: http://projects.gnome.org/rhythmbox/
@@ -54,8 +54,11 @@
Patch0: rb-disable-power-plugin-by-default.patch
# http://svn.gnome.org/viewvc/rhythmbox?view=revision&revision=6245
Patch1: rb-0.12.0-use-decodebin2.patch
-#
+# http://bugzilla.gnome.org/show_bug.cgi?id=510236
Patch2: fix-psp-entry-types.diff
+# http://bugzilla.gnome.org/show_bug.cgi?id=578514
+Patch3: rb-ddkit-monitor.patch
+BuildRequires: automake autoconf libtool
%description
Rhythmbox is an integrated music management application based on the powerful
@@ -92,10 +95,13 @@
%patch0 -p0 -b .dont-disable-suspend
%patch1 -p0 -b .decodebin2
%patch2 -p1 -b .psp-crasher
+%patch3 -p0 -b .ddkit
# Use the installed louie, not the one in Coherence
find plugins/coherence/upnp_coherence/ -type f -exec sed -i 's/coherence.extern.louie as louie/louie/' '{}' ';'
+automake
+
%build
# work around a gstreamer bug
@@ -228,6 +234,9 @@
%{_libdir}/rhythmbox/plugins/upnp_coherence
%changelog
+* Thu Apr 09 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-4
+- Fix iPod detection with the DeviceKit-disks gvfs monitor (#493640)
+
* Wed Mar 25 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-3
- Fix crasher in the PSP and Nokia plugins
More information about the scm-commits
mailing list