diff options
-rw-r--r-- | indra/llui/llmenugl.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterchat.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimview.h | 5 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llspeakers.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llspeakers.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml | 17 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_control_panel.xml | 20 |
11 files changed, 48 insertions, 29 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 527c0a1b87..29adb0d8b6 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2964,7 +2964,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) LLUI::getMousePositionLocal(menu->getParent(), &mouse_x, &mouse_y); LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x,mouse_y); - const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect(); + const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getRect(); const S32 HPAD = 2; LLRect rect = menu->getRect(); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index b9e0f928f1..8f91424f59 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -311,8 +311,10 @@ void LLFloaterChat::addChat(const LLChat& chat, BOOL from_instant_message, BOOL triggerAlerts(chat.mText); // Add the sender to the list of people with which we've recently interacted. - if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull()) - LLRecentPeople::instance().add(chat.mFromID); + // this is not the best place to add _all_ messages to recent list + // comment this for now, may remove later on code cleanup + //if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull()) + // LLRecentPeople::instance().add(chat.mFromID); bool add_chat = true; bool log_chat = true; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index daabf1f717..87b2793f9f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -382,10 +382,6 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f mSpeakers->speakerChatted(from_id); mSpeakers->setSpeakerTyping(from_id, FALSE); } - - if( mSessionType == P2P_SESSION || - mSessionType == ADHOC_SESSION) - LLRecentPeople::instance().add(from_id); } void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& history) @@ -684,6 +680,12 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); if (!session) return false; + //good place to add some1 to recent list + //other places may be called from message history. + if( !from_id.isNull() && + ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) + LLRecentPeople::instance().add(from_id); + // notify listeners LLSD arg; arg["session_id"] = session_id; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 20d8e28392..e72bda6c2b 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -78,6 +78,11 @@ public: bool isP2P(); bool isOtherParticipantAvaline(); + bool isP2PSessionType() const { return mSessionType == P2P_SESSION;} + bool isAdHocSessionType() const { return mSessionType == ADHOC_SESSION;} + bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;} + bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;} + LLUUID mSessionID; std::string mName; EInstantMessage mType; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 72994a4371..acbca60103 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -417,6 +417,7 @@ void LLInspectAvatar::updateModeratorPanel() LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); if(speaker_mgr->isVoiceActive() && selected_speakerp && + selected_speakerp->isInVoiceChannel() && ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) { getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index f3d6dbbb46..d14bdc5ab5 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -594,8 +594,10 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g if (it != mGroups.begin()) groups += ", "; - - std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]"; + std::string group_url= it->second.notNull() + ? "[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]" + : getString("no_partner_text"); + groups += group_url; } diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e2da4c4475..362454ee3c 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -592,8 +592,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& if (speakerp.notNull()) { // not in voice participants can not be moderated - return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE - || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + return speakerp->isInVoiceChannel(); } } return false; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 010dfd1b33..0dd9203c6d 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -88,6 +88,11 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c mDisplayName = first + " " + last; } +bool LLSpeaker::isInVoiceChannel() +{ + return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; +} + LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) : LLEvent(source, "Speaker add moderator event"), mSpeakerID (source->mID), diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 1a8c23f56a..da8dfdf548 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -67,6 +67,8 @@ public: void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + bool isInVoiceChannel(); + ESpeakerStatus mStatus; // current activity status in speech group F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index 6c54532a3a..28a6995186 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -4,7 +4,7 @@ follows="all" height="215" name="panel_im_control_panel" - width="180"> + width="150"> <layout_stack mouse_opaque="false" border_size="0" @@ -16,15 +16,16 @@ name="vertical_stack" orientation="vertical" top="0" - width="177"> + width="147"> <layout_panel auto_resize="true" follows="top|left" height="130" layout="topleft" + left="0" min_height="0" mouse_opaque="false" - width="180" + width="147" top="0" name="speakers_list_panel" user_resize="false"> @@ -39,7 +40,7 @@ show_info_btn="false" show_profile_btn="false" show_speaking_indicator="false" - width="180" /> + width="147" /> </layout_panel> <layout_panel auto_resize="false" @@ -47,7 +48,7 @@ height="25" layout="topleft" min_height="25" - width="160" + width="130" name="call_btn_panel" user_resize="false" visible="false"> @@ -56,7 +57,7 @@ height="20" label="Call" name="call_btn" - width="160" + width="130" top="5" /> </layout_panel> <layout_panel @@ -65,7 +66,7 @@ height="25" layout="topleft" min_height="25" - width="160" + width="130" name="end_call_btn_panel" user_resize="false" visible="false"> @@ -82,7 +83,7 @@ height="25" layout="topleft" min_height="25" - width="160" + width="130" name="voice_ctrls_btn_panel" user_resize="false" visible="false"> diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index 4073ef158b..aa7d621e4c 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -4,7 +4,7 @@ follows="all" height="238" name="panel_im_control_panel" - width="180"> + width="150"> <layout_stack mouse_opaque="false" border_size="0" @@ -16,7 +16,7 @@ name="vertical_stack" orientation="vertical" top="0" - width="175"> + width="145"> <layout_panel auto_resize="true" follows="top|left" @@ -24,7 +24,7 @@ layout="topleft" min_height="0" mouse_opaque="false" - width="180" + width="145" top="0" name="speakers_list_panel" user_resize="false"> @@ -39,7 +39,7 @@ show_info_btn="false" show_profile_btn="false" show_speaking_indicator="false" - width="180" /> + width="145" /> </layout_panel> <layout_panel auto_resize="false" @@ -47,7 +47,7 @@ height="28" layout="topleft" min_height="28" - width="160" + width="130" name="group_info_btn_panel" user_resize="false"> <button @@ -57,7 +57,7 @@ name="group_info_btn" use_ellipses="true" top="5" - width="160" /> + width="130" /> </layout_panel> <layout_panel auto_resize="false" @@ -65,7 +65,7 @@ height="28" layout="topleft" min_height="28" - width="160" + width="130" name="call_btn_panel" user_resize="false"> <button @@ -74,7 +74,7 @@ label="Call Group" name="call_btn" use_ellipses="true" - width="160" /> + width="130" /> </layout_panel> <layout_panel auto_resize="false" @@ -82,7 +82,7 @@ height="28" layout="topleft" min_height="28" - width="160" + width="130" name="end_call_btn_panel" user_resize="false" visible="false"> @@ -99,7 +99,7 @@ height="28" layout="topleft" min_height="28" - width="160" + width="130" name="voice_ctrls_btn_panel" user_resize="false" visible="false"> |