diff --git a/gtk/main.c b/gtk/main.c
index dce389c97..39209ef29 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -92,7 +92,6 @@ static gint main_window_y=0;
#endif
static gboolean verbose=0;
static gboolean quit_done=FALSE;
-static gboolean auto_answer = 0;
static gchar * addr_to_call = NULL;
static int start_option = START_LINPHONE;
static gboolean no_video=FALSE;
@@ -139,7 +138,6 @@ static GOptionEntry linphone_options[]={
LINPHONE_OPTION("no-video", '\0', G_OPTION_ARG_NONE, (gpointer)&no_video, N_("Start linphone with video disabled.")),
LINPHONE_OPTION("iconified", '\0', G_OPTION_ARG_NONE, (gpointer)&iconified, N_("Start only in the system tray, do not show the main interface.")),
LINPHONE_OPTION("call", 'c', G_OPTION_ARG_STRING, &addr_to_call, N_("address to call right now")),
- LINPHONE_OPTION("auto-answer", 'a', G_OPTION_ARG_NONE, (gpointer) & auto_answer, N_("if set automatically answer incoming calls")),
LINPHONE_OPTION("workdir", '\0', G_OPTION_ARG_STRING, (gpointer) & workingdir, N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)")),
LINPHONE_OPTION("config", '\0', G_OPTION_ARG_FILENAME, (gpointer) &custom_config_file, N_("Configuration file")),
LINPHONE_OPTION("run-audio-assistant", '\0', G_OPTION_ARG_NONE, (gpointer) &run_audio_assistant, N_("Run the audio assistant")),
@@ -1375,7 +1373,7 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
linphone_gtk_create_in_call_view(call);
linphone_gtk_in_call_view_set_incoming(call);
linphone_gtk_status_icon_set_blinking(TRUE);
- if (auto_answer) {
+ if (linphone_gtk_get_ui_config_int("auto_answer", 0)) {
linphone_call_ref(call);
g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer ,call);
}
diff --git a/gtk/parameters.ui b/gtk/parameters.ui
index 864674822..07862b46d 100644
--- a/gtk/parameters.ui
+++ b/gtk/parameters.ui
@@ -189,23 +189,6 @@
-
@@ -293,7 +275,6 @@
True
True
False
- False
True
@@ -310,7 +291,6 @@
True
False
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
True
@@ -360,257 +340,239 @@
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
8
2
-
-
+
-
-
- 1
- 2
- 1
- 1
-
-
-
-
-
- True
- False
- SIP/TCP port
-
-
- 1
- 2
-
+
+ True
+ False
+
+
+ Disabled
+ True
+ True
+ False
+ True
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ Random
+ True
+ True
+ False
+ True
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ •
+ True
+ False
+ False
+ True
+ True
+ adjustment8
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ 1
+ 2
+ 1
+
-
- True
- False
-
-
-
- Disabled
- True
- True
- False
- False
- True
-
-
-
- True
- True
- 0
-
-
-
-
-
- Random
- True
- True
- False
- False
- True
-
-
-
- True
- True
- 1
-
-
-
-
-
- True
- True
- •
- True
- False
- False
- True
- True
- adjustment8
-
-
-
- True
- True
- 2
-
-
-
-
- 1
- 2
- 1
- 2
-
-
-
-
-
-
-
- True
- False
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Audio RTP/UDP:
- right
-
-
- 2
- 3
-
+
+ True
+ False
+ SIP/TCP port
+
+
+ 1
+ 2
+
-
- True
- False
-
-
- True
- True
- •
- False
- False
- True
- True
- adjustment_min_audio_port
- True
-
-
-
- True
- True
- 0
-
-
-
-
- True
- True
- •
- True
- False
- False
- True
- True
- adjustment_max_audio_port
- True
-
-
-
- True
- True
- 1
-
-
-
-
- Fixed
- True
- True
- False
- False
- True
-
-
-
- True
- True
- 2
-
-
-
-
- 1
- 2
- 2
- 3
-
-
-
-
-
- True
- False
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- Video RTP/UDP:
- right
-
-
- 3
- 4
-
+
+ True
+ False
+
+
+ Disabled
+ True
+ True
+ False
+ True
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ Random
+ True
+ True
+ False
+ True
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ •
+ True
+ False
+ False
+ True
+ True
+ adjustment8
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ 1
+ 2
+ 1
+ 2
+
-
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Audio RTP/UDP:
+ right
+
+
+ 2
+ 3
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ •
+ False
+ False
+ True
+ True
+ adjustment_min_audio_port
+ True
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ True
+ •
+ True
+ False
+ False
+ True
+ True
+ adjustment_max_audio_port
+ True
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ Fixed
+ True
+ True
+ False
+ True
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+ True
+ False
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ Video RTP/UDP:
+ right
+
+
+ 3
+ 4
+
+
+
+
True
False
@@ -658,7 +620,6 @@
True
True
False
- False
True
@@ -668,109 +629,105 @@
2
-
-
+
+
1
2
3
4
-
-
-
-
-
- True
- False
- Media encryption type
-
-
- 4
- 6
-
+
-
- True
- False
- 0
-
-
- 1
- 2
- 4
- 5
-
+
+ True
+ False
+ Media encryption type
+
+
+ 4
+ 6
+
-
- Media encryption is mandatory
- True
- True
- False
- False
- True
-
-
-
- 1
- 2
- 5
- 6
-
+
+ True
+ False
+ 0
+
+
+ 1
+ 2
+ 4
+ 5
+
-
- False
- Tunnel
-
-
- 7
- 8
-
+
+ Media encryption is mandatory
+ True
+ True
+ False
+ True
+
+
+
+ 1
+ 2
+ 5
+ 6
+
-
- gtk-edit
- True
- True
- False
- True
-
-
-
- 1
- 2
- 7
- 8
-
+
+ False
+ Tunnel
+
+
+ 7
+ 8
+
-
- True
- False
- DSCP fields
-
-
- 6
- 7
-
+
+ gtk-edit
+ True
+ True
+ True
+
+
+
+ 1
+ 2
+ 7
+ 8
+
-
- gtk-edit
- True
- True
- True
- False
- True
-
-
-
- 1
- 2
- 6
- 7
-
+
+ True
+ False
+ DSCP fields
+
+
+ 6
+ 7
+
+
+
+
+ gtk-edit
+ True
+ True
+ True
+ True
+
+
+
+ 1
+ 2
+ 6
+ 7
+
@@ -813,7 +770,6 @@
True
True
False
- False
True
True
@@ -830,7 +786,6 @@
True
True
False
- False
True
no_nat
@@ -847,7 +802,6 @@
True
True
False
- False
True
no_nat
@@ -864,7 +818,6 @@
True
True
False
- False
True
no_nat
@@ -881,7 +834,6 @@
True
True
False
- False
True
no_nat
@@ -1084,6 +1036,9 @@
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
6
2
+
+
+
True
@@ -1109,7 +1064,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
True
@@ -1285,7 +1239,6 @@
True
True
False
- False
True
@@ -1296,9 +1249,6 @@
6
-
-
-
@@ -1437,7 +1387,6 @@
True
True
True
- False
@@ -1686,7 +1635,6 @@
True
True
True
- False
@@ -1734,7 +1682,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -1782,7 +1729,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -1830,7 +1776,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -1923,7 +1868,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -2109,7 +2053,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
True
@@ -2126,7 +2069,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
True
@@ -2142,7 +2084,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -2190,7 +2131,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -2356,7 +2296,6 @@
True
True
False
- False
0
True
@@ -2449,7 +2388,63 @@
-
+
+ True
+ False
+ 3
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Automatically answer when a call is received
+ True
+ True
+ False
+ True
+
+
+
+
+
+ 4
+
+
+
+
+ True
+ False
+ Call parameters
+
+
+ 4
+ False
+
+
+
+
True
False
@@ -2511,7 +2506,6 @@
True
True
False
- False
True
@@ -2535,7 +2529,7 @@
- 4
+ 5
@@ -2569,7 +2563,7 @@
- 4
+ 5
False
@@ -2596,6 +2590,9 @@
4
2
True
+
+
+
True
@@ -2638,7 +2635,6 @@
True
True
True
- False
True
@@ -2691,9 +2687,6 @@
GTK_SHRINK
-
-
-
@@ -2718,7 +2711,7 @@
- 5
+ 6
@@ -2751,7 +2744,7 @@
- 5
+ 6
False
@@ -2774,7 +2767,6 @@
True
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- False
@@ -2825,4 +2817,21 @@
+
+
+
+
+
+
+
+ SIP (UDP)
+
+
+ SIP (TCP)
+
+
+ SIP (TLS)
+
+
+
diff --git a/gtk/propertybox.c b/gtk/propertybox.c
index 5f2c177ab..7f9a0f6f9 100644
--- a/gtk/propertybox.c
+++ b/gtk/propertybox.c
@@ -1582,6 +1582,8 @@ void linphone_gtk_show_parameters(void){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"adaptive_rate_control")),
linphone_core_adaptive_rate_control_enabled(lc));
+ /* CALL PARAMS CONFIG */
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb, "auto_answer")), linphone_gtk_get_ui_config_int("auto_answer", 0));
/* UI CONFIG */
linphone_gtk_fill_langs(pb);
@@ -1770,3 +1772,8 @@ void linphone_gtk_dscp_edit_response(GtkWidget *dialog, guint response_id){
}
gtk_widget_destroy(dialog);
}
+
+void linphone_gtk_enable_auto_answer(GtkToggleButton *checkbox, gpointer user_data) {
+ gboolean auto_answer_enabled = gtk_toggle_button_get_active(checkbox);
+ linphone_gtk_set_ui_config_int("auto_answer", auto_answer_enabled ? 1 : 0);
+}