diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-11 17:45:45 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-11 17:45:45 -0700 |
commit | 7b78e72bf148d20a402eadb8629bf15dc2f100a3 (patch) | |
tree | 4209d49b18635a5c58317268965641ce89f69287 /indra/newview/llconversationview.cpp | |
parent | ef39011f433d93ea72cf636d4c415b468f776a01 (diff) | |
parent | cb8ce1141837cc450756764e03a4564f8ab0c9eb (diff) |
merging in latest changes
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 9c1c9aa225..1d1c774874 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -39,7 +39,7 @@ // // Implementation of conversations list session widgets // - + LLConversationViewSession::Params::Params() : @@ -85,6 +85,36 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible) } } +LLConversationViewParticipant* LLConversationViewSession::findParticipant(const LLUUID& participant_id) +{ + // This is *not* a general tree parsing algorithm. We search only in the mItems list + // assuming there is no mFolders which makes sense for sessions (sessions don't contain + // sessions). + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast<LLConversationViewParticipant*>(*iter); + if (participant->hasSameValue(participant_id)) + { + break; + } + } + return (iter == getItemsEnd() ? NULL : participant); +} + +void LLConversationViewSession::refresh() +{ + // Refresh the session view from its model data + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); + vmi->resetRefresh(); + + // Note: for the moment, all that needs to be done is done by LLFolderViewItem::refresh() + + // Do the regular upstream refresh + LLFolderViewFolder::refresh(); +} + // // Implementation of conversations list participant (avatar) widgets // @@ -93,13 +123,15 @@ static LLDefaultChildRegistry::Register<LLConversationViewParticipant> r("conver LLConversationViewParticipant::Params::Params() : container(), +participant_id(), info_button("info_button"), output_monitor("output_monitor") {} LLConversationViewParticipant::LLConversationViewParticipant( const LLConversationViewParticipant::Params& p ): - LLFolderViewItem(p) -{ + LLFolderViewItem(p), + mUUID(p.participant_id) +{ } @@ -124,6 +156,18 @@ BOOL LLConversationViewParticipant::postBuild() return TRUE; } +void LLConversationViewParticipant::refresh() +{ + // Refresh the participant view from its model data + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); + vmi->resetRefresh(); + + // Note: for the moment, all that needs to be done is done by LLFolderViewItem::refresh() + + // Do the regular upstream refresh + LLFolderViewItem::refresh(); +} + void LLConversationViewParticipant::onInfoBtnClick() { @@ -189,3 +233,4 @@ void LLConversationViewParticipant::draw() } // EOF + |