Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22386/src/classes

Modified Files:
        MApplication.cpp 
Log Message:
added --import cmd line option

Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.291
retrieving revision 1.292
diff -b -u -2 -r1.291 -r1.292
--- MApplication.cpp    17 Mar 2004 10:01:01 -0000      1.291
+++ MApplication.cpp    20 Apr 2004 13:09:55 -0000      1.292
@@ -44,4 +44,5 @@
 #include "Composer.h"         // for RestoreAll()
 #include "SendMessage.h"
+#include "ConfigSource.h"
 
 #include "InitPython.h"
@@ -361,4 +362,20 @@
    }
 
+   // import the settings from the given location
+   if ( !m_cmdLineOptions->configImport.empty() )
+   {
+      ConfigSource_obj
+         configSrc(ConfigSourceLocal::CreateFile(m_cmdLineOptions->configImport)),
+         configDst(ConfigSourceLocal::CreateDefault());
+
+      if ( !ConfigSource::Copy(*configDst, *configSrc) )
+      {
+         wxLogError(_("Failed to import Mahogany settings from \"%s\"."),
+                    m_cmdLineOptions->configImport.c_str());
+
+         // continue nevertheless
+      }
+   }
+
    // disable the use of environment variables if configured like this (this
    // speeds up things relatively significantly under Windows - and as few



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to