From 70cd4bc7002c6969ced4f014aec1d023dc559ee7 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 24 Aug 2010 17:28:45 +0200 Subject: [PATCH] Added an extra argument to the incrementProgressBar function so that an increment can be specified (like 0, if you don't want an increment). --- openlp/plugins/songs/forms/songimportform.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/forms/songimportform.py b/openlp/plugins/songs/forms/songimportform.py index b8d3085fd..53b0a9804 100644 --- a/openlp/plugins/songs/forms/songimportform.py +++ b/openlp/plugins/songs/forms/songimportform.py @@ -334,10 +334,12 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard): self.genericFileListWidget.clear() #self.csvFilenameEdit.setText(u'') - def incrementProgressBar(self, status_text): + def incrementProgressBar(self, status_text, increment=1): log.debug(u'IncrementBar %s', status_text) - self.importProgressLabel.setText(status_text) - self.importProgressBar.setValue(self.importProgressBar.value() + 1) + if increment > 0: + self.importProgressLabel.setText(status_text) + self.importProgressBar.setValue(self.importProgressBar.value() + + increment) Receiver.send_message(u'openlp_process_events') def preImport(self):