summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-15 12:37:56 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-15 12:37:56 +0000
commit188185803bcdca6d37ca1eb58c929719d6657d29 (patch)
tree7c58fc3817d91d33d62d761c5c43ffaf528130dd
parentc6108f0fadd54a60c8bbeecb3f3604073a934c73 (diff)
EXT-4233: Display "?" button on torn-off floaters.
This involved tracking the torn-off state of a floater, which we apparently weren't doing before. Also, making sure that we update the title bar buttons when the floater changes torn-off state.
-rw-r--r--indra/llui/llfloater.cpp6
-rw-r--r--indra/llui/llfloater.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a17e306325..980cd2abd7 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -233,6 +233,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mAutoFocus(TRUE), // automatically take focus when opened
mCanDock(false),
mDocked(false),
+ mTornOff(false),
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0)
@@ -1456,6 +1457,7 @@ void LLFloater::onClickTearOff(LLFloater* self)
}
self->setTornOff(false);
}
+ self->updateButtons();
}
// static
@@ -1748,8 +1750,8 @@ void LLFloater::updateButtons()
if (i == BUTTON_HELP)
{
// don't show the help button if the floater is minimized
- // or if it is a tear-off hosted floater
- if (isMinimized() || mButtonsEnabled[BUTTON_TEAR_OFF])
+ // or if it is a docked tear-off floater
+ if (isMinimized() || (mButtonsEnabled[BUTTON_TEAR_OFF] && ! mTornOff))
{
enabled = false;
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index daf558de24..f70495c0f0 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -256,7 +256,7 @@ public:
bool isDocked() const { return mDocked; }
virtual void setDocked(bool docked, bool pop_on_undock = true);
- virtual void setTornOff(bool torn_off) {}
+ virtual void setTornOff(bool torn_off) { mTornOff = torn_off; }
// Return a closeable floater, if any, given the current focus.
static LLFloater* getClosableFloaterFromFocus();
@@ -387,6 +387,7 @@ private:
bool mCanDock;
bool mDocked;
+ bool mTornOff;
static LLMultiFloater* sHostp;
static BOOL sQuitting;