Revision: 7502
http://mahogany.svn.sourceforge.net/mahogany/?rev=7502&view=rev
Author: vadz
Date: 2008-08-04 20:41:26 +0000 (Mon, 04 Aug 2008)
Log Message:
-----------
add --noremote option, useful for debugging
Modified Paths:
--------------
trunk/M/doc/Manual.htex
trunk/M/include/CmdLineOpts.h
trunk/M/src/classes/MApplication.cpp
trunk/M/src/gui/wxMApp.cpp
Modified: trunk/M/doc/Manual.htex
===================================================================
--- trunk/M/doc/Manual.htex 2008-07-31 17:25:45 UTC (rev 7501)
+++ trunk/M/doc/Manual.htex 2008-08-04 20:41:26 UTC (rev 7502)
@@ -1016,6 +1016,9 @@
-{}-nopython & disable the embedded Python interpreter, even if it is
enabled in the program options (\ref{PythonOptions}) \\
\hline
+ -{}-noremote & don't reuse an already running instance of Mahogany even if
+the corresponding option is set \\
+ \hline
\end{tabular}
}
Modified: trunk/M/include/CmdLineOpts.h
===================================================================
--- trunk/M/include/CmdLineOpts.h 2008-07-31 17:25:45 UTC (rev 7501)
+++ trunk/M/include/CmdLineOpts.h 2008-08-04 20:41:26 UTC (rev 7502)
@@ -61,6 +61,9 @@
bool noPython;
#endif // USE_PYTHON
+ // don't switch to an already running instance even if configured to do it
+ bool noRemote;
+
/**
@name Conversion to/from string
Modified: trunk/M/src/classes/MApplication.cpp
===================================================================
--- trunk/M/src/classes/MApplication.cpp 2008-07-31 17:25:45 UTC (rev
7501)
+++ trunk/M/src/classes/MApplication.cpp 2008-08-04 20:41:26 UTC (rev
7502)
@@ -427,8 +427,9 @@
// called
m_debugMail = m_cmdLineOptions->debugMail;
- // safe mode disables remote calls
- if ( !m_cmdLineOptions->safe )
+ // delegating to another instance can be disabled with a special
+ // command-line option
+ if ( !m_cmdLineOptions->noRemote )
{
// before doing anything else, if the corresponding option is set, check
// if another program instance is not already running
Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp 2008-07-31 17:25:45 UTC (rev 7501)
+++ trunk/M/src/gui/wxMApp.cpp 2008-08-04 20:41:26 UTC (rev 7502)
@@ -2317,6 +2317,7 @@
#define OPTION_LANG "lang"
#define OPTION_NEWSGROUP "newsgroup"
#define OPTION_NOPYTHON "nopython"
+#define OPTION_NOREMOTE "noremote"
#define OPTION_SAFE "safe"
#define OPTION_SUBJECT "subject"
@@ -2409,6 +2410,15 @@
gettext_noop("don't load Python interpreter even if configured to do
so"),
},
+ // --noremote to disable MP_RUNONEONLY option even if it's on
+ {
+ wxCMD_LINE_SWITCH,
+ "",
+ OPTION_NOREMOTE,
+ gettext_noop("don't reuse an already running instance even if "
+ "configured to do so")
+ },
+
// --newsgroup to specify the newsgroup to post the message to
{
wxCMD_LINE_OPTION,
@@ -2480,6 +2490,17 @@
}
m_cmdLineOptions->safe = parser.Found(OPTION_SAFE);
+ if ( m_cmdLineOptions->safe )
+ {
+ // safe mode implies running this instance and not switching to another
+ // one
+ m_cmdLineOptions->noRemote = true;
+ }
+ else
+ {
+ m_cmdLineOptions->noRemote = parser.Found(OPTION_NOREMOTE);
+ }
+
m_cmdLineOptions->debugMail = parser.Found(OPTION_DEBUGMAIL);
#ifdef USE_PYTHON
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates