Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv9276/src/gui

Modified Files:
        wxMApp.cpp 
Log Message:
added --debug option to force mail subsystem debugging from command line


Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.232
retrieving revision 1.233
diff -b -u -2 -r1.232 -r1.233
--- wxMApp.cpp  16 Apr 2002 02:50:38 -0000      1.232
+++ wxMApp.cpp  22 Apr 2002 10:12:06 -0000      1.233
@@ -2007,4 +2007,5 @@
 #define OPTION_CC          "cc"
 #define OPTION_CONFIG      "config"
+#define OPTION_DEBUGMAIL   "debug"
 #define OPTION_FOLDER      "folder"
 #define OPTION_NEWSGROUP   "newsgroup"
@@ -2016,4 +2017,5 @@
    wxApp::OnInitCmdLine(parser);
 
+   // NB: add new options in alphabetical order
    static const wxCmdLineEntryDesc cmdLineDesc[] =
    {
@@ -2050,4 +2052,12 @@
       },
 
+      // --debug to force mail debugging on
+      {
+         wxCMD_LINE_SWITCH,
+         NULL,
+         OPTION_DEBUGMAIL,
+         gettext_noop("enable mail subsystem debug message logging"),
+      },
+
       // -f or --folder to specify the folder to open in the main frame
       {
@@ -2129,4 +2139,5 @@
 
    m_cmdLineOptions->safe = parser.Found(OPTION_SAFE);
+   m_cmdLineOptions->debugMail = parser.Found(OPTION_DEBUGMAIL);
 
    if ( startComposer )
@@ -2330,5 +2341,9 @@
 
 // the version of the CmdLineOptions::ToString() format
-#define CMD_LINE_OPTS_VERSION 1.0
+#define CMD_LINE_OPTS_VERSION 1.1
+
+// the string versions of TRUE and FALSE
+#define CMD_LINE_OPTS_TRUE '1'
+#define CMD_LINE_OPTS_FALSE '0'
 
 // the positions of the individual members in the string produced by ToString()
@@ -2343,4 +2358,5 @@
    CmdLineOptions_Subject,
    CmdLineOptions_To,
+   CmdLineOptions_DebugMail,
    CmdLineOptions_Max
 };
@@ -2357,5 +2373,6 @@
      << composer.newsgroups << CMD_LINE_OPTS_SEP
      << composer.subject << CMD_LINE_OPTS_SEP
-     << composer.to;
+     << composer.to << CMD_LINE_OPTS_SEP
+     << (debugMail ? CMD_LINE_OPTS_TRUE : CMD_LINE_OPTS_FALSE);
 
    return s;
@@ -2380,4 +2397,5 @@
    composer.subject = tokens[CmdLineOptions_Subject];
    composer.to = tokens[CmdLineOptions_To];
+   debugMail = tokens[CmdLineOptions_DebugMail] == CMD_LINE_OPTS_TRUE;
 
    return true;


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to