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

Proposed by Phill
Status: Merged
Approved by: Raoul Snyman
Approved revision: 2082
Merged at revision: 2083
Proposed branch: lp:~phill-ridout/openlp/alert_fixes
Merge into: lp:openlp
Diff against target: 42 lines (+6/-1)
2 files modified
openlp/plugins/alerts/alertsplugin.py (+1/-0)
openlp/plugins/alerts/forms/alertform.py (+5/-1)
To merge this branch: bzr merge lp:~phill-ridout/openlp/alert_fixes
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Raoul Snyman Approve
Andreas Preikschat (community) Approve
Review via email: mp+129059@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

Approved.

But better have one proposal for one bug! ;)

review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/plugins/alerts/alertsplugin.py'
2--- openlp/plugins/alerts/alertsplugin.py 2012-06-22 14:14:53 +0000
3+++ openlp/plugins/alerts/alertsplugin.py 2012-10-10 22:05:25 +0000
4@@ -105,6 +105,7 @@
5 font-size: %spt;
6 color: %s;
7 background-color: %s;
8+ word-wrap: break-word;
9 }
10 """
11
12
13=== modified file 'openlp/plugins/alerts/forms/alertform.py'
14--- openlp/plugins/alerts/forms/alertform.py 2012-06-22 14:14:53 +0000
15+++ openlp/plugins/alerts/forms/alertform.py 2012-10-10 22:05:25 +0000
16@@ -80,6 +80,10 @@
17 item_name = QtGui.QListWidgetItem(alert.text)
18 item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
19 self.alertListWidget.addItem(item_name)
20+ if alert.text == unicode(self.alertTextEdit.text()):
21+ self.item_id = alert.id
22+ self.alertListWidget.setCurrentRow(
23+ self.alertListWidget.row(item_name))
24
25 def onDisplayClicked(self):
26 self.triggerAlert(unicode(self.alertTextEdit.text()))
27@@ -112,7 +116,6 @@
28 alert = AlertItem()
29 alert.text = unicode(self.alertTextEdit.text())
30 self.manager.save_object(alert)
31- self.alertTextEdit.setText(u'')
32 self.loadList()
33
34 def onSaveClick(self):
35@@ -125,6 +128,7 @@
36 self.manager.save_object(alert)
37 self.item_id = None
38 self.loadList()
39+ self.saveButton.setEnabled(False)
40
41 def onTextChanged(self):
42 """