Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
liblinphone
Commits
26d7e615
Commit
26d7e615
authored
14 years ago
by
Simon Morlat
Browse files
Options
Download
Patches
Plain Diff
dtmfs start and stop according to how they are pressed
parent
55aa245f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gtk/main.c
+8
-3
gtk/main.c
mediastreamer2
+1
-1
mediastreamer2
with
9 additions
and
4 deletions
gtk/main.c
+
8
−
3
View file @
26d7e615
...
@@ -1080,24 +1080,29 @@ void linphone_gtk_load_identities(void){
...
@@ -1080,24 +1080,29 @@ void linphone_gtk_load_identities(void){
gtk_combo_box_set_active
(
box
,
def_index
);
gtk_combo_box_set_active
(
box
,
def_index
);
}
}
static
void
linphone_gtk_dtmf_
click
ed
(
GtkButton
*
button
){
static
void
linphone_gtk_dtmf_
press
ed
(
GtkButton
*
button
){
const
char
*
label
=
gtk_button_get_label
(
button
);
const
char
*
label
=
gtk_button_get_label
(
button
);
GtkWidget
*
uri_bar
=
linphone_gtk_get_widget
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)),
"uribar"
);
GtkWidget
*
uri_bar
=
linphone_gtk_get_widget
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)),
"uribar"
);
int
pos
=-
1
;
int
pos
=-
1
;
gtk_editable_insert_text
(
GTK_EDITABLE
(
uri_bar
),
label
,
1
,
&
pos
);
gtk_editable_insert_text
(
GTK_EDITABLE
(
uri_bar
),
label
,
1
,
&
pos
);
linphone_core_play_dtmf
(
linphone_gtk_get_core
(),
label
[
0
],
1
00
);
linphone_core_play_dtmf
(
linphone_gtk_get_core
(),
label
[
0
],
-
1
);
if
(
linphone_core_in_call
(
linphone_gtk_get_core
())){
if
(
linphone_core_in_call
(
linphone_gtk_get_core
())){
linphone_core_send_dtmf
(
linphone_gtk_get_core
(),
label
[
0
]);
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
){
static
void
linphone_gtk_connect_digits
(
void
){
GtkContainer
*
cont
=
GTK_CONTAINER
(
linphone_gtk_get_widget
(
linphone_gtk_get_main_window
(),
"dtmf_table"
));
GtkContainer
*
cont
=
GTK_CONTAINER
(
linphone_gtk_get_widget
(
linphone_gtk_get_main_window
(),
"dtmf_table"
));
GList
*
children
=
gtk_container_get_children
(
cont
);
GList
*
children
=
gtk_container_get_children
(
cont
);
GList
*
elem
;
GList
*
elem
;
for
(
elem
=
children
;
elem
!=
NULL
;
elem
=
elem
->
next
){
for
(
elem
=
children
;
elem
!=
NULL
;
elem
=
elem
->
next
){
GtkButton
*
button
=
GTK_BUTTON
(
elem
->
data
);
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
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
mediastreamer2
@
3103bc44
Subproject commit
955a7d6b8aa205e8a97d751dd8d3920de1595455
Subproject commit
3103bc444eb3469cb8003b8e4d816cb918fb41fd
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets