forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
3ed25941ac
commit
0e5b0b75c5
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user