summaryrefslogtreecommitdiff
path: root/netspeed
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-04 03:18:38 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2021-01-06 19:23:48 +0100
commitabb00f11a4b8cda9e3dc9c34c6cd61fea725a45c (patch)
treed9150429aeb91d17a847c5701b99e6b8eb51ffcd /netspeed
parent9cd9c97faf065067c0c2a32695fa7123b9330a1a (diff)
downloadmate-applets-abb00f11a4b8cda9e3dc9c34c6cd61fea725a45c.tar.bz2
mate-applets-abb00f11a4b8cda9e3dc9c34c6cd61fea725a45c.tar.xz
netspeed: allow to select an interface which is down
Diffstat (limited to 'netspeed')
-rw-r--r--netspeed/src/netspeed.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index 2235542f..d1231a63 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -1563,11 +1563,14 @@ device_settings_changed (GSettings *settings,
const gchar *key,
NetspeedApplet *netspeed)
{
- char *davice;
+ char *device;
+ DevInfo *info;
- davice = g_settings_get_string (settings, key);
- set_applet_devinfo (netspeed, davice);
- g_free (davice);
+ device = g_settings_get_string (settings, key);
+ free_device_info (netspeed->devinfo);
+ get_device_info (device, &netspeed->devinfo);
+ netspeed->device_has_changed = TRUE;
+ g_free (device);
}
/* The "main" function of the applet