]> sjero.net Git - linphone/commitdiff
conferencing improvement, works in GTK ui.
authorSimon Morlat <simon.morlat@linphone.org>
Tue, 11 Oct 2011 20:12:17 +0000 (22:12 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Tue, 11 Oct 2011 20:12:17 +0000 (22:12 +0200)
coreapi/conference.c
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/private.h
gtk/conference.c
gtk/incall_view.c
gtk/linphone.h
gtk/main.c
gtk/main.ui
mediastreamer2
po/fr.po

index 14867f72ac14fe8bbbe6909459dce427a39c6871..4c9f4ccb26285408a18a2acb618f7fda539518a8 100644 (file)
@@ -43,10 +43,13 @@ static void remove_local_endpoint(LinphoneConference *ctx){
        }
 }
 
-static void conference_check_uninit(LinphoneConference *ctx){
+void linphone_core_conference_check_uninit(LinphoneConference *ctx){
        if (ctx->conf){
-               if (ctx->conf->nmembers==0){
+               ms_message("conference_check_uninit(): nmembers=%i",ctx->conf->nmembers);
+               if (ctx->conf->nmembers==1 && ctx->local_participant!=NULL){
                        remove_local_endpoint(ctx);
+               }
+               if (ctx->conf->nmembers==0){
                        ms_audio_conference_destroy(ctx->conf);
                        ctx->conf=NULL;
                }
@@ -70,7 +73,6 @@ void linphone_call_remove_from_conf(LinphoneCall *call){
        ms_audio_conference_remove_member(conf->conf,call->endpoint);
        ms_audio_endpoint_release_from_stream(call->endpoint);
        call->endpoint=NULL;
-       conference_check_uninit(conf);
 }
 
 static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
@@ -102,7 +104,7 @@ static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
 float linphone_core_get_conference_local_input_volume(LinphoneCore *lc){
        LinphoneConference *conf=&lc->conf_ctx;
        AudioStream *st=conf->local_participant;
-       if (st && st->volsend){
+       if (st && st->volsend && !conf->local_muted){
                float vol=0;
                ms_filter_call_method(st->volsend,MS_VOLUME_GET,&vol);
                return vol;
@@ -139,6 +141,7 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call){
 }
 
 int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){
+       int err=0;
        if (!call->current_params.in_conference){
                if (call->params.in_conference){
                        ms_warning("Not (yet) in conference, be patient");
@@ -149,7 +152,8 @@ int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){
                }
        }
        call->params.in_conference=FALSE;
-       return linphone_core_pause_call(lc,call);
+       err=linphone_core_pause_call(lc,call);
+       return err;
 }
 
 bool_t linphone_core_is_in_conference(const LinphoneCore *lc){
index d41ab52067de0a240a44777132cafd3f2d7d61f3..977b26e9f86e7fe6f2b6f9102984b30d9fa61489 100644 (file)
@@ -350,6 +350,8 @@ static void linphone_call_set_terminated(LinphoneCall *call){
        if (ms_list_size(lc->calls)==0)
                linphone_core_notify_all_friends(lc,lc->presence_mode);
 
+       linphone_core_conference_check_uninit(&lc->conf_ctx);
+
 }
 
 const char *linphone_call_state_to_string(LinphoneCallState cs){
index f86337b8ac98335354ba7ccc76c30d47144d56c4..e8c159a12de94412104a0084065c02ac85fbd607 100644 (file)
@@ -3038,23 +3038,33 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){
 **/
 void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){
        LinphoneCall *call=linphone_core_get_current_call(lc);
-       if (call==NULL){
+       AudioStream *st=NULL;
+       if (linphone_core_is_in_conference(lc)){
+               lc->conf_ctx.local_muted=val;
+               st=lc->conf_ctx.local_participant;
+       }else if (call==NULL){
                ms_warning("linphone_core_mute_mic(): No current call !");
                return;
+       }else{
+               call->audio_muted=val;
        }
-       if (call->audiostream!=NULL){
-               audio_stream_set_mic_gain(call->audiostream,
+       if (st!=NULL){
+               audio_stream_set_mic_gain(st,
                        (val==TRUE) ? 0 : lp_config_get_float(lc->config,"sound","mic_gain",1));
                if ( linphone_core_get_rtp_no_xmit_on_audio_mute(lc) ){
-                       audio_stream_mute_rtp(call->audiostream,val);
+                       audio_stream_mute_rtp(st,val);
                }
-               call->audio_muted=val;
+               
        }
 }
-
+/**
+ * Returns whether microphone is muted.
+**/
 bool_t linphone_core_is_mic_muted(LinphoneCore *lc) {
        LinphoneCall *call=linphone_core_get_current_call(lc);
-       if (call==NULL){
+       if (linphone_core_is_in_conference(lc)){
+               return lc->conf_ctx.local_muted;
+       }else if (call==NULL){
                ms_warning("linphone_core_is_mic_muted(): No current call !");
                return FALSE;
        }
index 1d44bb1cbe284dae5f49f786057147866e36f7d8..0a43745abb96bdb59d92fb699d33cfcd7b06b818 100644 (file)
@@ -228,6 +228,7 @@ extern SalCallbacks linphone_sal_callbacks;
 void linphone_proxy_config_set_error(LinphoneProxyConfig *cfg, LinphoneReason error);
 bool_t linphone_core_rtcp_enabled(const LinphoneCore *lc);
 
+
 struct _LinphoneProxyConfig
 {
        struct _LinphoneCore *lc;
@@ -399,6 +400,7 @@ struct _LinphoneConference{
        MSAudioConference *conf;
        AudioStream *local_participant;
        MSAudioEndpoint *local_endpoint;
+       bool_t local_muted;
 };
 
 typedef struct _LinphoneConference LinphoneConference;
@@ -513,6 +515,7 @@ void linphone_core_preempt_sound_resources(LinphoneCore *lc);
 void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t muted);
 void linphone_call_add_to_conf(LinphoneCall *call);
 void linphone_call_remove_from_conf(LinphoneCall *call);
+void linphone_core_conference_check_uninit(LinphoneConference *ctx);
 
 #define HOLD_OFF       (0)
 #define HOLD_ON                (1)
index eda0d959400473e9c3438210e2a7b29840d9eb51..4d1567773d54cd7daee8d862aee8e737e2dab989 100644 (file)
@@ -25,6 +25,8 @@
  
 #include "linphone.h"
 
+#define PADDING_PIXELS 4
+
 static GtkWidget *create_conference_label(void){
        GtkWidget *box=gtk_hbox_new(FALSE,0);
        gtk_box_pack_start(GTK_BOX(box),gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU),FALSE,FALSE,0);
@@ -35,9 +37,12 @@ static GtkWidget *create_conference_label(void){
 
 static void init_local_participant(GtkWidget *participant){
        GtkWidget *sound_meter;
+       GtkWidget *button=linphone_gtk_get_widget(participant,"conference_control");
        gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(participant,"callee_name_label")),_("Me"));
        sound_meter=linphone_gtk_get_widget(participant,"sound_indicator");
-       gtk_widget_hide(linphone_gtk_get_widget(participant,"hangup_button"));
+       linphone_gtk_enable_mute_button(GTK_BUTTON(button),TRUE);
+       g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_mute_clicked,NULL);
+       gtk_widget_show(button);
        linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_core_get_conference_local_input_volume, linphone_gtk_get_core());
 }
 
@@ -46,8 +51,9 @@ static GtkWidget *get_conference_tab(GtkWidget *mw){
        if (box==NULL){
                GtkWidget *box=gtk_vbox_new(FALSE,0);
                GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
+               gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
                init_local_participant(participant);
-               gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,0);
+               gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,PADDING_PIXELS);
                gtk_widget_show(box);
                g_object_set_data(G_OBJECT(mw),"conference_tab",box);
                gtk_notebook_append_page(GTK_NOTEBOOK(linphone_gtk_get_widget(mw,"viewswitch")),box,
@@ -56,56 +62,79 @@ static GtkWidget *get_conference_tab(GtkWidget *mw){
        return box;
 }
 
-void linphone_gtk_add_to_conference(LinphoneCall *call){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *tab=get_conference_tab(mw);
-       GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
-       const char *hangup_image=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png");
-       const LinphoneAddress *addr=linphone_call_get_remote_address(call);
-       GtkWidget *sound_meter;
-       GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
-       gchar *markup;
-       if (linphone_address_get_display_name(addr)!=NULL){
-               markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));
-       }else{
-               char *tmp=linphone_address_as_string_uri_only(addr);
-               markup=g_strdup_printf("%s",tmp);
-               ms_free(tmp);
-       }
-       gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(participant,"callee_name_label")),markup);
-       g_free(markup);
-       gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(participant,"hangup_button")),create_pixmap(hangup_image));
-       sound_meter=linphone_gtk_get_widget(participant,"sound_indicator");
-       linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
-       gtk_box_pack_end(GTK_BOX(tab),participant,FALSE,FALSE,0);
-       g_object_set_data_full(G_OBJECT(participant),"call",linphone_call_ref(call),(GDestroyNotify)linphone_call_unref);
-       gtk_widget_show(participant);
-       gtk_notebook_set_current_page(GTK_NOTEBOOK(viewswitch),
-                                     gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),tab));
-       linphone_core_add_to_conference(linphone_gtk_get_core(),call);
-}
-
 static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
        GtkWidget *mw=linphone_gtk_get_main_window();
        GtkWidget *tab=get_conference_tab(mw);
        GList *elem;
        GtkWidget *ret=NULL;
-       GList *l=gtk_container_get_children(GTK_CONTAINER(tab));
-       for(elem=l;elem!=NULL;elem=elem->next){
-               GtkWidget *frame=(GtkWidget*)elem->data;
-               if (call==g_object_get_data(G_OBJECT(frame),"call")){
-                       ret=frame;
-                       break;
+       if (call!=NULL){
+               GList *l=gtk_container_get_children(GTK_CONTAINER(tab));
+               for(elem=l;elem!=NULL;elem=elem->next){
+                       GtkWidget *frame=(GtkWidget*)elem->data;
+                       if (call==g_object_get_data(G_OBJECT(frame),"call")){
+                               ret=frame;
+                               break;
+                       }
                }
+               g_list_free(l);
        }
-       g_list_free(l);
+       //g_message("find_conferencee_from_call(): found widget %p for call %p",ret,call);
        return ret;
 }
 
-void linphone_gtk_remove_from_conference(LinphoneCall *call){
+void linphone_gtk_set_in_conference(LinphoneCall *call){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *participant=find_conferencee_from_call(call);
+       
+       if (participant==NULL){
+               GtkWidget *tab=get_conference_tab(mw);
+               const LinphoneAddress *addr=linphone_call_get_remote_address(call);
+               participant=linphone_gtk_create_widget("main","callee_frame");
+               GtkWidget *sound_meter;
+               GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
+               gchar *markup;
+               if (linphone_address_get_display_name(addr)!=NULL){
+                       markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));
+               }else{
+                       char *tmp=linphone_address_as_string_uri_only(addr);
+                       markup=g_strdup_printf("%s",tmp);
+                       ms_free(tmp);
+               }
+               gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(participant,"callee_name_label")),markup);
+               g_free(markup);
+               sound_meter=linphone_gtk_get_widget(participant,"sound_indicator");
+               linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
+               gtk_box_pack_start(GTK_BOX(tab),participant,FALSE,FALSE,PADDING_PIXELS);
+               g_object_set_data_full(G_OBJECT(participant),"call",linphone_call_ref(call),(GDestroyNotify)linphone_call_unref);
+               gtk_widget_show(participant);
+               gtk_notebook_set_current_page(GTK_NOTEBOOK(viewswitch),
+                                                 gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),tab));
+       }
+}
+
+
+
+void linphone_gtk_terminate_conference_participant(LinphoneCall *call){
        GtkWidget *frame=find_conferencee_from_call(call);
+       if (frame){
+               gtk_widget_set_sensitive(frame,FALSE);
+       }
+}
+
+void linphone_gtk_unset_from_conference(LinphoneCall *call){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *box=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conference_tab");
+       GtkWidget *frame=find_conferencee_from_call(call);
+       GList *children;
        if (frame){
                gtk_widget_destroy(frame);
        }
+       children=gtk_container_get_children(GTK_CONTAINER(box));
+       if (g_list_length(children)==1){
+               /*the conference is terminated */
+               gtk_widget_destroy(box);
+               g_object_set_data(G_OBJECT(mw),"conference_tab",NULL);
+       }
+       g_list_free(children);
 }
 
