network: Add tooltip text to encrypted connection.

The issue was that sometimes the icon would show an error but we would not know what it is.

Fixes #468
This commit is contained in:
Veerasamy Sevagen 2019-09-11 03:20:55 +00:00 committed by Robert Ancell
parent d28d317332
commit 9316a77af4

View file

@ -244,9 +244,25 @@ update_ui (CcWifiConnectionRow *self)
gtk_widget_set_child_visible (GTK_WIDGET (self->encrypted_icon), TRUE);
if (security == NM_AP_SEC_WEP)
{
icon_name = "channel-insecure-symbolic";
else
gtk_widget_set_tooltip_text (GTK_WIDGET (self->encrypted_icon), _("Insecure network (WEP)"));
}
else if (security == NM_AP_SEC_WPA)
{
icon_name = "network-wireless-encrypted-symbolic";
gtk_widget_set_tooltip_text (GTK_WIDGET (self->encrypted_icon), _("Secure network (WPA)"));
}
else if (security == NM_AP_SEC_WPA2)
{
icon_name = "network-wireless-encrypted-symbolic";
gtk_widget_set_tooltip_text (GTK_WIDGET (self->encrypted_icon), _("Secure network (WPA2)"));
}
else
{
icon_name = "network-wireless-encrypted-symbolic";
gtk_widget_set_tooltip_text (GTK_WIDGET (self->encrypted_icon), _("Secure network"));
}
g_object_set (self->encrypted_icon, "icon-name", icon_name, NULL);
}