forked from openlp/openlp
Fix urlopen() and mainDisplay closing
This commit is contained in:
parent
5e79fc3399
commit
770751899c
@ -414,7 +414,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
plugins.
|
plugins.
|
||||||
"""
|
"""
|
||||||
QtGui.QMainWindow.__init__(self)
|
QtGui.QMainWindow.__init__(self)
|
||||||
self.closeEvent = self.onCloseEvent
|
|
||||||
self.screenList = screens
|
self.screenList = screens
|
||||||
self.serviceNotSaved = False
|
self.serviceNotSaved = False
|
||||||
self.settingsmanager = SettingsManager(screens)
|
self.settingsmanager = SettingsManager(screens)
|
||||||
@ -593,7 +592,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.RenderManager.update_display(screen_number)
|
self.RenderManager.update_display(screen_number)
|
||||||
self.mainDisplay.setup(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
|
Hook to close the main window and display windows on exit
|
||||||
"""
|
"""
|
||||||
|
@ -44,7 +44,7 @@ def check_latest_version(config, current_version):
|
|||||||
req = urllib2.Request(u'http://www.openlp.org/files/version.txt')
|
req = urllib2.Request(u'http://www.openlp.org/files/version.txt')
|
||||||
req.add_header(u'User-Agent', u'OpenLP%s' % current_version)
|
req.add_header(u'User-Agent', u'OpenLP%s' % current_version)
|
||||||
try:
|
try:
|
||||||
handle = urllib2.urlopen(req, None, 1)
|
handle = urllib2.urlopen(req, None)
|
||||||
html = handle.read()
|
html = handle.read()
|
||||||
version_string = unicode(html).rstrip()
|
version_string = unicode(html).rstrip()
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user