index 6411a9e52978d42a643e5597f3235bf2dd0e3497..852a6f570598831f757dc0ec3e537b17748d2a24 100644 (file)
@@ -36,11 +36,12 @@ gboolean linphone_gtk_use_in_call_view(){
        return val;
 }
 
-LinphoneCall *linphone_gtk_get_currently_displayed_call(){
+LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
        LinphoneCore *lc=linphone_gtk_get_core();
        GtkWidget *main_window=linphone_gtk_get_main_window ();
        GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
        const MSList *calls=linphone_core_get_calls(lc);
+       if (is_conf) *is_conf=FALSE;
        if (!linphone_gtk_use_in_call_view() || ms_list_size(calls)==1){
                if (calls) return (LinphoneCall*)calls->data;
        }else{
@@ -48,6 +49,13 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(){
                GtkWidget *page=gtk_notebook_get_nth_page(notebook,idx);
                if (page!=NULL){
                        LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(page),"call");
+                       if (call==NULL){
+                               if (page==g_object_get_data(G_OBJECT(main_window),"conference_tab")){
+                                       if (is_conf)
+                                               *is_conf=TRUE;
+                                       return NULL;
+                               }
+                       }
                        return call;
                }
        }
@@ -94,8 +102,8 @@ static void linphone_gtk_in_call_set_animation_spinner(GtkWidget *callview){
 
 
 static void linphone_gtk_transfer_call(LinphoneCall *dest_call){
-       LinphoneCall *call=linphone_gtk_get_currently_displayed_call();
-       linphone_core_transfer_call_to_another (linphone_gtk_get_core(),call,dest_call);
+       LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
+       if (call) linphone_core_transfer_call_to_another(linphone_gtk_get_core(),call,dest_call);
 }
 
 static void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
@@ -140,6 +148,7 @@ void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value){
                        button=NULL;
                }else if (!button && value==TRUE){
                        button=gtk_button_new_with_label (_("Transfer"));
+                       //gtk_button_set_image_position(GTK_BUTTON(button),GTK_POS_BOTTOM);
                        gtk_button_set_image(GTK_BUTTON(button),gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
                        g_signal_connect(G_OBJECT(button),"clicked",(GCallback)transfer_button_clicked,call);
                        gtk_widget_show_all(button);
@@ -150,7 +159,8 @@ void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value){
 }
 
 static void conference_button_clicked(GtkWidget *button, gpointer call_ref){
-       linphone_gtk_add_to_conference((LinphoneCall*)call_ref);
+       linphone_core_add_all_to_conference(linphone_gtk_get_core());
+       //linphone_core_add_to_conference(linphone_gtk_get_core(),(LinphoneCall*)call_ref);
        gtk_widget_set_sensitive(button,FALSE);
 }
 
@@ -166,6 +176,7 @@ void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value){
                        button=NULL;
                }else if (!button && value==TRUE){
                        button=gtk_button_new_with_label (_("Conference"));
+                       //gtk_button_set_image_position(GTK_BUTTON(button),GTK_POS_BOTTOM);
                        gtk_button_set_image(GTK_BUTTON(button),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
                        g_signal_connect(G_OBJECT(button),"clicked",(GCallback)conference_button_clicked,call);
                        gtk_widget_show_all(button);
@@ -205,14 +216,29 @@ 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_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);
        gtk_notebook_remove_page (GTK_NOTEBOOK(nb),idx);
        gtk_widget_destroy(w);
+       if (in_conf){
+               linphone_gtk_unset_from_conference(call);
+       }
        linphone_call_set_user_pointer (call,NULL);
        linphone_call_unref(call);
-       gtk_notebook_set_current_page(GTK_NOTEBOOK(nb), 0);
+       call=linphone_core_get_current_call(linphone_gtk_get_core());
+       if (call==NULL){
+               if (linphone_core_is_in_conference(linphone_gtk_get_core())){
+                       /*show the conference*/
+                       gtk_notebook_set_current_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),
+                                           g_object_get_data(G_OBJECT(main_window),"conference_tab")));
+               }else gtk_notebook_set_current_page(GTK_NOTEBOOK(nb), 0);
+       }else{
+               /*show the active call*/
+               gtk_notebook_set_current_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),
+                                                                                    linphone_call_get_user_pointer(call)));
+       }
 }
 
 static void display_peer_name_in_label(GtkWidget *label, const LinphoneAddress *from){
@@ -391,6 +417,7 @@ void linphone_gtk_in_call_view_enable_audio_view(LinphoneCall *call, gboolean va
        }else{
                linphone_gtk_uninit_audio_meter(mic_level);
                linphone_gtk_uninit_audio_meter(spk_level);
+               gtk_widget_hide(audio_view);
        }
 }
 
