From 3ac0a803e4fe58a4ac1b82a5770468c6801e93ab Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 15 May 2012 12:52:08 -0400 Subject: udisks2: Show "Eject Anyway" (not "Unmount Anyway") if ejecting ... instead of unmounting. Signed-off-by: David Zeuthen --- monitor/udisks2/gvfsudisks2drive.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'monitor/udisks2/gvfsudisks2drive.c') diff --git a/monitor/udisks2/gvfsudisks2drive.c b/monitor/udisks2/gvfsudisks2drive.c index da095480..87747ac3 100644 --- a/monitor/udisks2/gvfsudisks2drive.c +++ b/monitor/udisks2/gvfsudisks2drive.c @@ -646,6 +646,13 @@ gvfs_udisks2_drive_eject_with_operation (GDrive *_drive, { GVfsUDisks2Drive *drive = GVFS_UDISKS2_DRIVE (_drive); + /* This information is needed in GVfsDdisks2Volume when apps have + * open files on the device ... we need to know if the button should + * be "Unmount Anyway" or "Eject Anyway" + */ + if (mount_operation != NULL) + g_object_set_data (G_OBJECT (mount_operation), "x-udisks2-is-eject", GINT_TO_POINTER (1)); + /* first we need to go through all the volumes and unmount their assoicated mounts (if any) */ unmount_mounts (drive, flags, -- cgit v1.2.1