summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-03-06 13:59:33 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-03-06 13:59:33 +0100
commit03b70f264123e9afc8202e29b884c42584108e92 (patch)
treea24a1f6ea6f848bed54642c1971da927652fa751
parent970ab474e07f98304b101caa31dfed69668d4fdb (diff)
downloadportato-03b70f264123e9afc8202e29b884c42584108e92.tar.gz
portato-03b70f264123e9afc8202e29b884c42584108e92.tar.bz2
portato-03b70f264123e9afc8202e29b884c42584108e92.zip
Only show best_icon, if the package can be installed w/o unmasking
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index e00e9e4..29eb728 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -791,13 +791,13 @@ class MainWindow (Window):
if not packages:
raise VersionsNotFoundException(cp)
- best = system.find_best([x.get_cpv() for x in packages]).get_version()
+ best = system.find_best_match(cp)
# append versions
for vers, inst, slot in ((x.get_version(), x.is_installed(), get_slot(x)) for x in packages):
if inst:
icon = self.icons["installed"]
- elif vers == best:
+ elif best is not None and vers == best.get_version():
icon = self.icons["better"]
else:
icon = None