diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-07-11 12:11:50 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-07-19 11:13:00 +0200 |
commit | f4d1d89f5868b241ac203759d511f9e549c2cb79 (patch) | |
tree | f75b7113120d4b4cddd99ff47d78c4ea30cc7d4b /vncviewer/CConn.cxx | |
parent | 31a492d1208fb1c1177eef03a1ede9453436eafc (diff) | |
download | tigervnc-f4d1d89f5868b241ac203759d511f9e549c2cb79.tar.gz tigervnc-f4d1d89f5868b241ac203759d511f9e549c2cb79.zip |
Allow removal of GUI prompt on fatal errors
Add a new parameter 'alertOnFatalError' which guards
the displaying of the GUI alert on fatal errors, and
thus when false just gives the textual error.
Now I can do:
while true
do
vncviewer alertOnFatalError=false vm:0
sleep 1
done
and it'll reappear when my VM appears without me getting error
dialogs.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
--
Diffstat (limited to 'vncviewer/CConn.cxx')
-rw-r--r-- | vncviewer/CConn.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index addc30df..2e97ec28 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -110,7 +110,8 @@ CConn::CConn(const char* vncServerName, network::Socket* socket=NULL) vlog.info(_("connected to host %s port %d"), serverHost, serverPort); } catch (rdr::Exception& e) { vlog.error("%s", e.str()); - fl_alert("%s", e.str()); + if (alertOnFatalError) + fl_alert("%s", e.str()); exit_vncviewer(); return; } |