forked from openlp/openlp
Head
This commit is contained in:
commit
77866ccc8e
|
@ -102,7 +102,8 @@ def translate(context, text, comment=None,
|
||||||
An identifying string for when the same text is used in different roles
|
An identifying string for when the same text is used in different roles
|
||||||
within the same context.
|
within the same context.
|
||||||
"""
|
"""
|
||||||
return QtCore.QCoreApplication.translate(context, text, comment, encoding, n)
|
return QtCore.QCoreApplication.translate(
|
||||||
|
context, text, comment, encoding, n)
|
||||||
|
|
||||||
def get_text_file_string(text_file):
|
def get_text_file_string(text_file):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -176,7 +176,8 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
# break compatability), but it makes sense for the icon to
|
# break compatability), but it makes sense for the icon to
|
||||||
# come before the tooltip (as you have to have an icon, but
|
# come before the tooltip (as you have to have an icon, but
|
||||||
# not neccesarily a tooltip)
|
# not neccesarily a tooltip)
|
||||||
return self.toolbar.addToolbarButton(title, icon, tooltip, slot, checkable)
|
return self.toolbar.addToolbarButton(title, icon, tooltip, slot,
|
||||||
|
checkable)
|
||||||
|
|
||||||
def addToolbarSeparator(self):
|
def addToolbarSeparator(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -28,7 +28,6 @@ import os
|
||||||
import logging
|
import logging
|
||||||
import cPickle
|
import cPickle
|
||||||
import zipfile
|
import zipfile
|
||||||
from pprint import pformat
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -986,8 +985,8 @@ class ServiceManager(QtGui.QWidget):
|
||||||
u'expanded':expand})
|
u'expanded':expand})
|
||||||
self.repaintServiceList(len(self.serviceItems) + 1, 0)
|
self.repaintServiceList(len(self.serviceItems) + 1, 0)
|
||||||
else:
|
else:
|
||||||
self.serviceItems.insert(self.dropPosition, {u'service_item': item,
|
self.serviceItems.insert(self.dropPosition,
|
||||||
u'order': self.dropPosition,
|
{u'service_item': item, u'order': self.dropPosition,
|
||||||
u'expanded':expand})
|
u'expanded':expand})
|
||||||
self.repaintServiceList(self.dropPosition, 0)
|
self.repaintServiceList(self.dropPosition, 0)
|
||||||
# if rebuilding list make sure live is fixed.
|
# if rebuilding list make sure live is fixed.
|
||||||
|
|
|
@ -249,7 +249,8 @@ class Ui_ThemeWizard(object):
|
||||||
self.footerSizeSpinBox.setMaximum(999)
|
self.footerSizeSpinBox.setMaximum(999)
|
||||||
self.footerSizeSpinBox.setValue(10)
|
self.footerSizeSpinBox.setValue(10)
|
||||||
self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
|
self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
|
||||||
self.footerAreaLayout.addRow(self.footerSizeLabel, self.footerSizeSpinBox)
|
self.footerAreaLayout.addRow(self.footerSizeLabel,
|
||||||
|
self.footerSizeSpinBox)
|
||||||
ThemeWizard.addPage(self.footerAreaPage)
|
ThemeWizard.addPage(self.footerAreaPage)
|
||||||
# Alignment Page
|
# Alignment Page
|
||||||
self.alignmentPage = QtGui.QWizardPage()
|
self.alignmentPage = QtGui.QWizardPage()
|
||||||
|
@ -317,9 +318,11 @@ class Ui_ThemeWizard(object):
|
||||||
self.areaPositionLayout.addWidget(self.mainPositionGroupBox)
|
self.areaPositionLayout.addWidget(self.mainPositionGroupBox)
|
||||||
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||||
self.footerPositionGroupBox.setObjectName(u'FooterPositionGroupBox')
|
self.footerPositionGroupBox.setObjectName(u'FooterPositionGroupBox')
|
||||||
self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox)
|
self.footerPositionLayout = QtGui.QFormLayout(
|
||||||
|
self.footerPositionGroupBox)
|
||||||
self.footerPositionLayout.setObjectName(u'FooterPositionLayout')
|
self.footerPositionLayout.setObjectName(u'FooterPositionLayout')
|
||||||
self.footerPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox)
|
self.footerPositionCheckBox = QtGui.QCheckBox(
|
||||||
|
self.footerPositionGroupBox)
|
||||||
self.footerPositionCheckBox.setObjectName(u'FooterPositionCheckBox')
|
self.footerPositionCheckBox.setObjectName(u'FooterPositionCheckBox')
|
||||||
self.footerPositionLayout.addRow(self.footerPositionCheckBox)
|
self.footerPositionLayout.addRow(self.footerPositionCheckBox)
|
||||||
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||||
|
|
|
@ -231,6 +231,9 @@ class BGExtract(object):
|
||||||
footnotes = soup.findAll(u'sup', u'footnote')
|
footnotes = soup.findAll(u'sup', u'footnote')
|
||||||
if footnotes:
|
if footnotes:
|
||||||
[footnote.extract() for footnote in footnotes]
|
[footnote.extract() for footnote in footnotes]
|
||||||
|
crossrefs = soup.findAll(u'sup', u'xref')
|
||||||
|
if crossrefs:
|
||||||
|
[crossref.extract() for crossref in crossrefs]
|
||||||
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
||||||
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
||||||
content = verses.find(u'div', u'result-text-style-normal')
|
content = verses.find(u'div', u'result-text-style-normal')
|
||||||
|
|
|
@ -273,10 +273,10 @@ class BibleManager(object):
|
||||||
Receiver.send_message(u'openlp_information_message', {
|
Receiver.send_message(u'openlp_information_message', {
|
||||||
u'title': translate('BiblesPlugin.BibleManager',
|
u'title': translate('BiblesPlugin.BibleManager',
|
||||||
'Scripture Reference Error'),
|
'Scripture Reference Error'),
|
||||||
u'message': translate('BiblesPlugin.BibleManager', 'Your scripture '
|
u'message': translate('BiblesPlugin.BibleManager',
|
||||||
'reference is either not supported by OpenLP or is invalid. '
|
'Your scripture reference is either not supported by OpenLP '
|
||||||
'Please make sure your reference conforms to one of the '
|
'or is invalid. Please make sure your reference conforms to '
|
||||||
'following patterns:\n\n'
|
'one of the following patterns:\n\n'
|
||||||
'Book Chapter\n'
|
'Book Chapter\n'
|
||||||
'Book Chapter-Chapter\n'
|
'Book Chapter-Chapter\n'
|
||||||
'Book Chapter:Verse-Verse\n'
|
'Book Chapter:Verse-Verse\n'
|
||||||
|
|
|
@ -709,11 +709,11 @@ class BibleMediaItem(MediaManagerItem):
|
||||||
if len(items) == 0:
|
if len(items) == 0:
|
||||||
return False
|
return False
|
||||||
bible_text = u''
|
bible_text = u''
|
||||||
|
old_item = None
|
||||||
old_chapter = -1
|
old_chapter = -1
|
||||||
raw_footer = []
|
raw_footer = []
|
||||||
raw_slides = []
|
raw_slides = []
|
||||||
raw_title = []
|
raw_title = []
|
||||||
first_item = True
|
|
||||||
for item in items:
|
for item in items:
|
||||||
bitem = self.listView.item(item.row())
|
bitem = self.listView.item(item.row())
|
||||||
book = self._decodeQtObject(bitem, 'book')
|
book = self._decodeQtObject(bitem, 'book')
|
||||||
|
@ -754,9 +754,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||||
# We have to be 'Continuous'.
|
# We have to be 'Continuous'.
|
||||||
else:
|
else:
|
||||||
bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
|
bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
|
||||||
if first_item:
|
if not old_item:
|
||||||
start_item = item
|
start_item = item
|
||||||
first_item = False
|
|
||||||
elif self.checkTitle(item, old_item):
|
elif self.checkTitle(item, old_item):
|
||||||
raw_title.append(self.formatTitle(start_item, old_item))
|
raw_title.append(self.formatTitle(start_item, old_item))
|
||||||
start_item = item
|
start_item = item
|
||||||
|
|
|
@ -79,7 +79,12 @@ class PresentationTab(SettingsTab):
|
||||||
for key in self.controllers:
|
for key in self.controllers:
|
||||||
controller = self.controllers[key]
|
controller = self.controllers[key]
|
||||||
checkbox = self.PresenterCheckboxes[controller.name]
|
checkbox = self.PresenterCheckboxes[controller.name]
|
||||||
|
if controller.available:
|
||||||
checkbox.setText(controller.name)
|
checkbox.setText(controller.name)
|
||||||
|
else:
|
||||||
|
checkbox.setText(
|
||||||
|
unicode(translate('PresentationPlugin.PresentationTab',
|
||||||
|
'%s (unvailable)')) % controller.name)
|
||||||
self.AdvancedGroupBox.setTitle(
|
self.AdvancedGroupBox.setTitle(
|
||||||
translate('PresentationPlugin.PresentationTab',
|
translate('PresentationPlugin.PresentationTab',
|
||||||
'Advanced'))
|
'Advanced'))
|
||||||
|
@ -93,7 +98,6 @@ class PresentationTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
for key in self.controllers:
|
for key in self.controllers:
|
||||||
controller = self.controllers[key]
|
controller = self.controllers[key]
|
||||||
if controller.available:
|
|
||||||
checkbox = self.PresenterCheckboxes[controller.name]
|
checkbox = self.PresenterCheckboxes[controller.name]
|
||||||
checkbox.setChecked(QtCore.QSettings().value(
|
checkbox.setChecked(QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/' + controller.name,
|
self.settingsSection + u'/' + controller.name,
|
||||||
|
@ -109,13 +113,15 @@ class PresentationTab(SettingsTab):
|
||||||
changed = False
|
changed = False
|
||||||
for key in self.controllers:
|
for key in self.controllers:
|
||||||
controller = self.controllers[key]
|
controller = self.controllers[key]
|
||||||
|
if controller.available:
|
||||||
checkbox = self.PresenterCheckboxes[controller.name]
|
checkbox = self.PresenterCheckboxes[controller.name]
|
||||||
setting_key = self.settingsSection + u'/' + controller.name
|
setting_key = self.settingsSection + u'/' + controller.name
|
||||||
if QtCore.QSettings().value(setting_key) != checkbox.checkState():
|
if QtCore.QSettings().value(setting_key) != \
|
||||||
|
checkbox.checkState():
|
||||||
changed = True
|
changed = True
|
||||||
QtCore.QSettings().setValue(setting_key,
|
QtCore.QSettings().setValue(setting_key,
|
||||||
QtCore.QVariant(checkbox.checkState()))
|
QtCore.QVariant(checkbox.checkState()))
|
||||||
if checkbox.checkState() == QtCore.Qt.Checked:
|
if checkbox.isChecked():
|
||||||
controller.start_process()
|
controller.start_process()
|
||||||
else:
|
else:
|
||||||
controller.kill()
|
controller.kill()
|
||||||
|
|
Loading…
Reference in New Issue