Style Police

This commit is contained in:
Tim Bentley 2010-11-18 17:46:47 +00:00
parent 44038028bc
commit 1dfef4f061
3 changed files with 12 additions and 10 deletions

View File

@ -29,7 +29,7 @@ import os
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate, theme, BackgroundType, BackgroundGradientType
from openlp.core.lib import translate, BackgroundType, BackgroundGradientType
from openlp.core.utils import get_images_filter
from themedialog import Ui_ThemeDialog
@ -315,18 +315,18 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
self.imageLineEdit.setText(self.theme.background_filename)
if self.theme.background_direction == \
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
self.setField(u'gradient', QtCore.QVariant(0))
self.setField(u'gradient', QtCore.QVariant(0))
elif self.theme.background_direction == \
BackgroundGradientType.to_string(BackgroundGradientType.Vertical):
self.setField(u'gradient', QtCore.QVariant(1))
self.setField(u'gradient', QtCore.QVariant(1))
elif self.theme.background_direction == \
BackgroundGradientType.to_string(BackgroundGradientType.Circular):
self.setField(u'gradient', QtCore.QVariant(2))
self.setField(u'gradient', QtCore.QVariant(2))
elif self.theme.background_direction == \
BackgroundGradientType.to_string(BackgroundGradientType.LeftTop):
self.setField(u'gradient', QtCore.QVariant(3))
self.setField(u'gradient', QtCore.QVariant(3))
else:
self.setField(u'gradient', QtCore.QVariant(4))
self.setField(u'gradient', QtCore.QVariant(4))
def setMainAreaTabValues(self):
"""

View File

@ -608,7 +608,7 @@ class ThemeManager(QtGui.QWidget):
BackgroundGradientType. \
to_string(BackgroundGradientType.Horizontal)
if theme.BackgroundParameter3.name() == 1:
newtheme.background_direction = \
newtheme.background_direction = \
BackgroundGradientType. \
to_string(BackgroundGradientType.Horizontal)
newtheme.background_start_color = \

View File

@ -122,7 +122,8 @@ class SongsPlugin(Plugin):
self.toolsReindexItem = QtGui.QAction(tools_menu)
self.toolsReindexItem.setIcon(build_icon(u':/plugins/plugin_songs.png'))
self.toolsReindexItem.setObjectName(u'toolsReindexItem')
self.toolsReindexItem.setText(translate('SongsPlugin', '&Re-index Songs'))
self.toolsReindexItem.setText(
translate('SongsPlugin', '&Re-index Songs'))
self.toolsReindexItem.setStatusTip(
translate('SongsPlugin', 'Re-index the songs database to improve '
'searching and ordering.'))
@ -149,8 +150,9 @@ class SongsPlugin(Plugin):
song.title = u''
if song.alternate_title is None:
song.alternate_title = u''
song.search_title = self.whitespace.sub(u' ', song.title.lower()) +\
u' ' + self.whitespace.sub(u' ', song.alternate_title.lower())
song.search_title = self.whitespace.sub(u' ', \
song.title.lower()) + u' ' + \
self.whitespace.sub(u' ', song.alternate_title.lower())
progressDialog.setValue(counter)
self.manager.save_objects(songs)
counter += 1