Force online state with unmanaged devices

If NM has an active unmanaged device it will forcefully set the online
state to CONNECTED_GLOBAL. In that case show a wired connection icon
instead of an offline icon.

Closes: #471191

Gbp-Pq: Name Force-online-state-with-unmanaged-devices.patch
This commit is contained in:
Michael Biebl 2014-03-18 10:49:13 +01:00 committed by openKylinBot
parent a497c42bbb
commit 1bd3b79aaf
1 changed files with 6 additions and 0 deletions

View File

@ -2679,6 +2679,12 @@ applet_update_icon (gpointer user_data)
applet_get_device_icon_for_state (applet, &pixbuf, &icon_name_free, &dev_tip_free);
icon_name = icon_name_free;
dev_tip = dev_tip_free;
if (!pixbuf && ( state == NM_STATE_CONNECTED_LOCAL
|| state == NM_STATE_CONNECTED_SITE
|| state == NM_STATE_CONNECTED_GLOBAL)) {
icon_name = g_strdup ("nm-device-wired");
pixbuf = g_object_ref (nma_icon_check_and_load (icon_name, applet));
}
break;
}