From 893f07d6e7919e11e1c3dc40fcc43c4bb38c2af3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 18 Jan 2006 21:44:30 +0100 Subject: * add cancel to the release notes --- UpdateManager/UpdateManager.py | 8 ++++++-- data/UpdateManager.glade | 13 +++++++++++++ 2 files changed, 19 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() diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index e46ea73d..80f82a12 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -968,6 +968,19 @@ Need to get the changes from the central server + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + True True True -- cgit v1.2.3