@@ -417,6 +444,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
                g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
        }
        linphone_gtk_in_call_view_enable_audio_view(call, !in_conf);
+       if (in_conf) linphone_gtk_set_in_conference(call);
 }
 
 void linphone_gtk_in_call_view_set_paused(LinphoneCall *call){
@@ -448,7 +476,7 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
        GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
        GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
        guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid"));
-       gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));
+       gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));    
 
        if (error_msg==NULL)
                gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
@@ -465,11 +493,11 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
        linphone_gtk_enable_mute_button(
                GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),FALSE);
        linphone_gtk_enable_hold_button(call,FALSE,TRUE);
-       if (in_conf){
-               linphone_gtk_remove_from_conference(call);
-       }
+       
        if (taskid!=0) g_source_remove(taskid);
        g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,call);
+       if (in_conf)
+               linphone_gtk_terminate_conference_participant(call);
 }
 
 void linphone_gtk_draw_mute_button(GtkButton *button, gboolean active){
@@ -525,7 +553,8 @@ void linphone_gtk_draw_hold_button(GtkButton *button, gboolean active){
 
 void linphone_gtk_hold_clicked(GtkButton *button){
        int active=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"active"));
-       LinphoneCall *call=linphone_gtk_get_currently_displayed_call ();
+       LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
+       if (!call) return;
        if(!active)
        {
                linphone_core_pause_call(linphone_gtk_get_core(),call);
index 32b5fdab77129bd3f79c91dc46d172b87e20eb35..63564c72ff7661261f913fcb86531e07339f6838 100644 (file)
@@ -96,7 +96,7 @@ void linphone_gtk_show_directory_search(void);
 
 /*functions controlling the different views*/
 gboolean linphone_gtk_use_in_call_view();
-LinphoneCall *linphone_gtk_get_currently_displayed_call();
+LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf);
 void linphone_gtk_create_in_call_view(LinphoneCall *call);
 void linphone_gtk_in_call_view_set_calling(LinphoneCall *call);
 void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call);
