diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-18 21:44:30 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-18 21:44:30 +0100 |
| commit | 893f07d6e7919e11e1c3dc40fcc43c4bb38c2af3 (patch) | |
| tree | 5b52042ad318106583e627a0f4dc32e59f4973cb /UpdateManager/UpdateManager.py | |
| parent | b54a8a7037d849fe5c62894e76a8bc0d3ca2695b (diff) | |
| download | python-apt-893f07d6e7919e11e1c3dc40fcc43c4bb38c2af3.tar.gz | |
* add cancel to the release notes
Diffstat (limited to 'UpdateManager/UpdateManager.py')
| -rw-r--r-- | UpdateManager/UpdateManager.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index c16f1bb6..7f832c06 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -717,13 +717,14 @@ class UpdateManager(SimpleGladeApp): gtk.main_iteration() # download/display the release notes - # FIXME: add some progress reporting here + # FIXME: add some progress reporting here + res = gtk.RESPONSE_CANCEL try: release_notes = urllib2.urlopen(uri) notes = release_notes.read() self.textview_release_notes.get_buffer().set_text(notes) self.dialog_release_notes.set_transient_for(self.window_main) - self.dialog_release_notes.run() + res = self.dialog_release_notes.run() self.dialog_release_notes.hide() except urllib2.HTTPError: # FIXME: make proper error dialogs here @@ -733,6 +734,9 @@ class UpdateManager(SimpleGladeApp): "check if there is an active internet connection.") self.window_main.set_sensitive(True) self.window_main.window.set_cursor(None) + # user clicked cancel + if res == gtk.RESPONSE_CANCEL: + return # now download the tarball with the upgrade script tmpdir = tempfile.mkdtemp() |
