options.sendPrimary.checked(sendPrimary);
if (state() == RFBSTATE_NORMAL) {
options.shared.disabled(true);
+#ifdef HAVE_GNUTLS
options.secVeNCrypt.disabled(true);
options.encNone.disabled(true);
options.encTLS.disabled(true);
options.secNone.disabled(true);
options.secVnc.disabled(true);
options.secPlain.disabled(true);
+#endif
} else {
options.shared.checked(shared);
+#ifdef HAVE_GNUTLS
/* Process non-VeNCrypt sectypes */
list<U8> secTypes = security->GetEnabledSecTypes();
list<U8>::iterator i;
}
}
}
+#endif
}
options.fullScreen.checked(fullScreen);
options.useLocalCursor.checked(useLocalCursor);
desktop->setNoCursor();
checkEncodings();
+#ifdef HAVE_GNUTLS
/* Process security types which don't use encryption */
if (options.encNone.checked()) {
if (options.secNone.checked())
security->DisableSecType(secTypeX509Plain);
}
-#ifdef HAVE_GNUTLS
CSecurityTLS::x509ca.setParam(options.ca.getText());
CSecurityTLS::x509crl.setParam(options.crl.getText());
#endif
public TXCheckboxCallback, public TXEntryCallback {
public:
OptionsDialog(Display* dpy, OptionsDialogCallback* cb_)
- : TXDialog(dpy, 750, 450, _("VNC Viewer: Connection Options")), cb(cb_),
+ : TXDialog(dpy, 450, 450, _("VNC Viewer: Connection Options")), cb(cb_),
/* Encoding and color level */
formatAndEnc(dpy, _("Encoding and Color Level:"), this),
useLocalCursor(dpy, _("Render cursor locally"), this, false, this),
dotWhenNoCursor(dpy, _("Show dot when no cursor"), this, false, this),
okButton(dpy, _("OK"), this, this, 60),
- cancelButton(dpy, _("Cancel"), this, this, 60),
+ cancelButton(dpy, _("Cancel"), this, this, 60)
+#ifdef HAVE_GNUTLS
+ ,
/* Security */
security(dpy, _("Security:"), this),
secVeNCrypt(dpy, _("Extended encryption and authentication methods (VeNCrypt)"),
this, false, this),
secPlain(dpy, _("Username and password (insecure without encryption)"),
this, false, this)
+#endif
{
/* Render the first collumn */
int y = yPad;
dotWhenNoCursor.move(xPad, y);
y += dotWhenNoCursor.height();
-
- /* Render "OK" and "Cancel" buttons */
- okButton.move(width() - xPad*12 - cancelButton.width() - okButton.width(),
- height() - yPad*4 - okButton.height());
- cancelButton.move(width() - xPad*6 - cancelButton.width(),
- height() - yPad*4 - cancelButton.height());
-
+#ifdef HAVE_GNUTLS
/* Render the second collumn */
y = yPad;
xPad += SECOND_COL_XPAD;
+ resize(750, height());
security.move(xPad, y);
y += security.height();
y += secVnc.height();
secPlain.move(xPad, y);
y += secPlain.height();
+#endif
+
+ /* Render "OK" and "Cancel" buttons */
+ okButton.move(width() - xPad*12 - cancelButton.width() - okButton.width(),
+ height() - yPad*4 - okButton.height());
+ cancelButton.move(width() - xPad*6 - cancelButton.width(),
+ height() - yPad*4 - cancelButton.height());
setBorderWidth(1);
}
compressLevel.disabled(!customCompressLevel.checked());
} else if (checkbox == &noJpeg) {
qualityLevel.disabled(autoSelect.checked() || !noJpeg.checked());
+#ifdef HAVE_GNUTLS
} else if (checkbox == &secVeNCrypt) {
encTLS.checked(false);
encTLS.disabled(!secVeNCrypt.checked());
encX509.disabled(!secVeNCrypt.checked());
secPlain.checked(false);
secPlain.disabled(!secVeNCrypt.checked());
+#endif
}
}
TXCheckbox shared, fullScreen, useLocalCursor, dotWhenNoCursor;
TXButton okButton, cancelButton;
+#ifdef HAVE_GNUTLS
TXLabel security;
TXCheckbox secVeNCrypt;
TXLabel authentication;
TXCheckbox secNone, secVnc, secPlain;
+#endif
};
#endif