Merge ~seb128/update-notifier:ubuntu-pro-action into update-notifier:master

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: b57a2bb45a3cfc2844c0bd99b6e499b73ce6fe2a
Proposed branch: ~seb128/update-notifier:ubuntu-pro-action
Merge into: update-notifier:master
Diff against target: 37 lines (+11/-1)
2 files modified
debian/changelog (+8/-0)
src/ubuntu-advantage.c (+3/-1)
Reviewer Review Type Date Requested Status
Robert Ancell (community) Approve
Review via email: mp+415952@code.launchpad.net

Commit message

* src/ubuntu-advantage.c:
  - set a default action to the ubuntu pro notification since just
    dismissing on click can be confusing (lp: #1960453)

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Looks great, thanks seb128!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 836d006..61001cb 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+update-notifier (3.192.51) UNRELEASED; urgency=medium
7+
8+ * src/ubuntu-advantage.c:
9+ - set a default action to the ubuntu pro notification since just
10+ dismissing on click can be confusing (lp: #1960453)
11+
12+ -- Sebastien Bacher <seb128@ubuntu.com> Wed, 23 Feb 2022 09:43:23 +0100
13+
14 update-notifier (3.192.50) jammy; urgency=medium
15
16 [ Olivier Gayot ]
17diff --git a/src/ubuntu-advantage.c b/src/ubuntu-advantage.c
18index c84a43b..c233701 100644
19--- a/src/ubuntu-advantage.c
20+++ b/src/ubuntu-advantage.c
21@@ -57,7 +57,7 @@ notify_action_cb (NotifyNotification *notification,
22 // User doesn't want to be notified again.
23 g_autoptr(GSettings) settings = g_settings_new (SETTINGS_SCHEMA);
24 g_settings_set_boolean (settings, SETTINGS_KEY_NOTIFY_UBUNTU_ADVANTAGE_AVAILABLE, FALSE);
25- } else if (g_strcmp0 (action, "enable") == 0) {
26+ } else if (g_strcmp0 (action, "enable") == 0 || g_strcmp0 (action, "default") == 0 ) {
27 // Open software properties
28 g_autoptr(GDesktopAppInfo) info = NULL;
29 g_autoptr(GdkAppLaunchContext) context = NULL;
30@@ -92,6 +92,8 @@ show_offer_notification (void)
31 notify_action_cb, NULL, NULL);
32 notify_notification_add_action (n, "enable", _("Enable Ubuntu Pro"),
33 notify_action_cb, NULL, NULL);
34+ notify_notification_add_action (n, "default", _("Enable Ubuntu Pro"),
35+ notify_action_cb, NULL, NULL);
36
37 g_signal_connect (n, "closed", G_CALLBACK (gtk_main_quit), NULL);
38

Subscribers

People subscribed via source and target branches