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;
}
"Show the dot cursor when the server sends an "
"invisible cursor", false);
+BoolParameter alertOnFatalError("AlertOnFatalError",
+ "Give a dialog on connection problems rather "
+ "than exiting immediately", true);
+
StringParameter passwordFile("PasswordFile",
"Password file for VNC authentication", "");
AliasParameter passwd("passwd", "Alias for PasswordFile", &passwordFile);
&sendPrimary,
#endif
&menuKey,
- &fullscreenSystemKeys
+ &fullscreenSystemKeys,
+ &alertOnFatalError
};
// Encoding Table
extern rfb::StringParameter menuKey;
extern rfb::BoolParameter fullscreenSystemKeys;
+extern rfb::BoolParameter alertOnFatalError;
#ifndef WIN32
extern rfb::StringParameter via;
defaultServerName = loadViewerParameters(NULL);
} catch (rfb::Exception& e) {
defaultServerName = "";
- fl_alert("%s", e.str());
+ vlog.error("%s", e.str());
+ if (alertOnFatalError)
+ fl_alert("%s", e.str());
}
int i = 1;
// TRANSLATORS: "Parameters" are command line arguments, or settings
// from a file or the Windows registry.
vlog.error(_("Parameters -listen and -via are incompatible"));
- fl_alert(_("Parameters -listen and -via are incompatible"));
+ if (alertOnFatalError)
+ fl_alert(_("Parameters -listen and -via are incompatible"));
exit_vncviewer();
return 1;
}
}
} catch (rdr::Exception& e) {
vlog.error("%s", e.str());
- fl_alert("%s", e.str());
+ if (alertOnFatalError)
+ fl_alert("%s", e.str());
exit_vncviewer();
return 1;
}
delete cc;
- if (exitError != NULL)
+ if (exitError != NULL && alertOnFatalError)
fl_alert("%s", exitError);
return 0;
\fIR\fR, and \fIG\fR taken the values of the local port number, the remote
host, the port number on the remote host, and the gateway machine
respectively.
+.
+.TP
+.B \-AlertOnFatalError
+Display a dialog with any fatal error before exiting. Default is on.
.SH FILES
.TP