From 188185803bcdca6d37ca1eb58c929719d6657d29 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 12:37:56 +0000 Subject: 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. --- indra/llui/llfloater.cpp | 6 ++++-- indra/llui/llfloater.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/llui') 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; -- cgit v1.2.3