Tino Keitel wrote:
> Hi,
> 
> the changelog for Thunar 0.9.0 mentions this:
> 
> -------------------------------------------------------------------
> Use the correct HAL property to determine whether a given volume or
> device requires eject (Bug #3119).
> -------------------------------------------------------------------
> 
> As I wasn't aware that #3119 was already fixed in SVN, I opened #3466
> and created my own fix. It asks HAL for the eject flag:
> 
> +  /* an eject menu entry is shown if this returns true */
> +  volume_hal->eject = libhal_drive_requires_eject (hd);
> 
> The SVN changeset for revision 25647 shows that Benny did it in the
> same way:
> 
> +  /* check if the drive requires eject */
> +  volume_hal->requires_eject = libhal_drive_requires_eject (hd);
> 
> However, all the devices that previously had an eject button in the
> context menu don't have it anymore with 4.4.2. I checked the lshal
> output and the eject property is still there for the device:
> 
> storage.requires_eject = true  (bool)
> 
> I noticed that the changes done by Benny use a function
> thunar_vfs_volume_is_ejectable(), whereas I just modified
> thunar_vfs_volume_is_disc() to return true for devices with the eject
> flag.
> 
> I assume that the new eject feature in 4.4.2 is tested and working, I
> just don't know _how_ it works. Can anyone enlighten me what I have to
> do to get the eject button back for my iPod, card reader etc.?

Hm, there seems to be an error in thunar-shortcuts-view.c. The "Eject
Volume" action is only added for discs. Try the attached patch.

> Regards,
> Tino

Benedikt
Index: thunar-shortcuts-view.c
===================================================================
--- thunar-shortcuts-view.c	(revision 26428)
+++ thunar-shortcuts-view.c	(working copy)
@@ -834,13 +834,12 @@
       gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
       gtk_widget_show (item);
 
-      /* check if the volume is a disc */
-      if (thunar_vfs_volume_is_disc (volume))
+      /* check if the volume is ejectable */
+      if (thunar_vfs_volume_is_ejectable (volume))
         {
           /* append the "Eject Volume" menu action */
           item = gtk_image_menu_item_new_with_mnemonic (_("E_ject Volume"));
           g_signal_connect_swapped (G_OBJECT (item), "activate", G_CALLBACK (thunar_shortcuts_view_eject), view);
-          gtk_widget_set_sensitive (item, thunar_vfs_volume_is_ejectable (volume));
           gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
           gtk_widget_show (item);
         }
_______________________________________________
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to