From 03b70f264123e9afc8202e29b884c42584108e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sat, 6 Mar 2010 13:59:33 +0100 Subject: Only show best_icon, if the package can be installed w/o unmasking --- portato/gui/windows/main.py | 4 ++-- 1 file 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 -- cgit v1.2.3