diff options
author | Peter Åstrand <astrand@cendio.se> | 2004-12-29 15:56:30 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2004-12-29 15:56:30 +0000 |
commit | fdd69322b115d09c360bcb6f4aed5a30857916d8 (patch) | |
tree | 5c402f160c0d3e03e2e18f0ac68a1734abc860ad /vncviewer_unix/CConn.cxx | |
parent | 2dd021bb81db770aba1beee808fc4ccc3e349b7e (diff) | |
download | tigervnc-fdd69322b115d09c360bcb6f4aed5a30857916d8.tar.gz tigervnc-fdd69322b115d09c360bcb6f4aed5a30857916d8.zip |
Added support for selecting zlib compression and jpeg quality in the UNIX client (both from GUI and command line)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@62 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer_unix/CConn.cxx')
-rw-r--r-- | vncviewer_unix/CConn.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vncviewer_unix/CConn.cxx b/vncviewer_unix/CConn.cxx index ff8b694c..3d5d84c6 100644 --- a/vncviewer_unix/CConn.cxx +++ b/vncviewer_unix/CConn.cxx @@ -74,6 +74,9 @@ CConn::CConn(Display* dpy_, int argc_, char** argv_, network::Socket* sock_, } cp.supportsDesktopResize = true; cp.supportsLocalCursor = useLocalCursor; + cp.customCompressLevel = customCompressLevel; + cp.compressLevel = compressLevel; + cp.noJpeg = noJpeg; cp.qualityLevel = qualityLevel; initMenu(); @@ -480,6 +483,7 @@ void CConn::menuSelect(long id, TXMenu* m) { // options dialog's checkboxes. void CConn::setOptions() { + char digit[2] = "0"; options.autoSelect.checked(autoSelect); options.fullColour.checked(fullColour); options.veryLowColour.checked(!fullColour && lowColourLevel == 0); @@ -489,6 +493,14 @@ void CConn::setOptions() { options.zrle.checked(currentEncoding == encodingZRLE); options.hextile.checked(currentEncoding == encodingHextile); options.raw.checked(currentEncoding == encodingRaw); + + options.customCompressLevel.checked(customCompressLevel); + digit[0] = '0' + compressLevel; + options.compressLevel.setText(digit); + options.noJpeg.checked(!noJpeg); + digit[0] = '0' + qualityLevel; + options.qualityLevel.setText(digit); + options.viewOnly.checked(viewOnly); options.acceptClipboard.checked(acceptClipboard); options.sendClipboard.checked(sendClipboard); @@ -523,6 +535,12 @@ void CConn::getOptions() { currentEncoding = newEncoding; encodingChange = true; } + + customCompressLevel.setParam(options.customCompressLevel.checked()); + compressLevel.setParam(options.compressLevel.getText()); + noJpeg.setParam(!options.noJpeg.checked()); + qualityLevel.setParam(options.qualityLevel.getText()); + viewOnly.setParam(options.viewOnly.checked()); acceptClipboard.setParam(options.acceptClipboard.checked()); sendClipboard.setParam(options.sendClipboard.checked()); |