Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
668d125b
Commit
668d125b
authored
Aug 03, 2015
by
Gautier Pelloux-Prayer
Browse files
main.c: redo properly button management in linphone_gtk_update_call_buttons()
parent
6d3d8a8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
668d125b
...
...
@@ -89,3 +89,4 @@ tester/record_for_lc_*.wav
tester/record-call_with_file_player.wav
tester/ZIDCache*.xml
tester/stereo-record.wav
gtk/main.c
View file @
668d125b
...
...
@@ -447,28 +447,28 @@ GtkWidget *linphone_gtk_create_widget_2(const char *filename, const char *widget
GtkBuilder
*
builder
=
gtk_builder_new
();
GError
*
error
=
NULL
;
GObject
*
obj
;
if
(
get_ui_file
(
filename
,
path
,
sizeof
(
path
))
==
-
1
)
goto
end
;
gtk_builder_set_translation_domain
(
builder
,
GETTEXT_PACKAGE
);
if
(
gtk_builder_add_from_file
(
builder
,
path
,
&
error
)
==
0
)
{
g_error
(
"Couldn't load builder file: %s"
,
error
->
message
);
g_error_free
(
error
);
goto
end
;
}
obj
=
gtk_builder_get_object
(
builder
,
widget_name
);
if
(
obj
==
NULL
)
{
g_error
(
"'%s' widget not found"
,
widget_name
);
goto
end
;
}
w
=
GTK_WIDGET
(
obj
);
g_object_set_data_full
(
obj
,
"builder"
,
builder
,
g_object_unref
);
gtk_widget_unparent
(
w
);
end:
return
w
;
}
...
...
@@ -870,22 +870,12 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
GtkWidget
*
mw
=
linphone_gtk_get_main_window
();
const
MSList
*
calls
=
linphone_core_get_calls
(
lc
);
GtkWidget
*
button
;
bool_t
start_active
=
TRUE
;
//bool_t stop_active=FALSE;
bool_t
add_call
=
FALSE
;
bool_t
add_call
=
(
calls
!=
NULL
);
int
call_list_size
=
ms_list_size
(
calls
);
GtkWidget
*
conf_frame
;
if
(
calls
==
NULL
){
start_active
=
TRUE
;
//stop_active=FALSE;
}
else
{
//stop_active=TRUE;
start_active
=
TRUE
;
add_call
=
TRUE
;
}
button
=
linphone_gtk_get_widget
(
mw
,
"start_call"
);
gtk_widget_set_sensitive
(
button
,
start_active
);
gtk_widget_set_sensitive
(
button
,
TRUE
);
gtk_widget_set_visible
(
button
,
!
add_call
);
button
=
linphone_gtk_get_widget
(
mw
,
"add_call"
);
...
...
@@ -893,10 +883,10 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
if
(
linphone_core_sound_resources_locked
(
lc
)
||
(
call
&&
linphone_call_get_state
(
call
)
==
LinphoneCallIncomingReceived
))
{
gtk_widget_set_sensitive
(
button
,
FALSE
);
}
else
{
gtk_widget_set_sensitive
(
button
,
start_active
);
gtk_widget_set_sensitive
(
button
,
TRUE
);
}
gtk_widget_set_visible
(
button
,
add_call
);
//gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),stop_active);
conf_frame
=
(
GtkWidget
*
)
g_object_get_data
(
G_OBJECT
(
mw
),
"conf_frame"
);
if
(
conf_frame
==
NULL
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment