network: cleanup: Avoid toggling button twice
After checking the method property of the connection settings we set the disabled toggle button twice. One is enough.
This commit is contained in:
parent
65d3b71d98
commit
5bcbe07299
2 changed files with 0 additions and 6 deletions
|
@ -509,7 +509,6 @@ static void
|
|||
connect_ip4_page (CEPageIP4 *self)
|
||||
{
|
||||
const gchar *str_method;
|
||||
gboolean disabled;
|
||||
guint method;
|
||||
|
||||
add_address_box (self);
|
||||
|
@ -517,8 +516,6 @@ connect_ip4_page (CEPageIP4 *self)
|
|||
add_routes_box (self);
|
||||
|
||||
str_method = nm_setting_ip_config_get_method (self->setting);
|
||||
disabled = g_strcmp0 (str_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->disabled_radio), disabled);
|
||||
g_signal_connect_swapped (self->disabled_radio, "notify::active", G_CALLBACK (ce_page_changed), self);
|
||||
g_object_bind_property (self->disabled_radio, "active",
|
||||
self->content_box, "sensitive",
|
||||
|
|
|
@ -470,7 +470,6 @@ static void
|
|||
connect_ip6_page (CEPageIP6 *self)
|
||||
{
|
||||
const gchar *str_method;
|
||||
gboolean disabled;
|
||||
guint method;
|
||||
|
||||
add_address_box (self);
|
||||
|
@ -478,8 +477,6 @@ connect_ip6_page (CEPageIP6 *self)
|
|||
add_routes_box (self);
|
||||
|
||||
str_method = nm_setting_ip_config_get_method (self->setting);
|
||||
disabled = g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->disabled_radio), disabled);
|
||||
g_signal_connect_swapped (self->disabled_radio, "notify::active", G_CALLBACK (ce_page_changed), self);
|
||||
g_object_bind_property (self->disabled_radio, "active",
|
||||
self->content_box, "sensitive",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue