forked from openlp/openlp
Cleanups
This commit is contained in:
parent
5135f848da
commit
3454f95ddf
@ -182,7 +182,7 @@ class OpenLP(QtGui.QApplication):
|
||||
screens = ScreenList()
|
||||
# Decide how many screens we have and their size
|
||||
for screen in xrange(0, self.desktop().numScreens()):
|
||||
size = self.desktop().screenGeometry(screen);
|
||||
size = self.desktop().screenGeometry(screen)
|
||||
screens.add_screen({u'number': screen,
|
||||
u'size': size,
|
||||
u'primary': (self.desktop().primaryScreen() == screen)})
|
||||
|
@ -78,7 +78,7 @@ class SearchEdit(QtGui.QLineEdit):
|
||||
else:
|
||||
self.setStyleSheet(u'QLineEdit { padding-right: %spx; } ' % \
|
||||
rightPadding)
|
||||
msz = self.minimumSizeHint();
|
||||
msz = self.minimumSizeHint()
|
||||
self.setMinimumSize(
|
||||
max(msz.width(),
|
||||
self.clearButton.width() + (frameWidth * 2) + 2),
|
||||
|
@ -177,8 +177,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
'parameter to be replaced.\nDo you want to continue anyway?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||
self.parameterEdit.setFocus()
|
||||
return False
|
||||
self.parameterEdit.setFocus()
|
||||
return False
|
||||
# The ParameterEdit field is not empty, but we have not found '<>'
|
||||
# in the alert text.
|
||||
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?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||
self.parameterEdit.setFocus()
|
||||
return False
|
||||
self.parameterEdit.setFocus()
|
||||
return False
|
||||
text = text.replace(u'<>', unicode(self.parameterEdit.text()))
|
||||
self.parent.alertsmanager.displayAlert(text)
|
||||
return True
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
import chardet
|
||||
import re
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtCore
|
||||
from sqlalchemy import Column, ForeignKey, or_, Table, types
|
||||
from sqlalchemy.orm import class_mapper, mapper, relation
|
||||
from sqlalchemy.orm.exc import UnmappedClassError
|
||||
|
Loading…
Reference in New Issue
Block a user