Revision: 4419
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4419&view=rev
Author: ossman_
Date: 2011-05-16 12:46:51 +0000 (Mon, 16 May 2011)
Log Message:
-----------
Implement support for storing settings from the options dialog.
Modified Paths:
--------------
trunk/vncviewer/OptionsDialog.cxx
Modified: trunk/vncviewer/OptionsDialog.cxx
===================================================================
--- trunk/vncviewer/OptionsDialog.cxx 2011-05-16 12:46:16 UTC (rev 4418)
+++ trunk/vncviewer/OptionsDialog.cxx 2011-05-16 12:46:51 UTC (rev 4419)
@@ -16,6 +16,8 @@
* USA.
*/
+#include <stdlib.h>
+
#include <list>
#include <FL/Fl_Tabs.H>
@@ -252,6 +254,85 @@
void OptionsDialog::storeOptions(void)
{
+ /* Compression */
+ autoSelect.setParam(autoselectCheckbox->value());
+
+ if (tightButton->value())
+ preferredEncoding.setParam(encodingName(encodingTight));
+ else if (zrleButton->value())
+ preferredEncoding.setParam(encodingName(encodingZRLE));
+ else if (hextileButton->value())
+ preferredEncoding.setParam(encodingName(encodingHextile));
+ else if (rawButton->value())
+ preferredEncoding.setParam(encodingName(encodingRaw));
+
+ fullColour.setParam(fullcolorCheckbox->value());
+ if (mediumcolorCheckbox->value())
+ lowColourLevel.setParam(0);
+ else if (lowcolorCheckbox->value())
+ lowColourLevel.setParam(1);
+ else if (verylowcolorCheckbox->value())
+ lowColourLevel.setParam(2);
+
+ customCompressLevel.setParam(compressionCheckbox->value());
+ noJpeg.setParam(!jpegCheckbox->value());
+ compressLevel.setParam(atoi(compressionInput->value()));
+ qualityLevel.setParam(atoi(jpegInput->value()));
+
+#ifdef HAVE_GNUTLS
+ /* Security */
+ Security security;
+
+ /* Process security types which don't use encryption */
+ if (encNoneCheckbox->value()) {
+ if (authNoneCheckbox->value())
+ security.EnableSecType(secTypeNone);
+ if (authVncCheckbox->value())
+ security.EnableSecType(secTypeVncAuth);
+
+ if (vencryptCheckbox->value()) {
+ if (authPlainCheckbox->value())
+ security.EnableSecType(secTypePlain);
+ }
+ }
+
+ if (vencryptCheckbox->value()) {
+ /* Process security types which use TLS encryption */
+ if (encTLSCheckbox->value()) {
+ if (authNoneCheckbox->value())
+ security.EnableSecType(secTypeTLSNone);
+ if (authVncCheckbox->value())
+ security.EnableSecType(secTypeTLSVnc);
+ if (authPlainCheckbox->value())
+ security.EnableSecType(secTypeTLSPlain);
+ }
+
+ /* Process security types which use X509 encryption */
+ if (encX509Checkbox->value()) {
+ if (authNoneCheckbox->value())
+ security.EnableSecType(secTypeX509None);
+ if (authVncCheckbox->value())
+ security.EnableSecType(secTypeX509Vnc);
+ if (authPlainCheckbox->value())
+ security.EnableSecType(secTypeX509Plain);
+ }
+ }
+
+ CSecurityTLS::x509ca.setParam(caInput->value());
+ CSecurityTLS::x509crl.setParam(crlInput->value());
+#endif
+
+ /* Input */
+ viewOnly.setParam(viewOnlyCheckbox->value());
+ acceptClipboard.setParam(acceptClipboardCheckbox->value());
+ sendClipboard.setParam(sendClipboardCheckbox->value());
+ sendPrimary.setParam(sendPrimaryCheckbox->value());
+
+ /* Misc. */
+ shared.setParam(sharedCheckbox->value());
+ fullScreen.setParam(fullScreenCheckbox->value());
+ useLocalCursor.setParam(localCursorCheckbox->value());
+ dotWhenNoCursor.setParam(dotCursorCheckbox->value());
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits