diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-07-30 19:09:48 -0700 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-30 19:09:48 -0700 |
| commit | b57d8e9c06e01cc6aa2eca17fa80da0a36a52b91 (patch) | |
| tree | 6e0f3e52f9aead1aa53aecb6561c096b2db7ece1 /indra/newview/llnearbychat.cpp | |
| parent | 209fd15176647a4b8defbb6e66daea6eb12d4b42 (diff) | |
CHUI-258: Adding a method to better whether nearby chat is visible or not.
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 4e53082c05..3bd5f96add 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -419,6 +419,35 @@ void LLNearbyChat::show() setVisible(TRUE); } +bool LLNearbyChat::isChatVisible() const +{ + bool isVisible = false; + + if (isChatMultiTab()) + { + LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance(); + // Is the IM floater container ever null? + llassert(im_box != NULL); + if (im_box != NULL) + { + if (gSavedSettings.getBOOL("NearbyChatIsNotTornOff")) + { + isVisible = (im_box->getVisible() && !im_box->isMinimized()); + } + else + { + isVisible = (getVisible() && !isMinimized()); + } + } + } + else + { + isVisible = (getVisible() && !isMinimized()); + } + + return isVisible; +} + void LLNearbyChat::showHistory() { openFloater(); |
