mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-08 21:14:16 +00:00
Reshow connection dialog on errors
remote-viewer behaviour is currently inconsistent in the connection dialog: if the user enters a valid URI, but then remote-viewer fails to connect to it, then we'll show again the connection dialog through a call to virt_viewer_app_start() in remote_viewer_deactivated(). If instead we enter an invalid URI in the connection dialog, then remote-viewer will report an error and quit. This commit makes sure in the latter case, we report the error and show again the connection dialog. The user can press 'Cancel' in the connection dialog to get out of remote-viewer as in this case, we return directly FALSE rather than going through the cleanup: label and looping.
This commit is contained in:
parent
30bb4019fd
commit
06b2c38246
@ -976,6 +976,7 @@ remote_viewer_start(VirtViewerApp *app)
|
||||
virt_viewer_app_show_status(VIRT_VIEWER_APP(self), _("Setting up Spice session..."));
|
||||
} else {
|
||||
#endif
|
||||
retry_dialog:
|
||||
if (priv->open_recent_dialog) {
|
||||
if (connect_dialog(&guri) != 0)
|
||||
return FALSE;
|
||||
@ -1044,6 +1045,10 @@ cleanup:
|
||||
g_free(guri);
|
||||
g_free(type);
|
||||
|
||||
if (!ret && priv->open_recent_dialog) {
|
||||
goto retry_dialog;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user