From ed4fd8d5a15c7ef339eca633ed543cb3d4a5c183 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 27 Dec 2005 16:27:42 +0000 Subject: [PATCH] In download-only mode, shade the Download button when there is nothing to download. git-svn-id: file:///home/talex/Backups/sf.net/Subversion/zero-install/injector/injector-gui@606 9f8c893c-44ee-0310-b757-c8ca8341c71e --- gui.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index ee76ffd..78e8d1b 100644 --- a/gui.py +++ b/gui.py @@ -114,7 +114,14 @@ class GUIPolicy(Policy): print >>sys.stderr, "Your version of the injector is very old. " \ "Try upgrading (http://0install.net/injector.html)" else: - self.window.set_response_sensitive(gtk.RESPONSE_OK, self.ready) + if self.ready and self.download_only: + need_download = False + for iface, impl in self.get_uncached_implementations(): + need_download = True + break + self.window.set_response_sensitive(gtk.RESPONSE_OK, need_download) + else: + self.window.set_response_sensitive(gtk.RESPONSE_OK, self.ready) def confirm_trust_keys(self, interface, sigs, iface_xml): import trust_box -- 2.11.4.GIT