openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #02345
[Merge] lp:~raoul-snyman/openlp/alerts-fixes into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/alerts-fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Couple of bug fixes in the Alerts plugin.
--
https://code.launchpad.net/~raoul-snyman/openlp/alerts-fixes/+merge/29306
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/alerts-fixes into lp:openlp.
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-07-05 16:00:48 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-07-06 15:32:32 +0000
@@ -35,7 +35,7 @@
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 @@
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',
@@ -102,4 +102,5 @@
about_text = translate('AlertsPlugin',
'<b>Alerts Plugin</b><br>This plugin '
'controls the displaying of alerts on the presentations screen')
- return about_text
\ No newline at end of file
+ return about_text
+
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py 2010-06-28 13:38:29 +0000
+++ openlp/plugins/alerts/forms/alertform.py 2010-07-06 15:32:32 +0000
@@ -88,13 +88,14 @@
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())
=== modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
--- openlp/plugins/alerts/lib/alertsmanager.py 2010-07-01 12:56:02 +0000
+++ openlp/plugins/alerts/lib/alertsmanager.py 2010-07-06 15:32:32 +0000
@@ -95,7 +95,7 @@
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 @@
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()
+
Follow ups