Example #1
0
	def renderList(self):
		self.cachelist = []
		
		for package in self.packages["packages"]:
			rank = 0.0
			if "rank" in package.keys():
				rank = float(package["rank"])
			
			ratings = 0
			if "ratings" in package.keys():
				ratings = float(package["ratings"])
				
			installed = fileExists("/usr/lib/opkg/info/%s.control" % package["package"])
			inprogress = smstack.checkIfPending(package["package"])
			
			if inprogress:
				message = smstack.getMessage(package["package"])
			else:
				message = package["description"]
				
			self.cachelist.append(PackageEntry(package["name"], installed, rank, message, inprogress, ratings))
			
		self["list"].setList(self.cachelist)
		self["list"].setIndex(self.index)
		self.selectionChanged()
Example #2
0
    def renderList(self):
        self.cachelist = []

        for package in self.packages["packages"]:
            rank = 0.0
            if "rank" in package.keys():
                rank = float(package["rank"])

            ratings = 0
            if "ratings" in package.keys():
                ratings = float(package["ratings"])

            installed = fileExists("/var/lib/opkg/info/%s.control" %
                                   package["package"])
            inprogress = smstack.checkIfPending(package["package"])

            if inprogress:
                message = smstack.getMessage(package["package"])
            else:
                message = package["description"]

            self.cachelist.append(
                PackageEntry(package["name"], installed, rank, message,
                             inprogress, ratings))

        self["list"].setList(self.cachelist)
        self["list"].setIndex(self.index)
        self.selectionChanged()
Example #3
0
	def renderInfo(self):
		frank = 0.0
		if "rank" in self.package.keys():
			frank = float(self.package["rank"])
		
		rank = int(frank)
		if rank < 1:
			self["star1"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star1"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 2:
			self["star2"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star2"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 3:
			self["star3"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star3"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 4:
			self["star4"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star4"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 5:
			self["star5"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star5"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		
		if smstack.checkIfPending(self.package["package"]):
			message = smstack.getMessage(self.package["package"])
		else:
			if fileExists("/usr/lib/opkg/info/%s.control" % self.package["package"]):
				message = "Status: installed"
			else:
				message = "Status: not installed"
			
		ratings = 0
		if "ratings" in self.package.keys():
			ratings = int(self.package["ratings"])
			
		self["title"].setText(self.package["name"])
		self["label"].setText(message)
		self["rating"].setText("Ranked %d times, score %.1f" % (ratings, frank))
		self["description"].setText(self.package["description"])
		
		screenshot = None
		if "screenshot" in self.package.keys():
			screenshot = self.package["screenshot"]
		
		if screenshot:
			self["key_blue"].setText(_("Screenshot"))
Example #4
0
	def renderInfo(self):
		frank = 0.0
		if "rank" in self.package.keys():
			frank = float(self.package["rank"])
		
		rank = int(frank)
		if rank < 1:
			self["star1"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star1"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 2:
			self["star2"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star2"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 3:
			self["star3"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star3"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 4:
			self["star4"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star4"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		if rank < 5:
			self["star5"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star_disabled.png")))
		else:
			self["star5"].instance.setPixmap(LoadPixmap(cached = True, path = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/sifteam_others/star.png")))
		
		if smstack.checkIfPending(self.package["package"]):
			message = smstack.getMessage(self.package["package"])
		else:
			if fileExists("/var/lib/opkg/info/%s.control" % self.package["package"]):
				message = "Status: installed"
			else:
				message = "Status: not installed"
			
		ratings = 0
		if "ratings" in self.package.keys():
			ratings = int(self.package["ratings"])
			
		self["title"].setText(self.package["name"])
		self["label"].setText(message)
		self["rating"].setText("Ranked %d times, score %.1f" % (ratings, frank))
		self["description"].setText(self.package["description"])
		
		screenshot = None
		if "screenshot" in self.package.keys():
			screenshot = self.package["screenshot"]
		
		if screenshot:
			self["key_blue"].setText(_("Screenshot"))