diff options
author | António Fernandes <antoniof@gnome.org> | 2021-08-15 17:48:09 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-11-22 15:16:18 +0000 |
commit | 243861e97b4dae67001c08e789e819d2646ce175 (patch) | |
tree | 1babe33825c493a81b14308c23eddaf8bf52cae6 | |
parent | a3126525a11af09dcc1197eab10074ec201eb283 (diff) | |
download | nautilus-243861e97b4dae67001c08e789e819d2646ce175.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 5d6efdcb2..d0a9a8d03 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) { |