forked from openlp/openlp
Minor fixes and unicode changes
This commit is contained in:
parent
2fefcef09d
commit
e0b7c54ddc
@ -34,11 +34,11 @@ from openlp.plugins.alerts.forms import AlertsTab, AlertForm, AlertEditForm
|
|||||||
|
|
||||||
class alertsPlugin(Plugin):
|
class alertsPlugin(Plugin):
|
||||||
global log
|
global log
|
||||||
log = logging.getLogger(u'alertsPlugin')
|
log = logging.getLogger(u'AlertsPlugin')
|
||||||
log.info(u'alerts Plugin loaded')
|
log.info(u'Alerts Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'alerts', u'1.9.1', plugin_helpers)
|
Plugin.__init__(self, u'Alerts', u'1.9.1', plugin_helpers)
|
||||||
self.weight = -3
|
self.weight = -3
|
||||||
self.icon = build_icon(u':/media/media_image.png')
|
self.icon = build_icon(u':/media/media_image.png')
|
||||||
self.alertsmanager = AlertsManager(self)
|
self.alertsmanager = AlertsManager(self)
|
||||||
@ -74,7 +74,7 @@ class alertsPlugin(Plugin):
|
|||||||
self.toolsAlertItem.setVisible(False)
|
self.toolsAlertItem.setVisible(False)
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.info(u'alerts Initialising')
|
log.info(u'Alerts Initialising')
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.toolsAlertItem.setVisible(True)
|
self.toolsAlertItem.setVisible(True)
|
||||||
|
|
||||||
|
@ -11,61 +11,61 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
class Ui_AlertDialog(object):
|
class Ui_AlertDialog(object):
|
||||||
def setupUi(self, AlertForm):
|
def setupUi(self, AlertForm):
|
||||||
AlertForm.setObjectName("AlertDialog")
|
AlertForm.setObjectName(u'AlertDialog')
|
||||||
AlertForm.resize(430, 320)
|
AlertForm.resize(430, 320)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
AlertForm.setWindowIcon(icon)
|
AlertForm.setWindowIcon(icon)
|
||||||
self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
|
self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
|
||||||
self.AlertFormLayout.setSpacing(8)
|
self.AlertFormLayout.setSpacing(8)
|
||||||
self.AlertFormLayout.setMargin(8)
|
self.AlertFormLayout.setMargin(8)
|
||||||
self.AlertFormLayout.setObjectName("AlertFormLayout")
|
self.AlertFormLayout.setObjectName(u'AlertFormLayout')
|
||||||
self.AlertEntryWidget = QtGui.QWidget(AlertForm)
|
self.AlertEntryWidget = QtGui.QWidget(AlertForm)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.AlertEntryWidget.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.AlertEntryWidget.sizePolicy().hasHeightForWidth())
|
||||||
self.AlertEntryWidget.setSizePolicy(sizePolicy)
|
self.AlertEntryWidget.setSizePolicy(sizePolicy)
|
||||||
self.AlertEntryWidget.setObjectName("AlertEntryWidget")
|
self.AlertEntryWidget.setObjectName(u'AlertEntryWidget')
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.AlertEntryWidget)
|
self.verticalLayout_2 = QtGui.QVBoxLayout(self.AlertEntryWidget)
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
||||||
self.verticalLayout = QtGui.QVBoxLayout()
|
self.verticalLayout = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||||
self.AlertEntryLabel = QtGui.QLabel(self.AlertEntryWidget)
|
self.AlertEntryLabel = QtGui.QLabel(self.AlertEntryWidget)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.AlertEntryLabel.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.AlertEntryLabel.sizePolicy().hasHeightForWidth())
|
||||||
self.AlertEntryLabel.setSizePolicy(sizePolicy)
|
self.AlertEntryLabel.setSizePolicy(sizePolicy)
|
||||||
self.AlertEntryLabel.setObjectName("AlertEntryLabel")
|
self.AlertEntryLabel.setObjectName(u'AlertEntryLabel')
|
||||||
self.verticalLayout.addWidget(self.AlertEntryLabel)
|
self.verticalLayout.addWidget(self.AlertEntryLabel)
|
||||||
self.AlertEntryEditItem = QtGui.QLineEdit(self.AlertEntryWidget)
|
self.AlertEntryEditItem = QtGui.QLineEdit(self.AlertEntryWidget)
|
||||||
self.AlertEntryEditItem.setObjectName("AlertEntryEditItem")
|
self.AlertEntryEditItem.setObjectName(u'AlertEntryEditItem')
|
||||||
self.verticalLayout.addWidget(self.AlertEntryEditItem)
|
self.verticalLayout.addWidget(self.AlertEntryEditItem)
|
||||||
self.AlertListWidget = QtGui.QListWidget(self.AlertEntryWidget)
|
self.AlertListWidget = QtGui.QListWidget(self.AlertEntryWidget)
|
||||||
self.AlertListWidget.setAlternatingRowColors(True)
|
self.AlertListWidget.setAlternatingRowColors(True)
|
||||||
self.AlertListWidget.setObjectName("AlertListWidget")
|
self.AlertListWidget.setObjectName(u'AlertListWidget')
|
||||||
self.verticalLayout.addWidget(self.AlertListWidget)
|
self.verticalLayout.addWidget(self.AlertListWidget)
|
||||||
self.verticalLayout_2.addLayout(self.verticalLayout)
|
self.verticalLayout_2.addLayout(self.verticalLayout)
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||||
spacerItem = QtGui.QSpacerItem(181, 38, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
spacerItem = QtGui.QSpacerItem(181, 38, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout.addItem(spacerItem)
|
self.horizontalLayout.addItem(spacerItem)
|
||||||
self.DisplayButton = QtGui.QPushButton(self.AlertEntryWidget)
|
self.DisplayButton = QtGui.QPushButton(self.AlertEntryWidget)
|
||||||
self.DisplayButton.setObjectName("DisplayButton")
|
self.DisplayButton.setObjectName(u'DisplayButton')
|
||||||
self.horizontalLayout.addWidget(self.DisplayButton)
|
self.horizontalLayout.addWidget(self.DisplayButton)
|
||||||
self.CancelButton = QtGui.QPushButton(self.AlertEntryWidget)
|
self.CancelButton = QtGui.QPushButton(self.AlertEntryWidget)
|
||||||
self.CancelButton.setObjectName("CancelButton")
|
self.CancelButton.setObjectName(u'CancelButton')
|
||||||
self.horizontalLayout.addWidget(self.CancelButton)
|
self.horizontalLayout.addWidget(self.CancelButton)
|
||||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||||
self.AlertFormLayout.addWidget(self.AlertEntryWidget)
|
self.AlertFormLayout.addWidget(self.AlertEntryWidget)
|
||||||
|
|
||||||
self.retranslateUi(AlertForm)
|
self.retranslateUi(AlertForm)
|
||||||
QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL("clicked()"), self.close)
|
QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL(u'clicked()'), self.close)
|
||||||
QtCore.QMetaObject.connectSlotsByName(AlertForm)
|
QtCore.QMetaObject.connectSlotsByName(AlertForm)
|
||||||
|
|
||||||
def retranslateUi(self, AlertForm):
|
def retranslateUi(self, AlertForm):
|
||||||
AlertForm.setWindowTitle(QtGui.QApplication.translate("AlertForm", "Alert Message", None, QtGui.QApplication.UnicodeUTF8))
|
AlertForm.setWindowTitle(self.trUtf8('Alert Message'))
|
||||||
self.AlertEntryLabel.setText(QtGui.QApplication.translate("AlertForm", "Alert Text:", None, QtGui.QApplication.UnicodeUTF8))
|
self.AlertEntryLabel.setText(self.trUtf8('Alert Text:'))
|
||||||
self.DisplayButton.setText(QtGui.QApplication.translate("AlertForm", "Display", None, QtGui.QApplication.UnicodeUTF8))
|
self.DisplayButton.setText(self.trUtf8('Display'))
|
||||||
self.CancelButton.setText(QtGui.QApplication.translate("AlertForm", "Cancel", None, QtGui.QApplication.UnicodeUTF8))
|
self.CancelButton.setText(self.trUtf8('Cancel'))
|
||||||
|
@ -11,45 +11,45 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
class Ui_AlertEditDialog(object):
|
class Ui_AlertEditDialog(object):
|
||||||
def setupUi(self, AlertEditDialog):
|
def setupUi(self, AlertEditDialog):
|
||||||
AlertEditDialog.setObjectName("AlertEditDialog")
|
AlertEditDialog.setObjectName(u'AlertEditDialog')
|
||||||
AlertEditDialog.resize(400, 300)
|
AlertEditDialog.resize(400, 300)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(AlertEditDialog)
|
self.buttonBox = QtGui.QDialogButtonBox(AlertEditDialog)
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(220, 270, 173, 27))
|
self.buttonBox.setGeometry(QtCore.QRect(220, 270, 173, 27))
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel)
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel)
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
self.layoutWidget = QtGui.QWidget(AlertEditDialog)
|
self.layoutWidget = QtGui.QWidget(AlertEditDialog)
|
||||||
self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 361, 251))
|
self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 361, 251))
|
||||||
self.layoutWidget.setObjectName("layoutWidget")
|
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget)
|
self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget)
|
||||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout()
|
self.horizontalLayout_2 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
||||||
self.AlertLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
self.AlertLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||||
self.AlertLineEdit.setObjectName("AlertLineEdit")
|
self.AlertLineEdit.setObjectName(u'AlertLineEdit')
|
||||||
self.horizontalLayout_2.addWidget(self.AlertLineEdit)
|
self.horizontalLayout_2.addWidget(self.AlertLineEdit)
|
||||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||||
self.AlertListWidget = QtGui.QListWidget(self.layoutWidget)
|
self.AlertListWidget = QtGui.QListWidget(self.layoutWidget)
|
||||||
self.AlertListWidget.setAlternatingRowColors(True)
|
self.AlertListWidget.setAlternatingRowColors(True)
|
||||||
self.AlertListWidget.setObjectName("AlertListWidget")
|
self.AlertListWidget.setObjectName(u'AlertListWidget')
|
||||||
self.horizontalLayout.addWidget(self.AlertListWidget)
|
self.horizontalLayout.addWidget(self.AlertListWidget)
|
||||||
self.verticalLayout = QtGui.QVBoxLayout()
|
self.verticalLayout = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||||
self.SaveButton = QtGui.QPushButton(self.layoutWidget)
|
self.SaveButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.SaveButton.setObjectName("SaveButton")
|
self.SaveButton.setObjectName(u'SaveButton')
|
||||||
self.verticalLayout.addWidget(self.SaveButton)
|
self.verticalLayout.addWidget(self.SaveButton)
|
||||||
self.ClearButton = QtGui.QPushButton(self.layoutWidget)
|
self.ClearButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.ClearButton.setObjectName("ClearButton")
|
self.ClearButton.setObjectName(u'ClearButton')
|
||||||
self.verticalLayout.addWidget(self.ClearButton)
|
self.verticalLayout.addWidget(self.ClearButton)
|
||||||
self.AddButton = QtGui.QPushButton(self.layoutWidget)
|
self.AddButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.AddButton.setObjectName("AddButton")
|
self.AddButton.setObjectName(u'AddButton')
|
||||||
self.verticalLayout.addWidget(self.AddButton)
|
self.verticalLayout.addWidget(self.AddButton)
|
||||||
self.EditButton = QtGui.QPushButton(self.layoutWidget)
|
self.EditButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.EditButton.setObjectName("EditButton")
|
self.EditButton.setObjectName(u'EditButton')
|
||||||
self.verticalLayout.addWidget(self.EditButton)
|
self.verticalLayout.addWidget(self.EditButton)
|
||||||
self.DeleteButton = QtGui.QPushButton(self.layoutWidget)
|
self.DeleteButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.DeleteButton.setObjectName("DeleteButton")
|
self.DeleteButton.setObjectName(u'DeleteButton')
|
||||||
self.verticalLayout.addWidget(self.DeleteButton)
|
self.verticalLayout.addWidget(self.DeleteButton)
|
||||||
self.horizontalLayout.addLayout(self.verticalLayout)
|
self.horizontalLayout.addLayout(self.verticalLayout)
|
||||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||||
@ -58,10 +58,10 @@ class Ui_AlertEditDialog(object):
|
|||||||
QtCore.QMetaObject.connectSlotsByName(AlertEditDialog)
|
QtCore.QMetaObject.connectSlotsByName(AlertEditDialog)
|
||||||
|
|
||||||
def retranslateUi(self, AlertEditDialog):
|
def retranslateUi(self, AlertEditDialog):
|
||||||
AlertEditDialog.setWindowTitle(QtGui.QApplication.translate("AlertEditDialog", "Maintain Alerts", None, QtGui.QApplication.UnicodeUTF8))
|
AlertEditDialog.setWindowTitle(self.trUtf8('Maintain Alerts'))
|
||||||
self.SaveButton.setText(QtGui.QApplication.translate("AlertEditDialog", "Save", None, QtGui.QApplication.UnicodeUTF8))
|
self.SaveButton.setText(self.trUtf8('Save'))
|
||||||
self.ClearButton.setText(QtGui.QApplication.translate("AlertEditDialog", "Clear", None, QtGui.QApplication.UnicodeUTF8))
|
self.ClearButton.setText(self.trUtf8('Clear'))
|
||||||
self.AddButton.setText(QtGui.QApplication.translate("AlertEditDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
|
self.AddButton.setText(self.trUtf8('Add'))
|
||||||
self.EditButton.setText(QtGui.QApplication.translate("AlertEditDialog", "Edit", None, QtGui.QApplication.UnicodeUTF8))
|
self.EditButton.setText(self.trUtf8('Edit'))
|
||||||
self.DeleteButton.setText(QtGui.QApplication.translate("AlertEditDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
|
self.DeleteButton.setText(self.trUtf8('Delete'))
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class CustomManager():
|
|||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
self.session.rollback()
|
self.session.rollback()
|
||||||
log.exceptiontion(u'Custom Slide save failed')
|
log.exception(u'Custom Slide save failed')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_custom(self, id=None):
|
def get_custom(self, id=None):
|
||||||
|
@ -172,6 +172,6 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
||||||
self.OverrideLabel.setText(bitem.text())
|
self.OverrideLabel.setText(bitem.text())
|
||||||
frame = QtGui.QImage(unicode(filename))
|
frame = QtGui.QImage(unicode(filename))
|
||||||
self.parent.live_controller.parent.mainDisplay.addImageWithText(frame)
|
self.parent.mainDisplay.addImageWithText(frame)
|
||||||
else:
|
else:
|
||||||
MediaManagerItem.onPreviewClick(self)
|
MediaManagerItem.onPreviewClick(self)
|
||||||
|
@ -54,7 +54,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.PreviewFunction = self.video_get_preview
|
self.PreviewFunction = self.video_get_preview
|
||||||
MediaManagerItem.__init__(self, parent, icon, title)
|
MediaManagerItem.__init__(self, parent, icon, title)
|
||||||
self.ServiceItemIconName = u':/media/media_video.png'
|
self.ServiceItemIconName = u':/media/media_video.png'
|
||||||
self.MainDisplay = self.parent.live_controller.parent.mainDisplay
|
self.MainDisplay = self.parent.mainDisplay
|
||||||
|
|
||||||
def initPluginNameVisible(self):
|
def initPluginNameVisible(self):
|
||||||
self.PluginNameVisible = self.trUtf8('Media')
|
self.PluginNameVisible = self.trUtf8('Media')
|
||||||
|
Loading…
Reference in New Issue
Block a user