← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/alert_fixes into lp:openlp

 

phill has proposed merging lp:~phill-ridout/openlp/alert_fixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1065149 in OpenLP: "Clicking new or save disables buttons to display alert"
  https://bugs.launchpad.net/openlp/+bug/1065149
  Bug #1065216 in OpenLP: "Alert display - Text dissapers of the edge of the screen"
  https://bugs.launchpad.net/openlp/+bug/1065216

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/alert_fixes/+merge/129059

Fixes: 1065216 Alert display - Text dissapers of the edge of the screen
Fixes: 1065149 Clicking new or save disables buttons to display alert

Long words now wrap rather than dissapearing off of the edge.
When creating a new item or editing one, the text is left in the text box, the item in the list stays selected and the display buttons enabled so the user does not have to find and click on the alert they just created.
-- 
https://code.launchpad.net/~phill-ridout/openlp/alert_fixes/+merge/129059
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/alert_fixes into lp:openlp.
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py	2012-06-22 14:14:53 +0000
+++ openlp/plugins/alerts/alertsplugin.py	2012-10-10 22:05:25 +0000
@@ -105,6 +105,7 @@
         font-size: %spt;
         color: %s;
         background-color: %s;
+        word-wrap: break-word;
     }
 """
 

=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py	2012-06-22 14:14:53 +0000
+++ openlp/plugins/alerts/forms/alertform.py	2012-10-10 22:05:25 +0000
@@ -80,6 +80,10 @@
             item_name = QtGui.QListWidgetItem(alert.text)
             item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
             self.alertListWidget.addItem(item_name)
+            if alert.text == unicode(self.alertTextEdit.text()):
+                self.item_id = alert.id
+                self.alertListWidget.setCurrentRow(
+                    self.alertListWidget.row(item_name))
 
     def onDisplayClicked(self):
         self.triggerAlert(unicode(self.alertTextEdit.text()))
@@ -112,7 +116,6 @@
             alert = AlertItem()
             alert.text = unicode(self.alertTextEdit.text())
             self.manager.save_object(alert)
-        self.alertTextEdit.setText(u'')
         self.loadList()
 
     def onSaveClick(self):
@@ -125,6 +128,7 @@
             self.manager.save_object(alert)
             self.item_id = None
             self.loadList()
+        self.saveButton.setEnabled(False)
 
     def onTextChanged(self):
         """


Follow ups