Commit 0e5b0b75 authored by Christian Kellner's avatar Christian Kellner Committed by Matthias Clasen
Browse files

placesview: properly recover from cancellation

The current code wrongly assumes that cancellation can only happen
as a result widget finalization, and consequentially does not
properly recover from it. Therefore if the operation is cancelled
as a result of user interaction, the entry is will stay disabled
and the spinner will keep spinning. This is fixed by removal of
the early bail out in case of cancellation.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
parent 3ed25941
......@@ -1173,12 +1173,9 @@ server_mount_ready_cb (GObject *source_file,
emit_show_error_message (view, _("Unable to access location"), error->message);
should_show = FALSE;
}
else
{
/* it was cancelled, so probably it was called during finalize, bail out. */
g_clear_error (&error);
return;
}
/* The operation got cancelled by the user and or the error
has been handled already. */
g_clear_error (&error);
}
......@@ -1247,13 +1244,9 @@ volume_mount_ready_cb (GObject *source_volume,
emit_show_error_message (GTK_PLACES_VIEW (user_data), _("Unable to access location"), error->message);
should_show = FALSE;
}
else
{
/* it was cancelled, so probably it was called during finalize, bail out. */
g_clear_error (&error);
return;
}
/* The operation got cancelled by the user and or the error
has been handled already. */
g_clear_error (&error);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment