[Pkg-xfce-commits] r1449 - in desktop/trunk/thunar/debian: . patches
corsac-guest at alioth.debian.org
corsac-guest at alioth.debian.org
Mon Dec 3 14:26:49 UTC 2007
Author: corsac-guest
Date: 2007-12-03 14:26:49 +0000 (Mon, 03 Dec 2007)
New Revision: 1449
Added:
desktop/trunk/thunar/debian/patches/02_thunar-vfs-volume-hal_missing-audio-cds-for-volman.patch
Modified:
desktop/trunk/thunar/debian/changelog
Log:
add patch to correct volume management on thunar
Modified: desktop/trunk/thunar/debian/changelog
===================================================================
--- desktop/trunk/thunar/debian/changelog 2007-12-02 21:49:39 UTC (rev 1448)
+++ desktop/trunk/thunar/debian/changelog 2007-12-03 14:26:49 UTC (rev 1449)
@@ -9,11 +9,13 @@
- bump build-dep to Xfce 4.4.2.
- add build-dep on libjpeg62-dev to build thumbnails correctly even for
larges images. closes: #444070
+ * debian/patches:
+ - added 02_thunar-vfs-volume-hal_missing-audio-cds-for-volman.
[ Simon Huggins ]
* Add Vcs-* headers to debian/control
- -- Yves-Alexis Perez <corsac at corsac.net> Sun, 02 Dec 2007 15:53:21 +0100
+ -- Yves-Alexis <corsac at molly.corsac.net> Mon, 3 Dec 2007 15:04:10 +0100
thunar (0.8.0-6) unstable; urgency=low
Added: desktop/trunk/thunar/debian/patches/02_thunar-vfs-volume-hal_missing-audio-cds-for-volman.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/02_thunar-vfs-volume-hal_missing-audio-cds-for-volman.patch (rev 0)
+++ desktop/trunk/thunar/debian/patches/02_thunar-vfs-volume-hal_missing-audio-cds-for-volman.patch 2007-12-03 14:26:49 UTC (rev 1449)
@@ -0,0 +1,83 @@
+Index: thunar-vfs/thunar-vfs-volume-hal.c
+===================================================================
+--- thunar-vfs/thunar-vfs-volume-hal.c (revision 26428)
++++ thunar-vfs/thunar-vfs-volume-hal.c (working copy)
+@@ -1007,9 +1007,7 @@
+ hv = libhal_volume_from_udi (context, udi);
+
+ /* HAL might want us to ignore this volume for some reason */
+- if (G_UNLIKELY (hv != NULL
+- && (libhal_volume_should_ignore (hv)
+- || libhal_volume_get_fsusage (hv) != LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM)))
++ if (G_UNLIKELY (hv != NULL && libhal_volume_should_ignore (hv)))
+ {
+ libhal_volume_free (hv);
+ return;
+@@ -1020,38 +1018,42 @@
+
+ if (G_LIKELY (hv != NULL))
+ {
+- /* determine the UDI of the drive to which this volume belongs */
+- drive_udi = libhal_volume_get_storage_device_udi (hv);
+- if (G_LIKELY (drive_udi != NULL))
++ /* check if we have a mountable file system here */
++ if (libhal_volume_get_fsusage (hv) == LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM)
+ {
+- /* determine the drive for the volume */
+- hd = libhal_drive_from_udi (context, drive_udi);
+- if (G_LIKELY (hd != NULL))
++ /* determine the UDI of the drive to which this volume belongs */
++ drive_udi = libhal_volume_get_storage_device_udi (hv);
++ if (G_LIKELY (drive_udi != NULL))
+ {
+- /* check if we already have a volume object for the UDI */
+- volume_hal = thunar_vfs_volume_manager_hal_get_volume_by_udi (manager_hal, udi);
+- if (G_LIKELY (volume_hal == NULL))
++ /* determine the drive for the volume */
++ hd = libhal_drive_from_udi (context, drive_udi);
++ if (G_LIKELY (hd != NULL))
+ {
+- /* otherwise, we allocate a new volume object */
+- volume_hal = g_object_new (THUNAR_VFS_TYPE_VOLUME_HAL, NULL);
+- volume_hal->udi = g_strdup (udi);
+- }
++ /* check if we already have a volume object for the UDI */
++ volume_hal = thunar_vfs_volume_manager_hal_get_volume_by_udi (manager_hal, udi);
++ if (G_LIKELY (volume_hal == NULL))
++ {
++ /* otherwise, we allocate a new volume object */
++ volume_hal = g_object_new (THUNAR_VFS_TYPE_VOLUME_HAL, NULL);
++ volume_hal->udi = g_strdup (udi);
++ }
+
+- /* update the volume object with the new data from the HAL volume/drive */
+- thunar_vfs_volume_hal_update (volume_hal, context, hv, hd);
++ /* update the volume object with the new data from the HAL volume/drive */
++ thunar_vfs_volume_hal_update (volume_hal, context, hv, hd);
+
+- /* add the volume object to our list if we allocated a new one */
+- if (g_list_find (THUNAR_VFS_VOLUME_MANAGER (manager_hal)->volumes, volume_hal) == NULL)
+- {
+- /* add the volume to the volume manager */
+- thunar_vfs_volume_manager_add (THUNAR_VFS_VOLUME_MANAGER (manager_hal), THUNAR_VFS_VOLUME (volume_hal));
++ /* add the volume object to our list if we allocated a new one */
++ if (g_list_find (THUNAR_VFS_VOLUME_MANAGER (manager_hal)->volumes, volume_hal) == NULL)
++ {
++ /* add the volume to the volume manager */
++ thunar_vfs_volume_manager_add (THUNAR_VFS_VOLUME_MANAGER (manager_hal), THUNAR_VFS_VOLUME (volume_hal));
+
+- /* release the reference on the volume */
+- g_object_unref (G_OBJECT (volume_hal));
++ /* release the reference on the volume */
++ g_object_unref (G_OBJECT (volume_hal));
++ }
++
++ /* release the HAL drive */
++ libhal_drive_free (hd);
+ }
+-
+- /* release the HAL drive */
+- libhal_drive_free (hd);
+ }
+ }
+
More information about the Pkg-xfce-commits
mailing list