diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-13 14:50:20 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-13 14:50:20 -0700 |
commit | 629ec1d54d16549d42198a9ac83a33bb9b51ab22 (patch) | |
tree | 2c1d558742f0d46c2277883de4de094dcabcb7f3 /indra/newview/llscreenchannel.h | |
parent | 9aa0c58c20f8d60dc2f674ce1eaa805db8f599c8 (diff) | |
parent | 1c812c3c6734197835fd8cfaef286f1ad444ec64 (diff) |
Pull and merge from ssh://hg@bitbucket.org/stinson_linden/viewer-development-havokai.
Diffstat (limited to 'indra/newview/llscreenchannel.h')
-rw-r--r-- | indra/newview/llscreenchannel.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index c9f8855fe6..695b6cd44d 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -163,7 +163,7 @@ public: virtual bool matches(const LLNotificationPtr) const = 0; }; - std::list<LLToast*> findToasts(const Matcher& matcher); + std::list<const LLToast*> findToasts(const Matcher& matcher); // Channel's outfit-functions // update channel's size and position in the World View @@ -238,31 +238,39 @@ public: reject_tost_signal_t mRejectToastSignal; boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); } private: - struct ToastElem + class ToastElem { - LLUUID id; - LLToast* toast; + public: + ToastElem(const LLHandle<LLToast>& toast) : mToast(toast) + { + } - ToastElem(LLToast::Params p) : id(p.notif_id) + ToastElem(const ToastElem& toast_elem) : mToast(toast_elem.mToast) { - toast = new LLToast(p); } - ToastElem(const ToastElem& toast_elem) + LLToast* getToast() const { - id = toast_elem.id; - toast = toast_elem.toast; + return mToast.get(); + } + + LLUUID getID() const + { + return mToast.isDead() ? LLUUID() : mToast.get()->getNotificationID(); } bool operator == (const LLUUID &id_op) const { - return (id == id_op); + return (getID() == id_op); } bool operator == (LLPanel* panel_op) const { - return (toast == panel_op); + return (mToast.get() == panel_op); } + + private: + LLHandle<LLToast> mToast; }; // Channel's handlers |