]> sjero.net Git - linphone/blobdiff - gtk/incall_view.c
Fix UI feedbacks :
[linphone] / gtk / incall_view.c
index 0a64a1041d2484f6cca2b1eb21f9f2e9c48b9414..01e3b3cd99d010a12ea2168ef18c05880b186900 100644 (file)
@@ -75,7 +75,7 @@ static GtkWidget *make_tab_header(int number){
        return w;
 }
 
-void update_tab_header(LinphoneCall *call,gboolean pause){
+void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause){
        GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
        GtkWidget *main_window=linphone_gtk_get_main_window();
        GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
@@ -431,8 +431,6 @@ void linphone_gtk_remove_in_call_view(LinphoneCall *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);
        }
@@ -444,12 +442,13 @@ void linphone_gtk_remove_in_call_view(LinphoneCall *call){
                        /*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),"conf_frame")));
-               }else gtk_notebook_set_current_page(GTK_NOTEBOOK(nb), 0);
+               }else gtk_notebook_prev_page(GTK_NOTEBOOK(nb));
        }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)));
+               gtk_notebook_set_current_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),                                                                     linphone_call_get_user_pointer(call)));
        }
+       gtk_notebook_remove_page (GTK_NOTEBOOK(nb),idx);
+       gtk_widget_destroy(w);
 }
 
 static void display_peer_name_in_label(GtkWidget *label, const LinphoneAddress *from){
@@ -689,7 +688,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
 
        gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
        linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PLAY,TRUE);
-               update_tab_header(call,FALSE);
+       linphone_gtk_call_update_tab_header(call,FALSE);
        linphone_gtk_enable_mute_button(
                                        GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);
        
@@ -759,10 +758,11 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
        gtk_widget_hide(linphone_gtk_get_widget(callview,"record_hbox"));
        gtk_widget_hide(linphone_gtk_get_widget(callview,"buttons_panel"));
        gtk_widget_hide(linphone_gtk_get_widget(callview,"incall_audioview"));
+       gtk_widget_hide(linphone_gtk_get_widget(callview,"quality_indicator"));
        linphone_gtk_enable_mute_button(
                GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),FALSE);
        linphone_gtk_enable_hold_button(call,FALSE,TRUE);
-
+       
        if (taskid!=0) g_source_remove(taskid);
        g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,call);
        if (in_conf)
@@ -844,7 +844,7 @@ 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(NULL);
-       update_tab_header(call,active);
+       linphone_gtk_call_update_tab_header(call,active);
        if (!call) return;
        if(!active)
        {
@@ -860,7 +860,7 @@ void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gbo
        GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer (call);
        GtkWidget *button;
        g_return_if_fail(callview!=NULL);
-       update_tab_header(call,!holdon);
+       linphone_gtk_call_update_tab_header(call,!holdon);
        button=linphone_gtk_get_widget(callview,"hold_call");
        gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
        gtk_widget_set_visible(GTK_WIDGET(button),sensitive);