diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llconversationmodel.h | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llconversationview.cpp | 102 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llconversationview.h | 51 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llimfloatercontainer.cpp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llviewerfoldertype.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml | 33 |
6 files changed, 176 insertions, 20 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..1d1c774874 100644..100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -32,10 +32,16 @@ #include "llimconversation.h" #include "llimfloatercontainer.h" + +#include "lluictrlfactory.h" +#include "llavatariconctrl.h" + // // Implementation of conversations list session widgets // + + LLConversationViewSession::Params::Params() : container() {} @@ -113,14 +119,41 @@ 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()); + LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params); + addChild(button); + + LLOutputMonitorCtrl::Params output_monitor_params(params.output_monitor()); + 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)); + + + LLFolderViewItem::postBuild(); + return TRUE; } void LLConversationViewParticipant::refresh() @@ -135,4 +168,69 @@ void LLConversationViewParticipant::refresh() LLFolderViewItem::refresh(); } +void LLConversationViewParticipant::onInfoBtnClick() +{ + + +} + +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() +{ + LLFolderViewItem::draw(); +} + // EOF + diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index a3755d9722..a7946f4d06 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,40 @@ 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 ) { } + virtual void draw(); + bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } + virtual void refresh(); + 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* createProfileButton(); + LLButton * mInfoBtn; + LLUUID mUUID; // UUID of the participant }; #endif // LL_LLCONVERSATIONVIEW_H diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index faca92e662..faca92e662 100644..100755 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp 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..0b5c1b9511 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml @@ -0,0 +1,33 @@ +<?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 + height="16" + image_pressed="Info_Press" + image_unselected="Info_Over" + layout="topleft" + left_pad="3" + right="200" + name="info_btn" + tab_stop="false" + top_delta="0" + width="16" /> +<output_monitor + auto_update="true" + draw_border="false" + height="16" + layout="topleft" + left_pad="5" + right="225" + mouse_opaque="true" + name="speaking_indicator" + visible="true" + width="20" /> +</conversation_view_participant> |