bzr-revno: 1194
This commit is contained in:
Jon Tibble 2011-01-07 14:57:17 +00:00
commit 2f8313f285
8 changed files with 11 additions and 12 deletions

View File

@ -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)})

View File

@ -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),

View File

@ -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

View File

@ -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

View File

@ -230,7 +230,7 @@ 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]
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')

View File

@ -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

View File

@ -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__)

View File

@ -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__)