Exemplo n.º 1
0
	def __init__(self, session, list=None):
		if not list: list = []
		IpkgInstaller.__init__(self, session, list)
		Screen.setTitle(self, _("Script Runner"))
		self.skinName = "IpkgInstaller"
		self["key_green"] = StaticText(_("Run"))

		self['myactions'] = ActionMap(["MenuActions"],
									  {
									  "menu": self.createSetup,
									  }, -1)
Exemplo n.º 2
0
	def __init__(self, session, list=None, menu_path=""):
		if not list:
			list = []
			if path.exists('/usr/scripts') and not path.exists('/usr/script'):
				rename('/usr/scripts', '/usr/script')
			if not path.exists('/usr/script'):
				mkdir('/usr/script', 0755)
			f = listdir('/usr/script')
			for line in f:
				parts = line.split()
				pkg = parts[0]
				if pkg.find('.sh') >= 0:
					list.append(pkg)
		IpkgInstaller.__init__(self, session, list)
		screentitle =  _("Script runner")
		self.menu_path = menu_path
		if config.usage.show_menupath.value == 'large':
			self.menu_path += screentitle
			title = self.menu_path
			self["menu_path_compressed"] = StaticText("")
			self.menu_path += ' / '
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			condtext = ""
			if self.menu_path and not self.menu_path.endswith(' / '):
				condtext = self.menu_path + " >"
			elif self.menu_path:
				condtext = self.menu_path[:-3] + " >"
			self["menu_path_compressed"] = StaticText(condtext)
			self.menu_path += screentitle + ' / '
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)

		self.skinName = ["VIXScriptRunner", "IpkgInstaller"]
		self["key_green"] = StaticText(_("Run"))

		self['myactions'] = ActionMap(["MenuActions"],
									  {
									  "menu": self.createSetup,
									  }, -1)
Exemplo n.º 3
0
    def __init__(self, session, list=None, menu_path=""):
        if not list:
            list = []
            if path.exists('/usr/scripts') and not path.exists('/usr/script'):
                rename('/usr/scripts', '/usr/script')
            if not path.exists('/usr/script'):
                mkdir('/usr/script', 0755)
            f = listdir('/usr/script')
            for line in f:
                parts = line.split()
                pkg = parts[0]
                if pkg.find('.sh') >= 0:
                    list.append(pkg)
        IpkgInstaller.__init__(self, session, list)
        screentitle = _("Script runner")
        self.menu_path = menu_path
        if config.usage.show_menupath.value == 'large':
            self.menu_path += screentitle
            title = self.menu_path
            self["menu_path_compressed"] = StaticText("")
            self.menu_path += ' / '
        elif config.usage.show_menupath.value == 'small':
            title = screentitle
            condtext = ""
            if self.menu_path and not self.menu_path.endswith(' / '):
                condtext = self.menu_path + " >"
            elif self.menu_path:
                condtext = self.menu_path[:-3] + " >"
            self["menu_path_compressed"] = StaticText(condtext)
            self.menu_path += screentitle + ' / '
        else:
            title = screentitle
            self["menu_path_compressed"] = StaticText("")
        Screen.setTitle(self, title)

        self.skinName = ["VIXScriptRunner", "IpkgInstaller"]
        self["key_green"] = StaticText(_("Run"))

        self['myactions'] = ActionMap(["MenuActions"], {
            "menu": self.createSetup,
        }, -1)
Exemplo n.º 4
0
    def __init__(self, session, list=None):
        if not list:
            list = []
            if path.exists('/usr/scripts') and not path.exists('/usr/script'):
                rename('/usr/scripts', '/usr/script')
            if not path.exists('/usr/script'):
                mkdir('/usr/script', 0755)
            f = listdir('/usr/script')
            for line in f:
                parts = line.split()
                pkg = parts[0]
                if pkg.find('.sh') >= 0:
                    list.append(pkg)
        IpkgInstaller.__init__(self, session, list)
        self.setTitle(_("Script runner"))

        self.skinName = ["VIXScriptRunner", "IpkgInstaller"]
        self["key_green"] = StaticText(_("Run"))

        self['myactions'] = ActionMap(["MenuActions"], {
            "menu": self.createSetup,
        }, -1)