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.
This commit is contained in:
Felix Riemann 2020-06-20 23:52:19 +02:00 committed by Robert Ancell
parent b05dee06ec
commit cd3fa0195b
2 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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);