~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/livepatch-tray.c

* Don't show the Livepatch indicator if livepatch is disabled.
* Remove livepatch-off.svg as no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
  show_status_icon = g_settings_get_boolean(ta->un->settings,
103
103
                                            SETTINGS_KEY_SHOW_LIVEPATCH_ICON);
104
104
 
105
 
  if (!show_status_icon || !livepatch_is_supported())
 
105
  if (!show_status_icon ||
 
106
      !livepatch_is_supported() || 
 
107
      !livepatch_is_running ())
106
108
    {
107
109
      tray_applet_ui_set_visible(ta, FALSE);
108
110
 
112
114
 
113
115
  tray_applet_ui_set_visible(ta, TRUE);
114
116
 
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
117
  gtk_menu_item_set_label(GTK_MENU_ITEM(priv->menuitem_enabled),
127
118
                          _("Livepatch is on"));
128
119