summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-06-18 14:28:22 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2015-06-19 14:39:48 -0500
commit999bd6767576d4adacc7ecb3f89bcfeb9f39e74e (patch)
tree1b2513b97ce3f690fdd9b1cc89b89fce72c98daa
parent592d8c6bb24ae2cf6891090331ab5219fcc50e9e (diff)
Automatically retry auth failures for VNC
There's no reason that we need to ask if the user wants to retry auth failures for VNC sessions but not ask for spice sessions. If the user doesn't want to retry, she can simply click 'cancel' when the auth dialog pops up, just as they do with spice.
-rw-r--r--src/virt-viewer-app.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 4041a07..3f10546 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1492,36 +1492,15 @@ static void virt_viewer_app_auth_refused(VirtViewerSession *session,
const char *msg,
VirtViewerApp *self)
{
- GtkWidget *dialog;
- int ret;
VirtViewerAppPrivate *priv = self->priv;
- if (virt_viewer_session_can_retry_auth(session)) {
- virt_viewer_app_simple_message_dialog(self,
- _("Unable to authenticate with remote desktop server at %s: %s\n"),
- priv->pretty_address, msg);
- return;
- }
+ virt_viewer_app_simple_message_dialog(self,
+ _("Unable to authenticate with remote desktop server at %s: %s\n"),
+ priv->pretty_address, msg);
/* if the session implementation cannot retry auth automatically, the
* VirtViewerApp needs to schedule a new connection to retry */
- dialog = gtk_message_dialog_new(virt_viewer_window_get_window(priv->main_window),
- GTK_DIALOG_MODAL |
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_YES_NO,
- _("Unable to authenticate with remote desktop server at %s: %s\n"
- "Retry connection again?"),
- priv->pretty_address, msg);
-
- ret = gtk_dialog_run(GTK_DIALOG(dialog));
-
- gtk_widget_destroy(dialog);
-
- if (ret == GTK_RESPONSE_YES)
- priv->authretry = TRUE;
- else
- priv->authretry = FALSE;
+ priv->authretry = !virt_viewer_session_can_retry_auth(session);
}
static void virt_viewer_app_auth_unsupported(VirtViewerSession *session G_GNUC_UNUSED,