Help restructuring.

master
Mike Hiretsky 14 years ago
parent 06e7290be8
commit 8a14baa3c1

Binary file not shown.

@ -35,16 +35,21 @@ EXAMPLES = _("%prog user_name")
DESCRIPTION = _("Create home directory for the new user account")
# Опции командной строки
CMD_OPTIONS = [{'longOption':"progress",
'help':_("show progress bar for xdm startup")},
{'longOption':"install",
'help':_("configure the system to install this package")},
{'longOption':"uninstall",
'help':_("configure the system to uninstall this package")}]
CMD_OPTIONS = [{'longOption':"set"},
{'longOption':"install",
'help':_("install package")},
{'longOption':"uninstall",
'help':_("uninstall package")},
{'longOption':"progress",
'help':_("show progress bar for xdm startup")}]
class desktop_cmd(share_cmd):
def __init__(self):
# Объект опций командной строки
setpos = \
filter(lambda x:x[1].get('longOption')=="set",
enumerate(CMD_OPTIONS))[0][0]
CMD_OPTIONS[setpos] = opt.variable_set[0]
self.optobj = opt(\
package=__app__,
version=__version__,
@ -52,7 +57,7 @@ class desktop_cmd(share_cmd):
examples=EXAMPLES,
comment_examples=COMMENT_EXAMPLES,
description=DESCRIPTION,
option_list=CMD_OPTIONS + opt.variable_control+opt.color_control,
option_list=CMD_OPTIONS + opt.variable_view+opt.color_control,
check_values=self.checkOpts)
# Создаем объект логики
self.logicObj = desktop()
@ -152,4 +157,4 @@ class desktop_cmd(share_cmd):
def uninstall(self):
"""Удаление программы"""
return self.logicObj.uninstallProg()
return self.logicObj.uninstallProg()

Loading…
Cancel
Save