forked from openlp/openlp
Cleanups
This commit is contained in:
parent
a42f71aad5
commit
1fbc873a8c
@ -173,14 +173,13 @@ class RenderManager(object):
|
|||||||
main_rect = None
|
main_rect = None
|
||||||
footer_rect = None
|
footer_rect = None
|
||||||
if not theme.font_main_override:
|
if not theme.font_main_override:
|
||||||
main_rect = QtCore.QRect(10, 0,
|
main_rect = QtCore.QRect(10, 0, self.width - 20, self.footer_start)
|
||||||
self.width - 20, self.footer_start)
|
|
||||||
else:
|
else:
|
||||||
main_rect = QtCore.QRect(theme.font_main_x, theme.font_main_y,
|
main_rect = QtCore.QRect(theme.font_main_x, theme.font_main_y,
|
||||||
theme.font_main_width - 1, theme.font_main_height - 1)
|
theme.font_main_width - 1, theme.font_main_height - 1)
|
||||||
if not theme.font_footer_override:
|
if not theme.font_footer_override:
|
||||||
footer_rect = QtCore.QRect(10, self.footer_start,
|
footer_rect = QtCore.QRect(10, self.footer_start, self.width - 20,
|
||||||
self.width - 20, self.height - self.footer_start)
|
self.height - self.footer_start)
|
||||||
else:
|
else:
|
||||||
footer_rect = QtCore.QRect(theme.font_footer_x,
|
footer_rect = QtCore.QRect(theme.font_footer_x,
|
||||||
theme.font_footer_y, theme.font_footer_width - 1,
|
theme.font_footer_y, theme.font_footer_width - 1,
|
||||||
@ -215,7 +214,7 @@ class RenderManager(object):
|
|||||||
else:
|
else:
|
||||||
self.image_manager.del_image(theme_data.theme_name)
|
self.image_manager.del_image(theme_data.theme_name)
|
||||||
footer = []
|
footer = []
|
||||||
footer.append(u'Arky Arky (Unknown)' )
|
footer.append(u'Arky Arky (Unknown)')
|
||||||
footer.append(u'Public Domain')
|
footer.append(u'Public Domain')
|
||||||
footer.append(u'CCLI 123456')
|
footer.append(u'CCLI 123456')
|
||||||
# build a service item to generate preview
|
# build a service item to generate preview
|
||||||
@ -258,6 +257,6 @@ class RenderManager(object):
|
|||||||
self.height = screen.height()
|
self.height = screen.height()
|
||||||
self.screen_ratio = float(self.height) / float(self.width)
|
self.screen_ratio = float(self.height) / float(self.width)
|
||||||
log.debug(u'calculate default %d, %d, %f',
|
log.debug(u'calculate default %d, %d, %f',
|
||||||
self.width, self.height, self.screen_ratio )
|
self.width, self.height, self.screen_ratio)
|
||||||
# 90% is start of footer
|
# 90% is start of footer
|
||||||
self.footer_start = int(self.height * 0.90)
|
self.footer_start = int(self.height * 0.90)
|
||||||
|
@ -323,7 +323,7 @@ class ServiceItem(object):
|
|||||||
for text_image in serviceitem[u'serviceitem'][u'data']:
|
for text_image in serviceitem[u'serviceitem'][u'data']:
|
||||||
filename = os.path.join(path, text_image[u'title'])
|
filename = os.path.join(path, text_image[u'title'])
|
||||||
self.add_from_command(
|
self.add_from_command(
|
||||||
path, text_image[u'title'], text_image[u'image'] )
|
path, text_image[u'title'], text_image[u'image'])
|
||||||
self._new_item()
|
self._new_item()
|
||||||
|
|
||||||
def get_display_title(self):
|
def get_display_title(self):
|
||||||
|
@ -170,7 +170,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
self.__buttonState(False)
|
self.__buttonState(False)
|
||||||
self.descriptionWordCount.setText(
|
self.descriptionWordCount.setText(
|
||||||
unicode(translate('OpenLP.ExceptionDialog',
|
unicode(translate('OpenLP.ExceptionDialog',
|
||||||
'Description characters to enter : %s')) % count )
|
'Description characters to enter : %s')) % count)
|
||||||
|
|
||||||
def onAttachFileButtonPressed(self):
|
def onAttachFileButtonPressed(self):
|
||||||
files = QtGui.QFileDialog.getOpenFileName(
|
files = QtGui.QFileDialog.getOpenFileName(
|
||||||
|
@ -71,7 +71,7 @@ class ScreenList(object):
|
|||||||
"""
|
"""
|
||||||
Set up the current screen dimensions
|
Set up the current screen dimensions
|
||||||
"""
|
"""
|
||||||
log.debug(u'set_current_display %s', number, )
|
log.debug(u'set_current_display %s', number)
|
||||||
if number + 1 > self.display_count:
|
if number + 1 > self.display_count:
|
||||||
self.current = self.screen_list[0]
|
self.current = self.screen_list[0]
|
||||||
self.override = copy.deepcopy(self.current)
|
self.override = copy.deepcopy(self.current)
|
||||||
@ -99,4 +99,4 @@ class ScreenList(object):
|
|||||||
user wants to use the correct screen attributes
|
user wants to use the correct screen attributes
|
||||||
"""
|
"""
|
||||||
log.debug(u'reset_current_display')
|
log.debug(u'reset_current_display')
|
||||||
self.set_current_display(self.current_display)
|
self.set_current_display(self.current_display)
|
||||||
|
@ -1061,8 +1061,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
if self.serviceItems[item][u'service_item']\
|
if self.serviceItems[item][u'service_item']\
|
||||||
.is_capable(ItemCapabilities.AllowsEdit):
|
.is_capable(ItemCapabilities.AllowsEdit):
|
||||||
Receiver.send_message(u'%s_edit' %
|
Receiver.send_message(u'%s_edit' %
|
||||||
self.serviceItems[item][u'service_item'].name.lower(), u'L:%s' %
|
self.serviceItems[item][u'service_item'].name.lower(),
|
||||||
self.serviceItems[item][u'service_item'].edit_id )
|
u'L:%s' % self.serviceItems[item][u'service_item'].edit_id)
|
||||||
|
|
||||||
def findServiceItem(self):
|
def findServiceItem(self):
|
||||||
"""
|
"""
|
||||||
|
@ -603,8 +603,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.serviceItem.is_text():
|
if self.serviceItem.is_text():
|
||||||
if frame[u'verseTag']:
|
if frame[u'verseTag']:
|
||||||
bits = frame[u'verseTag'].split(u':')
|
bits = frame[u'verseTag'].split(u':')
|
||||||
tag = u'%s\n%s' % (bits[0][0], bits[1][0:] )
|
tag = u'%s\n%s' % (bits[0][0], bits[1][0:])
|
||||||
tag1 = u'%s%s' % (bits[0][0], bits[1][0:] )
|
tag1 = u'%s%s' % (bits[0][0], bits[1][0:])
|
||||||
row = tag
|
row = tag
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
if tag1 not in self.slideList:
|
if tag1 not in self.slideList:
|
||||||
|
@ -36,7 +36,7 @@ from openlp.core.lib import OpenLPToolbar, ThemeXML, get_text_file_string, \
|
|||||||
build_icon, Receiver, SettingsManager, translate, check_item_selected, \
|
build_icon, Receiver, SettingsManager, translate, check_item_selected, \
|
||||||
BackgroundType, BackgroundGradientType, check_directory_exists, \
|
BackgroundType, BackgroundGradientType, check_directory_exists, \
|
||||||
VerticalType
|
VerticalType
|
||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
from openlp.core.lib.ui import critical_error_message_box
|
||||||
from openlp.core.theme import Theme
|
from openlp.core.theme import Theme
|
||||||
from openlp.core.ui import FileRenameForm, ThemeForm
|
from openlp.core.ui import FileRenameForm, ThemeForm
|
||||||
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
|
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
|
||||||
|
@ -71,5 +71,5 @@ class EditCustomSlideForm(QtGui.QDialog, Ui_CustomSlideEditDialog):
|
|||||||
"""
|
"""
|
||||||
if self.slideTextEdit.textCursor().columnNumber() != 0:
|
if self.slideTextEdit.textCursor().columnNumber() != 0:
|
||||||
self.slideTextEdit.insertPlainText(u'\n')
|
self.slideTextEdit.insertPlainText(u'\n')
|
||||||
self.slideTextEdit.insertPlainText(u'[---]\n' )
|
self.slideTextEdit.insertPlainText(u'[---]\n')
|
||||||
self.slideTextEdit.setFocus()
|
self.slideTextEdit.setFocus()
|
||||||
|
@ -55,7 +55,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'custom_edit'), self.onRemoteEdit)
|
QtCore.SIGNAL(u'custom_edit'), self.onRemoteEdit)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'custom_edit_clear' ), self.onRemoteEditClear)
|
QtCore.SIGNAL(u'custom_edit_clear'), self.onRemoteEditClear)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'custom_load_list'), self.initialise)
|
QtCore.SIGNAL(u'custom_load_list'), self.initialise)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
@ -187,7 +187,7 @@ class CCLIFileImport(SongImport):
|
|||||||
if check_first_verse_line:
|
if check_first_verse_line:
|
||||||
if verse_lines[0].startswith(u'(PRE-CHORUS'):
|
if verse_lines[0].startswith(u'(PRE-CHORUS'):
|
||||||
verse_type = u'P'
|
verse_type = u'P'
|
||||||
log.debug(u'USR verse PRE-CHORUS: %s', verse_lines[0] )
|
log.debug(u'USR verse PRE-CHORUS: %s', verse_lines[0])
|
||||||
verse_text = verse_lines[1]
|
verse_text = verse_lines[1]
|
||||||
elif verse_lines[0].startswith(u'(BRIDGE'):
|
elif verse_lines[0].startswith(u'(BRIDGE'):
|
||||||
verse_type = u'B'
|
verse_type = u'B'
|
||||||
|
Loading…
Reference in New Issue
Block a user