Skip to content
Snippets Groups Projects
Commit bc57c738 authored by Yuri Chebotarev's avatar Yuri Chebotarev
Browse files

merge

--HG--
branch : product-engine
parents e8421572 4441b83e
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,13 @@ void LLAvatarList::draw()
}
}
//virtual
void LLAvatarList::clear()
{
getIDs().clear();
setDirty(true);
}
void LLAvatarList::setNameFilter(const std::string& filter)
{
if (mNameFilter != filter)
......
......@@ -70,6 +70,8 @@ class LLAvatarList : public LLFlatListView
virtual void draw(); // from LLView
virtual void clear();
void setNameFilter(const std::string& filter);
void setDirty(bool val = true) { mDirty = val; }
uuid_vector_t& getIDs() { return mIDs; }
......
......@@ -62,8 +62,6 @@ BOOL LLCallFloater::postBuild()
LLDockableFloater::postBuild();
mAvatarList = getChild<LLAvatarList>("speakers_list");
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, false);
LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_panel");
......@@ -73,4 +71,27 @@ BOOL LLCallFloater::postBuild()
return TRUE;
}
// virtual
void LLCallFloater::onOpen(const LLSD& key)
{
// by default let show nearby chat participants
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
const LLUUID& session_id = key.asUUID();
LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id);
if (im_session)
{
mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id);
}
delete mPaticipants;
mAvatarList->clear();
mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, false);
}
//////////////////////////////////////////////////////////////////////////
/// PRIVATE SECTION
//////////////////////////////////////////////////////////////////////////
//EOF
......@@ -58,6 +58,7 @@ class LLCallFloater : public LLDockableFloater
~LLCallFloater();
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
private:
......
......@@ -48,6 +48,8 @@
#include "llscrollcontainer.h"
#include "llavatariconctrl.h"
#include "llweb.h"
#include "llfloaterworldmap.h"
#include "llfloaterreg.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLDropTarget
......@@ -150,6 +152,8 @@ BOOL LLPanelAvatarNotes::postBuild()
childSetCommitCallback("call", boost::bind(&LLPanelAvatarNotes::onCallButtonClick, this), NULL);
childSetCommitCallback("teleport", boost::bind(&LLPanelAvatarNotes::onTeleportButtonClick, this), NULL);
childSetCommitCallback("share", boost::bind(&LLPanelAvatarNotes::onShareButtonClick, this), NULL);
childSetCommitCallback("show_on_map_btn", (boost::bind(
&LLPanelAvatarNotes::onMapButtonClick, this)), NULL);
LLTextEditor* te = getChild<LLTextEditor>("notes_edit");
te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this));
......@@ -311,6 +315,7 @@ void LLPanelProfileTab::onOpen(const LLSD& key)
// Update data even if we are viewing same avatar profile as some data might been changed.
setAvatarId(key.asUUID());
updateData();
updateButtons();
}
void LLPanelProfileTab::scrollToTop()
......@@ -320,6 +325,22 @@ void LLPanelProfileTab::scrollToTop()
scrollContainer->goToTop();
}
void LLPanelProfileTab::onMapButtonClick()
{
std::string name;
gCacheName->getFullName(getAvatarId(), name);
gFloaterWorldMap->trackAvatar(getAvatarId(), name);
LLFloaterReg::showInstance("world_map");
}
void LLPanelProfileTab::updateButtons()
{
bool enable_map_btn = LLAvatarTracker::instance().isBuddyOnline(getAvatarId())
&& gAgent.isGodlike() || is_agent_mappable(getAvatarId());
childSetEnabled("show_on_map_btn", enable_map_btn);
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
......@@ -338,6 +359,8 @@ BOOL LLPanelAvatarProfile::postBuild()
childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL);
childSetCommitCallback("overflow_btn", boost::bind(&LLPanelAvatarProfile::onOverflowButtonClicked, this), NULL);
childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
childSetCommitCallback("show_on_map_btn", (boost::bind(
&LLPanelAvatarProfile::onMapButtonClick, this)), NULL);
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this));
......
......@@ -106,6 +106,10 @@ class LLPanelProfileTab
*/
void scrollToTop();
virtual void onMapButtonClick();
virtual void updateButtons();
private:
LLUUID mAvatarId;
......
......@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterreg.h"
#include "llpanelimcontrolpanel.h"
#include "llagent.h"
......@@ -58,7 +60,7 @@ void LLPanelChatControlPanel::onEndCallButtonClicked()
void LLPanelChatControlPanel::onOpenVoiceControlsClicked()
{
// TODO: implement Voice Control Panel opening
LLFloaterReg::showInstance("voice_controls", getSessionId());
}
void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
......
......@@ -86,6 +86,9 @@ class LLPanelPicks
// parent panels failed to work (picks related code was in my profile panel)
void setProfilePanel(LLPanelProfile* profile_panel);
protected:
/*virtual*/void updateButtons();
private:
void onClickDelete();
void onClickTeleport();
......@@ -125,7 +128,6 @@ class LLPanelPicks
bool callbackDeleteClassified(const LLSD& notification, const LLSD& response);
bool callbackTeleport(const LLSD& notification, const LLSD& response);
void updateButtons();
virtual void onDoubleClickPickItem(LLUICtrl* item);
virtual void onDoubleClickClassifiedItem(LLUICtrl* item);
......
......@@ -89,6 +89,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mModeratorList.insert(speakerp->mID);
}
}
mAvatarList->setDirty(true);
sort();
}
......
......@@ -25,13 +25,13 @@
<avatar_icon
enabled="false"
follows="left|top"
height="20"
image_name="icon_avatar_online.tga"
height="18"
image_name="Generic_Person"
layout="topleft"
left="0"
name="user_icon"
top="0"
width="20" />
width="18" />
<text
follows="top|left"
font="SansSerifSmallBold"
......
......@@ -61,7 +61,6 @@
width="125"/>
<button
enabled="false"
bottom="10"
follows="all"
height="20"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment