<convert type="TemplatedMultiContent">
{"templates":
{"default": (51,[
- MultiContentEntryText(pos = (30, 1), size = (470, 24), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name
- MultiContentEntryText(pos = (30, 25), size = (470, 24), font=1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is the description
+ MultiContentEntryText(pos = (0, 1), size = (470, 24), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name
+ MultiContentEntryText(pos = (0, 25), size = (470, 24), font=1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is the description
MultiContentEntryPixmapAlphaTest(pos = (475, 0), size = (48, 48), png = 5), # index 5 is the status pixmap
MultiContentEntryPixmapAlphaTest(pos = (0, 49), size = (550, 2), png = 6), # index 6 is the div pixmap
]),
if status == 'update':
statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png"))
self.statuslist.append(( _("Updating software catalog"), '', _("Searching for available updates. Please wait..." ),'', '', statuspng, divpng, None, '' ))
- self["list"].style = "default"
- self['list'].setList(self.statuslist)
elif status == 'sync':
statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png"))
self.statuslist.append(( _("Package list update"), '', _("Searching for new installed or removed packages. Please wait..." ),'', '', statuspng, divpng, None, '' ))
- self["list"].style = "default"
- self['list'].setList(self.statuslist)
elif status == 'error':
statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png"))
self.statuslist.append(( _("Error"), '', _("There was an error downloading the packetlist. Please try again." ),'', '', statuspng, divpng, None, '' ))
- self["list"].style = "default"
- self['list'].setList(self.statuslist)
+ self["list"].style = "default"
+ self['list'].setList(self.statuslist)
+
def getUpdateInfos(self):
self.setState('update')
self.rebuildList()
elif retval is False:
self.setState('error')
- self["status"].setText(_("No network connection available."))
+ if iSoftwareTools.NetworkConnectionAvailable:
+ self["status"].setText(_("Updatefeed not available."))
+ else:
+ self["status"].setText(_("No network connection available."))
def rebuildList(self, retval = None):
if self.currentSelectedTag is None:
status = "remove"
else:
status = "installed"
- self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+ self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
else:
if selectState == True:
status = "install"
else:
status = "installable"
- self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+ self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
if len(self.list):
self.list.sort(key=lambda x: x[0])
self["list"].style = "default"
self.skin_path = plugin_path
self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
self.attributes = None
- self.translatedAttributes = None
- DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, language = self.language)
+ DreamInfoHandler.__init__(self, self.statusCallback, blocking = False)
self.directory = resolveFilename(SCOPE_METADIR)
if packagedata:
self.pluginname = packagedata[0]
self.package = self.packageDetails[0]
if self.package[0].has_key("attributes"):
self.attributes = self.package[0]["attributes"]
- if self.package[0].has_key("translation"):
- self.translatedAttributes = self.package[0]["translation"]
self.cmdList = []
self.oktext = _("\nAfter pressing OK, please wait!")
self.onLayoutFinish.append(self.setInfos)
def setWindowTitle(self):
- self.setTitle(_("Details for extension: " + self.pluginname))
+ self.setTitle(_("Details for plugin: ") + self.pluginname )
def exit(self):
self.close(False)
pass
def setInfos(self):
- if self.translatedAttributes.has_key("name"):
- self.pluginname = self.translatedAttributes["name"]
- elif self.attributes.has_key("name"):
+ if self.attributes.has_key("screenshot"):
+ self.loadThumbnail(self.attributes)
+
+ if self.attributes.has_key("name"):
self.pluginname = self.attributes["name"]
else:
self.pluginname = _("unknown")
- if self.translatedAttributes.has_key("author"):
- self.author = self.translatedAttributes["author"]
- elif self.attributes.has_key("author"):
+ if self.attributes.has_key("author"):
self.author = self.attributes["author"]
else:
self.author = _("unknown")
- if self.translatedAttributes.has_key("description"):
- self.description = self.translatedAttributes["description"]
- elif self.attributes.has_key("description"):
- self.description = self.attributes["description"]
+ if self.attributes.has_key("description"):
+ self.description = _(self.attributes["description"].replace("\\n", "\n"))
else:
self.description = _("No description available.")
- if self.translatedAttributes.has_key("screenshot"):
- self.loadThumbnail(self.translatedAttributes)
- else:
- self.loadThumbnail(self.attributes)
-
self["author"].setText(_("Author: ") + self.author)
- self["detailtext"].setText(self.description.strip())
+ self["detailtext"].setText(_(self.description))
if self.pluginstate in ('installable', 'install'):
self["key_green"].setText(_("Install"))
else:
thumbnailUrl = None
if entry.has_key("screenshot"):
thumbnailUrl = entry["screenshot"]
+ if self.language == "de":
+ if thumbnailUrl[-7:] == "_en.jpg":
+ thumbnailUrl = thumbnailUrl[:-7] + "_de.jpg"
+
if thumbnailUrl is not None:
self.thumbnail = "/tmp/" + thumbnailUrl.split('/')[-1]
print "[PluginDetails] downloading screenshot " + thumbnailUrl + " to " + self.thumbnail