summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-07 20:54:31 +0000
committerJames Cook <james@lindenlab.com>2009-10-07 20:54:31 +0000
commitec84b639ed71c1dac8457867148d8aea6d595685 (patch)
tree71f46df7991cff5a9e9cf500c9b3c339d84a2637 /indra/llui
parentec278c9dfb71d9ccebacc858240a08d02c758b88 (diff)
EXT-1339 Create onClose method in LLFloater, and remove most bindings to mCloseSignal. In the vast majority of cases, mCloseSignal is being bound to an onClose function. Just make it virtual and be done with it. Renamed a couple of LLPanel close methods to onClosePanel() to distinguish them. Reviewed with Richard.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp3
-rw-r--r--indra/llui/llfloater.h13
2 files changed, 12 insertions, 4 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 564e4d748f..b7a15a2b33 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -664,7 +664,8 @@ void LLFloater::closeFloater(bool app_quitting)
dirtyRect();
- // Close callback
+ // Close callbacks
+ onClose(app_quitting);
mCloseSignal(this, LLSD(app_quitting));
// Hide or Destroy
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 1dc5177f81..17ffc94014 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -208,8 +208,8 @@ public:
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
virtual void draw();
- // *TODO: Eliminate this in favor of mOpenSignal
virtual void onOpen(const LLSD& key) {}
+ virtual void onClose(bool app_quitting) {}
// This cannot be "const" until all derived floater canClose()
// methods are const as well. JC
@@ -293,11 +293,18 @@ private:
void addResizeCtrls();
void addDragHandle();
+public:
+ // Called when floater is opened, passes mKey
+ // Public so external views or floaters can watch for this floater opening
+ commit_signal_t mOpenSignal;
+
+ // Called when floater is closed, passes app_qitting as LLSD()
+ // Public so external views or floaters can watch for this floater closing
+ commit_signal_t mCloseSignal;
+
protected:
std::string mRectControl;
std::string mVisibilityControl;
- commit_signal_t mOpenSignal; // Called when floater is opened, passes mKey
- commit_signal_t mCloseSignal; // Called when floater is closed, passes app_qitting as LLSD()
LLSD mKey; // Key used for retrieving instances; set (for now) by LLFLoaterReg
LLDragHandle* mDragHandle;