]> git.pld-linux.org Git - packages/Thunar.git/blame - Thunar-missing-audio-cds-for-volman.patch
- updated for 1.0.0
[packages/Thunar.git] / Thunar-missing-audio-cds-for-volman.patch
CommitLineData
84cbb7ff
MB
1Thunar 0.9.0 contains a bug where Audio CDs are no longer handled to
2thunar-volman for autoplay. Apply this patch to fix the issue.
3
4Index: thunar-vfs/thunar-vfs-volume-hal.c
5===================================================================
6--- thunar-vfs/thunar-vfs-volume-hal.c (revision 26428)
7+++ thunar-vfs/thunar-vfs-volume-hal.c (working copy)
8@@ -1007,9 +1007,7 @@
9 hv = libhal_volume_from_udi (context, udi);
10
11 /* HAL might want us to ignore this volume for some reason */
12- if (G_UNLIKELY (hv != NULL
13- && (libhal_volume_should_ignore (hv)
14- || libhal_volume_get_fsusage (hv) != LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM)))
15+ if (G_UNLIKELY (hv != NULL && libhal_volume_should_ignore (hv)))
16 {
17 libhal_volume_free (hv);
18 return;
19@@ -1020,38 +1018,42 @@
20
21 if (G_LIKELY (hv != NULL))
22 {
23- /* determine the UDI of the drive to which this volume belongs */
24- drive_udi = libhal_volume_get_storage_device_udi (hv);
25- if (G_LIKELY (drive_udi != NULL))
26+ /* check if we have a mountable file system here */
27+ if (libhal_volume_get_fsusage (hv) == LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM)
28 {
29- /* determine the drive for the volume */
30- hd = libhal_drive_from_udi (context, drive_udi);
31- if (G_LIKELY (hd != NULL))
32+ /* determine the UDI of the drive to which this volume belongs */
33+ drive_udi = libhal_volume_get_storage_device_udi (hv);
34+ if (G_LIKELY (drive_udi != NULL))
35 {
36- /* check if we already have a volume object for the UDI */
37- volume_hal = thunar_vfs_volume_manager_hal_get_volume_by_udi (manager_hal, udi);
38- if (G_LIKELY (volume_hal == NULL))
39+ /* determine the drive for the volume */
40+ hd = libhal_drive_from_udi (context, drive_udi);
41+ if (G_LIKELY (hd != NULL))
42 {
43- /* otherwise, we allocate a new volume object */
44- volume_hal = g_object_new (THUNAR_VFS_TYPE_VOLUME_HAL, NULL);
45- volume_hal->udi = g_strdup (udi);
46- }
47+ /* check if we already have a volume object for the UDI */
48+ volume_hal = thunar_vfs_volume_manager_hal_get_volume_by_udi (manager_hal, udi);
49+ if (G_LIKELY (volume_hal == NULL))
50+ {
51+ /* otherwise, we allocate a new volume object */
52+ volume_hal = g_object_new (THUNAR_VFS_TYPE_VOLUME_HAL, NULL);
53+ volume_hal->udi = g_strdup (udi);
54+ }
55
56- /* update the volume object with the new data from the HAL volume/drive */
57- thunar_vfs_volume_hal_update (volume_hal, context, hv, hd);
58+ /* update the volume object with the new data from the HAL volume/drive */
59+ thunar_vfs_volume_hal_update (volume_hal, context, hv, hd);
60
61- /* add the volume object to our list if we allocated a new one */
62- if (g_list_find (THUNAR_VFS_VOLUME_MANAGER (manager_hal)->volumes, volume_hal) == NULL)
63- {
64- /* add the volume to the volume manager */
65- thunar_vfs_volume_manager_add (THUNAR_VFS_VOLUME_MANAGER (manager_hal), THUNAR_VFS_VOLUME (volume_hal));
66+ /* add the volume object to our list if we allocated a new one */
67+ if (g_list_find (THUNAR_VFS_VOLUME_MANAGER (manager_hal)->volumes, volume_hal) == NULL)
68+ {
69+ /* add the volume to the volume manager */
70+ thunar_vfs_volume_manager_add (THUNAR_VFS_VOLUME_MANAGER (manager_hal), THUNAR_VFS_VOLUME (volume_hal));
71
72- /* release the reference on the volume */
73- g_object_unref (G_OBJECT (volume_hal));
74+ /* release the reference on the volume */
75+ g_object_unref (G_OBJECT (volume_hal));
76+ }
77+
78+ /* release the HAL drive */
79+ libhal_drive_free (hd);
80 }
81-
82- /* release the HAL drive */
83- libhal_drive_free (hd);
84 }
85 }
86
This page took 0.097681 seconds and 4 git commands to generate.