summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-02-21 19:15:48 -0800
committerMerov Linden <merov@lindenlab.com>2013-02-21 19:15:48 -0800
commit86150b4019d1a84b4af73f0ea18c47baff955562 (patch)
treee5414250c8b0c4f18e3a128d09b9da1494dadd75 /indra/llui/llfloater.cpp
parentf79f9f111b0db67cacfe9bbe453737f3979b3ba9 (diff)
CHUI-568 : WIP : Introduced Ctrl-T and Ctrl-H for conversations and nearby chat
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 734e2cfda7..bf424883b3 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -813,6 +813,22 @@ void LLFloater::closeFloater(bool app_quitting)
}
/*virtual*/
+void LLFloater::closeHostedFloater()
+{
+ // When toggling *visibility*, close the host instead of the floater when hosted
+ if (getHost())
+ {
+ llinfos << "Merov debug : closeHostedFloater : host " << llendl;
+ getHost()->closeFloater();
+ }
+ else
+ {
+ llinfos << "Merov debug : closeHostedFloater : floater " << llendl;
+ closeFloater();
+ }
+}
+
+/*virtual*/
void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPanel::reshape(width, height, called_from_parent);
@@ -1609,8 +1625,19 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus)
{
- setVisible(TRUE);
- setFrontmost(take_focus);
+ LLMultiFloater* hostp = getHost();
+ if (hostp)
+ {
+ llinfos << "Merov debug : setVisibleAndFrontmost : hostp->setFrontmost " << llendl;
+ hostp->setVisible(TRUE);
+ hostp->setFrontmost(take_focus);
+ }
+ else
+ {
+ llinfos << "Merov debug : setVisibleAndFrontmost : setFrontmost " << llendl;
+ setVisible(TRUE);
+ setFrontmost(take_focus);
+ }
}
void LLFloater::setFrontmost(BOOL take_focus)
@@ -1618,12 +1645,14 @@ void LLFloater::setFrontmost(BOOL take_focus)
LLMultiFloater* hostp = getHost();
if (hostp)
{
+ llinfos << "Merov debug : setFrontmost : hostp->showFloater " << llendl;
// this will bring the host floater to the front and select
// the appropriate panel
hostp->showFloater(this);
}
else
{
+ llinfos << "Merov debug : setFrontmost : bringToFront " << llendl;
// there are more than one floater view
// so we need to query our parent directly
((LLFloaterView*)getParent())->bringToFront(this, take_focus);