[gnome-control-center] network: Fix connection editor blanking when removing manual entry



commit cd3fa0195bf9c9160a98c4886005371ab156cd3c
Author: Felix Riemann <friemann gnome org>
Date:   Sat Jun 20 23:52:19 2020 +0200

    network: Fix connection editor blanking when removing manual entry
    
    To delete a manual entry row (IP addresses or routes) the remove_row
    function started walking the widget hierarchy at the connection editor
    widget. This caused the entire dialog box getting removed. Begin at the
    GtkButton instead to actually remove the corresponding line.
    
    Fixes #972.

 panels/network/connection-editor/ce-page-ip4.c | 4 ++--
 panels/network/connection-editor/ce-page-ip6.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index a5e3630234..852fc3c0eb 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -152,13 +152,13 @@ update_row_gateway_sensitivity (CEPageIP4 *self)
 }
 
 static void
-remove_row (CEPageIP4 *self)
+remove_row (CEPageIP4 *self, GtkButton *button)
 {
         GtkWidget *list;
         GtkWidget *row;
         GtkWidget *row_box;
 
-        row_box = gtk_widget_get_parent (GTK_WIDGET (self));
+        row_box = gtk_widget_get_parent (GTK_WIDGET (button));
         row = gtk_widget_get_parent (row_box);
         list = gtk_widget_get_parent (row);
 
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index fb39faaa52..a86cd89ffb 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -135,13 +135,13 @@ update_row_sensitivity (CEPageIP6 *self, GtkWidget *list)
 }
 
 static void
-remove_row (CEPageIP6 *self)
+remove_row (CEPageIP6 *self, GtkButton *button)
 {
         GtkWidget *row;
         GtkWidget *row_box;
         GtkWidget *list;
 
-        row_box = gtk_widget_get_parent (GTK_WIDGET (self));
+        row_box = gtk_widget_get_parent (GTK_WIDGET (button));
         row = gtk_widget_get_parent (row_box);
         list = gtk_widget_get_parent (row);
 


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