Change fill method of action variables.

Change fill method for applying templates by execute cl-desktop
command without install this package.
master
Mike Hiretsky 14 years ago
parent 0c24fbfd64
commit bda6abf71b

@ -30,28 +30,25 @@ class fillVars():
def get_cl_desktop_install_action(self): def get_cl_desktop_install_action(self):
"""переключатель для шаблонов инсталяции и удаления программы""" """переключатель для шаблонов инсталяции и удаления программы"""
ret = "" ret = ""
if "calculate-desktop" in self.GetList("cl_merges"): action = self.Get("cl_action")
action = self.Get("cl_action") if action in ("install","merge"):
if action in ("install","merge"): ret = "up"
ret = "up" elif action == "uninstall":
elif action == "uninstall": ret = "down"
ret = "down"
return ret return ret
def get_cl_desktop_merge_action(self): def get_cl_desktop_merge_action(self):
"""переключатель для шаблонов merge""" """переключатель для шаблонов merge"""
ret = "" ret = ""
if "calculate-desktop" in self.GetList("cl_merges"): action = self.Get("cl_action")
action = self.Get("cl_action") if action in ("install","uninstall","merge"):
if action in ("install","uninstall","merge"): ret = "up"
ret = "up"
return ret return ret
def get_cl_desktop_desktop_action(self): def get_cl_desktop_desktop_action(self):
"""переключатель для шаблонов создания пользовательского профиля""" """переключатель для шаблонов создания пользовательского профиля"""
ret = "" ret = ""
if "calculate-desktop" in self.GetList("cl_merges"): action = self.Get("cl_action")
action = self.Get("cl_action") if action in ("desktop",):
if action in ("desktop",): ret = "up"
ret = "up" return ret
return ret

Loading…
Cancel
Save