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") DESCRIPTION = _("Create home directory for the new user account")
# Опции командной строки # Опции командной строки
CMD_OPTIONS = [{'longOption':"progress", CMD_OPTIONS = [{'longOption':"set"},
'help':_("show progress bar for xdm startup")}, {'longOption':"install",
{'longOption':"install", 'help':_("install package")},
'help':_("configure the system to install this package")}, {'longOption':"uninstall",
{'longOption':"uninstall", 'help':_("uninstall package")},
'help':_("configure the system to uninstall this package")}] {'longOption':"progress",
'help':_("show progress bar for xdm startup")}]
class desktop_cmd(share_cmd): class desktop_cmd(share_cmd):
def __init__(self): 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(\ self.optobj = opt(\
package=__app__, package=__app__,
version=__version__, version=__version__,
@ -52,7 +57,7 @@ class desktop_cmd(share_cmd):
examples=EXAMPLES, examples=EXAMPLES,
comment_examples=COMMENT_EXAMPLES, comment_examples=COMMENT_EXAMPLES,
description=DESCRIPTION, 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) check_values=self.checkOpts)
# Создаем объект логики # Создаем объект логики
self.logicObj = desktop() self.logicObj = desktop()
@ -152,4 +157,4 @@ class desktop_cmd(share_cmd):
def uninstall(self): def uninstall(self):
"""Удаление программы""" """Удаление программы"""
return self.logicObj.uninstallProg() return self.logicObj.uninstallProg()

Loading…
Cancel
Save