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
diff --git a/debian/changelog b/debian/changelog
index 836d006..61001cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1update-notifier (3.192.51) UNRELEASED; urgency=medium
2
3 * src/ubuntu-advantage.c:
4 - set a default action to the ubuntu pro notification since just
5 dismissing on click can be confusing (lp: #1960453)
6
7 -- Sebastien Bacher <seb128@ubuntu.com> Wed, 23 Feb 2022 09:43:23 +0100
8
1update-notifier (3.192.50) jammy; urgency=medium9update-notifier (3.192.50) jammy; urgency=medium
210
3 [ Olivier Gayot ]11 [ Olivier Gayot ]
diff --git a/src/ubuntu-advantage.c b/src/ubuntu-advantage.c
index c84a43b..c233701 100644
--- a/src/ubuntu-advantage.c
+++ b/src/ubuntu-advantage.c
@@ -57,7 +57,7 @@ notify_action_cb (NotifyNotification *notification,
57 // User doesn't want to be notified again.57 // User doesn't want to be notified again.
58 g_autoptr(GSettings) settings = g_settings_new (SETTINGS_SCHEMA);58 g_autoptr(GSettings) settings = g_settings_new (SETTINGS_SCHEMA);
59 g_settings_set_boolean (settings, SETTINGS_KEY_NOTIFY_UBUNTU_ADVANTAGE_AVAILABLE, FALSE);59 g_settings_set_boolean (settings, SETTINGS_KEY_NOTIFY_UBUNTU_ADVANTAGE_AVAILABLE, FALSE);
60 } else if (g_strcmp0 (action, "enable") == 0) {60 } else if (g_strcmp0 (action, "enable") == 0 || g_strcmp0 (action, "default") == 0 ) {
61 // Open software properties61 // Open software properties
62 g_autoptr(GDesktopAppInfo) info = NULL;62 g_autoptr(GDesktopAppInfo) info = NULL;
63 g_autoptr(GdkAppLaunchContext) context = NULL;63 g_autoptr(GdkAppLaunchContext) context = NULL;
@@ -92,6 +92,8 @@ show_offer_notification (void)
92 notify_action_cb, NULL, NULL);92 notify_action_cb, NULL, NULL);
93 notify_notification_add_action (n, "enable", _("Enable Ubuntu Pro"),93 notify_notification_add_action (n, "enable", _("Enable Ubuntu Pro"),
94 notify_action_cb, NULL, NULL);94 notify_action_cb, NULL, NULL);
95 notify_notification_add_action (n, "default", _("Enable Ubuntu Pro"),
96 notify_action_cb, NULL, NULL);
9597
96 g_signal_connect (n, "closed", G_CALLBACK (gtk_main_quit), NULL);98 g_signal_connect (n, "closed", G_CALLBACK (gtk_main_quit), NULL);
9799

Subscribers

People subscribed via source and target branches