Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17721/src/classes
Modified Files:
ConfigSourcesAll.cpp
Log Message:
removed ConfigSourceLocalOld, shouldn't be needed any more
Index: ConfigSourcesAll.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/ConfigSourcesAll.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -u -2 -r1.6 -r1.7
--- ConfigSourcesAll.cpp 6 Jul 2005 11:28:48 -0000 1.6
+++ ConfigSourcesAll.cpp 6 Jul 2005 12:41:23 -0000 1.7
@@ -24,4 +24,6 @@
#include "Mdefaults.h"
#include "MApplication.h"
+
+ #include <wx/config.h>
#endif // USE_PCH
@@ -43,46 +45,4 @@
// ----------------------------------------------------------------------------
-#ifdef OS_UNIX
-
-/**
- ConfigSourceLocalOld is the class which behaves in exactly the same way as
- ConfigSourceLocal except that it prepends "/M" to all paths.
-
- See AllConfigSources constructor for the explanation of why is this needed.
-
- This class is read-only, all Write() methods silently fail.
- */
-class ConfigSourceLocalOld : public ConfigSourceLocal
-{
-private:
- // "fix" the config path
- static String Fix(const String& path) { return _T("/M") + path; }
-
-public:
- ConfigSourceLocalOld(const String& filename, const String& name = _T(""))
- : ConfigSourceLocal(CreateDefault(filename), name) { }
-
- virtual bool Read(const String& name, String *value) const
- { return ConfigSourceLocal::Read(Fix(name), value); }
- virtual bool Read(const String& name, long *value) const
- { return ConfigSourceLocal::Read(Fix(name), value); }
- virtual bool Write(const String&, const String&) { return true; }
- virtual bool Write(const String&, long) { return true; }
- virtual bool GetFirstGroup(const String& key,
- String& group, EnumData& cookie) const
- { return ConfigSourceLocal::GetFirstGroup(Fix(key), group, cookie); }
- virtual bool GetFirstEntry(const String& key,
- String& entry, EnumData& cookie) const
- { return ConfigSourceLocal::GetFirstEntry(Fix(key), entry, cookie); }
- virtual bool DeleteEntry(const String&) { return true; }
- virtual bool DeleteGroup(const String&) { return true; }
- virtual bool CopyEntry(const String&, const String&, ConfigSource *)
- { return true; }
- virtual bool RenameGroup(const String&, const String&) { return true; }
-};
-
-#endif // OS_UNIX
-
-
/**
wxConfigMultiplexer is a wxConfig façade for AllConfigSources.
@@ -345,24 +305,4 @@
m_sources.push_back(configLocal);
-#ifdef OS_UNIX
- // under Unix we used to store all config data under /M/Profiles which was
- // inconsistent with Windows version which used just /Profile and a bit
- // silly anyhow as what else if not M data can be stored in ~/.M/config
- // file anyhow
- //
- // so starting with 0.66 we use just /Profiles everywhere but this creates
- // a problem because the location of everything has changed
- //
- // to solve this, we create a fallback config source which justs look in
- // /M/path when reading from /path and which we only use if we detect that
- // config file is from an older version
- String ver;
- bool useOldConfig = configLocal->Read(_T("/M/Profiles/Version"), &ver);
- if ( useOldConfig )
- {
- m_sources.push_back(new ConfigSourceLocalOld(filename));
- }
-#endif // OS_UNIX
-
// now get all the other configs
LongList priorities;
@@ -396,8 +336,4 @@
List::iterator i = m_sources.begin();
++i; // skip local config which is always first
-#ifdef OS_UNIX
- if ( useOldConfig )
- ++i; // and compatibility config if we use it
-#endif // OS_UNIX
LongList::iterator j;
-------------------------------------------------------
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