forked from openlp/openlp
Head 1197
This commit is contained in:
commit
ef3ae247fc
|
@ -182,7 +182,7 @@ class OpenLP(QtGui.QApplication):
|
||||||
screens = ScreenList()
|
screens = ScreenList()
|
||||||
# Decide how many screens we have and their size
|
# Decide how many screens we have and their size
|
||||||
for screen in xrange(0, self.desktop().numScreens()):
|
for screen in xrange(0, self.desktop().numScreens()):
|
||||||
size = self.desktop().screenGeometry(screen);
|
size = self.desktop().screenGeometry(screen)
|
||||||
screens.add_screen({u'number': screen,
|
screens.add_screen({u'number': screen,
|
||||||
u'size': size,
|
u'size': size,
|
||||||
u'primary': (self.desktop().primaryScreen() == screen)})
|
u'primary': (self.desktop().primaryScreen() == screen)})
|
||||||
|
|
|
@ -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):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -78,7 +78,7 @@ class SearchEdit(QtGui.QLineEdit):
|
||||||
else:
|
else:
|
||||||
self.setStyleSheet(u'QLineEdit { padding-right: %spx; } ' % \
|
self.setStyleSheet(u'QLineEdit { padding-right: %spx; } ' % \
|
||||||
rightPadding)
|
rightPadding)
|
||||||
msz = self.minimumSizeHint();
|
msz = self.minimumSizeHint()
|
||||||
self.setMinimumSize(
|
self.setMinimumSize(
|
||||||
max(msz.width(),
|
max(msz.width(),
|
||||||
self.clearButton.width() + (frameWidth * 2) + 2),
|
self.clearButton.width() + (frameWidth * 2) + 2),
|
||||||
|
|
|
@ -38,6 +38,8 @@ class Ui_FileRenameDialog(object):
|
||||||
self.fileNameLabel.setObjectName(u'fileNameLabel')
|
self.fileNameLabel.setObjectName(u'fileNameLabel')
|
||||||
self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
|
self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
|
||||||
self.fileNameEdit = QtGui.QLineEdit(FileRenameDialog)
|
self.fileNameEdit = QtGui.QLineEdit(FileRenameDialog)
|
||||||
|
self.fileNameEdit.setValidator(QtGui.QRegExpValidator(
|
||||||
|
QtCore.QRegExp(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
||||||
self.fileNameEdit.setObjectName(u'fileNameEdit')
|
self.fileNameEdit.setObjectName(u'fileNameEdit')
|
||||||
self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
|
self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog)
|
self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog)
|
||||||
|
|
|
@ -139,6 +139,7 @@ class GeneralTab(SettingsTab):
|
||||||
self.numberLabel = QtGui.QLabel(self.ccliGroupBox)
|
self.numberLabel = QtGui.QLabel(self.ccliGroupBox)
|
||||||
self.numberLabel.setObjectName(u'numberLabel')
|
self.numberLabel.setObjectName(u'numberLabel')
|
||||||
self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox)
|
self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox)
|
||||||
|
self.numberEdit.setValidator(QtGui.QIntValidator())
|
||||||
self.numberEdit.setObjectName(u'numberEdit')
|
self.numberEdit.setObjectName(u'numberEdit')
|
||||||
self.ccliLayout.addRow(self.numberLabel, self.numberEdit)
|
self.ccliLayout.addRow(self.numberLabel, self.numberEdit)
|
||||||
self.usernameLabel = QtGui.QLabel(self.ccliGroupBox)
|
self.usernameLabel = QtGui.QLabel(self.ccliGroupBox)
|
||||||
|
|
|
@ -307,7 +307,8 @@ class ServiceManager(QtGui.QWidget):
|
||||||
Setter for service file.
|
Setter for service file.
|
||||||
"""
|
"""
|
||||||
self._fileName = unicode(fileName)
|
self._fileName = unicode(fileName)
|
||||||
self.mainwindow.setServiceModified(self.isModified, self.shortFileName())
|
self.mainwindow.setServiceModified(self.isModified(),
|
||||||
|
self.shortFileName())
|
||||||
QtCore.QSettings(). \
|
QtCore.QSettings(). \
|
||||||
setValue(u'service/last file',QtCore.QVariant(fileName))
|
setValue(u'service/last file',QtCore.QVariant(fileName))
|
||||||
|
|
||||||
|
@ -685,7 +686,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
# Top Item was selected so set the last one
|
# Top Item was selected so set the last one
|
||||||
if setLastItem:
|
if setLastItem:
|
||||||
lastItem.setSelected(True)
|
lastItem.setSelected(True)
|
||||||
self.isModified = True
|
self.setModified(True)
|
||||||
|
|
||||||
def onMoveSelectionDown(self):
|
def onMoveSelectionDown(self):
|
||||||
"""
|
"""
|
||||||
|
@ -708,7 +709,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
serviceIterator += 1
|
serviceIterator += 1
|
||||||
if setSelected:
|
if setSelected:
|
||||||
firstItem.setSelected(True)
|
firstItem.setSelected(True)
|
||||||
self.isModified = True
|
self.setModified(True)
|
||||||
|
|
||||||
def onCollapseAll(self):
|
def onCollapseAll(self):
|
||||||
"""
|
"""
|
||||||
|
@ -752,7 +753,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
self.serviceItems.remove(self.serviceItems[item])
|
self.serviceItems.remove(self.serviceItems[item])
|
||||||
self.serviceItems.insert(0, temp)
|
self.serviceItems.insert(0, temp)
|
||||||
self.repaintServiceList(0, count)
|
self.repaintServiceList(0, count)
|
||||||
self.isModified = True
|
self.setModified(True)
|
||||||
|
|
||||||
def onServiceUp(self):
|
def onServiceUp(self):
|
||||||
"""
|
"""
|
||||||
|
@ -985,8 +986,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)
|
||||||
|
@ -360,6 +363,8 @@ class Ui_ThemeWizard(object):
|
||||||
self.themeNameLabel = QtGui.QLabel(self.previewPage)
|
self.themeNameLabel = QtGui.QLabel(self.previewPage)
|
||||||
self.themeNameLabel.setObjectName(u'ThemeNameLabel')
|
self.themeNameLabel.setObjectName(u'ThemeNameLabel')
|
||||||
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
||||||
|
self.themeNameEdit.setValidator(QtGui.QRegExpValidator(
|
||||||
|
QtCore.QRegExp(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
||||||
self.themeNameEdit.setObjectName(u'ThemeNameEdit')
|
self.themeNameEdit.setObjectName(u'ThemeNameEdit')
|
||||||
self.themeNameLayout.addRow(self.themeNameLabel, self.themeNameEdit)
|
self.themeNameLayout.addRow(self.themeNameLabel, self.themeNameEdit)
|
||||||
self.previewLayout.addLayout(self.themeNameLayout)
|
self.previewLayout.addLayout(self.themeNameLayout)
|
||||||
|
|
|
@ -177,8 +177,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
'parameter to be replaced.\nDo you want to continue anyway?'),
|
'parameter to be replaced.\nDo you want to continue anyway?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
self.parameterEdit.setFocus()
|
self.parameterEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
# The ParameterEdit field is not empty, but we have not found '<>'
|
# The ParameterEdit field is not empty, but we have not found '<>'
|
||||||
# in the alert text.
|
# in the alert text.
|
||||||
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
||||||
|
@ -188,8 +188,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
' contain \'<>\'.\nDo want to continue anyway?'),
|
' contain \'<>\'.\nDo want to continue anyway?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
self.parameterEdit.setFocus()
|
self.parameterEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
text = text.replace(u'<>', unicode(self.parameterEdit.text()))
|
text = text.replace(u'<>', unicode(self.parameterEdit.text()))
|
||||||
self.parent.alertsmanager.displayAlert(text)
|
self.parent.alertsmanager.displayAlert(text)
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
import chardet
|
import chardet
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore
|
||||||
from sqlalchemy import Column, ForeignKey, or_, Table, types
|
from sqlalchemy import Column, ForeignKey, or_, Table, types
|
||||||
from sqlalchemy.orm import class_mapper, mapper, relation
|
from sqlalchemy.orm import class_mapper, mapper, relation
|
||||||
from sqlalchemy.orm.exc import UnmappedClassError
|
from sqlalchemy.orm.exc import UnmappedClassError
|
||||||
|
|
|
@ -230,7 +230,10 @@ class BGExtract(object):
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
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')
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, SettingsManager, translate
|
from openlp.core.lib import Receiver, SettingsManager, translate
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
|
@ -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'
|
||||||
|
|
|
@ -30,8 +30,7 @@ import os
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
context_menu_action, ItemCapabilities, SettingsManager, translate, \
|
ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver
|
||||||
check_item_selected, Receiver
|
|
||||||
from openlp.core.utils import AppLocation, get_images_filter
|
from openlp.core.utils import AppLocation, get_images_filter
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -31,7 +31,7 @@ from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
ItemCapabilities, SettingsManager, translate, check_item_selected, \
|
ItemCapabilities, SettingsManager, translate, check_item_selected, \
|
||||||
context_menu_action, Receiver
|
Receiver
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,8 @@ class PresentationTab(SettingsTab):
|
||||||
if controller.available:
|
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()))
|
||||||
|
|
|
@ -245,6 +245,7 @@ class Ui_EditSongDialog(object):
|
||||||
self.CCLILabel.setObjectName(u'CCLILabel')
|
self.CCLILabel.setObjectName(u'CCLILabel')
|
||||||
self.CCLILayout.addWidget(self.CCLILabel)
|
self.CCLILayout.addWidget(self.CCLILabel)
|
||||||
self.CCLNumberEdit = QtGui.QLineEdit(self.rightsGroupBox)
|
self.CCLNumberEdit = QtGui.QLineEdit(self.rightsGroupBox)
|
||||||
|
self.CCLNumberEdit.setValidator(QtGui.QIntValidator())
|
||||||
self.CCLNumberEdit.setObjectName(u'CCLNumberEdit')
|
self.CCLNumberEdit.setObjectName(u'CCLNumberEdit')
|
||||||
self.CCLILayout.addWidget(self.CCLNumberEdit)
|
self.CCLILayout.addWidget(self.CCLNumberEdit)
|
||||||
self.rightsLayout.addLayout(self.CCLILayout)
|
self.rightsLayout.addLayout(self.CCLILayout)
|
||||||
|
|
Loading…
Reference in New Issue