Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/components
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9374
Modified Files:
escCLH.js
Log Message:
Add support for simple -usage command which prints out command line usage.
Index: escCLH.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/components/escCLH.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- escCLH.js 9 Feb 2007 21:55:31 -0000 1.2
+++ escCLH.js 28 Feb 2007 19:05:30 -0000 1.3
@@ -57,10 +57,23 @@
cmdLine.preventDefault = true;
}
+
+ var showUsage = cmdLine.handleFlag("usage",false);
+
+ recordMessage("ShowUsage flag: " + showUsage);
+ if(showUsage) {
+ cmdLine.preventDefault = true;
+ }
+
if(win)
{
recordMessage("Subsequent command invocation. Launch appropriate
page.");
-
+ if(showUsage)
+ {
+ recordMessage("About to show usage.");
+ win.ShowUsage();
+ return;
+ }
var locName = win.location.toString();
recordMessage("Base window . " + locName);
Show replies by date