Merge lp:~nik90/ubuntu-clock-app/fix-alarm-label-behavior into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 53
Merged at revision: 51
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-alarm-label-behavior
Merge into: lp:ubuntu-clock-app
Diff against target: 52 lines (+28/-0)
2 files modified
app/alarm/AlarmLabel.qml (+20/-0)
debian/changelog (+8/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-alarm-label-behavior
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan Needs Fixing
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+230387@code.launchpad.net

Commit message

Improved alarm label behavior by not allowing empty alarm labels and also disabling predictive text.

Description of the change

This improves the alarm label behavior by not allowing empty strings and also by disabling predictive text.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Other than allowing lots of spaces as an alarm name, looks good.

review: Approve
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

To clarify, we discussed the "multiple spaces" on IRC. It's fine to allow spaces as the alarm name if the user wishes IMO.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I don't think we can allow an alarm label with multiple spaces since it results in http://imgur.com/aPGjPKn which looks weird. Also the alarm label is shown in the snap notification. It might break there as well.

review: Needs Fixing
50. By Nekhelesh Ramananthan

Fixed string containing only spaces which will now not be accepted anymore

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
51. By Nekhelesh Ramananthan

Merged trunk

52. By Nekhelesh Ramananthan

Updated changelog

53. By Nekhelesh Ramananthan

Updated versioning

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmLabel.qml'
2--- app/alarm/AlarmLabel.qml 2014-07-30 20:16:06 +0000
3+++ app/alarm/AlarmLabel.qml 2014-08-13 14:00:32 +0000
4@@ -48,12 +48,32 @@
5 objectName: "labelEntry"
6 text: alarm.message
7 width: parent.width
8+ inputMethodHints: Qt.ImhNoPredictiveText
9+
10+ onTextChanged: {
11+ backAction.enabled = false
12+
13+ // If string is empty, reject it immediately
14+ if(text === "") {
15+ backAction.enabled = false
16+ return
17+ }
18+
19+ // Check if strings contain only blank spaces. If yes reject.
20+ for (var i=0; i < text.length; i++) {
21+ if(text[i] !== " ") {
22+ backAction.enabled = true
23+ return
24+ }
25+ }
26+ }
27 }
28 }
29
30 tools: ToolbarItems {
31 back: Button {
32 action: Action {
33+ id: backAction
34 iconName: "back"
35 onTriggered: {
36 alarm.message = _labelEntry.text
37
38=== modified file 'debian/changelog'
39--- debian/changelog 2014-08-13 11:48:37 +0000
40+++ debian/changelog 2014-08-13 14:00:32 +0000
41@@ -1,3 +1,11 @@
42+ubuntu-clock-app (3.1) utopic; urgency=medium
43+
44+ [Nekhelesh Ramananthan]
45+ * Alarm name label no longer accepts predictive text and empty
46+ strings. (LP: #1355414)
47+
48+ -- Nekhelesh Ramananthan <krnekhelesh@gmail.com> Wed, 13 Aug 2014 15:46:12 +0200
49+
50 ubuntu-clock-app (3.0-0ubuntu1) utopic; urgency=medium
51
52 [ Daniel Holbach ]

Subscribers

People subscribed via source and target branches