diff options
author | Peter Åstrand <astrand@cendio.se> | 2004-12-19 16:32:44 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2004-12-19 16:32:44 +0000 |
commit | aede8d72afcbadc02e9e3f7d4f0d8ed8b0c4cda1 (patch) | |
tree | ac2b730a2dc9216344bede8b08bf81f9f4d3556d /vncviewer_unix | |
parent | a2cdd2b02b2fdeed8ef9399b273bc19f2858c363 (diff) | |
download | tigervnc-aede8d72afcbadc02e9e3f7d4f0d8ed8b0c4cda1.tar.gz tigervnc-aede8d72afcbadc02e9e3f7d4f0d8ed8b0c4cda1.zip |
Now possible to select tight encoding in UNIX vncviewer GUI
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@47 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer_unix')
-rw-r--r-- | vncviewer_unix/CConn.cxx | 10 | ||||
-rw-r--r-- | vncviewer_unix/OptionsDialog.h | 16 |
2 files changed, 17 insertions, 9 deletions
diff --git a/vncviewer_unix/CConn.cxx b/vncviewer_unix/CConn.cxx index 7229cc3e..faab2a4b 100644 --- a/vncviewer_unix/CConn.cxx +++ b/vncviewer_unix/CConn.cxx @@ -53,7 +53,7 @@ CConn::CConn(Display* dpy_, int argc_, char** argv_, network::Socket* sock_, : dpy(dpy_), argc(argc_), argv(argv_), serverHost(0), serverPort(0), sock(sock_), viewport(0), desktop(0), desktopEventHandler(0), - currentEncoding(encodingZRLE), lastServerEncoding((unsigned int)-1), + currentEncoding(encodingTight), lastServerEncoding((unsigned int)-1), fullColour(::fullColour), autoSelect(::autoSelect), shared(::shared), formatChange(false), encodingChange(false), sameMachine(false), fullScreen(::fullScreen), @@ -485,6 +485,7 @@ void CConn::setOptions() { options.veryLowColour.checked(!fullColour && lowColourLevel == 0); options.lowColour.checked(!fullColour && lowColourLevel == 1); options.mediumColour.checked(!fullColour && lowColourLevel == 2); + options.tight.checked(currentEncoding == encodingTight); options.zrle.checked(currentEncoding == encodingZRLE); options.hextile.checked(currentEncoding == encodingHextile); options.raw.checked(currentEncoding == encodingRaw); @@ -514,7 +515,8 @@ void CConn::getOptions() { formatChange = true; } } - unsigned int newEncoding = (options.zrle.checked() ? encodingZRLE : + unsigned int newEncoding = (options.tight.checked() ? encodingTight : + options.zrle.checked() ? encodingZRLE : options.hextile.checked() ? encodingHextile : encodingRaw); if (newEncoding != currentEncoding) { @@ -599,7 +601,7 @@ void CConn::reconfigureViewport() // to the connection speed: // Above 16Mbps (timing for at least a second), same machine, switch to raw // Above 3Mbps, switch to hextile -// Below 1.5Mbps, switch to ZRLE +// Below 1.5Mbps, switch to Tight // Above 1Mbps, switch to full colour mode void CConn::autoSelectFormatAndEncoding() { @@ -612,7 +614,7 @@ void CConn::autoSelectFormatAndEncoding() } else if (kbitsPerSecond > 3000) { newEncoding = encodingHextile; } else if (kbitsPerSecond < 1500) { - newEncoding = encodingZRLE; + newEncoding = encodingTight; } if (newEncoding != currentEncoding) { diff --git a/vncviewer_unix/OptionsDialog.h b/vncviewer_unix/OptionsDialog.h index 96268cc7..3963990a 100644 --- a/vncviewer_unix/OptionsDialog.h +++ b/vncviewer_unix/OptionsDialog.h @@ -48,6 +48,7 @@ public: mediumColour(dpy, "Medium (256 colours)", this, true, this), lowColour(dpy, "Low (64 colours)", this, true, this), veryLowColour(dpy, "Very low (8 colours)", this, true, this), + tight(dpy, "Tight", this, true, this), zrle(dpy, "ZRLE", this, true, this), hextile(dpy, "Hextile", this, true, this), raw(dpy, "Raw", this, true, this), @@ -70,14 +71,16 @@ public: int x2 = xPad + autoSelect.width() + xPad*5; fullColour.move(x2, y); y += autoSelect.height(); - zrle.move(xPad, y); + tight.move(xPad, y); mediumColour.move(x2, y); + y += tight.height(); + zrle.move(xPad, y); + lowColour.move(x2, y); y += zrle.height(); hextile.move(xPad, y); - lowColour.move(x2, y); + veryLowColour.move(x2, y); y += hextile.height(); raw.move(xPad, y); - veryLowColour.move(x2, y); y += raw.height(); y += yPad*4; @@ -113,6 +116,7 @@ public: virtual void initDialog() { if (cb) cb->setOptions(); + tight.disabled(autoSelect.checked()); zrle.disabled(autoSelect.checked()); hextile.disabled(autoSelect.checked()); raw.disabled(autoSelect.checked()); @@ -135,6 +139,7 @@ public: virtual void checkboxSelect(TXCheckbox* checkbox) { if (checkbox == &autoSelect) { + tight.disabled(autoSelect.checked()); zrle.disabled(autoSelect.checked()); hextile.disabled(autoSelect.checked()); raw.disabled(autoSelect.checked()); @@ -144,7 +149,8 @@ public: mediumColour.checked(checkbox == &mediumColour); lowColour.checked(checkbox == &lowColour); veryLowColour.checked(checkbox == &veryLowColour); - } else if (checkbox == &zrle || checkbox == &hextile || checkbox == &raw) { + } else if (checkbox == &tight || checkbox == &zrle || checkbox == &hextile || checkbox == &raw) { + tight.checked(checkbox == &tight); zrle.checked(checkbox == &zrle); hextile.checked(checkbox == &hextile); raw.checked(checkbox == &raw); @@ -159,7 +165,7 @@ public: TXLabel formatAndEnc, inputs, misc; TXCheckbox autoSelect; TXCheckbox fullColour, mediumColour, lowColour, veryLowColour; - TXCheckbox zrle, hextile, raw; + TXCheckbox tight, zrle, hextile, raw; TXCheckbox viewOnly, acceptClipboard, sendClipboard, sendPrimary; TXCheckbox shared, fullScreen, useLocalCursor, dotWhenNoCursor; TXButton okButton, cancelButton; |