diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 3efb14af201e4521e9bf3124e166b1c46092e0f5..d8dad00353722a7351598bc4fcd0ee1786cf9c68 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -913,12 +913,20 @@ sflphone_display_selected_codec (const gchar* codecName) msg = g_markup_printf_escaped (_("IP call - %s"), codecName); } else { - msg = g_markup_printf_escaped("%s %s (%s) - %s %s" , + + if (strcmp(codecName, "") != 0) { + msg = g_markup_printf_escaped("%s %s (%s) - %s %s" , _("Using account"), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE), _("Codec"), codecName); + } else { + msg = g_markup_printf_escaped("%s %s (%s)" , + _("Using account"), + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE)); + } } statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); g_free(msg); diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index b5f24b2694256aeaf79724e602a7db5c1cee26f6..9f802389ec0f89d0cc69820ea4804c137e40aae5 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -279,6 +279,12 @@ row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED) */ if( active_calltree == current_calls ) { + + // sflphone_selected_call_codec(selectedCall); + + // DEBUG("single click action: %s", dbus_get_current_codec_name(selectedCall)); + sflphone_display_selected_codec(dbus_get_current_codec_name(selectedCall)); + switch(selectedCall->_srtp_state) { case SRTP_STATE_SAS_UNCONFIRMED: diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index abed5c1acfbe438887ec7f30ca40be93c4cc3f43..17c1a2accb28b5091db0aaf7c9dfd6288a46c09a 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -2502,10 +2502,15 @@ ManagerImpl::getCodecDetails (const int32_t& payload) std::string ManagerImpl::getCurrentCodecName (const CallID& id) { - // _debug("ManagerImpl::getCurrentCodecName method called \n"); - AccountID accountid = getAccountFromCall (id); - // _debug("ManagerImpl::getCurrentCodecName : %s \n",getAccountLink(accountid)->getCurrentCodecName().c_str()); - return getAccountLink (accountid)->getCurrentCodecName(); + + AccountID accountid = getAccountFromCall(id); + VoIPLink* link = getAccountLink (accountid); + Call* call = link->getCall(id); + + if(call->getState() != Call::Active) + return ""; + else + return link->getCurrentCodecName(); } /**