[gnome-control-center/wip/networking2: 35/36] networking: Make wired device off switch work better
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/networking2: 35/36] networking: Make wired device off switch work better
- Date: Mon, 7 Jan 2013 05:17:09 +0000 (UTC)
commit e2656d06afe1855e903109918c3bc794c16f6660
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 7 00:10:30 2013 -0500
networking: Make wired device off switch work better
panels/network/net-device-ethernet.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index f809f6a..6455313 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -267,8 +267,6 @@ device_ethernet_refresh_ui (NetDeviceEthernet *device)
g_string_append_printf (status, " - %s", speed);
gtk_label_set_label (GTK_LABEL (widget), status->str);
g_string_free (status, TRUE);
- gtk_widget_set_tooltip_text (widget,
- panel_device_state_reason_to_localized_string (nm_device));
populate_ui (device);
}
@@ -538,6 +536,7 @@ device_off_toggled (GtkSwitch *sw,
NMClient *client;
NMDevice *nm_device;
NMConnection *connection;
+ NMActiveConnection *a;
if (device->updating_device)
return;
@@ -554,7 +553,10 @@ device_off_toggled (GtkSwitch *sw,
NULL, NULL, NULL);
}
} else {
- nm_device_disconnect (nm_device, NULL, NULL);
+ a = nm_device_get_active_connection (nm_device);
+ if (a) {
+ nm_client_deactivate_connection (client, a);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]