diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-11 14:29:49 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-11 14:29:49 -0700 |
commit | ae90fd93c8a7afa13dab0bc3dff71d66219c1367 (patch) | |
tree | dee887d277d989916529dc2c6f31304873e838f8 /indra/llui | |
parent | c47a5dfe003e4b6ae8987ab3169f14694c97efc3 (diff) | |
parent | 33bfe43b0cbae946f5c0929f1dacc16e2e9d88f6 (diff) |
STORM-301 : merge to viewer-beta
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 16 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index eb5d7a6b6a..d23b876543 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -231,7 +231,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mTornOff(false), mHasBeenDraggedWhileMinimized(FALSE), mPreviousMinimizedBottom(0), - mPreviousMinimizedLeft(0) + mPreviousMinimizedLeft(0), + mMinimizeSignal(NULL) // mNotificationContext(NULL) { mHandle.bind(this); @@ -493,6 +494,8 @@ LLFloater::~LLFloater() setVisible(false); // We're not visible if we're destroyed storeVisibilityControl(); storeDockStateControl(); + + delete mMinimizeSignal; } void LLFloater::storeRectControl() @@ -997,6 +1000,11 @@ void LLFloater::setMinimized(BOOL minimize) if (minimize == mMinimized) return; + if(mMinimizeSignal) + { + (*mMinimizeSignal)(this, LLSD(minimize)); + } + if (minimize) { // minimized flag should be turned on before release focus @@ -2810,6 +2818,12 @@ void LLFloater::initFromParams(const LLFloater::Params& p) } } +boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_t::slot_type& cb ) +{ + if (!mMinimizeSignal) mMinimizeSignal = new commit_signal_t(); + return mMinimizeSignal->connect(cb); +} + LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build"); bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 5ecf515cf9..d26f41b4c7 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -142,6 +142,8 @@ public: // Don't export top/left for rect, only height/width static void setupParamsForExport(Params& p, LLView* parent); + boost::signals2::connection setMinimizeCallback( const commit_signal_t::slot_type& cb ); + void initFromParams(const LLFloater::Params& p); bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL); @@ -347,6 +349,8 @@ public: // Public so external views or floaters can watch for this floater closing commit_signal_t mCloseSignal; + commit_signal_t* mMinimizeSignal; + protected: std::string mRectControl; std::string mVisibilityControl; |