summaryrefslogtreecommitdiff
path: root/geneticone/gui/windows.py
diff options
context:
space:
mode:
authornecoro <>2006-09-30 22:17:38 +0000
committernecoro <>2006-09-30 22:17:38 +0000
commit3b985bff8f9f76e29f6dd3e15e6ecf4d01388e2c (patch)
tree594e924552bec56f53165710a52dfc75dd77774b /geneticone/gui/windows.py
parente9df5f9ed8b2d67ff74a7861d2ccc4f51a10d86c (diff)
downloadportato-3b985bff8f9f76e29f6dd3e15e6ecf4d01388e2c.tar.gz
portato-3b985bff8f9f76e29f6dd3e15e6ecf4d01388e2c.tar.bz2
portato-3b985bff8f9f76e29f6dd3e15e6ecf4d01388e2c.zip
Implemented some new backend functions which speed up the package-list-creation. (Thanks an porthole for the inspiration ;P)
Diffstat (limited to 'geneticone/gui/windows.py')
-rw-r--r--geneticone/gui/windows.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py
index bfc279d..1cb39a1 100644
--- a/geneticone/gui/windows.py
+++ b/geneticone/gui/windows.py
@@ -90,8 +90,8 @@ class PackageWindow:
#self.window.connect("configure-event", self.cbSizeCheck)
# packages and installed packages
- self.packages = backend.sort_package_list(backend.find_packages(cp, masked=True))
- self.instPackages = backend.sort_package_list(backend.find_installed_packages(cp, masked=True))
+ self.packages = backend.sort_package_list(backend.get_all_versions(cp))
+ self.instPackages = backend.sort_package_list(backend.get_all_installed_versions(cp))
# main structure - the table
self.table = gtk.Table(rows=4,columns=2)
@@ -545,10 +545,12 @@ class MainWindow:
if name:
if name not in self.packages and not force: # only calc packages if not already done
self.packages[name] = []
- for p in unique_array([x.get_name() for x in backend.find_all_packages(name+"/")]):
- if backend.find_installed_packages(name+"/"+p, masked=True) != []:
+ list = backend.find_all_packages(name = name+"/", withVersion = False)
+ installed = backend.find_all_installed_packages(name = name+"/", withVersion=False)
+ for p in list:
+ if p in installed:
p += "*" # append a '*' if the package is installed
- self.packages[name].append(p)
+ self.packages[name].append(p.split("/")[1])
for p in self.packages[name]:
store.append([p])