Merge lp:~macslow/unity-notifications/combo-button-support into lp:unity-notifications

Proposed by Mirco Müller
Status: Merged
Approved by: Michał Sawicz
Approved revision: 210
Merged at revision: 211
Proposed branch: lp:~macslow/unity-notifications/combo-button-support
Merge into: lp:unity-notifications
Diff against target: 172 lines (+53/-21) (has conflicts)
4 files modified
debian/changelog (+11/-0)
examples/sd-example-incoming-call-canceled.py (+17/-10)
examples/sd-example-incoming-call.py (+24/-10)
src/NotificationServer.cpp (+1/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~macslow/unity-notifications/combo-button-support
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+221506@code.launchpad.net

Commit message

Updated calling snap-decision examples to show off new combo-button support in notifications frontend (unity8). Updated the incoming-call example to use 7 actions to be inline with design-requirements.

Description of the change

Updated calling snap-decision examples to show off new combo-button support in notifications frontend (unity8). Updated the incoming-call example to use 7 actions to be inline with design-requirements.

- Are there any related MPs required for this MP to build/function as expected?
No

- Did you perform an exploratory manual test run of your code change and any related functionality?
Yes, but only on desktop not yet on the device/phone since cross-compiling currently doesn't work for me (Malta-sprint)

- Did you make sure that your branch does not contain spurious tags?
Yes

- If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Yes

- If you changed the UI, has there been a design review?
not applicable

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

This looks fine, we just need a changelog bump so that autopilot tests in the unity8 counterpart can depend on this change.

review: Needs Fixing
210. By Mirco Müller

Bumped version to indicate the updated maximum number of supported actions.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yup.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-06-02 10:58:29 +0000
3+++ debian/changelog 2014-06-16 14:26:40 +0000
4@@ -1,3 +1,4 @@
5+<<<<<<< TREE
6 unity-notifications (0.1.1+14.10.20140602-0ubuntu1) utopic; urgency=low
7
8 [ Mirco Müller ]
9@@ -6,6 +7,16 @@
10
11 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 02 Jun 2014 10:58:29 +0000
12
13+=======
14+unity-notifications (0.1.2-0ubuntu1) UNRELEASED; urgency=low
15+
16+ [ Mirco Müller ]
17+ * Changed maximum number of allowed actions to be 7. Updated related examples accordingly.
18+ * Bump version to indicate support for maximum of 7 actions.
19+
20+ -- Mirco Müller <mirco.mueller@ubuntu.com> Mon, 16 Jun 2014 15:59:37 +0200
21+
22+>>>>>>> MERGE-SOURCE
23 unity-notifications (0.1.1+14.10.20140514.1-0ubuntu1) utopic; urgency=low
24
25 [ Antti Kaijanmäki ]
26
27=== modified file 'examples/sd-example-incoming-call-canceled.py'
28--- examples/sd-example-incoming-call-canceled.py 2013-12-02 17:18:13 +0000
29+++ examples/sd-example-incoming-call-canceled.py 2014-06-16 14:26:40 +0000
30@@ -45,27 +45,33 @@
31
32 def action_decline_2 (notification, action):
33 if action == "action_decline_2":
34- print "\"Dude, my wife is here!\""
35+ print "Reject with SMS"
36 else:
37 print "That should not have happened (action_decline_2)!"
38
39 def action_decline_3 (notification, action):
40 if action == "action_decline_3":
41- print "\"I'm sleeping.\""
42+ print "Dude, my wife is here!"
43 else:
44 print "That should not have happened (action_decline_3)!"
45
46 def action_decline_4 (notification, action):
47 if action == "action_decline_4":
48- print "\"No time... I'm riding!\""
49+ print "I'm sleeping."
50 else:
51 print "That should not have happened (action_decline_4)!"
52
53 def action_decline_5 (notification, action):
54 if action == "action_decline_5":
55+ print "No time... I'm riding!"
56+ else:
57+ print "That should not have happened (action_decline_5)!"
58+
59+def action_decline_6 (notification, action):
60+ if action == "action_decline_6":
61 print "Send SMS..."
62 else:
63- print "That should not have happened (action_decline_5)!"
64+ print "That should not have happened (action_decline_6)!"
65
66 def action_accept (notification, action):
67 if action == "action_accept":
68@@ -78,12 +84,13 @@
69
70 # NOTE: the order in which actions are added is important... positive
71 # always comes first!
72- n.add_action ("action_accept", "Pick up", action_accept);
73- n.add_action ("action_decline_1", "Hang up", action_decline_1);
74- #n.add_action ("action_decline_2", "\"Dude, my wife is here!\"", action_decline_2);
75- #n.add_action ("action_decline_3", "\"I'm sleeping.\"", action_decline_3);
76- #n.add_action ("action_decline_4", "\"No time... I'm riding!\"", action_decline_4);
77- #n.add_action ("action_decline_5", "Send SMS...", action_decline_5);
78+ n.add_action ("action_accept", "Pick up", action_accept);
79+ n.add_action ("action_decline_1", "Hang up", action_decline_1);
80+ n.add_action ("action_decline_2", "Reject with SMS", action_decline_2);
81+ n.add_action ("action_decline_3", "messages:Dude, my wife is here!", action_decline_3);
82+ n.add_action ("action_decline_4", "messages:I'm sleeping.", action_decline_4);
83+ n.add_action ("action_decline_5", "messages:No time... I'm riding!", action_decline_5);
84+ n.add_action ("action_decline_6", "edit:Send SMS...", action_decline_6);
85
86 # indicate to the notification-daemon, that we want to use snap-decisions
87 n.set_hint_string ("x-canonical-snap-decisions", "true");
88
89=== modified file 'examples/sd-example-incoming-call.py'
90--- examples/sd-example-incoming-call.py 2013-12-02 17:18:13 +0000
91+++ examples/sd-example-incoming-call.py 2014-06-16 14:26:40 +0000
92@@ -39,31 +39,43 @@
93
94 def action_decline_1 (notification, action):
95 if action == "action_decline_1":
96- print "Decline"
97+ print "End + Answer"
98 else:
99 print "That should not have happened (action_decline_1)!"
100
101 def action_decline_2 (notification, action):
102 if action == "action_decline_2":
103- print "\"Can't talk now, what's up?\""
104+ print "Decline"
105 else:
106 print "That should not have happened (action_decline_2)!"
107
108 def action_decline_3 (notification, action):
109 if action == "action_decline_3":
110- print "\"I call you back.\""
111+ print "I missed your call - can you call me now?"
112 else:
113 print "That should not have happened (action_decline_3)!"
114
115 def action_decline_4 (notification, action):
116 if action == "action_decline_4":
117- print "Send custom message..."
118+ print "I'm running late. I'm on my way."
119 else:
120 print "That should not have happened (action_decline_4)!"
121
122+def action_decline_5 (notification, action):
123+ if action == "action_decline_5":
124+ print "I'm busy at the moment. I'll call later."
125+ else:
126+ print "That should not have happened (action_decline_5)!"
127+
128+def action_decline_6 (notification, action):
129+ if action == "action_decline_6":
130+ print "Custom"
131+ else:
132+ print "That should not have happened (action_decline_6)!"
133+
134 def action_accept (notification, action):
135 if action == "action_accept":
136- print "Accepting call"
137+ print "Hold + Answer"
138 else:
139 print "That should not have happened (action_accept)!"
140
141@@ -72,11 +84,13 @@
142
143 # NOTE: the order in which actions are added is important... positive
144 # always comes first!
145- n.add_action ("action_accept", "Accept", action_accept);
146- n.add_action ("action_decline_1", "Decline", action_decline_1);
147- n.add_action ("action_decline_2", "\"Can't talk now, what's up?\"", action_decline_2);
148- n.add_action ("action_decline_3", "\"I call you back.\"", action_decline_3);
149- n.add_action ("action_decline_4", "Send custom message...", action_decline_4);
150+ n.add_action ("action_accept", "Hold + Answer", action_accept);
151+ n.add_action ("action_decline_1", "End + Answer", action_decline_1);
152+ n.add_action ("action_decline_2", "Decline", action_decline_2);
153+ n.add_action ("action_decline_3", "messages:I missed your call - can you call me now?", action_decline_3);
154+ n.add_action ("action_decline_4", "messages:I'm running late. I'm on my way.", action_decline_4);
155+ n.add_action ("action_decline_5", "messages:I'm busy at the moment. I'll call later.", action_decline_5);
156+ n.add_action ("action_decline_6", "edit:Custom", action_decline_6);
157
158 # indicate to the notification-daemon, that we want to use snap-decisions
159 n.set_hint_string ("x-canonical-snap-decisions", "true");
160
161=== modified file 'src/NotificationServer.cpp'
162--- src/NotificationServer.cpp 2014-06-02 10:58:21 +0000
163+++ src/NotificationServer.cpp 2014-06-16 14:26:40 +0000
164@@ -104,7 +104,7 @@
165 const QStringList &actions, const Hints &hints, int expire_timeout) {
166 const unsigned int FAILURE = 0; // Is this correct?
167 const int minActions = 4;
168- const int maxActions = 12;
169+ const int maxActions = 14;
170 //QImage icon(app_icon);
171 int currentId = idCounter;
172 QSharedPointer<Notification> notification;

Subscribers

People subscribed via source and target branches

to all changes: