Ejemplo n.º 1
0
void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
	GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
	GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
	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_local_conference_mode(linphone_call_get_current_params(call));
	
	display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

	gtk_widget_set_visible(linphone_gtk_get_widget(callview,"mute_pause_buttons"),!in_conf);
	gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
	gtk_label_set_markup(GTK_LABEL(status),in_conf ? _("In conference") : _("<b>In call</b>"));

	gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
	linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PLAY,TRUE);
	linphone_gtk_enable_mute_button(
					GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),!in_conf);
	if (taskid==0){
		taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
		g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
	}
	linphone_gtk_in_call_view_enable_audio_view(call, !in_conf);
	linphone_gtk_in_call_view_show_encryption(call);
	if (in_conf) linphone_gtk_set_in_conference(call);
}
Ejemplo n.º 2
0
void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
	GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
	GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
	GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
	GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration");
	GtkWidget *animation=linphone_gtk_get_widget(callview,"in_call_animation");
	GdkPixbufAnimation *pbuf=create_pixbuf_animation("incall_anim.gif");
	guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid"));
	
	display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

	gtk_widget_show(linphone_gtk_get_widget(callview,"mute_pause_buttons"));
	gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
	gtk_label_set_markup(GTK_LABEL(status),_("<b>In call</b>"));

	gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
	if (pbuf!=NULL){
		gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
		g_object_unref(G_OBJECT(pbuf));
	}else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_EXECUTE,GTK_ICON_SIZE_DIALOG);
	linphone_gtk_enable_mute_button(
					GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);
	if (taskid==0){
		taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
		g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
	}
}
Ejemplo n.º 3
0
void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call, bool_t with_pause){
	GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
	GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
	GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
	GtkWidget *animation=linphone_gtk_get_widget(callview,"in_call_animation");
	GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
	GtkWidget *answer_button;
	GtkWidget *image;

	gtk_label_set_markup(GTK_LABEL(status),_("<b>Incoming call</b>"));
	gtk_widget_show_all(linphone_gtk_get_widget(callview,"answer_decline_panel"));
	gtk_widget_hide(linphone_gtk_get_widget(callview,"mute_pause_buttons"));
	display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

	answer_button=linphone_gtk_get_widget(callview,"accept_call");
	image=create_pixmap (linphone_gtk_get_ui_config("start_call_icon","startcall-green.png"));
	if (with_pause){
		gtk_button_set_label(GTK_BUTTON(answer_button),
		                     _("Pause all calls\nand answer"));
	}else gtk_button_set_label(GTK_BUTTON(answer_button),_("Answer"));
	gtk_button_set_image(GTK_BUTTON(answer_button),image);
	gtk_widget_show(image);
	
	image=create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"));
	gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(callview,"decline_call")),image);
	gtk_widget_show(image);
	
	if (pbuf!=NULL){
		gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
		g_object_unref(G_OBJECT(pbuf));
	}else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_EXECUTE,GTK_ICON_SIZE_DIALOG);
}
Ejemplo n.º 4
0
void linphone_gtk_in_call_view_set_calling(LinphoneCall *call) {
    GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
    GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
    GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
    GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration");

    gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
    display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

    gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
    linphone_gtk_in_call_set_animation_spinner(callview);
}
Ejemplo n.º 5
0
void linphone_gtk_in_call_view_set_calling(LinphoneCall *call){
	GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
	GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
	GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
	GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration");
	GtkWidget *animation=linphone_gtk_get_widget(callview,"in_call_animation");
	GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
	
	gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
	display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
	
	gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
	if (pbuf!=NULL){
		gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
		g_object_unref(G_OBJECT(pbuf));
	}else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_FIND,GTK_ICON_SIZE_DIALOG);
}
Ejemplo n.º 6
0
void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call) {
    GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
    GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
    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));
    GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(callview),"call_stats");

    linphone_gtk_in_call_show_video(call);

    display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

    gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
    gtk_label_set_markup(GTK_LABEL(status),in_conf ? _("In conference") : _("<b>In call</b>"));

    gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"conference_button"),!in_conf);
    gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"transfer_button"),!in_conf);

    gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
    linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PLAY,TRUE);
    linphone_gtk_call_update_tab_header(call,FALSE);
    linphone_gtk_enable_mute_button(
        GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);

    if (taskid==0) {
        taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
        g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
    }
    linphone_gtk_in_call_view_enable_audio_view(call, !in_conf);
    linphone_gtk_in_call_view_show_encryption(call);
    if (in_conf) {
        linphone_gtk_set_in_conference(call);
        gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"incall_mute"),FALSE);
        gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"hold_call"),FALSE);
    } else {
        linphone_gtk_unset_from_conference(call); /*in case it was previously*/
        gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"incall_mute"),TRUE);
        gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"hold_call"),TRUE);
    }
    gtk_widget_show_all(linphone_gtk_get_widget(callview,"buttons_panel"));
    if (!in_conf) gtk_widget_show_all(linphone_gtk_get_widget(callview,"record_hbox"));
    else gtk_widget_hide(linphone_gtk_get_widget(callview,"record_hbox"));
    if (call_stats) show_used_codecs(call_stats,call);
}
Ejemplo n.º 7
0
void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call) {
    GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
    GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
    GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
    GtkWidget *answer_button;
    GtkWidget *image;

    gtk_label_set_markup(GTK_LABEL(status),_("<b>Incoming call</b>"));
    gtk_widget_show_all(linphone_gtk_get_widget(callview,"answer_decline_panel"));
    gtk_widget_hide(linphone_gtk_get_widget(callview,"buttons_panel"));
    display_peer_name_in_label(callee,linphone_call_get_remote_address (call));

    answer_button=linphone_gtk_get_widget(callview,"accept_call");
    image=create_pixmap (linphone_gtk_get_ui_config("start_call_icon","startcall-small.png"));
    gtk_button_set_label(GTK_BUTTON(answer_button),_("Answer"));
    gtk_button_set_image(GTK_BUTTON(answer_button),image);
    gtk_widget_show(image);

    image=create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-small.png"));
    gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(callview,"decline_call")),image);
    gtk_widget_show(image);

    linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_DIALOG_INFO,TRUE);
}