mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
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.
This commit is contained in:
parent
a3126525a1
commit
243861e97b
1 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue