summaryrefslogtreecommitdiff
path: root/portato/gui/gtk/usetips.py
diff options
context:
space:
mode:
authornecoro <>2007-08-16 15:52:53 +0000
committernecoro <>2007-08-16 15:52:53 +0000
commitb48d1b86ad5dc9ec069be256c37d9571759111b8 (patch)
tree5338c4ba3ad49e7aa8cf85c045d040b1c84d5edc /portato/gui/gtk/usetips.py
parenteae9ec73ba26638e25d23ba2261422461150ad73 (diff)
downloadportato-b48d1b86ad5dc9ec069be256c37d9571759111b8.tar.gz
portato-b48d1b86ad5dc9ec069be256c37d9571759111b8.tar.bz2
portato-b48d1b86ad5dc9ec069be256c37d9571759111b8.zip
improved update-world; now showing differences between installed and set use-flags
Diffstat (limited to 'portato/gui/gtk/usetips.py')
-rw-r--r--portato/gui/gtk/usetips.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/portato/gui/gtk/usetips.py b/portato/gui/gtk/usetips.py
index 1d8ce20..2c51d88 100644
--- a/portato/gui/gtk/usetips.py
+++ b/portato/gui/gtk/usetips.py
@@ -53,21 +53,35 @@ class UseTips (TreeViewTooltips):
disabled = []
expanded = set()
- pkg_flags = pkg.get_all_use_flags()
+ pkg_flags = pkg.get_iuse_flags()
if not pkg_flags: # no flags - stop here
return None
pkg_flags.sort()
+ actual = pkg.get_actual_use_flags()
+
+ if pkg.is_installed():
+ installed = pkg.get_installed_use_flags()
+ else:
+ inst = system.find_installed_packages(pkg.get_slot_cp())
+ if inst:
+ installed = inst[0].get_installed_use_flags()
+ else:
+ installed = []
+
for use in pkg_flags:
exp = pkg.use_expanded(use)
if exp:
expanded.add(exp)
else:
- if pkg.is_use_flag_enabled(use):
- enabled.append(use)
+ useStr = use
+ if installed and ((use in actual) != (use in installed)):
+ useStr += " %"
+ if use in actual:
+ enabled.append(useStr)
else:
- disabled.append(use)
+ disabled.append(useStr)
string = ""