diff options
-rw-r--r-- | indra/newview/llcallfloater.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llcallfloater.h | 1 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_controls.xml | 12 |
7 files changed, 67 insertions, 17 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index b41f962ffa..46432a4953 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -119,6 +119,7 @@ void LLCallFloater::updateSession() lldebugs << "Set DEFAULT speaker manager" << llendl; } + updateTitle(); refreshPartisipantList(); } @@ -135,4 +136,20 @@ void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { updateSession(); } + +void LLCallFloater::updateTitle() +{ + LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (NULL == voice_channel) return; + + std::string title = voice_channel->getSessionName(); + + if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) + { + title = getString("title_nearby"); + } + + // *TODO: mantipov: update code to use title from xml for other chat types + setTitle(title); +} //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index bfaa1075c4..0cd5fe05c1 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -74,6 +74,7 @@ private: */ void refreshPartisipantList(); void onCurrentChannelChanged(const LLUUID& session_id); + void updateTitle(); private: LLSpeakerMgr* mSpeakerManager; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index caf9c08057..078c2518c6 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -267,20 +267,20 @@ protected: } private: - std::string appendTime(const LLChat& chat)
- {
- time_t utc_time;
- utc_time = time_corrected();
- std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
- +LLTrans::getString("TimeMin")+"] ";
-
- LLSD substitution;
-
- substitution["datetime"] = (S32) utc_time;
- LLStringUtil::format (timeStr, substitution);
-
- return timeStr;
- }
+ std::string appendTime(const LLChat& chat) + { + time_t utc_time; + utc_time = time_corrected(); + std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"] "; + + LLSD substitution; + + substitution["datetime"] = (S32) utc_time; + LLStringUtil::format (timeStr, substitution); + + return timeStr; + } void setTimeField(const LLChat& chat) { @@ -302,7 +302,7 @@ private: time_box->translate(delta_pos_x, delta_pos_y); //... & change width of the name control - LLTextBox* user_name = getChild<LLTextBox>("user_name"); + LLView* user_name = getChild<LLView>("user_name"); const LLRect& user_rect = user_name->getRect(); user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight()); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2f88578739..24092bab98 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -233,6 +233,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } + + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); + } } else // group || ad-hoc calls { diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 68dc1b511f..07a1214b4f 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -87,7 +87,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { const LLPointer<LLSpeaker>& speakerp = *it; - group_members.push_back(speakerp->mID); + addAvatarIDExceptAgent(group_members, speakerp->mID); if ( speakerp->mIsModerator ) { mModeratorList.insert(speakerp->mID); @@ -192,7 +192,7 @@ bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, co return true; } - group_members.push_back(uu_id); + addAvatarIDExceptAgent(group_members, uu_id); // Mark AvatarList as dirty one mAvatarList->setDirty(); sort(); @@ -260,6 +260,15 @@ void LLParticipantList::sort() } } +// static +void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id) +{ + if (gAgent.getID() != avatar_id) + { + existing_list.push_back(avatar_id); + } +} + // // LLParticipantList::SpeakerAddListener // diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index ce61dd9b96..460cf4b9ef 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -132,6 +132,11 @@ class LLParticipantList void onAvatarListDoubleClicked(LLAvatarList* list); void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); + /** + * Adds specified avatar ID to the existing list if it is not Agent's ID + */ + static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id); + LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 4434fe7403..4a5642e5c6 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -8,6 +8,18 @@ save_visibility="true" single_instance="true" width="282"> + <string + name="title_nearby"> + NEARBY VOICE + </string> + <string + name="title_group"> + Group Call with [GROUP] + </string> + <string + name="title_adhoc"> + Conference Call + </string> <panel bevel_style="in" follows="left|right|top" |