From 72c304e345642a836ebfc0ee7083a1b8dc3ebe62 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Jun 2008 12:36:27 -0700 Subject: [PATCH] Implement #769 --- src/calibre/gui2/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 81d51bb392..d28e35b0f1 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -1150,6 +1150,14 @@ class Main(MainWindow, Ui_MainWindow): self.vanity.setText(self.vanity_template%(dict(version=self.latest_version, device=self.device_info))) self.vanity.update() + s = Settings() + if True or s.get('update to version %s'%version, True): + d = question_dialog(self, _('Update available'), _('%s has been updated to version %s. Visit the download page?')%(__appname__, version)) + if d.exec_() == QMessageBox.Yes: + url = 'http://calibre.kovidgoyal.net/download_'+('windows' if iswindows else 'osx' if isosx else 'linux') + print url + QDesktopServices.openUrl(QUrl(url)) + s.set('update to version %s'%version, False) def main(args=sys.argv):