diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.h | 16 | ||||
-rw-r--r-- | indra/newview/llconversationview.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llconversationview.h | 14 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 18 |
5 files changed, 83 insertions, 11 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 832dc3c3e4..f54e6d2d48 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -29,7 +29,10 @@ #include "llconversationmodel.h" -// Conversation items +// +// Conversation items : common behaviors +// + LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLFolderViewModelItemCommon(root_view_model), mName(display_name), @@ -73,4 +76,32 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL return (compare < 0); } +// +// LLConversationItemSession +// + +LLConversationItemSession::LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(display_name,uuid,root_view_model) +{ +} + +LLConversationItemSession::LLConversationItemSession(LLFolderViewModelInterface& root_view_model) : + LLConversationItem(root_view_model) +{ +} + +// +// LLConversationItemParticipant +// + +LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(display_name,uuid,root_view_model) +{ +} + +LLConversationItemParticipant::LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model) : + LLConversationItem(root_view_model) +{ +} + // EOF diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index cb03128cac..fc2c600364 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -104,6 +104,22 @@ private: const LLUUID mUUID; }; +class LLConversationItemSession : public LLConversationItem +{ +public: + LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemSession(LLFolderViewModelInterface& root_view_model); + virtual ~LLConversationItemSession() {} +}; + +class LLConversationItemParticipant : public LLConversationItem +{ +public: + LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model); + virtual ~LLConversationItemParticipant() {} +}; + // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. // We just stubb everything for the moment. class LLConversationFilter : public LLFolderViewFilter diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 6cc911ecef..fefb7e9cac 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -32,6 +32,10 @@ #include "llimconversation.h" #include "llimfloatercontainer.h" +// +// Implementation of conversations list session widgets +// + LLConversationViewSession::Params::Params() : container() {} @@ -75,4 +79,13 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible) } } +// +// Implementation of conversations list participant (avatar) widgets +// + +LLConversationViewParticipant::LLConversationViewParticipant( const LLFolderViewItem::Params& p ): + LLFolderViewItem(p) +{ +} + // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 6a51e719c8..5695925f43 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -31,7 +31,7 @@ class LLIMFloaterContainer; -// Implementation of conversations list widgets +// Implementation of conversations list session widgets class LLConversationViewSession : public LLFolderViewFolder { @@ -55,4 +55,16 @@ public: void setVisibleIfDetached(BOOL visible); }; +// Implementation of conversations list participant (avatar) widgets + +class LLConversationViewParticipant : public LLFolderViewItem +{ +protected: + friend class LLUICtrlFactory; + LLConversationViewParticipant( const LLFolderViewItem::Params& p ); + +public: + virtual ~LLConversationViewParticipant( void ) { } +}; + #endif // LL_LLCONVERSATIONVIEW_H diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 35b9f404c3..4d0bd623f8 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -328,11 +328,11 @@ void LLIMFloaterContainer::setVisible(BOOL visible) // We need to show/hide all the associated conversations that have been torn off // (and therefore, are not longer managed by the multifloater), // so that they show/hide with the conversations manager. - conversations_widgets_map::iterator item_it = mConversationsWidgets.begin(); - for (;item_it != mConversationsWidgets.end(); ++item_it) + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + for (;widget_it != mConversationsWidgets.end(); ++widget_it) { - LLConversationViewSession* item = dynamic_cast<LLConversationViewSession*>(item_it->second); - item->setVisibleIfDetached(visible); + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second); + widget->setVisibleIfDetached(visible); } // Now, do the normal multifloater show/hide @@ -471,7 +471,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) removeConversationListItem(uuid,false); // Create a conversation item - LLConversationItem* item = new LLConversationItem(display_name, uuid, getRootViewModel()); + LLConversationItem* item = new LLConversationItemSession(display_name, uuid, getRootViewModel()); mConversationsItems[uuid] = item; // Create a widget from it @@ -513,11 +513,11 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c if (change_focus) { setFocus(TRUE); - conversations_items_map::iterator item_it = mConversationsItems.begin(); - if (item_it != mConversationsItems.end()) + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + if (widget_it != mConversationsWidgets.end()) { - LLConversationItem* item = item_it->second; - item->selectItem(); + LLFolderViewItem* widget = widget_it->second; + widget->selectItem(); } } } |