File: Force-online-state-with-unmanaged-devices.patch

package info (click to toggle)
network-manager-applet 1.36.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,512 kB
  • sloc: ansic: 34,599; sh: 5,052; makefile: 535; xml: 43; python: 17; sed: 16
file content (28 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/applet.c b/src/applet.c
index 24019e7..ca9e4ed 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2648,6 +2648,10 @@ 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_GLOBAL) {
+			icon_name = g_strdup ("nm-device-wired");
+			pixbuf = g_object_ref (nma_icon_check_and_load (icon_name, applet));
+		}
 		break;
 	}