diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
| commit | a997e131d4262f0a18a6f4f8c305c73edbfea6b6 (patch) | |
| tree | 5b7f8595e7911f4fd7ba6f2824c6b92f8478a9ef /indra/newview/llsyswellwindow.cpp | |
| parent | cab31b572d1a3b717b7f8b9fdf2a49f0b2eb6995 (diff) | |
| parent | bbf497469c4d71d5308421f1ef06d0a2098772c8 (diff) | |
Merge with SVN viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
| -rw-r--r-- | indra/newview/llsyswellwindow.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 7ddbf0a744..98428bf0f7 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -154,6 +154,8 @@ void LLSysWellWindow::toggleWindow() getDockTongue(), LLDockControl::TOP, isDocked())); } setVisible(!getVisible()); + //set window in foreground + setFocus(getVisible()); } //--------------------------------------------------------------------------------- @@ -179,7 +181,7 @@ void LLSysWellWindow::setVisible(BOOL visible) if(mChannel) mChannel->setShowToasts(!visible); - LLFloater::setVisible(visible); + LLDockableFloater::setVisible(visible); } //--------------------------------------------------------------------------------- @@ -329,11 +331,28 @@ void LLSysWellWindow::sessionRemoved(const LLUUID& sessionId) //--------------------------------------------------------------------------------- LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) : - LLScrollingPanel(LLPanel::Params()), mParent(parent) + LLScrollingPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_activeim_row.xml", NULL); - mChiclet = getChild<LLIMChiclet>("chiclet"); + // Choose which of the pre-created chiclets (IM/group) to use. + // The other one gets hidden. + + LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(sessionId); + switch (im_chiclet_type) + { + case LLIMChiclet::TYPE_GROUP: + mChiclet = getChild<LLIMChiclet>("group_chiclet"); + childSetVisible("p2p_chiclet", false); + break; + case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway + case LLIMChiclet::TYPE_IM: + mChiclet = getChild<LLIMChiclet>("p2p_chiclet"); + childSetVisible("group_chiclet", false); + break; + } + + // Initialize chiclet. mChiclet->setCounter(chicletCounter); mChiclet->setSessionId(sessionId); mChiclet->setIMSessionName(name); |