@@ -104,12 +104,14 @@ void linphone_gtk_in_call_view_update_duration(LinphoneCall *call);
 void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg);
 void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call);
 void linphone_gtk_in_call_view_set_paused(LinphoneCall *call);
+void linphone_gtk_mute_clicked(GtkButton *button);
 void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive);
 void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
 void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value);
 void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value);
-void linphone_gtk_add_to_conference(LinphoneCall *call);
-void linphone_gtk_remove_from_conference(LinphoneCall *call);
+void linphone_gtk_set_in_conference(LinphoneCall *call);
+void linphone_gtk_unset_from_conference(LinphoneCall *call);
+void linphone_gtk_terminate_conference_participant(LinphoneCall *call);
 typedef float (*get_volume_t)(void *data);
 void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data);
 
index 064d857aba45740412ed5b9ffe9508b532a2dd8b..28c4685edfbd033f884019e7ec0c01bd5349660b 100644 (file)
@@ -719,7 +719,7 @@ void linphone_gtk_start_call(GtkWidget *w){
        GtkWidget *mw=gtk_widget_get_toplevel(w);
        GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
 
-       call=linphone_gtk_get_currently_displayed_call();
+       call=linphone_gtk_get_currently_displayed_call(NULL);
        if (call!=NULL && linphone_call_get_state(call)==LinphoneCallIncomingReceived){
                linphone_core_accept_call(lc,call);
        }else{
@@ -737,19 +737,23 @@ void linphone_gtk_uri_bar_activate(GtkWidget *w){
 
 
 void linphone_gtk_terminate_call(GtkWidget *button){
-       LinphoneCall *call=linphone_gtk_get_currently_displayed_call ();
-       if (call)
+       gboolean is_conf;
+       LinphoneCall *call=linphone_gtk_get_currently_displayed_call(&is_conf);
+       if (call){
                linphone_core_terminate_call(linphone_gtk_get_core(),call);
+       }else if (is_conf){
+               linphone_core_terminate_conference(linphone_gtk_get_core());
+       }
 }
 
 void linphone_gtk_decline_clicked(GtkWidget *button){
-       LinphoneCall *call=linphone_gtk_get_currently_displayed_call ();
+       LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
        if (call)
                linphone_core_terminate_call(linphone_gtk_get_core(),call);
 }
 
 void linphone_gtk_answer_clicked(GtkWidget *button){
-       LinphoneCall *call=linphone_gtk_get_currently_displayed_call ();
+       LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
        if (call){
                linphone_core_pause_all_calls(linphone_gtk_get_core());
                linphone_core_accept_call(linphone_gtk_get_core(),call);
index 1a8fe13c65e7fbb11219a58b8b93b8f0a479ac6d..9c393b54c76405c7bc29aeae2bd73f31610a3e59 100644 (file)
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkProgressBar" id="sound_indicator">
+                  <object class="GtkHBox" id="conf_hbox1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkLabel" id="callee_name_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="justify">right</property>
+                        <property name="ellipsize">end</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="pack_type">end</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="conference_control">
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkButton" id="hangup_button">
+                  <object class="GtkProgressBar" id="sound_indicator">
+                    <property name="width_request">170</property>
+                    <property name="height_request">30</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="use_action_appearance">False</property>
-                    <signal name="clicked" handler="linphone_gtk_conf_hangup_clicked" swapped="no"/>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">2</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
             </child>
           </object>
         </child>
-        <child type="label">
-          <object class="GtkLabel" id="callee_name_label">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
-            <property name="use_markup">True</property>
-          </object>
+        <child type="label_item">
+          <placeholder/>
         </child>
       </object>
     </child>
index 85e43112e4054ba9112751655a52a42bb381584f..d9957eac4e4409b1eccc65c59b3851542582b718 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 85e43112e4054ba9112751655a52a42bb381584f
+Subproject commit d9957eac4e4409b1eccc65c59b3851542582b718
index 14ad5edd18c6ebfa9b291e07ea312a354d79676d..cdf0028e670ac5ba56ceefce4c88658d70925154 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -423,7 +423,7 @@ msgstr "Reprendre"
 
 #: ../gtk/incall_view.c:347 ../gtk/main.ui.h:46
 msgid "Pause"
-msgstr "Mettre en attente"
+msgstr "Pause"
 
 #: ../gtk/loginframe.c:93
 #, c-format