Revision: 4194
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4194&view=rev
Author:   atkac
Date:     2010-11-11 14:29:35 +0000 (Thu, 11 Nov 2010)

Log Message:
-----------
[Development] Allow changing the default value of string parameters. (Martin 
Koegler)

Modified Paths:
--------------
    trunk/common/rfb/Configuration.cxx
    trunk/common/rfb/Configuration.h

Modified: trunk/common/rfb/Configuration.cxx
===================================================================
--- trunk/common/rfb/Configuration.cxx  2010-11-11 14:06:42 UTC (rev 4193)
+++ trunk/common/rfb/Configuration.cxx  2010-11-11 14:29:35 UTC (rev 4194)
@@ -418,6 +418,12 @@
   strFree(value);
 }
 
+void StringParameter::setDefaultStr(const char* v) {
+  def_value = v;
+  strFree(value);
+  value = strDup(v);
+}
+
 bool StringParameter::setParam(const char* v) {
   LOCK_CONFIG;
   if (immutable) return true;

Modified: trunk/common/rfb/Configuration.h
===================================================================
--- trunk/common/rfb/Configuration.h    2010-11-11 14:06:42 UTC (rev 4193)
+++ trunk/common/rfb/Configuration.h    2010-11-11 14:29:35 UTC (rev 4194)
@@ -240,6 +240,7 @@
     virtual bool setParam(const char* value);
     virtual char* getDefaultStr() const;
     virtual char* getValueStr() const;
+    void setDefaultStr(const char* v);
 
     // getData() returns a copy of the data - it must be delete[]d by the
     // caller.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to