diff --git a/gtk/main.c b/gtk/main.c index b87c3f088..ad984c081 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1384,8 +1384,9 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call linphone_gtk_in_call_view_set_incoming(call); linphone_gtk_status_icon_set_blinking(TRUE); if (linphone_gtk_get_ui_config_int("auto_answer", 0)) { + int delay = linphone_gtk_get_ui_config_int("auto_answer_delay", 2000); linphone_call_ref(call); - g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer ,call); + g_timeout_add(delay, (GSourceFunc)linphone_gtk_auto_answer, call); } break; case LinphoneCallResuming: diff --git a/gtk/parameters.ui b/gtk/parameters.ui index 65420eeee..c40537c8f 100644 --- a/gtk/parameters.ui +++ b/gtk/parameters.ui @@ -2,69 +2,12 @@ - - 500 - 3001 - 500 - 1 - 10 - - - 500 - 50 - 1 - 10 - - - 1 - 65535 - 1 - 1 - 10 - - - 1 - 65535 - 1 - 1 - 10 - - - 65535 - 1 - 1 - 10 - - + -1 100000 1 10 - - -1 - 100000 - 1 - 10 - - - 65535 - 5060 - 1 - 9.9999999995529656 - - - 65535 - 5060 - 1 - 10 - - - 100 - 10 - 1 - 10 - 65535 2 @@ -85,12 +28,31 @@ 2 10 - - 65535 - 1 + + 500 + 3001 + 500 1 10 + + 65535 + 5060 + 1 + 10 + + + -1 + 100000 + 1 + 10 + + + 60000 + 2000 + 100 + 500 + @@ -189,6 +151,29 @@ + + + + + + + + SIP (UDP) + + + SIP (TCP) + + + SIP (TLS) + + + + + 65535 + 5060 + 1 + 9.9999999995529656 + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -253,7 +238,7 @@ False True True - adjustment1 + adjustment_mtu @@ -391,7 +376,7 @@ False True True - adjustment8 + udp_port_adjustment @@ -461,7 +446,7 @@ False True True - adjustment8 + adjustment_tcp_port @@ -1940,13 +1925,55 @@ False 12 - - Automatically answer when a call is received + True - True - False - True - + False + 2 + 2 + + + Automatically answer when a call is received + True + True + False + True + + + + 2 + + + + + True + False + Delay before answering (ms) + + + 1 + 2 + + + + + True + True + + False + False + True + True + ajustment_auto_answer_delay + True + + + + 1 + 2 + 1 + 2 + + @@ -2273,7 +2300,7 @@ False True True - adjustment5 + adjustment_upload_bw @@ -2295,7 +2322,7 @@ False True True - adjustment6 + adjustment_download_bw @@ -2801,21 +2828,4 @@ - - - - - - - - SIP (UDP) - - - SIP (TCP) - - - SIP (TLS) - - - diff --git a/gtk/propertybox.c b/gtk/propertybox.c index 04a4a2d9d..102aeafc1 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -1584,6 +1584,7 @@ void linphone_gtk_show_parameters(void){ /* CALL PARAMS CONFIG */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb, "auto_answer_checkbox")), linphone_gtk_get_ui_config_int("auto_answer", 0)); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb, "auto_answer_delay_spinbutton")), linphone_gtk_get_ui_config_int("auto_answer_delay", 2000)); /* UI CONFIG */ linphone_gtk_fill_langs(pb); @@ -1777,3 +1778,8 @@ void linphone_gtk_enable_auto_answer(GtkToggleButton *checkbox, gpointer user_da gboolean auto_answer_enabled = gtk_toggle_button_get_active(checkbox); linphone_gtk_set_ui_config_int("auto_answer", auto_answer_enabled ? 1 : 0); } + +void linphone_gtk_auto_answer_delay_changed(GtkSpinButton *spinbutton, gpointer user_data) { + int delay = gtk_spin_button_get_value(spinbutton); + linphone_gtk_set_ui_config_int("auto_answer_delay", delay); +}