diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 4b2de8500..190939ab9 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -664,25 +664,12 @@ class ThemeManager(QtGui.QWidget): """ Called to update the themes' preview images. """ - progressDialog = QtGui.QProgressDialog(self.mainwindow) - progressDialog.setWindowModality(QtCore.Qt.WindowModal) - progressDialog.setLabelText( - translate('OpenLP.ThemeManager', 'Starting update...', - 'Shown when you update the theme images.')) - progressDialog.setCancelButton(None) - progressDialog.setRange(0, len(self.themelist)) - progressDialog.setMinimumDuration(0) - progressDialog.forceShow() - Receiver.send_message(u'openlp_process_events') - for index, theme in enumerate(self.themelist): - progressDialog.setValue(index) - progressDialog.setLabelText(unicode(translate('OpenLP.ThemeManager', - 'Updating %s...', - 'Shown when you update the theme images.')) % theme) - Receiver.send_message(u'openlp_process_events') + self.mainwindow.displayProgressBar(len(self.themelist)) + for theme in self.themelist: + self.mainwindow.incrementProgressBar() self.generateAndSaveImage( self.path, theme, self.getThemeData(theme)) - progressDialog.setValue(len(self.themelist)) + self.mainwindow.finishedProgressBar() self.loadThemes() def generateImage(self, themeData, forcePage=False):