Exemple #1
0
    def loadCountry(self):
        pngpath = self["IPTVList"].getCurrent()

        if pngpath == None:
            return

        for l in self.downloadlist:
            if len(l) >= 3:
                if pngpath == l[3]:
                    pngpath = l[0]
                    break

        try:
            pngpath = pngpath + (".png")
            pngpath = self.root + pngpath
        except AttributeError:
            pngpath = resolveFilename(
                "/usr/lib/enigma2/python/Plugins/Extensions/IPTV-List-Updater/images/noprev.png"
            )

        if not path.exists(pngpath):
            pngpath = eEnv.resolve(
                "/usr/lib/enigma2/python/Plugins/Extensions/IPTV-List-Updater/images/noprev.png"
            )
        if self.countryPath != pngpath:
            self.countryPath = pngpath

        self["country"].instance.setPixmapFromFile(self.countryPath)
        Screen.hide(self)
        Screen.show(self)
Exemple #2
0
    def loadCountry(self):
        pngpath = self["IPTVList"].getCurrent()

        if pngpath == None:
            return

        for l in self.downloadlist:
            if len(l) >= 3:
                if pngpath == l[3]:
                    pngpath = l[0]
                    break

        try:
            pngpath = pngpath + (".png")
            pngpath = self.root + pngpath
        except AttributeError:
            pngpath = resolveFilename("/usr/lib/enigma2/python/Plugins/Extensions/IPTV-List-Updater/images/noprev.png")
            
        if not path.exists(pngpath):
            pngpath = eEnv.resolve("/usr/lib/enigma2/python/Plugins/Extensions/IPTV-List-Updater/images/noprev.png")
        if self.countryPath != pngpath:
            self.countryPath = pngpath
            
        self["country"].instance.setPixmapFromFile(self.countryPath)
        Screen.hide(self)
        Screen.show(self)
Exemple #3
0
 def mkNewMenu(self):
     self.delMenu()
     self.makeMenu()
     self["downloadmenu"].moveToIndex(0)
     self.loadInfo()
     Screen.hide(self)
     Screen.show(self)
Exemple #4
0
 def mkNewMenu(self):
     self.delMenu()
     self.makeMenu()
     self["downloadmenu"].moveToIndex(0)
     self.loadInfo()
     Screen.hide(self)
     Screen.show(self)
Exemple #5
0
 def uninstall(self, answer):
     if answer is True:
         os.chmod("/usr/uninstall/" + self["downloadmenu"].l.getCurrentSelection()[1], 755)
         os.system("sh /usr/uninstall/" + self["downloadmenu"].l.getCurrentSelection()[1] + "")
         self.anyNewInstalled = True
         Screen.hide(self)
         self.mkNewMenu()
         self.session.open(MessageBox, ("It's recommented to restart box for changes taking place!"), MessageBox.TYPE_INFO, timeout=10).setTitle(_("Uninstall complete"))
     else:
         self.close()
Exemple #6
0
 def uninstall(self, answer):
     if answer is True:
         os.chmod("/usr/uninstall/" + self["downloadmenu"].l.getCurrentSelection()[1], 755)
         os.system("sh /usr/uninstall/" + self["downloadmenu"].l.getCurrentSelection()[1] + "")
         self.anyNewInstalled = True
         Screen.hide(self)
         self.mkNewMenu()
         self.session.open(MessageBox, ("It's recommented to restart box for changes taking place!"), MessageBox.TYPE_INFO, timeout=10).setTitle(_("Uninstall complete"))
     else:
         self.close()
Exemple #7
0
	def loadPreview(self):
		pngpath = self["SkinList"].l.getCurrentSelection()[0] + "_prev.png"
		try:
			pngpath = self.root + pngpath
		except AttributeError:
			pass
		if not os.path.exists(pngpath):
			pngpath = "/usr/share/enigma2/display/noprev.png"
		if self.previewPath != pngpath:
			self.previewPath = pngpath
		self["Preview"].instance.setPixmapFromFile(self.previewPath)
		Screen.hide(self)
		Screen.show(self)
