diff options
author | Peter Åstrand <astrand@cendio.se> | 2005-01-03 12:01:45 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2005-01-03 12:01:45 +0000 |
commit | 55855d5a0a786628c251bfdf2de43adc94f5cee4 (patch) | |
tree | afa6e51d8b18d698cd31837685860b6e6b6adfd0 /vncviewer | |
parent | ff32dec05b5e37d780ee2359781c7df0a8461153 (diff) | |
download | tigervnc-55855d5a0a786628c251bfdf2de43adc94f5cee4.tar.gz tigervnc-55855d5a0a786628c251bfdf2de43adc94f5cee4.zip |
AutoSelect if default only if not using PreferredEncoding or FullColor.
CustomCompressLevel is default if CompressLevel is specified.
This gives backwards compatibility with the old vncviewer, but at the
same time making it possible to fully specify the internal state of
the viewer wrt AutoSelect, CustomCompressLevel and CompressLevel. For
example, it's now possible to start the client with CompressLevel=4
specified, but with CustomCompressLevel=0 (thus the option
grayed-out).
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@79 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/CViewOptions.cxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/vncviewer/CViewOptions.cxx b/vncviewer/CViewOptions.cxx index f19b096a..1f551296 100644 --- a/vncviewer/CViewOptions.cxx +++ b/vncviewer/CViewOptions.cxx @@ -49,10 +49,12 @@ static BoolParameter fullScreen("FullScreen", "(Press F8 to access the viewer menu)", false); static StringParameter preferredEncoding("PreferredEncoding", - "Preferred graphical encoding to use - overridden by AutoSelect if set. " - "(ZRLE, Hextile or Raw)", "ZRLE"); - -static BoolParameter autoSelect("AutoSelect", "Auto select pixel format and encoding", true); + "Preferred encoding to use (Tight, ZRLE, Hextile or" + " Raw)", "Tight"); +static BoolParameter autoSelect("AutoSelect", + "Auto select pixel format and encoding. " + "Default if PreferredEncoding and FullColor are not specified.", + true); static BoolParameter sharedConnection("Shared", "Allow existing connections to the server to continue." "(Default is to disconnect all other clients)", @@ -86,8 +88,8 @@ static StringParameter monitor("Monitor", "The monitor to open the VNC Viewer wi static StringParameter menuKey("MenuKey", "The key which brings up the popup menu", "F8"); static BoolParameter customCompressLevel("CustomCompressLevel", - "Use custom compression level", - false); + "Use custom compression level. " + "Default if CompressLevel is specified.", false); static IntParameter compressLevel("CompressLevel", "Use specified compression level" @@ -116,6 +118,17 @@ noJpeg(::noJpeg), qualityLevel(::qualityLevel) CharArray encodingName(::preferredEncoding.getData()); preferredEncoding = encodingNum(encodingName.buf); setMenuKey(CharArray(::menuKey.getData()).buf); + + if (!::autoSelect.hasBeenSet()) { + // Default to AutoSelect=0 if -PreferredEncoding or -FullColor is used + autoSelect = (!::preferredEncoding.hasBeenSet() + && !::fullColour.hasBeenSet() + && !::fullColourAlias.hasBeenSet()); + } + if (!::customCompressLevel.hasBeenSet()) { + // Default to CustomCompressLevel=1 if CompressLevel is used. + customCompressLevel = ::compressLevel.hasBeenSet(); + } } |