diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-03-26 23:05:31 +0100 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-03-27 16:12:58 +0100 |
commit | f9c4a03bd76ca23b6eb715244b7019fddca0eb72 (patch) | |
tree | d2e63f3aef7e2f61e280d07973407cf205ebe3ce /src/virt-viewer-app.c | |
parent | cab8f7450b8af6111c50d563321e5e7e50944479 (diff) |
virt-viewer-app: Add a GError arg to create_session()
This is part of a small re-factoring that will have all connection
errors, when we won't be able to connect regardless of what changes on
the remote host, being treated by virt_viewer_app_initial_connect(),
avoiding weird behaviors as we have nowadays (like more than one error
dialog being shown or having the virt-viewer waiting forever for a guest
that will never show up).
Related: rhbz#1085216
Diffstat (limited to 'src/virt-viewer-app.c')
-rw-r--r-- | src/virt-viewer-app.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index dd0361f..6b58cf6 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -1052,7 +1052,7 @@ static void notify_software_reader_cb(GObject *gobject G_GNUC_UNUSED, } int -virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type) +virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type, GError **error) { g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), -1); VirtViewerAppPrivate *priv = self->priv; @@ -1076,6 +1076,10 @@ virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type) } else #endif { + g_set_error(error, + VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_FAILED, + _("Unsupported graphic type '%s'"), type); + virt_viewer_app_trace(self, "Guest %s has unsupported %s display type", priv->guest_name, type); virt_viewer_app_simple_message_dialog(self, _("Unknown graphic type for the guest %s"), |