Commit 44cf5060 authored by Tristan Matthews's avatar Tristan Matthews

* #9959: disable stun server entry instead of hiding it

This allows for more intuitive editing by the user.
parent f2762ba6
......@@ -500,8 +500,7 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
gtk_widget_set_sensitive(use_stun_check_box, FALSE);
gtk_widget_set_sensitive(same_as_local_radio_button, TRUE);
gtk_widget_set_sensitive(published_addr_radio_button, TRUE);
gtk_widget_hide(stun_server_label);
gtk_widget_hide(stun_server_entry);
gtk_widget_set_sensitive(stun_server_entry, FALSE);
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(same_as_local_radio_button))) {
gtk_widget_show(published_address_entry);
......@@ -518,6 +517,7 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
gtk_widget_set_sensitive(published_addr_radio_button, FALSE);
gtk_widget_show(stun_server_label);
gtk_widget_show(stun_server_entry);
gtk_widget_set_sensitive(stun_server_entry, TRUE);
gtk_widget_hide(published_address_entry);
gtk_widget_hide(published_port_spin_box);
gtk_widget_hide(published_address_label);
......@@ -525,8 +525,7 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
} else {
gtk_widget_set_sensitive(same_as_local_radio_button, TRUE);
gtk_widget_set_sensitive(published_addr_radio_button, TRUE);
gtk_widget_hide(stun_server_label);
gtk_widget_hide(stun_server_entry);
gtk_widget_set_sensitive(stun_server_entry, FALSE);
}
}
}
......@@ -604,6 +603,7 @@ static void use_stun_cb(GtkWidget *widget, gpointer data UNUSED)
DEBUG("Config: Showing stun options, hiding Local/Published info");
gtk_widget_show(stun_server_label);
gtk_widget_show(stun_server_entry);
gtk_widget_set_sensitive(stun_server_entry, TRUE);
gtk_widget_set_sensitive(same_as_local_radio_button, FALSE);
gtk_widget_set_sensitive(published_addr_radio_button, FALSE);
......@@ -612,9 +612,8 @@ static void use_stun_cb(GtkWidget *widget, gpointer data UNUSED)
gtk_widget_hide(published_address_entry);
gtk_widget_hide(published_port_spin_box);
} else {
DEBUG("Config: hiding stun options, showing Local/Published info");
gtk_widget_hide(stun_server_label);
gtk_widget_hide(stun_server_entry);
DEBUG("Config: disabling stun options, showing Local/Published info");
gtk_widget_set_sensitive(stun_server_entry, FALSE);
gtk_widget_set_sensitive(same_as_local_radio_button, TRUE);
gtk_widget_set_sensitive(published_addr_radio_button, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment