forked from openlp/openlp
Style Police
This commit is contained in:
parent
44038028bc
commit
1dfef4f061
@ -29,7 +29,7 @@ import os
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
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 openlp.core.utils import get_images_filter
|
||||||
from themedialog import Ui_ThemeDialog
|
from themedialog import Ui_ThemeDialog
|
||||||
|
|
||||||
@ -315,18 +315,18 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
|
|||||||
self.imageLineEdit.setText(self.theme.background_filename)
|
self.imageLineEdit.setText(self.theme.background_filename)
|
||||||
if self.theme.background_direction == \
|
if self.theme.background_direction == \
|
||||||
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
||||||
self.setField(u'gradient', QtCore.QVariant(0))
|
self.setField(u'gradient', QtCore.QVariant(0))
|
||||||
elif self.theme.background_direction == \
|
elif self.theme.background_direction == \
|
||||||
BackgroundGradientType.to_string(BackgroundGradientType.Vertical):
|
BackgroundGradientType.to_string(BackgroundGradientType.Vertical):
|
||||||
self.setField(u'gradient', QtCore.QVariant(1))
|
self.setField(u'gradient', QtCore.QVariant(1))
|
||||||
elif self.theme.background_direction == \
|
elif self.theme.background_direction == \
|
||||||
BackgroundGradientType.to_string(BackgroundGradientType.Circular):
|
BackgroundGradientType.to_string(BackgroundGradientType.Circular):
|
||||||
self.setField(u'gradient', QtCore.QVariant(2))
|
self.setField(u'gradient', QtCore.QVariant(2))
|
||||||
elif self.theme.background_direction == \
|
elif self.theme.background_direction == \
|
||||||
BackgroundGradientType.to_string(BackgroundGradientType.LeftTop):
|
BackgroundGradientType.to_string(BackgroundGradientType.LeftTop):
|
||||||
self.setField(u'gradient', QtCore.QVariant(3))
|
self.setField(u'gradient', QtCore.QVariant(3))
|
||||||
else:
|
else:
|
||||||
self.setField(u'gradient', QtCore.QVariant(4))
|
self.setField(u'gradient', QtCore.QVariant(4))
|
||||||
|
|
||||||
def setMainAreaTabValues(self):
|
def setMainAreaTabValues(self):
|
||||||
"""
|
"""
|
||||||
|
@ -608,7 +608,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
BackgroundGradientType. \
|
BackgroundGradientType. \
|
||||||
to_string(BackgroundGradientType.Horizontal)
|
to_string(BackgroundGradientType.Horizontal)
|
||||||
if theme.BackgroundParameter3.name() == 1:
|
if theme.BackgroundParameter3.name() == 1:
|
||||||
newtheme.background_direction = \
|
newtheme.background_direction = \
|
||||||
BackgroundGradientType. \
|
BackgroundGradientType. \
|
||||||
to_string(BackgroundGradientType.Horizontal)
|
to_string(BackgroundGradientType.Horizontal)
|
||||||
newtheme.background_start_color = \
|
newtheme.background_start_color = \
|
||||||
|
@ -122,7 +122,8 @@ class SongsPlugin(Plugin):
|
|||||||
self.toolsReindexItem = QtGui.QAction(tools_menu)
|
self.toolsReindexItem = QtGui.QAction(tools_menu)
|
||||||
self.toolsReindexItem.setIcon(build_icon(u':/plugins/plugin_songs.png'))
|
self.toolsReindexItem.setIcon(build_icon(u':/plugins/plugin_songs.png'))
|
||||||
self.toolsReindexItem.setObjectName(u'toolsReindexItem')
|
self.toolsReindexItem.setObjectName(u'toolsReindexItem')
|
||||||
self.toolsReindexItem.setText(translate('SongsPlugin', '&Re-index Songs'))
|
self.toolsReindexItem.setText(
|
||||||
|
translate('SongsPlugin', '&Re-index Songs'))
|
||||||
self.toolsReindexItem.setStatusTip(
|
self.toolsReindexItem.setStatusTip(
|
||||||
translate('SongsPlugin', 'Re-index the songs database to improve '
|
translate('SongsPlugin', 'Re-index the songs database to improve '
|
||||||
'searching and ordering.'))
|
'searching and ordering.'))
|
||||||
@ -149,8 +150,9 @@ class SongsPlugin(Plugin):
|
|||||||
song.title = u''
|
song.title = u''
|
||||||
if song.alternate_title is None:
|
if song.alternate_title is None:
|
||||||
song.alternate_title = u''
|
song.alternate_title = u''
|
||||||
song.search_title = self.whitespace.sub(u' ', song.title.lower()) +\
|
song.search_title = self.whitespace.sub(u' ', \
|
||||||
u' ' + self.whitespace.sub(u' ', song.alternate_title.lower())
|
song.title.lower()) + u' ' + \
|
||||||
|
self.whitespace.sub(u' ', song.alternate_title.lower())
|
||||||
progressDialog.setValue(counter)
|
progressDialog.setValue(counter)
|
||||||
self.manager.save_objects(songs)
|
self.manager.save_objects(songs)
|
||||||
counter += 1
|
counter += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user