Added makedist script to svn.
[zeroinstall.git] / checking.py
blob2d18d180346fe9574b1d517908f9b40340e4a5dc
1 import gtk, gobject
3 from dialog import Dialog
5 class CheckingBox(Dialog):
6 def __init__(self, root):
7 Dialog.__init__(self)
8 self.set_title("Checking for updates")
9 self.label = gtk.Label("Checking for updates to '%s'..." % root.get_name())
10 self.label.set_padding(10, 10)
11 self.vbox.pack_start(self.label, True, True, 0)
12 self.vbox.show_all()
14 self.progress = gtk.ProgressBar()
15 self.vbox.pack_start(self.progress, False, True, 0)
16 self.progress.show()
18 self.add_mixed_button('Details...', gtk.STOCK_ZOOM_IN, gtk.RESPONSE_OK)
19 self.connect('response', lambda w, r: self.destroy())
21 def updates_done(self, changes):
22 """Close the dialog after a short delay"""
23 if changes:
24 self.label.set_text('Updates found')
25 else:
26 self.label.set_text('No changes')
27 self.progress.set_fraction(1)
28 self.set_response_sensitive(gtk.RESPONSE_OK, False)
29 gobject.timeout_add(1000, self.destroy)