diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-12 15:43:05 -0700 | 
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-12 15:43:05 -0700 | 
| commit | ab43940f11b9690c1d3f6874241c66f200f84258 (patch) | |
| tree | ce6ae5f4689eff5b3686ef64a24e420ac84cd0a9 /indra | |
| parent | 7b78e72bf148d20a402eadb8629bf15dc2f100a3 (diff) | |
CHUI-283: Now the speaker icon and information icon are functional.
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/llconversationview.cpp | 72 | ||||
| -rwxr-xr-x | indra/newview/llconversationview.h | 6 | 
2 files changed, 17 insertions, 61 deletions
| diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 1d1c774874..9fb4b4f0dc 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -31,7 +31,7 @@  #include "llconversationmodel.h"  #include "llimconversation.h"  #include "llimfloatercontainer.h" - +#include "llfloaterreg.h"  #include "lluictrlfactory.h"  #include "llavatariconctrl.h" @@ -151,6 +151,7 @@ BOOL LLConversationViewParticipant::postBuild()  	mInfoBtn = getChild<LLButton>("info_btn");  	mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); +	mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");  	LLFolderViewItem::postBuild();  	return TRUE; @@ -168,68 +169,23 @@ void LLConversationViewParticipant::refresh()  	LLFolderViewItem::refresh();  } -void LLConversationViewParticipant::onInfoBtnClick() +void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder)  { -	 -	 +    //Add the item to the folder (conversation) +    LLFolderViewItem::addToFolder(folder); +	 +    //Now retrieve the folder (conversation) UUID, which is the speaker session +    LLConversationItem* vmi = this->getParentFolder() ? dynamic_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL; +    if(vmi) +    { +        mSpeakingIndicator->setSpeakerId(mUUID,  +            vmi->getUUID()); //set the session id  } - -LLButton* LLConversationViewParticipant::createProfileButton() -{ -	 -	LLButton::Params params; -	 -	 -	//<button -	params.follows.flags(FOLLOWS_RIGHT); -	//params.height="20"; -	LLUIImage * someImage = LLUI::getUIImage("Web_Profile_Off"); -	params.image_overlay = someImage; -	params.layout="topleft"; -	params.left_pad=5; -	//params.right="-28"; -	params.name="profile_btn"; -	params.tab_stop="false"; -	params.tool_tip="View profile"; -	params.top_delta=-2; -	//params.width="20"; -	///>	 -	 -	 -	/* -	LLConversationViewParticipant::Params params; -	 -	params.name = item->getDisplayName(); -	//params.icon = bridge->getIcon(); -	//params.icon_open = bridge->getOpenIcon(); -	//params.creation_date = bridge->getCreationDate(); -	params.root = mConversationsRoot; -	params.listener = item; -	params.rect = LLRect (0, 0, 0, 0); -	params.tool_tip = params.name; -	params.container = this; -	*/ -	 -	LLButton * button = LLUICtrlFactory::create<LLButton>(params); -	LLRect someRect; -	someRect.setOriginAndSize(30, 0, 20, 20); -	button->setShape(someRect); -	 -	//button->follows= "right"; -	//button->height = 20; -	//button->image_overlay="Web_Profile_Off"; -	//button->right = -28; -	//button->width = 20; - -	 -	 -	return button;  } - -void LLConversationViewParticipant::draw() +void LLConversationViewParticipant::onInfoBtnClick()  { -    LLFolderViewItem::draw(); +	LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));  }  // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index a7946f4d06..2ac6c999d6 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -89,9 +89,9 @@ public:      };      virtual ~LLConversationViewParticipant( void ) { } -    virtual void draw();      bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }      virtual void refresh(); +    void addToFolder(LLFolderViewFolder* folder);  protected:  	friend class LLUICtrlFactory; @@ -102,9 +102,9 @@ protected:  	void onInfoBtnClick();  private: -	LLButton* createProfileButton();  	LLButton * mInfoBtn; -    LLUUID mUUID;		// UUID of the participant	 +    LLOutputMonitorCtrl* mSpeakingIndicator; +    LLUUID mUUID;		// UUID of the participant  };  #endif // LL_LLCONVERSATIONVIEW_H | 
