From 9a6e8dcdf4e23f208e5baf91f47237b4e5d6a7f9 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 14 Nov 2012 16:11:44 +0100 Subject: [PATCH] Disable conference button during transition states --- Classes/LinphoneUI/UICallBar.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Classes/LinphoneUI/UICallBar.m b/Classes/LinphoneUI/UICallBar.m index eda89bc0e..c1848ad14 100644 --- a/Classes/LinphoneUI/UICallBar.m +++ b/Classes/LinphoneUI/UICallBar.m @@ -277,6 +277,22 @@ [pauseButton setHidden:true]; [conferenceButton setHidden:false]; } + bool enabled = true; + const MSList *list = linphone_core_get_calls(lc); + while(list != NULL) { + LinphoneCall *call = (LinphoneCall*) list->data; + LinphoneCallState state = linphone_call_get_state(call); + if(state == LinphoneCallIncomingReceived || + state == LinphoneCallOutgoingInit || + state == LinphoneCallOutgoingProgress || + state == LinphoneCallOutgoingRinging || + state == LinphoneCallOutgoingEarlyMedia || + state == LinphoneCallConnected) { + enabled = false; + } + list = list->next; + } + [conferenceButton setEnabled:enabled]; } else { if([pauseButton isHidden]) { [pauseButton setHidden:false];