Merge lp:~larsu/indicator-network/use-standard-timeout into lp:indicator-network/14.10

Proposed by Lars Karlitski
Status: Rejected
Rejected by: Charles Kerr
Proposed branch: lp:~larsu/indicator-network/use-standard-timeout
Merge into: lp:indicator-network/14.10
Diff against target: 53 lines (+8/-2)
4 files modified
network/notify-cpp/notification.cpp (+6/-0)
network/notify-cpp/notification.h (+1/-0)
network/notify-cpp/snapdecision/sim-unlock.cpp (+1/-1)
secret-agent/SecretRequest.cpp (+0/-1)
To merge this branch: bzr merge lp:~larsu/indicator-network/use-standard-timeout
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+222217@code.launchpad.net

Commit message

Use standard timeout parameter for snap decisions

Description of the change

Use standard timeout parameter for snap decisions

This can go in after lp:~larsu/unity-notifications/revert-timeout lands.

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
Antti Kaijanmäki (kaijanmaki) wrote :

We already have a solution in place.

As per Mircos comment in bug #1295762 there was a technical design decision made with "x-canonical-snap-decisions-timeout". Unless there is a clear technical reason why that solution is wrong I'm not changing the implementation. Sorry.

review: Disapprove
Revision history for this message
Charles Kerr (charlesk) wrote :

Marking this as "Rejected" as per Antti's comment from 2014-06-10.

Unmerged revisions

343. By Lars Karlitski

Use standard timeout parameter for snap decisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'network/notify-cpp/notification.cpp'
2--- network/notify-cpp/notification.cpp 2014-03-25 23:22:16 +0000
3+++ network/notify-cpp/notification.cpp 2014-06-05 15:40:19 +0000
4@@ -104,6 +104,12 @@
5 }
6
7 void
8+Notification::setTimeout(int timeout)
9+{
10+ notify_notification_set_timeout(d->notification.get(), timeout);
11+}
12+
13+void
14 Notification::show()
15 {
16 GError *error = nullptr;
17
18=== modified file 'network/notify-cpp/notification.h'
19--- network/notify-cpp/notification.h 2014-05-12 11:36:59 +0000
20+++ network/notify-cpp/notification.h 2014-06-05 15:40:19 +0000
21@@ -54,6 +54,7 @@
22
23 void setHint(const std::string &key, Variant value);
24 void setHintString(const std::string &key, const std::string &value);
25+ void setTimeout(int timeout);
26
27 void show();
28 void close();
29
30=== modified file 'network/notify-cpp/snapdecision/sim-unlock.cpp'
31--- network/notify-cpp/snapdecision/sim-unlock.cpp 2014-05-27 07:44:18 +0000
32+++ network/notify-cpp/snapdecision/sim-unlock.cpp 2014-06-05 15:40:19 +0000
33@@ -132,7 +132,7 @@
34
35 m_notification = std::make_shared<notify::Notification>(title, body, "");
36 m_notification->setHintString("x-canonical-snap-decisions", "true");
37- m_notification->setHint("x-canonical-snap-decisions-timeout", TypedVariant<std::int32_t>(std::numeric_limits<std::int32_t>::max()));
38+ m_notification->setTimeout(0);
39 m_notification->setHint("x-canonical-private-menu-model", TypedVariant<std::map<std::string, Variant>>(modelPaths));
40 m_notification->closed().connect([this](){ m_closed(); });
41
42
43=== modified file 'secret-agent/SecretRequest.cpp'
44--- secret-agent/SecretRequest.cpp 2014-05-27 07:44:18 +0000
45+++ secret-agent/SecretRequest.cpp 2014-06-05 15:40:19 +0000
46@@ -40,7 +40,6 @@
47 QVariantMap notificationHints;
48 notificationHints["x-canonical-snap-decisions"] = "true";
49 notificationHints["x-canonical-private-button-tint"] = "true";
50- notificationHints["x-canonical-snap-decisions-timeout"] = std::numeric_limits<std::int32_t>::max();
51
52 QVariantMap menuModelActions;
53 menuModelActions["notifications"] = m_menu.actionPath();

Subscribers

People subscribed via source and target branches