[gnome-control-center/gnome-3-8] network: Destroy connection row widget when connection is removed
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] network: Destroy connection row widget when connection is removed
- Date: Tue, 1 Oct 2013 13:11:21 +0000 (UTC)
commit 7e2c0f80061812d0cd262ff7a64dcc95f6eddcfe
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Sep 30 16:45:25 2013 +0200
network: Destroy connection row widget when connection is removed
Otherwise all sorts of crashes may happen if it's interacted with.
https://bugzilla.gnome.org/show_bug.cgi?id=709104
panels/network/net-device-wifi.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 0f8469f..fc70e31 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1597,8 +1597,11 @@ make_row (GtkSizeGroup *rows,
gtk_widget_show_all (row);
g_object_set_data (G_OBJECT (row), "ap", ap);
- g_object_set_data (G_OBJECT (row), "connection", connection);
-
+ if (connection) {
+ g_object_set_data (G_OBJECT (row), "connection", connection);
+ g_signal_connect_object (connection, "removed",
+ G_CALLBACK (gtk_widget_destroy), row, G_CONNECT_SWAPPED);
+ }
g_object_set_data (G_OBJECT (row), "timestamp", GUINT_TO_POINTER (timestamp));
g_object_set_data (G_OBJECT (row), "active", GUINT_TO_POINTER (active));
g_object_set_data (G_OBJECT (row), "strength", GUINT_TO_POINTER (strength));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]