summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchiclet.cpp14
-rw-r--r--indra/newview/llchiclet.h4
-rw-r--r--indra/newview/llimhandler.cpp12
-rw-r--r--indra/newview/llimview.cpp4
-rw-r--r--indra/newview/llimview.h5
-rw-r--r--indra/newview/llnearbychathandler.cpp11
-rw-r--r--indra/newview/llnotificationalerthandler.cpp18
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp16
-rw-r--r--indra/newview/llnotificationhandler.h4
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp2
-rw-r--r--indra/newview/llnotificationofferhandler.cpp19
-rw-r--r--indra/newview/llnotificationscripthandler.cpp20
-rw-r--r--indra/newview/llnotificationtiphandler.cpp17
-rw-r--r--indra/newview/llscreenchannel.h3
-rw-r--r--indra/newview/lltoastalertpanel.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp5
16 files changed, 85 insertions, 73 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index aabab0ccb9..a661808d1f 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -1113,8 +1113,8 @@ LLChicletPanel::~LLChicletPanel()
}
}
-void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
-
+void LLChicletPanel::onMessageCountChanged(const LLSD& data)
+{
LLUUID session_id = data["session_id"].asUUID();
S32 unread = data["participant_unread"].asInteger();
@@ -1139,7 +1139,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
}
}
-void object_chiclet_callback(const LLSD& data)
+void LLChicletPanel::objectChicletCallback(const LLSD& data)
{
LLUUID notification_id = data["notification_id"];
bool new_message = data["new_message"];
@@ -1163,10 +1163,10 @@ void object_chiclet_callback(const LLSD& data)
BOOL LLChicletPanel::postBuild()
{
LLPanel::postBuild();
- LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1));
- LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1));
- LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1));
- LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1));
+ LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
+ LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
+ LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
+ LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1));
LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1));
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 1f1069dcb4..19683492c2 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -1158,6 +1158,10 @@ protected:
*/
void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param);
+ void onMessageCountChanged(const LLSD& data);
+
+ void objectChicletCallback(const LLSD& data);
+
typedef std::vector<LLChiclet*> chiclet_list_t;
/**
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index cd71da7393..07d73c8c66 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -42,7 +42,7 @@ LLIMHandler::LLIMHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
+ mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle();
}
//--------------------------------------------------------------------------
@@ -55,13 +55,13 @@ void LLIMHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLIMHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -72,7 +72,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -104,7 +104,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
p.panel = im_box;
p.can_be_stored = false;
p.on_delete_toast = boost::bind(&LLIMHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -113,7 +113,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index c4ea8c0d31..a7c4618fa4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -171,8 +171,8 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id)
LLIMModel::LLIMModel()
{
- addNewMsgCallback(LLIMFloater::newIMCallback);
- addNewMsgCallback(toast_callback);
+ addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1));
+ addNewMsgCallback(boost::bind(&toast_callback, _1));
}
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index f07a78e2f7..7c2cd03d97 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -153,7 +153,6 @@ public:
std::map<LLUUID, LLIMSession*> mId2SessionMap;
typedef boost::signals2::signal<void(const LLSD&)> session_signal_t;
- typedef boost::function<void(const LLSD&)> session_callback_t;
session_signal_t mNewMsgSignal;
session_signal_t mNoUnreadMsgsSignal;
@@ -174,8 +173,8 @@ public:
*/
void processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id);
- boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
- boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
+ boost::signals2::connection addNewMsgCallback(const session_signal_t::slot_type& cb ) { return mNewMsgSignal.connect(cb); }
+ boost::signals2::connection addNoUnreadMsgsCallback(const session_signal_t::slot_type& cb ) { return mNoUnreadMsgsSignal.connect(cb); }
/**
* Create new session object in a model
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 240a7c7a35..600fd395fb 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -458,7 +458,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
channel->setCreatePanelCallback(callback);
- mChannel = LLChannelManager::getInstance()->addChannel(channel);
+ LLChannelManager::getInstance()->addChannel(channel);
+
+ mChannel = channel->getHandle();
}
LLNearbyChatHandler::~LLNearbyChatHandler()
@@ -558,11 +560,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
&& nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
- || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
+ || mChannel.isDead()
+ || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -579,7 +582,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
}
*/
- LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel);
+ LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get());
if(channel)
{
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index cae7d02fed..89fe7bb3c2 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -51,8 +51,8 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo
p.channel_align = CA_CENTRE;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->getChannel(p);
- mChannel->setCanStoreToasts(false);
+ mChannel = LLChannelManager::getInstance()->getChannel(p)->getHandle();
+ mChannel.get()->setCanStoreToasts(false);
}
//--------------------------------------------------------------------------
@@ -64,13 +64,13 @@ LLAlertHandler::~LLAlertHandler()
void LLAlertHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
- mChannel->init(channel_right_bound, channel_right_bound);
+ mChannel.get()->init(channel_right_bound, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLAlertHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -81,7 +81,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -114,22 +114,22 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
// Show alert in middle of progress view (during teleport) (EXT-1093)
LLProgressView* progress = gViewerWindow->getProgressView();
LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
- mChannel->updatePositionAndSize(rc);
+ mChannel.get()->updatePositionAndSize(rc);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "change")
{
LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog);
}
else
{
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->killToastByNotificationID(notification->getID());
}
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index 9b7fdaef82..ad51389241 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -42,10 +42,12 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -58,13 +60,13 @@ void LLGroupHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLGroupHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -75,7 +77,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -91,7 +93,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -102,7 +104,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 23dbb6b047..3569ad6447 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -103,8 +103,8 @@ protected:
// at the moment, when a handlers creates a channel.
virtual void initChannel()=0;
- LLScreenChannelBase* mChannel;
- e_notification_type mType;
+ LLHandle<LLScreenChannelBase> mChannel;
+ e_notification_type mType;
};
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 1b767e80d4..7c6287967a 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -64,7 +64,7 @@ LLSysHandler::LLSysHandler()
void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif)
{
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel.get());
if (channel == NULL)
{
return;
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 68fd65be0f..1552ed3346 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -45,12 +45,13 @@ LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- mChannel->setControlHovering(true);
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
+ channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -63,13 +64,13 @@ void LLOfferHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLOfferHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -80,7 +81,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -134,7 +135,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notid_to_im;
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@@ -175,7 +176,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
{
LLHandlerUtil::decIMMesageCounter(notification);
}
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
}
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index bbb4d03768..995915206b 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -47,13 +47,13 @@ LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
- mChannel->setControlHovering(true);
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
+ channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1));
-
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -66,13 +66,13 @@ void LLScriptHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLScriptHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -83,7 +83,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -109,7 +109,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
{
channel->addToast(p);
@@ -127,7 +127,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
}
else
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
}
return false;
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index fb0891c4c5..e397cfa046 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -46,11 +46,12 @@ LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
- mChannel = LLChannelManager::getInstance()->createNotificationChannel();
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
+ {
channel->setOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1));
+ mChannel = channel->getHandle();
+ }
}
//--------------------------------------------------------------------------
@@ -63,13 +64,13 @@ void LLTipHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLTipHandler::processNotification(const LLSD& notify)
{
- if(!mChannel)
+ if(mChannel.isDead())
{
return false;
}
@@ -80,7 +81,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
- if(!mChannel->getVisible())
+ if(!mChannel.get()->getVisible())
{
initChannel();
}
@@ -137,13 +138,13 @@ bool LLTipHandler::processNotification(const LLSD& notify)
removeExclusiveNotifications(notification);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "delete")
{
- mChannel->killToastByNotificationID(notification->getID());
+ mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 695b6cd44d..56a9cf8b4b 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -117,7 +117,7 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
- LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
+ LLHandle<LLScreenChannelBase> getHandle() { return getDerivedHandle<LLScreenChannelBase>(); }
protected:
void updateRect();
@@ -130,7 +130,6 @@ protected:
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
- LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 9ba8431fde..8fef2ed6d1 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -424,8 +424,8 @@ LLToastAlertPanel::~LLToastAlertPanel()
LLTransientFloaterMgr::GLOBAL, this);
// EXP-1822
- // return focus to the previously focused view
- if (mPreviouslyFocusedView.get())
+ // return focus to the previously focused view if the viewer is not exiting
+ if (mPreviouslyFocusedView.get() && !LLApp::isExiting())
{
mPreviouslyFocusedView.get()->setFocus(TRUE);
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 37fb77a10a..e590f29a9a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -143,7 +143,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
}
else
{
- gAgentAvatarp->updateRegion(regionp);
+ if (isAgentAvatarValid())
+ {
+ gAgentAvatarp->updateRegion(regionp);
+ }
}
res = gAgentAvatarp;
}