Merge lp:~azzar1/update-notifier/hide-livepatch-indicator-if-disabled into lp:update-notifier

Proposed by Andrea Azzarone on 2019-04-26
Status: Merged
Approved by: Sebastien Bacher on 2019-05-10
Approved revision: 967
Merged at revision: 970
Proposed branch: lp:~azzar1/update-notifier/hide-livepatch-indicator-if-disabled
Merge into: lp:update-notifier
Diff against target: 38 lines (+3/-13)
2 files modified
pixmaps/scalable/livepatch-off.svg (+0/-1)
src/livepatch-tray.c (+3/-12)
To merge this branch: bzr merge lp:~azzar1/update-notifier/hide-livepatch-indicator-if-disabled
Reviewer Review Type Date Requested Status
Sebastien Bacher 2019-04-26 Approve on 2019-05-10
Review via email: mp+366569@code.launchpad.net

Commit message

* pixmaps/scalable/livepatch-off.svg:
   - Remove as no longer needed.
* src/livepatch-tray.c:
   - Don't show the Livepatch indicator if livepatch is disabled.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'pixmaps/scalable/livepatch-off.svg'
2--- pixmaps/scalable/livepatch-off.svg 2019-03-13 10:05:20 +0000
3+++ pixmaps/scalable/livepatch-off.svg 1970-01-01 00:00:00 +0000
4@@ -1,1 +0,0 @@
5-<svg id="Livepatch-_off" data-name="Livepatch- off" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><defs><style>.cls-1{fill:none;}.cls-2{fill:#ccc;}.cls-3{fill:#df382c;}.cls-4{fill:#fff;}</style></defs><title>Artboard 1</title><g id="layer1"><rect id="rect4782" class="cls-1" y="0.13" width="19" height="19"/><path id="path4210" class="cls-2" d="M9.5.52S7.56,3.77,2.38,3.77c0,11.06,7.12,15,7.12,15s7.13-3.9,7.13-15C11.46,3.77,9.5.52,9.5.52Z"/></g><circle class="cls-3" cx="13.56" cy="11.99" r="4.4"/><path id="path4179" class="cls-4" d="M11.86,9.76l-.4.4,1.68,1.68-1.68,1.68.4.4,1.68-1.68,1.68,1.68.4-.4L14,11.84l1.67-1.68-.4-.4-1.68,1.67Z"/></svg>
6\ No newline at end of file
7
8=== modified file 'src/livepatch-tray.c'
9--- src/livepatch-tray.c 2019-03-15 16:48:29 +0000
10+++ src/livepatch-tray.c 2019-04-26 13:35:53 +0000
11@@ -102,7 +102,9 @@
12 show_status_icon = g_settings_get_boolean(ta->un->settings,
13 SETTINGS_KEY_SHOW_LIVEPATCH_ICON);
14
15- if (!show_status_icon || !livepatch_is_supported())
16+ if (!show_status_icon ||
17+ !livepatch_is_supported() ||
18+ !livepatch_is_running ())
19 {
20 tray_applet_ui_set_visible(ta, FALSE);
21
22@@ -112,17 +114,6 @@
23
24 tray_applet_ui_set_visible(ta, TRUE);
25
26- if (!livepatch_is_running())
27- {
28- tray_applet_ui_set_icon(ta, "livepatch-off");
29- gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),
30- _("Livepatch is off"));
31- gtk_widget_set_visible(priv->menuitem_desc, FALSE);
32-
33- priv->timeout_id = 0;
34- return G_SOURCE_REMOVE;
35- }
36-
37 gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),
38 _("Livepatch is on"));
39

Subscribers

People subscribed via source and target branches

to all changes: