Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2302/include
Modified Files:
ConfigSourceLocal.h
Log Message:
added UseFile/GetFilePath()
Index: ConfigSourceLocal.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/ConfigSourceLocal.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -2 -r1.1 -r1.2
--- ConfigSourceLocal.h 5 Jul 2005 12:34:13 -0000 1.1
+++ ConfigSourceLocal.h 5 Jul 2005 21:23:08 -0000 1.2
@@ -82,4 +82,25 @@
return config;
}
+
+ /**
+ Configure CreateDefault() to use a file instead of the registry.
+
+ The value of config file name is always stored in the registry as this is
+ where we look first, hence if we're already using a config file and not
+ registry we can't use the usual ConfigSource or Profile methods to write
+ it but have to use this special function.
+
+ @sa GetFilePath()
+
+ @param filename if not empty, use the file with this name instead of the
+ registry, otherwise use the registry
+ */
+ static void UseFile(const String& filename);
+
+ /**
+ Return the name of the config file used by CreateDefault() or an empty
+ string if we're using the registry.
+ */
+ static String GetFilePath();
#endif // OS_WIN
@@ -133,6 +154,19 @@
#ifdef OS_WIN
+ // create registry config for us
+ static wxConfigBase *DoCreateRegConfig();
+
// initialize m_config with wxRegConfig we use under Windows
bool InitRegistry();
+
+ // get the location used for "config file" option in the registry (relative
+ // to wxRegConfig root)
+ static String GetConfigFileKey()
+ {
+ return M_PROFILE_CONFIG_SECTION _T("/UseConfigFile");
+ }
+
+ // get the config file location from the given wxRegConfig
+ static String GetFilePath(wxConfigBase *config);
#endif // OS_WIN
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates