Merge ~seb128/update-notifier:requires-livepatch-desktop into update-notifier:master

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: 6ccf6044a62772b1e5fbf34d3ff845843a08d557
Proposed branch: ~seb128/update-notifier:requires-livepatch-desktop
Merge into: update-notifier:master
Diff against target: 18 lines (+7/-0)
1 file modified
src/ubuntu-advantage.c (+7/-0)
Reviewer Review Type Date Requested Status
Robert Ancell (community) Approve
Review via email: mp+416020@code.launchpad.net

Description of the change

The notification text isn't informative so there is little point displaying it if the action isn't working.

One question is the return value though but it feels like that should be a case where the helper did its job and that we decide there is no point displaying the notification so a success?

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

LGTM, thanks Seb!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/ubuntu-advantage.c b/src/ubuntu-advantage.c
2index c233701..d8510ae 100644
3--- a/src/ubuntu-advantage.c
4+++ b/src/ubuntu-advantage.c
5@@ -123,6 +123,13 @@ main (int argc, char **argv)
6 return EXIT_SUCCESS;
7 }
8
9+ // Don't display a notification if it has no use
10+ g_autoptr(GDesktopAppInfo) info = NULL;
11+ info = g_desktop_app_info_new (LIVEPATCH_DESKTOP_FILE);
12+ if (!info) {
13+ return EXIT_SUCCESS;
14+ }
15+
16 // Check if already attached.
17 gboolean attached;
18 if (!get_ubuntu_advantage_attached (&attached)) {

Subscribers

People subscribed via source and target branches