summaryrefslogtreecommitdiff
path: root/debian/patches/Force-online-state-with-unmanaged-devices.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/Force-online-state-with-unmanaged-devices.patch')
-rw-r--r--debian/patches/Force-online-state-with-unmanaged-devices.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch
new file mode 100644
index 00000000..a7eeb213
--- /dev/null
+++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch
@@ -0,0 +1,30 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Tue, 18 Mar 2014 10:49:13 +0100
+Subject: 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
+---
+ src/applet.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/applet.c b/src/applet.c
+index 72ac5c9..b5fe9cd 100644
+--- a/src/applet.c
++++ b/src/applet.c
+@@ -2610,6 +2610,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;
+ }
+