diff options
author | Cho <cho@lindenlab.com> | 2013-02-25 18:11:51 +0000 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-02-25 18:11:51 +0000 |
commit | cbbf1504f015f42e3426a92129824e05021e1fe3 (patch) | |
tree | 4922b33e421f7c1184330f62793f6f9519e149de /indra/newview/llfloaterimcontainer.cpp | |
parent | 6194302a849431e84c046325d3cd19e92f62aa6f (diff) | |
parent | 4b6e1c26f05d89aa130a899803553940069457c0 (diff) |
merging
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 2d12d4ec21..c5edd11c12 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1337,6 +1337,30 @@ void LLFloaterIMContainer::selectConversation(const LLUUID& session_id) selectConversationPair(session_id, true); } +// Select the conversation *after* (or before if none after) the passed uuid conversation +// Used to change the selection on key hits +void LLFloaterIMContainer::selectNextConversation(const LLUUID& uuid) +{ + LLFolderViewItem* new_selection = NULL; + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); + if (widget) + { + new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + if (!new_selection) + { + new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + } + } + if (new_selection) + { + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem()); + if (vmi) + { + selectConversationPair(vmi->getUUID(), true); + } + } +} + // Synchronous select the conversation item and the conversation floater BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget) { |