mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
dtmfs start and stop according to how they are pressed
This commit is contained in:
parent
55aa245f04
commit
26d7e61577
2 changed files with 9 additions and 4 deletions
11
gtk/main.c
11
gtk/main.c
|
|
@ -1080,24 +1080,29 @@ void linphone_gtk_load_identities(void){
|
|||
gtk_combo_box_set_active(box,def_index);
|
||||
}
|
||||
|
||||
static void linphone_gtk_dtmf_clicked(GtkButton *button){
|
||||
static void linphone_gtk_dtmf_pressed(GtkButton *button){
|
||||
const char *label=gtk_button_get_label(button);
|
||||
GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"uribar");
|
||||
int pos=-1;
|
||||
gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
|
||||
linphone_core_play_dtmf (linphone_gtk_get_core(),label[0],100);
|
||||
linphone_core_play_dtmf (linphone_gtk_get_core(),label[0],-1);
|
||||
if (linphone_core_in_call(linphone_gtk_get_core())){
|
||||
linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_gtk_dtmf_released(GtkButton *button){
|
||||
linphone_core_stop_dtmf (linphone_gtk_get_core());
|
||||
}
|
||||
|
||||
static void linphone_gtk_connect_digits(void){
|
||||
GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
|
||||
GList *children=gtk_container_get_children(cont);
|
||||
GList *elem;
|
||||
for(elem=children;elem!=NULL;elem=elem->next){
|
||||
GtkButton *button=GTK_BUTTON(elem->data);
|
||||
g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_dtmf_clicked,NULL);
|
||||
g_signal_connect(G_OBJECT(button),"pressed",(GCallback)linphone_gtk_dtmf_pressed,NULL);
|
||||
g_signal_connect(G_OBJECT(button),"released",(GCallback)linphone_gtk_dtmf_released,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 955a7d6b8aa205e8a97d751dd8d3920de1595455
|
||||
Subproject commit 3103bc444eb3469cb8003b8e4d816cb918fb41fd
|
||||
Loading…
Add table
Reference in a new issue