aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/PluginBrowser.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-02-24 20:56:21 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-02-24 20:56:21 +0100
commit574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f (patch)
treee2ded87bb0e66cd9e88ae8d4ffc3846f788343bf /lib/python/Screens/PluginBrowser.py
parent5a6bde9419249a78c957093e0cc438d7c6eeb46c (diff)
downloadenigma2-574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f.tar.gz
enigma2-574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f.zip
small optimizations and cleanups by Moritz Venn
Diffstat (limited to 'lib/python/Screens/PluginBrowser.py')
-rw-r--r--lib/python/Screens/PluginBrowser.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/python/Screens/PluginBrowser.py b/lib/python/Screens/PluginBrowser.py
index 0f6ee746..cd17e2e0 100644
--- a/lib/python/Screens/PluginBrowser.py
+++ b/lib/python/Screens/PluginBrowser.py
@@ -51,11 +51,9 @@ class PluginBrowser(Screen):
plugin(session=self.session)
def updateList(self):
- self.list = [ ]
self.pluginlist = plugins.getPlugins(PluginDescriptor.WHERE_PLUGINMENU)
- for plugin in self.pluginlist:
- self.list.append(PluginEntryComponent(plugin))
-
+ self.list = [PluginEntryComponent(plugin) for plugin in self.pluginlist]
+
self["list"].l.setList(self.list)
def delete(self):
@@ -187,7 +185,7 @@ class PluginDownloadBrowser(Screen):
self.pluginlist.append(plugin)
def updateList(self):
- self.list = []
+ list = []
expandableIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/expandable-plugins.png"))
expandedIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/expanded-plugins.png"))
verticallineIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/verticalline-plugins.png"))
@@ -204,10 +202,10 @@ class PluginDownloadBrowser(Screen):
for x in self.plugins.keys():
if x in self.expanded:
- self.list.append(PluginCategoryComponent(x, expandedIcon))
- for plugin in self.plugins[x]:
- self.list.append(PluginDownloadComponent(plugin[0], plugin[1]))
+ list.append(PluginCategoryComponent(x, expandedIcon))
+ list.extend([PluginDownloadComponent(plugin[0], plugin[1]) for plugin in self.plugins[x]])
else:
- self.list.append(PluginCategoryComponent(x, expandableIcon))
- self["list"].l.setList(self.list)
+ list.append(PluginCategoryComponent(x, expandableIcon))
+ self.list = list
+ self["list"].l.setList(list)