summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-x[-rw-r--r--]indra/newview/llconversationmodel.h8
-rwxr-xr-x[-rw-r--r--]indra/newview/llconversationview.cpp73
-rwxr-xr-x[-rw-r--r--]indra/newview/llconversationview.h54
-rwxr-xr-x[-rw-r--r--]indra/newview/llimfloatercontainer.cpp3
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerfoldertype.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml32
6 files changed, 151 insertions, 21 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 2775bf8186..4f13d3d3a1 100644..100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -30,6 +30,7 @@
#include "llfolderviewitem.h"
#include "llfolderviewmodel.h"
#include "llavatarname.h"
+#include "llviewerfoldertype.h"
// Implementation of conversations list
@@ -56,7 +57,7 @@ public:
virtual const std::string& getSearchableName() const { return mName; }
virtual const LLUUID& getUUID() const { return mUUID; }
virtual time_t getCreationDate() const { return 0; }
- virtual LLPointer<LLUIImage> getIcon() const { return NULL; }
+ virtual LLPointer<LLUIImage> getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILE, FALSE)); }
virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); }
virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; }
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
@@ -103,7 +104,7 @@ public:
// bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); }
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
-
+
void resetRefresh() { mNeedsRefresh = false; }
bool needsRefresh() { return mNeedsRefresh; }
@@ -120,6 +121,7 @@ public:
LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
virtual ~LLConversationItemSession() {}
+ LLPointer<LLUIImage> getIcon() const { return NULL; }
void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; }
void addParticipant(LLConversationItemParticipant* participant);
void removeParticipant(LLConversationItemParticipant* participant);
@@ -151,7 +153,7 @@ public:
void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; }
void onAvatarNameCache(const LLAvatarName& av_name);
-
+
void dumpDebugData();
private:
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 9f3df93aba..7b1c9ef912 100644..100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -31,11 +31,17 @@
#include "llconversationmodel.h"
#include "llimconversation.h"
#include "llimfloatercontainer.h"
+#include "llfloaterreg.h"
+
+#include "lluictrlfactory.h"
+#include "llavatariconctrl.h"
//
// Implementation of conversations list session widgets
//
+
+
LLConversationViewSession::Params::Params() :
container()
{}
@@ -113,14 +119,45 @@ void LLConversationViewSession::refresh()
// Implementation of conversations list participant (avatar) widgets
//
+static LLDefaultChildRegistry::Register<LLConversationViewParticipant> r("conversation_view_participant");
+
LLConversationViewParticipant::Params::Params() :
- participant_id()
+container(),
+participant_id(),
+info_button("info_button"),
+output_monitor("output_monitor")
{}
LLConversationViewParticipant::LLConversationViewParticipant( const LLConversationViewParticipant::Params& p ):
LLFolderViewItem(p),
- mUUID(p.participant_id)
+ mUUID(p.participant_id)
+{
+
+}
+
+void LLConversationViewParticipant::initFromParams(const LLConversationViewParticipant::Params& params)
+{
+ LLButton::Params info_button_params(params.info_button());
+ applyXUILayout(info_button_params, this);
+ LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params);
+ addChild(button);
+
+ LLOutputMonitorCtrl::Params output_monitor_params(params.output_monitor());
+ applyXUILayout(output_monitor_params, this);
+ LLOutputMonitorCtrl * outputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(output_monitor_params);
+ addChild(outputMonitor);
+}
+
+BOOL LLConversationViewParticipant::postBuild()
{
+ mInfoBtn = getChild<LLButton>("info_btn");
+ mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this));
+ mInfoBtn->setVisible(false);
+
+ mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
+
+ LLFolderViewItem::postBuild();
+ return TRUE;
}
void LLConversationViewParticipant::refresh()
@@ -135,4 +172,36 @@ void LLConversationViewParticipant::refresh()
LLFolderViewItem::refresh();
}
+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
+ }
+}
+
+void LLConversationViewParticipant::onInfoBtnClick()
+{
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));
+}
+
+void LLConversationViewParticipant::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ mInfoBtn->setVisible(true);
+ LLFolderViewItem::onMouseEnter(x, y, mask);
+}
+
+void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ mInfoBtn->setVisible(false);
+ LLFolderViewItem::onMouseEnter(x, y, mask);
+}
+
// EOF
+
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index a3755d9722..0dcf6542a3 100644..100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -29,6 +29,15 @@
#include "llfolderviewitem.h"
+
+
+
+#include "llstyle.h"
+#include "llcallbackmap.h"
+#include "lltextbox.h"
+#include "llbutton.h"
+#include "lloutputmonitorctrl.h"
+
class LLIMFloaterContainer;
class LLConversationViewSession;
class LLConversationViewParticipant;
@@ -62,28 +71,43 @@ public:
// Implementation of conversations list participant (avatar) widgets
+class LLAvatarIconCtrl;
+
class LLConversationViewParticipant : public LLFolderViewItem
{
+
public:
- struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
- {
- Optional<LLUUID> participant_id;
-
- Params();
- };
-
+
+ struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
+ {
+ Optional<LLIMFloaterContainer*> container;
+ Optional<LLUUID> participant_id;
+ Optional<LLButton::Params> info_button;
+ Optional<LLOutputMonitorCtrl::Params> output_monitor;
+
+ Params();
+ };
+
+ virtual ~LLConversationViewParticipant( void ) { }
+ bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
+ virtual void refresh();
+ void addToFolder(LLFolderViewFolder* folder);
+
+ void onMouseEnter(S32 x, S32 y, MASK mask);
+ void onMouseLeave(S32 x, S32 y, MASK mask);
+
protected:
friend class LLUICtrlFactory;
- LLConversationViewParticipant( const Params& p );
-
-public:
- virtual ~LLConversationViewParticipant( void ) { }
-
- bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
+ LLConversationViewParticipant( const Params& p );
+ void initFromParams(const Params& params);
+ BOOL postBuild();
- virtual void refresh();
+ void onInfoBtnClick();
+
private:
- LLUUID mUUID; // UUID of the participant
+ LLButton * mInfoBtn;
+ LLOutputMonitorCtrl* mSpeakingIndicator;
+ LLUUID mUUID; // UUID of the participant
};
#endif // LL_LLCONVERSATIONVIEW_H
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index a1bd623ac5..9320117eb5 100644..100755
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -716,6 +716,7 @@ LLConversationViewSession* LLIMFloaterContainer::createConversationItemWidget(LL
LLConversationViewParticipant* LLIMFloaterContainer::createConversationViewParticipant(LLConversationItem* item)
{
LLConversationViewParticipant::Params params;
+ LLRect panel_rect = mConversationsListPanel->getRect();
params.name = item->getDisplayName();
//params.icon = bridge->getIcon();
@@ -723,7 +724,7 @@ LLConversationViewParticipant* LLIMFloaterContainer::createConversationViewParti
//params.creation_date = bridge->getCreationDate();
params.root = mConversationsRoot;
params.listener = item;
- params.rect = LLRect (0, 0, 0, 0);
+ params.rect = LLRect (0, 16, panel_rect.getWidth(), 0);
params.tool_tip = params.name;
params.participant_id = item->getUUID();
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index a179b61cff..d470abb8c5 100644..100755
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -147,6 +147,8 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false));
}
#endif
+
+ addEntry(LLFolderType::FT_PROFILE, new ViewerFolderEntry("Profile", "Generic_Person", "Generic_Person", FALSE, false, "default"));
}
bool LLViewerFolderDictionary::initEnsemblesFromFile()
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
new file mode 100755
index 0000000000..60015576b5
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<conversation_view_participant
+ folder_arrow_image="ForSale_Badge"
+ folder_indentation="8"
+ item_height="20"
+ item_top_pad="4"
+ selection_image="Rounded_Square"
+ mouse_opaque="true"
+ follows="left|top|right"
+>
+<info_button
+ follows="right"
+ auto_update="true"
+ height="16"
+ image_pressed="Info_Press"
+ image_unselected="Info_Over"
+ layout="topleft"
+ right="-28"
+ name="info_btn"
+ width="16" />
+<output_monitor
+ follows="right"
+ auto_update="true"
+ draw_border="false"
+ height="16"
+ layout="topleft"
+ right="-3"
+ mouse_opaque="true"
+ name="speaking_indicator"
+ visible="true"
+ width="20" />
+</conversation_view_participant>