network: Remove logic checking visibility of always visibile widget
This commit is contained in:
parent
ba80822797
commit
fbaa9cb607
1 changed files with 3 additions and 5 deletions
|
@ -614,8 +614,7 @@ ui_to_setting (CEPageIP4 *self)
|
|||
text_address = gtk_entry_get_text (entry);
|
||||
text_netmask = gtk_entry_get_text (GTK_ENTRY (g_object_get_data (G_OBJECT (row), "network")));
|
||||
gateway_entry = g_object_get_data (G_OBJECT (row), "gateway");
|
||||
if (gtk_widget_is_visible (GTK_WIDGET (gateway_entry)))
|
||||
text_gateway = gtk_entry_get_text (gateway_entry);
|
||||
text_gateway = gtk_entry_get_text (gateway_entry);
|
||||
|
||||
if (!*text_address && !*text_netmask && !*text_gateway) {
|
||||
/* ignore empty rows */
|
||||
|
@ -639,14 +638,13 @@ ui_to_setting (CEPageIP4 *self)
|
|||
widget_unset_error (g_object_get_data (G_OBJECT (row), "network"));
|
||||
}
|
||||
|
||||
if (gtk_widget_is_visible (GTK_WIDGET (gateway_entry)) &&
|
||||
*text_gateway &&
|
||||
if (*text_gateway &&
|
||||
!nm_utils_ipaddr_valid (AF_INET, text_gateway)) {
|
||||
widget_set_error (g_object_get_data (G_OBJECT (row), "gateway"));
|
||||
ret = FALSE;
|
||||
} else {
|
||||
widget_unset_error (GTK_WIDGET (gateway_entry));
|
||||
if (gtk_widget_is_visible (GTK_WIDGET (gateway_entry)) && *text_gateway) {
|
||||
if (*text_gateway) {
|
||||
g_assert (default_gateway == NULL);
|
||||
default_gateway = text_gateway;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue