forked from openlp/openlp
Fix up some strings and come bugs in the alerts plugin.
bzr-revno: 920
This commit is contained in:
commit
08293786c7
@ -35,7 +35,7 @@ from openlp.plugins.alerts.forms import AlertForm
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class alertsPlugin(Plugin):
|
||||
class AlertsPlugin(Plugin):
|
||||
log.info(u'Alerts Plugin loaded')
|
||||
|
||||
def __init__(self, plugin_helpers):
|
||||
@ -88,7 +88,7 @@ class alertsPlugin(Plugin):
|
||||
Plugin.finalise(self)
|
||||
self.toolsAlertItem.setVisible(False)
|
||||
|
||||
def togglealertsState(self):
|
||||
def toggleAlertsState(self):
|
||||
self.alertsActive = not self.alertsActive
|
||||
QtCore.QSettings().setValue(
|
||||
self.settingsSection + u'/active',
|
||||
@ -103,3 +103,4 @@ class alertsPlugin(Plugin):
|
||||
'<b>Alerts Plugin</b><br>This plugin '
|
||||
'controls the displaying of alerts on the presentations screen')
|
||||
return about_text
|
||||
|
||||
|
@ -88,13 +88,14 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
self.AlertTextEdit.setText(u'')
|
||||
self.SaveButton.setEnabled(False)
|
||||
self.DeleteButton.setEnabled(False)
|
||||
self.EditButton.setEnabled(False)
|
||||
|
||||
def onNewClick(self):
|
||||
if len(self.AlertTextEdit.text()) == 0:
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('AlertsPlugin.AlertForm', 'Item selected to Add'),
|
||||
translate('AlertsPlugin.AlertForm', 'Missing data'))
|
||||
translate('AlertsPlugin.AlertForm', 'New Alert'),
|
||||
translate('AlertsPlugin.AlertForm', 'You haven\'t specified '
|
||||
'any text for your alert. Please type in some text before '
|
||||
'clicking New.'))
|
||||
else:
|
||||
alert = AlertItem()
|
||||
alert.text = unicode(self.AlertTextEdit.text())
|
||||
|
@ -95,7 +95,7 @@ class AlertsManager(QtCore.QObject):
|
||||
alertTab = self.parent.alertsTab
|
||||
text = HTMLCODE % (alertTab.font_color, alertTab.bg_color,
|
||||
alertTab.font_face, alertTab.font_size, text)
|
||||
self.parent.preview_controller.parent.displayManager.addAlert(text,
|
||||
self.parent.previewController.parent.displayManager.addAlert(text,
|
||||
alertTab.location)
|
||||
# check to see if we have a timer running
|
||||
if self.timer_id == 0:
|
||||
@ -112,8 +112,9 @@ class AlertsManager(QtCore.QObject):
|
||||
log.debug(u'timer event')
|
||||
alertTab = self.parent.alertsTab
|
||||
if event.timerId() == self.timer_id:
|
||||
self.parent.preview_controller.parent.displayManager.addAlert(u'',
|
||||
self.parent.previewController.parent.displayManager.addAlert(u'',
|
||||
alertTab.location)
|
||||
self.killTimer(self.timer_id)
|
||||
self.timer_id = 0
|
||||
self.generateAlert()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user