]> source.dussan.org Git - tigervnc.git/commitdiff
Added showToolbar parameter to the CViewOptions class.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Wed, 30 Nov 2005 16:17:46 +0000 (16:17 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Wed, 30 Nov 2005 16:17:46 +0000 (16:17 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@424 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/CViewOptions.cxx
vncviewer/CViewOptions.h

index 39a1a5ca746e480b023ecaad117686d8427aa767..b3f58103d2d1dc984cc59ca5e32a5bc8c735f38f 100644 (file)
@@ -88,6 +88,8 @@ static BoolParameter acceptBell("AcceptBell",
                          "Produce a system beep when requested to by the server.",
                          true);
 
+static BoolParameter showToolbar("ShowToolbar", "Show toolbar by default.", true);
+
 static StringParameter monitor("Monitor", "The monitor to open the VNC Viewer window on, if available.", "");
 static StringParameter menuKey("MenuKey", "The key which brings up the popup menu", "F8");
 
@@ -114,7 +116,7 @@ CViewOptions::CViewOptions()
 autoSelect(::autoSelect), fullColour(::fullColour), fullScreen(::fullScreen),
 shared(::sharedConnection), sendPtrEvents(::sendPtrEvents), sendKeyEvents(::sendKeyEvents), sendSysKeys(::sendSysKeys),
 preferredEncoding(encodingZRLE), clientCutText(::clientCutText), serverCutText(::serverCutText),
-protocol3_3(::protocol3_3), acceptBell(::acceptBell), lowColourLevel(::lowColourLevel),
+protocol3_3(::protocol3_3), acceptBell(::acceptBell), showToolbar(::showToolbar), lowColourLevel(::lowColourLevel),
 pointerEventInterval(ptrEventInterval), emulate3(::emulate3), monitor(::monitor.getData()),
 customCompressLevel(::customCompressLevel), compressLevel(::compressLevel), 
 noJpeg(::noJpeg), qualityLevel(::qualityLevel), passwordFile(::passwordFile.getData())
@@ -224,6 +226,8 @@ void CViewOptions::readFromFile(const char* filename) {
             serverCutText = atoi(value.buf);
           } else if (stricmp(name.buf, "Emulate3") == 0) {
             emulate3 = atoi(value.buf);
+          } else if (stricmp(name.buf, "ShowToolbar") == 0) {
+            showToolbar = atoi(value.buf);
           } else if (stricmp(name.buf, "PointerEventInterval") == 0) {
             pointerEventInterval = atoi(value.buf);
           } else if (stricmp(name.buf, "Monitor") == 0) {
@@ -318,6 +322,7 @@ void CViewOptions::writeToFile(const char* filename) {
     fprintf(f, "SendCutText=%d\n", (int)clientCutText);
     fprintf(f, "AcceptCutText=%d\n", (int)serverCutText);
     fprintf(f, "Emulate3=%d\n", (int)emulate3);
+    fprintf(f, "ShowToolbar=%d\n", (int)showToolbar);
     fprintf(f, "PointerEventInterval=%d\n", pointerEventInterval);
     if (monitor.buf)
       fprintf(f, "Monitor=%s\n", monitor.buf);
@@ -354,6 +359,7 @@ void CViewOptions::writeDefaults() {
   key.setBool(_T("ServerCutText"), serverCutText);
   key.setBool(_T("Protocol3.3"), protocol3_3);
   key.setBool(_T("AcceptBell"), acceptBell);
+  key.setBool(_T("ShowToolbar"), showToolbar);
   key.setBool(_T("Emulate3"), emulate3);
   key.setInt(_T("PointerEventInterval"), pointerEventInterval);
   if (monitor.buf)
@@ -412,6 +418,7 @@ CViewOptions& CViewOptions::operator=(const CViewOptions& o) {
   pointerEventInterval = o.pointerEventInterval;
   protocol3_3 = o.protocol3_3;
   acceptBell = o.acceptBell;
+  showToolbar = o.showToolbar;
   setUserName(o.userName.buf);
   setPassword(o.password.buf);
   setConfigFileName(o.configFileName.buf);
index b19c75084ccfcdb76866fe181e36f7425900875d..febd2842408148a5f94195f36ebd4a259dcea96c 100644 (file)
@@ -59,6 +59,7 @@ namespace rfb {
       bool sendPtrEvents;
       bool sendKeyEvents;
       bool sendSysKeys;
+      bool showToolbar;
       bool clientCutText;
       bool serverCutText;
       bool emulate3;