From 20831d929e8b3a251e6706deff214c08dda82e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Tue, 8 Dec 2015 14:15:31 +0100 Subject: [PATCH] Display the conference view while conferences using a focus server --- console/commands.c | 2 +- gtk/conference.c | 4 +++- gtk/incall_view.c | 7 +++---- gtk/linphone.h | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/console/commands.c b/console/commands.c index f2c316325..cf462b990 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2452,7 +2452,7 @@ static void lpc_display_call_states(LinphoneCore *lc){ const char *flag; bool_t in_conference; call=(LinphoneCall*)elem->data; - in_conference=linphone_call_params_get_local_conference_mode(linphone_call_get_current_params(call)); + in_conference=(linphone_call_get_conference(call) != NULL); tmp=linphone_call_get_remote_address_as_string (call); flag=in_conference ? "conferencing" : ""; flag=linphone_call_has_transfer_pending(call) ? "transfer pending" : flag; diff --git a/gtk/conference.c b/gtk/conference.c index 175cfc482..9073d629e 100644 --- a/gtk/conference.c +++ b/gtk/conference.c @@ -178,4 +178,6 @@ void linphone_gtk_unset_from_conference(LinphoneCall *call){ } } - +bool_t linphone_gtk_call_is_in_conference_view(LinphoneCall *call) { + return (find_conferencee_from_call(call) != NULL); +} diff --git a/gtk/incall_view.c b/gtk/incall_view.c index e099b963d..68941d50a 100644 --- a/gtk/incall_view.c +++ b/gtk/incall_view.c @@ -509,11 +509,10 @@ void linphone_gtk_remove_in_call_view(LinphoneCall *call){ GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer (call); GtkWidget *main_window=linphone_gtk_get_main_window (); GtkWidget *nb=linphone_gtk_get_widget(main_window,"viewswitch"); - gboolean in_conf=linphone_call_params_get_local_conference_mode(linphone_call_get_current_params(call)); int idx; g_return_if_fail(w!=NULL); idx=gtk_notebook_page_num(GTK_NOTEBOOK(nb),w); - if (in_conf){ + if (linphone_gtk_call_is_in_conference_view(call)){ linphone_gtk_unset_from_conference(call); } linphone_call_set_user_pointer (call,NULL); @@ -776,7 +775,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){ GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri"); GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration"); guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid")); - gboolean in_conf=linphone_call_params_get_local_conference_mode(linphone_call_get_current_params(call)); + gboolean in_conf=(linphone_call_get_conference(call) != NULL); GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(callview),"call_stats"); linphone_gtk_in_call_show_video(call); @@ -854,7 +853,7 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m video_window=(GtkWidget*)g_object_get_data(G_OBJECT(callview),"video_window"); status=linphone_gtk_get_widget(callview,"in_call_status"); taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid")); - in_conf=linphone_call_params_get_local_conference_mode(linphone_call_get_current_params(call)); + in_conf=(linphone_call_get_conference(call) != NULL); if (video_window) gtk_widget_destroy(video_window); if (status==NULL) return; if (error_msg==NULL) diff --git a/gtk/linphone.h b/gtk/linphone.h index f337770fb..9f430f5fc 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -198,6 +198,7 @@ LINPHONE_PUBLIC void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gbool LINPHONE_PUBLIC void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value); LINPHONE_PUBLIC void linphone_gtk_set_in_conference(LinphoneCall *call); LINPHONE_PUBLIC void linphone_gtk_unset_from_conference(LinphoneCall *call); +LINPHONE_PUBLIC bool_t linphone_gtk_call_is_in_conference_view(LinphoneCall *call); LINPHONE_PUBLIC void linphone_gtk_terminate_conference_participant(LinphoneCall *call); LINPHONE_PUBLIC void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call); LINPHONE_PUBLIC void linphone_gtk_in_call_view_hide_encryption(LinphoneCall *call);