From 5eeab86db9b9bd4349f6271c77fa28a89e387cc9 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 26 Sep 2012 16:13:42 +0200 Subject: [PATCH] removed not needed parameters --- openlp/core/ui/firsttimeform.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index 1bd746759..7ee3807e2 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -104,7 +104,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'), self.updateScreenListCombo) - def exec_(self, edit=False): + def exec_(self): """ Run the wizard. """ @@ -265,8 +265,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): self._performWizard() Receiver.send_message(u'openlp_process_events') Receiver.send_message(u'cursor_normal') - Settings().setValue(u'general/has run wizard', - QtCore.QVariant(True)) + Settings().setValue(u'general/has run wizard', QtCore.QVariant(True)) self.close() def urlGetFile(self, url, fpath): @@ -277,7 +276,6 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): block_count = 0 block_size = 4096 urlfile = urllib2.urlopen(url) - filesize = urlfile.headers["Content-Length"] filename = open(fpath, "wb") # Download until finished or canceled. while not self.downloadCancelled: @@ -286,7 +284,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): break filename.write(data) block_count += 1 - self._downloadProgress(block_count, block_size, filesize) + self._downloadProgress(block_count, block_size) filename.close() # Delete file if cancelled, it may be a partial file. if self.downloadCancelled: @@ -314,7 +312,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): meta = site.info() return int(meta.getheaders("Content-Length")[0]) - def _downloadProgress(self, count, block_size, total_size): + def _downloadProgress(self, count, block_size): increment = (count * block_size) - self.previous_size self._incrementProgressBar(None, increment) self.previous_size = count * block_size @@ -468,7 +466,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): Settings().setValue(u'General/monitor', QtCore.QVariant(self.displayComboBox.currentIndex())) self.screens.set_current_display( - self.displayComboBox.currentIndex()) + self.displayComboBox.currentIndex()) # Set Global Theme if self.themeComboBox.currentIndex() != -1: Settings().setValue(u'themes/global theme',