summaryrefslogtreecommitdiff
path: root/portato/gui/gtk/windows.py
diff options
context:
space:
mode:
authorNecoro <>2008-01-24 23:49:51 +0000
committerNecoro <>2008-01-24 23:49:51 +0000
commit4d4d5a6fd0348ecc628251dbca5ac9e22acfb555 (patch)
tree4b9e0de2dc57b8f4794812349c04466c5877c946 /portato/gui/gtk/windows.py
parentbf75aae3c9f6ac2130b65a0499e501ee697688b1 (diff)
downloadportato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.tar.gz
portato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.tar.bz2
portato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.zip
r716@Devoty: necoro | 2008-01-25 00:35:00 +0100
Improved useflag handling r717@Devoty: necoro | 2008-01-25 00:47:45 +0100 improved update_world
Diffstat (limited to 'portato/gui/gtk/windows.py')
-rw-r--r--portato/gui/gtk/windows.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index bdd5bfb..ed31a66 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -1342,16 +1342,18 @@ class MainWindow (Window):
if not pkg_flags: # no flags - stop here
return None
- actual = pkg.get_actual_use_flags()
+ actual = set(pkg.get_actual_use_flags())
if pkg.is_installed():
- installed = pkg.get_installed_use_flags()
+ installed = set(pkg.get_iuse_flags()).intersection(pkg.get_installed_use_flags())
else:
inst = system.find_installed_packages(pkg.get_slot_cp())
if inst:
- installed = inst[0].get_installed_use_flags()
+ installed = set(inst[0].get_iuse_flags()).intersection(inst[0].get_installed_use_flags())
else:
- installed = []
+ installed = set()
+
+ diff = actual.symmetric_difference(installed)
for use in pkg_flags:
exp = pkg.use_expanded(use)
@@ -1360,7 +1362,7 @@ class MainWindow (Window):
else:
useStr = use
- if installed and ((use in actual) != (use in installed)):
+ if installed and use in diff:
useStr += " %"
if use in actual:
enabled.append(useStr)