Merge lp:~michael-sheldon/content-hub/download-manager-with-snapdecision-unity8 into lp:~ken-vandine/content-hub/download-manager-with-snapdecision

Proposed by Michael Sheldon
Status: Merged
Merged at revision: 88
Proposed branch: lp:~michael-sheldon/content-hub/download-manager-with-snapdecision-unity8
Merge into: lp:~ken-vandine/content-hub/download-manager-with-snapdecision
Diff against target: 53 lines (+22/-2)
1 file modified
src/com/ubuntu/content/detail/service.cpp (+22/-2)
To merge this branch: bzr merge lp:~michael-sheldon/content-hub/download-manager-with-snapdecision-unity8
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+214506@code.launchpad.net

Commit message

Make snap decision compatible with unity8

Description of the change

Unity8 no longer displays snap decisions with only one button (by design: bug #1301685), and also doesn't display decisions with NULL text, this branch adds a "Dismiss" option and makes a few small styling changes (highlights the "Open" button and displays the "Save" icon).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/com/ubuntu/content/detail/service.cpp'
2--- src/com/ubuntu/content/detail/service.cpp 2014-04-03 19:13:47 +0000
3+++ src/com/ubuntu/content/detail/service.cpp 2014-04-07 10:21:52 +0000
4@@ -184,6 +184,14 @@
5 && st != cuc::Transfer::aborted);
6 }
7
8+void action_dismiss(NotifyNotification *notification, char *action, gpointer data)
9+{
10+ TRACE() << Q_FUNC_INFO;
11+ Q_UNUSED(notification);
12+ Q_UNUSED(action);
13+ Q_UNUSED(data);
14+}
15+
16 void action_accept(NotifyNotification *notification, char *action, gpointer data)
17 {
18 TRACE() << Q_FUNC_INFO;
19@@ -201,13 +209,18 @@
20 NotifyNotification* notification;
21
22 notification = notify_notification_new ("Download Complete",
23- NULL,
24- NULL);
25+ "",
26+ "save");
27+
28 notify_notification_set_hint_string(notification,
29 "x-canonical-snap-decisions",
30 "true");
31
32
33+ notify_notification_set_hint_string(notification,
34+ "x-canonical-private-button-tint",
35+ "true");
36+
37 notify_notification_add_action (notification,
38 "action_accept",
39 "Open",
40@@ -215,6 +228,13 @@
41 t,
42 NULL);
43
44+ notify_notification_add_action (notification,
45+ "action_dismiss",
46+ "Dismiss",
47+ action_dismiss,
48+ t,
49+ NULL);
50+
51 GError *error = NULL;
52 if (!notify_notification_show(notification, &error)) {
53 qWarning() << "Failed to show snap decision:" << error->message;

Subscribers

People subscribed via source and target branches

to all changes: