From 770751899cfa7c9becc1eab46b9e32d1f2405b54 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Fri, 16 Oct 2009 22:29:38 +0100 Subject: [PATCH] Fix urlopen() and mainDisplay closing --- openlp/core/ui/mainwindow.py | 3 +-- openlp/core/utils/__init__.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 67b9bcd3d..981bfed22 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -414,7 +414,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): plugins. """ QtGui.QMainWindow.__init__(self) - self.closeEvent = self.onCloseEvent self.screenList = screens self.serviceNotSaved = False self.settingsmanager = SettingsManager(screens) @@ -593,7 +592,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.RenderManager.update_display(screen_number) self.mainDisplay.setup(screen_number) - def onCloseEvent(self, event): + def closeEvent(self, event): """ Hook to close the main window and display windows on exit """ diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 59d1054c7..4cc1ddc3f 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -44,7 +44,7 @@ def check_latest_version(config, current_version): req = urllib2.Request(u'http://www.openlp.org/files/version.txt') req.add_header(u'User-Agent', u'OpenLP%s' % current_version) try: - handle = urllib2.urlopen(req, None, 1) + handle = urllib2.urlopen(req, None) html = handle.read() version_string = unicode(html).rstrip() except IOError, e: