diff options
author | António Fernandes <antoniof@gnome.org> | 2021-08-15 17:48:09 +0100 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2021-08-15 21:21:07 +0100 |
commit | 7c67d00931e48bc73571cf4f130124aa08fa7627 (patch) | |
tree | 0e24b4f9557884144f26103478f11ff9f1116744 | |
parent | 34b4168bb709201bc439d81efe5286e454a71a81 (diff) | |
download | nautilus-7c67d00931e48bc73571cf4f130124aa08fa7627.tar.gz |
file: Pass parent window to unmount operation
It's conveniently set as a property of GtkMountOperation, so there is no
reason not to pass both forward.
This is necessary for the preceding commit to actually work as intended.
-rw-r--r-- | src/nautilus-file.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index c14356d8f..8f62d9a10 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -1404,11 +1404,15 @@ nautilus_file_unmount (NautilusFile *file, else if (file->details->mount != NULL && g_mount_can_unmount (file->details->mount)) { + GtkWindow *parent; + + parent = gtk_mount_operation_get_parent (GTK_MOUNT_OPERATION (mount_op)); + data = g_new0 (UnmountData, 1); data->file = nautilus_file_ref (file); data->callback = callback; data->callback_data = callback_data; - nautilus_file_operations_unmount_mount_full (NULL, file->details->mount, NULL, FALSE, TRUE, unmount_done, data); + nautilus_file_operations_unmount_mount_full (parent, file->details->mount, mount_op, FALSE, TRUE, unmount_done, data); } else if (callback) { @@ -1447,11 +1451,15 @@ nautilus_file_eject (NautilusFile *file, else if (file->details->mount != NULL && g_mount_can_eject (file->details->mount)) { + GtkWindow *parent; + + parent = gtk_mount_operation_get_parent (GTK_MOUNT_OPERATION (mount_op)); + data = g_new0 (UnmountData, 1); data->file = nautilus_file_ref (file); data->callback = callback; data->callback_data = callback_data; - nautilus_file_operations_unmount_mount_full (NULL, file->details->mount, NULL, TRUE, TRUE, unmount_done, data); + nautilus_file_operations_unmount_mount_full (parent, file->details->mount, mount_op, TRUE, TRUE, unmount_done, data); } else if (callback) { |