[gnome-control-center] network: Get the correct widget holding the "connection" object data



commit 16502937198a2cc67e003b6176de95387ea175fb
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Sep 30 14:52:44 2013 +0200

    network: Get the correct widget holding the "connection" object data
    
    The check button isn't a direct child of the GtkListBoxRow instance
    that contains the "connection" object data so we are adding the wrong
    widget to the "rows" list which then gives us a NULL for "connection"
    in really_forget() and making us fail to remove the connection.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709091

 panels/network/net-device-wifi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 15e9ea4..15ab302 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1415,7 +1415,7 @@ check_toggled (GtkToggleButton *check, GtkWidget *forget)
         GtkWidget *row;
         GList *rows;
 
-        row = gtk_widget_get_parent (GTK_WIDGET (check));
+        row = gtk_widget_get_ancestor (GTK_WIDGET (check), GTK_TYPE_LIST_BOX_ROW);
         active = gtk_toggle_button_get_active (check);
         rows = g_object_steal_data (G_OBJECT (forget), "rows");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]