diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index d497534105d70f09c6cf2460535dbc6dfa0a9f4e..62f713952426cb2b2affa04c4cd057b11c80ae2e 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -983,7 +983,12 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d { // TODO: dragged a conference call on a call // TODO: dragged a conference call on a conference - // TODO: dragged a conference call on a NULL element + + else if(selected_type == A_CONFERENCE && dragged_type == NULL) + { + // TODO: dragged a conference call on a NULL element + sflphone_detach_participant(selected_call_id); + } } else // dragged_path_depth == 2 { diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index aee0a42e0d12c64a31b4cdee77f56ace346418c6..c7f2761bf3f6852531b3766de9fe0f991d3e41c9 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -821,15 +821,23 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id) iter_details = call_details.find("CALL_STATE"); if (iter_details->second == "HOLD") - { - _debug(" OFFHOLD %s\n", call_id.c_str()); - offHoldCall(call_id); - } + { + _debug(" OFFHOLD %s\n", call_id.c_str()); + offHoldCall(call_id); + } else if(iter_details->second == "INCOMING") - { - _debug(" ANSWER %s\n", call_id.c_str()); - answerCall(call_id); - } + { + _debug(" ANSWER %s\n", call_id.c_str()); + answerCall(call_id); + } + + AccountID currentAccountId; + + Call* call = NULL; + + currentAccountId = getAccountFromCall (call_id); + call = getAccountLink (currentAccountId)->getCall (conference_id); + call->setConfId (default_conf); _dbus->getCallManager()->conferenceChanged(conference_id); } @@ -883,13 +891,24 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2) _debug(" ANSWER %s\n", call_id2.c_str()); answerCall(call_id2); } - - + + AccountID currentAccountId; + + Call* call = NULL; + + currentAccountId = getAccountFromCall (call_id1); + call = getAccountLink (currentAccountId)->getCall (call_id1); + call->setConfId (default_conf); + + currentAccountId = getAccountFromCall (call_id2); + call = getAccountLink (currentAccountId)->getCall (call_id2); + call->setConfId (default_conf); } else { - _debug("ALREADY A CONFERENCE CREATED, ADD PARTICIPANT TO IT\n"); + _debug("ALREADY A CONFERENCE CREATED\n"); + /* Conference* conf = iter->second; conf->add(call_id1); _conferencecall.insert(pair<CallID, Conference*>(call_id1, conf)); @@ -905,6 +924,7 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2) _debug(" Add INCOMING call to conference\n"); answerCall(call_id1); } + */ /* iter_details = call2_details.find("CALL_STATE"); @@ -919,17 +939,6 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2) */ } - AccountID currentAccountId; - - Call* call = NULL; - - currentAccountId = getAccountFromCall (call_id1); - call = getAccountLink (currentAccountId)->getCall (call_id1); - call->setConfId (default_conf); - - currentAccountId = getAccountFromCall (call_id2); - call = getAccountLink (currentAccountId)->getCall (call_id2); - call->setConfId (default_conf); } @@ -946,7 +955,7 @@ ManagerImpl::detachParticipant(const CallID& call_id) } else { - _debug("ALREADY A CONFERENCE CREATED, ADD PARTICIPANT TO IT\n"); + _debug("ManagerImpl::detachParticipant detach participant %s\n", call_id.c_str()); // Conference* conf = iter->second; // conf->remove(call_id); @@ -955,15 +964,9 @@ ManagerImpl::detachParticipant(const CallID& call_id) removeParticipant(call_id); onHoldCall(call_id); - } - - AccountID currentAccountId; - Call* call = NULL; - - currentAccountId = getAccountFromCall (call_id); - call = getAccountLink (currentAccountId)->getCall (default_conf); - call->setConfId (default_conf); + // _dbus->getCallManager()->conferenceChanged(conference_id); + } }