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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 967
Merged at revision: 970
Proposed branch: lp:~azzar1/update-notifier/hide-livepatch-indicator-if-disabled
Merge into: lp:update-notifier/ubuntu
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 Approve
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.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'pixmaps/scalable/livepatch-off.svg'
--- pixmaps/scalable/livepatch-off.svg 2019-03-13 10:05:20 +0000
+++ pixmaps/scalable/livepatch-off.svg 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1<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>
2\ No newline at end of file0\ No newline at end of file
31
=== modified file 'src/livepatch-tray.c'
--- src/livepatch-tray.c 2019-03-15 16:48:29 +0000
+++ src/livepatch-tray.c 2019-04-26 13:35:53 +0000
@@ -102,7 +102,9 @@
102 show_status_icon = g_settings_get_boolean(ta->un->settings,102 show_status_icon = g_settings_get_boolean(ta->un->settings,
103 SETTINGS_KEY_SHOW_LIVEPATCH_ICON);103 SETTINGS_KEY_SHOW_LIVEPATCH_ICON);
104104
105 if (!show_status_icon || !livepatch_is_supported())105 if (!show_status_icon ||
106 !livepatch_is_supported() ||
107 !livepatch_is_running ())
106 {108 {
107 tray_applet_ui_set_visible(ta, FALSE);109 tray_applet_ui_set_visible(ta, FALSE);
108110
@@ -112,17 +114,6 @@
112114
113 tray_applet_ui_set_visible(ta, TRUE);115 tray_applet_ui_set_visible(ta, TRUE);
114116
115 if (!livepatch_is_running())
116 {
117 tray_applet_ui_set_icon(ta, "livepatch-off");
118 gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),
119 _("Livepatch is off"));
120 gtk_widget_set_visible(priv->menuitem_desc, FALSE);
121
122 priv->timeout_id = 0;
123 return G_SOURCE_REMOVE;
124 }
125
126 gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),117 gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),
127 _("Livepatch is on"));118 _("Livepatch is on"));
128119

Subscribers

People subscribed via source and target branches

to all changes: