Exemplo n.º 1
0
	def __init__(self, session):
		if (getDesktop(0).size().width() < 800):
			skin = "%s/skins/menu_sd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		else:
			skin = "%s/skins/menu_hd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		f = open(skin, "r")
		self.skin = f.read()
		f.close()
		Screen.__init__(self, session)

		self.config = CrossEPG_Config()
		self.config.load()
		self.patchtype = getEPGPatchType()

		l = []
		l.append(self.buildListEntry(_("Configure CrossEPG"), "configure.png"))
		l.append(self.buildListEntry(_("Epg Providers"), "xmltv.png"))
		l.append(self.buildListEntry(_("Epg Tools"), "conversion.png"))
		l.append(self.buildListEntry(_("Download now"), "download.png"))
		l.append(self.buildListEntry(_("Information"), "about.png"))

		self["list"] = List(l)
		self["setupActions"] = ActionMap(["SetupActions"],
		{
			"cancel": self.quit,
			"ok": self.openSelected,
		}, -2)

		self.onFirstExecBegin.append(self.setTitleWithVerion)
		
		if self.config.configured == 0:
			self.onFirstExecBegin.append(self.openSetup)
Exemplo n.º 2
0
	def __init__(self, session):
		if (getDesktop(0).size().width() < 800):
			skin = "%s/skins/menu_sd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		else:
			skin = "%s/skins/menu_hd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		f = open(skin, "r")
		self.skin = f.read()
		f.close()
		Screen.__init__(self, session)

		self.config = CrossEPG_Config()
		self.config.load()
		self.patchtype = getEPGPatchType()

		l = []
		l.append(self.buildListEntry(_("XMLTV providers"), "xmltv.png"))
		l.append(self.buildListEntry(_("OpenTV providers"), "opentv.png"))
		l.append(self.buildListEntry(_("XEPGDB providers"), "xepgdb.png"))
		l.append(self.buildListEntry(_("Scripts providers"), "scripts.png"))
		l.append(self.buildListEntry(_("MHW2 providers"), "opentv.png"))
		l.append(self.buildListEntry(_("Providers start order"), "reorder.png"))
		l.append(self.buildListEntry(_("Update rytec providers"), "rytec_small.png"))
		l.append(self.buildListEntry(_("Update xepgdb providers"), "xepgdb.png"))

		self["list"] = List(l)
		self["setupActions"] = ActionMap(["SetupActions"],
		{
			"cancel": self.quit,
			"ok": self.openSelected,
		}, -2)

		self.onFirstExecBegin.append(self.setTitleWithVerion)
		
		if self.config.configured == 0:
			self.onFirstExecBegin.append(self.openSetup)