Author: benny Date: 2007-05-20 13:06:03 +0000 (Sun, 20 May 2007) New Revision: 25731
Modified: thunar/trunk/ChangeLog thunar/trunk/configure.in.in thunar/trunk/thunar-vfs/thunar-vfs-volume-freebsd.c thunar/trunk/thunar-vfs/thunar-vfs-volume-hal.c thunar/trunk/thunar-vfs/thunar-vfs-volume.c thunar/trunk/thunar-vfs/thunar-vfs-volume.h thunar/trunk/thunar-vfs/thunar-vfs.symbols Log: 2007-05-20 Benedikt Meurer <[EMAIL PROTECTED]> * thunar-vfs/thunar-vfs-volume-freebsd.c, thunar-vfs/thunar-vfs-volume-hal.c, thunar-vfs/thunar-vfs-volume.{c,h}, thunar-vfs/thunar-vfs.symbols: Apply patch from Brian Tarricone <[EMAIL PROTECTED]> to fix invalid invocation of thunar-volman for devices that should be ignored, and add a MOUNTABLE flag for volumes. Bug #2789. * configure.in.in: Bump library interface version. Modified: thunar/trunk/ChangeLog =================================================================== --- thunar/trunk/ChangeLog 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/ChangeLog 2007-05-20 13:06:03 UTC (rev 25731) @@ -1,5 +1,15 @@ 2007-05-20 Benedikt Meurer <[EMAIL PROTECTED]> + * thunar-vfs/thunar-vfs-volume-freebsd.c, + thunar-vfs/thunar-vfs-volume-hal.c, + thunar-vfs/thunar-vfs-volume.{c,h}, thunar-vfs/thunar-vfs.symbols: + Apply patch from Brian Tarricone <[EMAIL PROTECTED]> to fix + invalid invocation of thunar-volman for devices that should be + ignored, and add a MOUNTABLE flag for volumes. Bug #2789. + * configure.in.in: Bump library interface version. + +2007-05-20 Benedikt Meurer <[EMAIL PROTECTED]> + * thunar/Makefile.am: Strip unused characters from the user interface description files. Bug #3094. Modified: thunar/trunk/configure.in.in =================================================================== --- thunar/trunk/configure.in.in 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/configure.in.in 2007-05-20 13:06:03 UTC (rev 25731) @@ -9,7 +9,7 @@ dnl *************************** dnl *** Version information *** dnl *************************** -m4_define([thunar_verinfo], [4:2:2]) +m4_define([thunar_verinfo], [5:0:3]) m4_define([thunar_version_api], [1]) m4_define([thunar_version_major], [0]) m4_define([thunar_version_minor], [8]) Modified: thunar/trunk/thunar-vfs/thunar-vfs-volume-freebsd.c =================================================================== --- thunar/trunk/thunar-vfs/thunar-vfs-volume-freebsd.c 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/thunar-vfs/thunar-vfs-volume-freebsd.c 2007-05-20 13:06:03 UTC (rev 25731) @@ -317,6 +317,9 @@ g_strchomp (label); if (G_LIKELY (*label != '\0')) volume_freebsd->label = g_strdup (label); + + /* if we got this far, the CD should be mountable */ + status |= THUNAR_VFS_VOLUME_STATUS_MOUNTABLE; } } } @@ -324,6 +327,11 @@ close (fd); } } + else + { + /* FIXME: not sure how to determine mountability */ + status |= THUNAR_VFS_VOLUME_STATUS_MOUNTABLE; + } /* determine the absolute path to the mount point */ if (thunar_vfs_path_to_string (volume_freebsd->mount_point, buffer, sizeof (buffer), NULL) > 0) Modified: thunar/trunk/thunar-vfs/thunar-vfs-volume-hal.c =================================================================== --- thunar/trunk/thunar-vfs/thunar-vfs-volume-hal.c 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/thunar-vfs/thunar-vfs-volume-hal.c 2007-05-20 13:06:03 UTC (rev 25731) @@ -536,6 +536,10 @@ * a drive, which means non-pollable then, so it's present */ volume_hal->status |= THUNAR_VFS_VOLUME_STATUS_PRESENT; + + /* figure out if the volume is mountable */ + if(hv != NULL && libhal_volume_get_fsusage (hv) == LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM) + volume_hal->status |= THUNAR_VFS_VOLUME_STATUS_MOUNTABLE; /* check if the drive requires eject */ volume_hal->requires_eject = libhal_drive_requires_eject (hd); @@ -999,11 +1003,19 @@ _thunar_vfs_return_if_fail (THUNAR_VFS_IS_VOLUME_MANAGER_HAL (manager_hal)); _thunar_vfs_return_if_fail (manager_hal->context == context); + /* check if we have a volume here */ + 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_free (hv); + return; + } + /* emit the "device-added" signal (to support thunar-volman) */ g_signal_emit_by_name (G_OBJECT (manager_hal), "device-added", udi); - /* check if we have a volume here */ - hv = libhal_volume_from_udi (context, udi); if (G_LIKELY (hv != NULL)) { /* determine the UDI of the drive to which this volume belongs */ Modified: thunar/trunk/thunar-vfs/thunar-vfs-volume.c =================================================================== --- thunar/trunk/thunar-vfs/thunar-vfs-volume.c 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/thunar-vfs/thunar-vfs-volume.c 2007-05-20 13:06:03 UTC (rev 25731) @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005-2006 Benedikt Meurer <[EMAIL PROTECTED]> + * Copyright (c) 2005-2007 Benedikt Meurer <[EMAIL PROTECTED]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -245,6 +245,24 @@ /** + * thunar_vfs_volume_is_mountable: + * @volume : a #ThunarVfsVolume instance. + * + * Determines whether @volume has a valid filesystem and + * if it can be mounted. + * + * Return value: %TRUE if @volume is mountable, else %FALSE. + **/ +gboolean +thunar_vfs_volume_is_mountable (ThunarVfsVolume *volume) +{ + g_return_val_if_fail (THUNAR_VFS_IS_VOLUME (volume), FALSE); + return (*THUNAR_VFS_VOLUME_GET_CLASS (volume)->get_status) (volume) & THUNAR_VFS_VOLUME_STATUS_MOUNTABLE; +} + + + +/** * thunar_vfs_volume_is_mounted: * @volume : a #ThunarVfsVolume instance. * Modified: thunar/trunk/thunar-vfs/thunar-vfs-volume.h =================================================================== --- thunar/trunk/thunar-vfs/thunar-vfs-volume.h 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/thunar-vfs/thunar-vfs-volume.h 2007-05-20 13:06:03 UTC (rev 25731) @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005-2006 Benedikt Meurer <[EMAIL PROTECTED]> + * Copyright (c) 2005-2007 Benedikt Meurer <[EMAIL PROTECTED]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -82,15 +82,17 @@ /** * ThunarVfsVolumeStatus: - * @THUNAR_VFS_VOLUME_STATUS_PRESENT : Whether or not a medium is present. - * @THUNAR_VFS_VOLUME_STATUS_MOUNTED : Whether or not the media is currently mounted. + * @THUNAR_VFS_VOLUME_STATUS_PRESENT : Whether or not a medium is present. + * @THUNAR_VFS_VOLUME_STATUS_MOUNTED : Whether or not the media is currently mounted. + * @THUNAR_VFS_VOLUME_STATUS_MOUNTABLE : Whether or not the media can be mounted. * * Describes the current status of a VFS volume. **/ typedef enum /*< flags >*/ { - THUNAR_VFS_VOLUME_STATUS_MOUNTED = 1 << 0, - THUNAR_VFS_VOLUME_STATUS_PRESENT = 1 << 1, + THUNAR_VFS_VOLUME_STATUS_MOUNTED = 1 << 0, + THUNAR_VFS_VOLUME_STATUS_PRESENT = 1 << 1, + THUNAR_VFS_VOLUME_STATUS_MOUNTABLE = 1 << 2, } ThunarVfsVolumeStatus; GType thunar_vfs_volume_get_type (void) G_GNUC_CONST; @@ -101,6 +103,7 @@ ThunarVfsPath *thunar_vfs_volume_get_mount_point (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_disc (ThunarVfsVolume *volume); +gboolean thunar_vfs_volume_is_mountable (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_mounted (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_present (ThunarVfsVolume *volume); gboolean thunar_vfs_volume_is_ejectable (ThunarVfsVolume *volume); Modified: thunar/trunk/thunar-vfs/thunar-vfs.symbols =================================================================== --- thunar/trunk/thunar-vfs/thunar-vfs.symbols 2007-05-20 12:52:55 UTC (rev 25730) +++ thunar/trunk/thunar-vfs/thunar-vfs.symbols 2007-05-20 13:06:03 UTC (rev 25731) @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005-2006 Benedikt Meurer <[EMAIL PROTECTED]>. + * Copyright (c) 2005-2007 Benedikt Meurer <[EMAIL PROTECTED]>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -318,6 +318,7 @@ thunar_vfs_volume_get_status thunar_vfs_volume_get_mount_point thunar_vfs_volume_is_disc +thunar_vfs_volume_is_mountable thunar_vfs_volume_is_mounted thunar_vfs_volume_is_present thunar_vfs_volume_is_ejectable _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits