From bf39c811e459a105f3d9cf838d1ee13a82f94dbb Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 24 Jan 2008 18:27:10 +0000 Subject: [PATCH] If the solver didn't rank the implementations of an interface, just sort by version instead. --- zeroinstall/0launch-gui/properties.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zeroinstall/0launch-gui/properties.py b/zeroinstall/0launch-gui/properties.py index 23ded78..c96322b 100644 --- a/zeroinstall/0launch-gui/properties.py +++ b/zeroinstall/0launch-gui/properties.py @@ -328,7 +328,12 @@ class Properties: self.compile_button.set_sensitive(have_source_for(self.interface)) def update_list(self): - self.use_list.set_items(policy.solver.details[self.interface]) + ranked_items = policy.solver.details.get(self.interface, None) + if ranked_items is None: + # The Solver didn't get this far, but we should still display them! + ranked_items = self.interface.implementations.values() + ranked_items.sort() + self.use_list.set_items(ranked_items) def add_remote_feed(parent, interface): d = gtk.MessageDialog(parent, 0, gtk.MESSAGE_QUESTION, gtk.BUTTONS_CANCEL, -- 2.11.4.GIT