[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5598 - trunk/gnue-forms/src
From: |
jcater |
Subject: |
r5598 - trunk/gnue-forms/src |
Date: |
Wed, 31 Mar 2004 16:49:14 -0600 (CST) |
Author: jcater
Date: 2004-03-31 16:49:13 -0600 (Wed, 31 Mar 2004)
New Revision: 5598
Modified:
trunk/gnue-forms/src/GFClient.py
Log:
added --help-ui to gnue-forms and simplified its use of CommandOptions
Modified: trunk/gnue-forms/src/GFClient.py
===================================================================
--- trunk/gnue-forms/src/GFClient.py 2004-03-31 21:46:40 UTC (rev 5597)
+++ trunk/gnue-forms/src/GFClient.py 2004-03-31 22:49:13 UTC (rev 5598)
@@ -52,18 +52,23 @@
COMMAND = "gnue-forms"
NAME = "GNUe Forms"
USAGE = GClientApp.USAGE + " file"
- COMMAND_OPTIONS = [
- [ 'user_interface', 'u', 'interface', True, None, 'type',
- _('The currently supported values for <type> are ') \
- +'wx, gtk2, qt, win32, and curses' ],
- [ 'splash_screen','s','no-splash', False, None, None,
- _('Disables the splash screen')]
- ]
SUMMARY = \
_("GNUe Forms is the primary user interface to the GNU Enterprise
system.")
USE_DATABASE_OPTIONS = 1
def __init__(self, connections=None):
+
+ self.addCommandOption('user_interface', 'u', 'interface',
+ argument="ui", category="ui",
+ help=_("The name of the user interface to use to display your form. "
+ "For a list of interfaces, use the --help-ui options."))
+
+ self.addCommandOption('help-ui', action=self.__listUIs,category="ui",
+ help=_("Prints a list of user interfaces that forms supports."))
+
+ self.addCommandOption('no-splash','s', category="ui",
+ help=_('Disables the splash screen'))
+
GClientApp.__init__(self, connections,'forms',ConfigOptions)
self.configurationManager.registerAlias('gConfigForms', 'forms')
@@ -145,7 +150,7 @@
if gConfigForms('disableSplash') == True:
self.disableSplash = True
else:
- self.disableSplash = self.OPTIONS['splash_screen']
+ self.disableSplash = self.OPTIONS['no-splash']
#
# Assign the proper login handler based upon the user interface choice
@@ -167,6 +172,25 @@
except CompileError, msg:
self.handleStartupError(msg)
+ def __listUIs(self):
+ self.printHelpHeader()
+ print _("The following interfaces are supported by GNUe Forms. You can
select an\n"
+ "interface via the --interface option.")
+ print
+ print _("To view general help, run this command with the --help option.")
+ print
+ print _('User interface command line options:')
+ print self.buildHelpOptions("ui")
+ # TODO: This should be automated
+ print "Available user interfaces:"
+ print " wx wxPython-based graphical interface"
+ print " gtk2 GTK2-based graphical interface"
+ print " qt QT3-based graphical interface"
+ print " win32 Native Windows graphical interface"
+ print " curses Text-based interface that uses ncurses"
+ self.printHelpFooter()
+ sys.exit()
+
if __name__ == '__main__':
GFClient().run()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5598 - trunk/gnue-forms/src,
jcater <=