Exemple #8
0
    def loadInfo(self):
        self["blue"].hide()
        self["key_blue"].setText(" ")
        if "download" in self["downloadmenu"].l.getCurrentSelection():
            if self.switch == "skin" or self.switch == "picon":
                self["blue"].show()
                self["key_blue"].setText("Preview")
            self["key_green"].setText("Download")
            self["introduction"].setText("Press OK to install the file.")
            self["description"].setText(
                self["downloadmenu"].l.getCurrentSelection()[3])
            self["description2"].setText("Description: ")
            self["size"].setText(
                self["downloadmenu"].l.getCurrentSelection()[2])
            self["size2"].setText("Size: ")
            Screen.setTitle(self, "Select your Download for " + boxname)
        elif "uninstall" in self["downloadmenu"].l.getCurrentSelection():
            self["key_green"].setText("Remove")
            self["introduction"].setText("Press OK to remove the file.")
            self["description"].setText(" ")
            self["description2"].setText(" ")
            self["size"].setText(" ")
            self["size2"].setText(" ")
            Screen.setTitle(self, "Select your Removal")
        elif "tmpinst" in self["downloadmenu"].l.getCurrentSelection():
            self["key_green"].setText("Install")
            self["introduction"].setText("Press OK to install the file.")
            self["description"].setText(" ")
            self["description2"].setText(" ")
            self["size"].setText(" ")
            self["size2"].setText(" ")
            Screen.setTitle(self, "Select your local file to install")
        elif "cancel" or "none" in self["downloadmenu"].l.getCurrentSelection(
        ):
            self["key_green"].setText("Ok")
            self["introduction"].setText(" ")
            self["description"].setText("Press OK to do nothing")
            self["description2"].setText("Description: ")
            self["size"].setText("0")
            self["size2"].setText("Size: ")
            Screen.setTitle(self, "HDFreaks.cc Downloader")
        else:
            self["description"].setText(" ")
            self["size"].setText(" ")

        Screen.hide(self)
        Screen.show(self)
Exemple #9
0
    def loadInfo(self):
        self["blue"].hide()
        self["key_blue"].setText(" ")
        if "download" in self["downloadmenu"].l.getCurrentSelection():
            if self.switch == "skin" or self.switch == "picon":
                        self["blue"].show()
                        self["key_blue"].setText("Preview")
            self["key_green"].setText("Download")
            self["introduction"].setText("Press OK to install the file.")
            self["description"].setText(self["downloadmenu"].l.getCurrentSelection()[3])
            self["description2"].setText("Description: ")
            self["size"].setText(self["downloadmenu"].l.getCurrentSelection()[2])
            self["size2"].setText("Size: ")
            Screen.setTitle(self, "Select your Download for " + boxname )
        elif "uninstall" in self["downloadmenu"].l.getCurrentSelection():
            self["key_green"].setText("Remove")
            self["introduction"].setText("Press OK to remove the file.")
            self["description"].setText(" ")
            self["description2"].setText(" ")
            self["size"].setText(" ")
            self["size2"].setText(" ")
            Screen.setTitle(self, "Select your Removal")
        elif "tmpinst" in self["downloadmenu"].l.getCurrentSelection():
            self["key_green"].setText("Install")
            self["introduction"].setText("Press OK to install the file.")
            self["description"].setText(" ")
            self["description2"].setText(" ")
            self["size"].setText(" ")
            self["size2"].setText(" ")
            Screen.setTitle(self, "Select your local file to install")
        elif "cancel" or "none" in self["downloadmenu"].l.getCurrentSelection():
            self["key_green"].setText("Ok")
            self["introduction"].setText(" ")
            self["description"].setText("Press OK to do nothing")
            self["description2"].setText("Description: ")
            self["size"].setText("0")
            self["size2"].setText("Size: ")
            Screen.setTitle(self, "HDFreaks.cc Downloader")
        else:
            self["description"].setText(" ")
            self["size"].setText(" ")

        Screen.hide(self)
        Screen.show(self)
Exemple #10
0
 def hide(self):
     self.isShown = False
     self.configText.help_window.hide()
     return Screen.hide(self)
Exemple #11
0
 def hide(self):
     self.configText.help_window.hide()
     return Screen.hide(self)
Exemple #12
0
	def hide(self):
		Screen.hide(self)
Exemple #13
0
 def hide(self):
     self["actions"].execEnd()
     self["cancelaction"].execEnd()
     Screen.hide(self)
 def hide(self):
     self.configText.help_window.hide()
     return Screen.hide(self)