From ebc3a8ebb25a09a73dc5e2b7f16c81574ecad5b6 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sun, 22 Apr 2012 20:05:26 -0700 Subject: [PATCH] Backed out changeset: a38147a6cf50 (LL has a different fix for this) --- indra/newview/llnotificationhandler.h | 7 ------- indra/newview/llnotificationofferhandler.cpp | 9 --------- indra/newview/llscreenchannel.cpp | 11 +---------- indra/newview/llscreenchannel.h | 19 ------------------- 4 files changed, 1 insertion(+), 45 deletions(-) diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index cd471b0504..cf1af7288d 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -81,7 +81,6 @@ typedef enum e_notification_type // - signal, that emits ID of the notification that is being processed // class LLEventHandler - : public LLScreenChannelBase::LLScreenChannelObserver // derive from observer, so we get notified when the Channel we hold dies. { public: virtual ~LLEventHandler() {}; @@ -111,10 +110,6 @@ protected: LLScreenChannelBase* mChannel; e_notification_type mType; - // Channel is dead, remove it. Yay for mChannel being protected so every derived class just mucks with the pointer as it wishes. Otherwise we could register an observer as soon as mChannel is set. - virtual void observeDestruction( LLScreenChannelBase *) - { mChannel = 0; } - // }; // LLSysHandler and LLChatHandler are more specific base classes @@ -262,7 +257,6 @@ protected: * Handler for offers notices. * It manages life time of offer notices. */ - class LLOfferHandler : public LLSysHandler { public: @@ -272,7 +266,6 @@ public: // base interface functions virtual bool processNotification(const LLSD& notify); - protected: virtual void onDeleteToast(LLToast* toast); virtual void initChannel(); diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index de46246963..59c6abe825 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -51,20 +51,11 @@ LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id) LLScreenChannel* channel = dynamic_cast(mChannel); if(channel) channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); - - // Register with observer so we notice when mChannel diees - if( mChannel ) - mChannel->setObserver( this ); - // } //-------------------------------------------------------------------------- LLOfferHandler::~LLOfferHandler() { - // Where are dead. In case we still hold a channel unregister - if( mChannel ) - mChannel->setObserver( 0 ); - // } //-------------------------------------------------------------------------- diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 02e62dce55..8d59aeb3f5 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -125,16 +125,6 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p) setMouseOpaque( false ); setVisible(FALSE); - - mObserver = 0; // Observerable -} - -LLScreenChannelBase::~LLScreenChannelBase() -{ - // Notofiy our observer that we're going down - if( mObserver ) - mObserver->observeDestruction( this ); - // } BOOL LLScreenChannelBase::postBuild() @@ -243,6 +233,7 @@ void LLScreenChannel::init(S32 channel_left, S32 channel_right) //-------------------------------------------------------------------------- LLScreenChannel::~LLScreenChannel() { + } std::list LLScreenChannel::findToasts(const Matcher& matcher) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 3e22603b4f..c9f8855fe6 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -52,7 +52,6 @@ typedef enum e_channel_alignment class LLScreenChannelBase : public LLUICtrl { friend class LLChannelManager; - public: struct Params : public LLInitParam::Block { @@ -70,7 +69,6 @@ public: }; LLScreenChannelBase(const Params&); - virtual ~LLScreenChannelBase(); BOOL postBuild(); @@ -144,22 +142,6 @@ protected: LLView* mFloaterSnapRegion; LLView* mChicletRegion; - - // Oberserver for ScreenChannelBase destruction -public: - class LLScreenChannelObserver - { - public: - virtual ~LLScreenChannelObserver() {} - virtual void observeDestruction( LLScreenChannelBase *) = 0; - }; - - void setObserver( LLScreenChannelObserver *aObserver ) - { mObserver = aObserver; } - -private: - LLScreenChannelObserver *mObserver; - // }; @@ -169,7 +151,6 @@ private: class LLScreenChannel : public LLScreenChannelBase { friend class LLChannelManager; - public: LLScreenChannel(const Params&); virtual ~LLScreenChannel();