Update of /cvsroot/mahogany/M/src/util
In directory sc8-pr-cvs1:/tmp/cvs-serv23092/src/util
Modified Files:
upgrade.cpp
Log Message:
upgrade the persistent msg box data when upgrading from 0.65 too; removed backwards
compatiblity code from MDialog_YesNoDialog() itself
Index: upgrade.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/upgrade.cpp,v
retrieving revision 1.211
retrieving revision 1.212
diff -b -u -2 -r1.211 -r1.212
--- upgrade.cpp 31 Aug 2003 19:23:32 -0000 1.211
+++ upgrade.cpp 31 Aug 2003 20:41:17 -0000 1.212
@@ -2804,11 +2804,41 @@
{
#ifdef OS_UNIX
+ // we don't use "/M" prefix any more, copy everything from under it to the
+ // root
wxConfigBase *config = mApplication->GetProfile()->GetConfig();
- if ( !CopyEntries(config, "/M", "/") > 0 )
+ if ( CopyEntries(config, "/M", "/") < 0 )
return false;
if ( !config->DeleteGroup("/M") )
wxLogDebug("Old data was left in [M] config section.");
+
+
+ // the folder-specific message box settings must be changed as well as
+ // profile paths have changed
+ //
+ // we use hardcoded path here but this is ok as we don't intend to ever
+ // change this code, even if the path used for storing the msg boxes
+ // settings changes in the future
+ String pathOld = config->GetPath();
+
+ String path;
+ path << '/' << M_SETTINGS_CONFIG_SECTION << "MessageBox";
+ config->SetPath(path);
+
+ long cookie;
+ String groupOld,
+ groupNew;
+ for ( bool cont = config->GetFirstGroup(groupOld, cookie);
+ cont;
+ cont = config->GetNextGroup(groupOld, cookie) )
+ {
+ if ( groupOld.StartsWith("M_Profiles_", &groupNew) )
+ {
+ config->RenameGroup(groupOld, groupNew);
+ }
+ }
+
+ config->SetPath(pathOld);
#endif // OS_UNIX
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates