Stefan Stuhr wrote:
>>Does anybody still have problems getting Thunar to work with HAL?
> 
> I have some problems in Ubuntu 5.10 (Xfce SVN, Thunar SVN checked out
> today - typeahead search in icon view saves my life!).
> 
> The device is an USB Mass Storage USB disc. It shows up fine in
> hal-device-manager and Nautilus, but it doesn't appear in the Thunar
> shortcuts pane at all. It doesn't matter if Thunar is running while I
> plug the disc, or if I first run Thunar when the disc is plugged.
> 
> When I insert a CD-ROM in my CD drive, on the other hand, it appears in
> the Thunar shortcuts pane.

I guess HAL just reports the wrong type and therefore Thunar doesn't
consider it to be a removable device. Try the attached patch.

> Stefan

Benedikt
Index: thunar-vfs-volume-hal.c
===================================================================
--- thunar-vfs-volume-hal.c	(revision 20027)
+++ thunar-vfs-volume-hal.c	(working copy)
@@ -627,20 +627,18 @@
       volume_hal->kind = THUNAR_VFS_VOLUME_KIND_AUDIO_PLAYER;
       break;
 
-    case LIBHAL_DRIVE_TYPE_MEMORY_STICK:
-    case LIBHAL_DRIVE_TYPE_REMOVABLE_DISK:
+    default:
       /* check if the drive is connected to the USB bus */
       if (libhal_drive_get_bus (hd) == LIBHAL_DRIVE_BUS_USB)
         {
           /* we consider the drive to be an USB stick */
           volume_hal->kind = THUNAR_VFS_VOLUME_KIND_USBSTICK;
-          break;
         }
-      /* FALL-THROUGH */
-
-    default:
-      /* fallback to harddisk drive */
-      volume_hal->kind = THUNAR_VFS_VOLUME_KIND_HARDDISK;
+      else
+        {
+          /* fallback to harddisk drive */
+          volume_hal->kind = THUNAR_VFS_VOLUME_KIND_HARDDISK;
+        }
       break;
     }
 
_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to