diff options
| author | Richard Linden <none@none> | 2012-04-26 15:30:08 -0700 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2012-04-26 15:30:08 -0700 | 
| commit | 28d5727cecdad638202106fd1289bee25c0f97bd (patch) | |
| tree | 77f0b78dd9b802effb578f206efa4a88275dde6e /indra | |
| parent | a0bb55adc6ff26595f20bed12cb6f1565011e246 (diff) | |
post-merge build fixes
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llxuixml/llinitparam.h | 4 | ||||
| -rw-r--r-- | indra/newview/llfolderviewitem.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llimhandler.cpp | 56 | ||||
| -rw-r--r-- | indra/newview/llnotificationgrouphandler.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llnotificationhandler.h | 2 | ||||
| -rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llnotificationtiphandler.cpp | 81 | ||||
| -rwxr-xr-x | indra/newview/llviewerwindow.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.h | 3 | 
9 files changed, 81 insertions, 82 deletions
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 2c854d8287..29f4a09cb7 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -1405,7 +1405,7 @@ namespace LLInitParam  			return *this;  		} -		self_t& add(const typename named_value_lookup_t::name_t& name) +		self_t& add(const typename named_value_t::name_t& name)  		{  			value_t value; @@ -1612,7 +1612,7 @@ namespace LLInitParam  			return *this;  		} -		self_t& add(const typename named_value_lookup_t::name_t& name) +		self_t& add(const typename named_value_t::name_t& name)  		{  			value_t value; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index c2dec4ab27..43d3675d17 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -357,7 +357,7 @@ void LLFolderViewItem::arrangeAndSet(BOOL set_selection,  	LLFolderView* root = getRoot();  	if (getParentFolder())  	{ -	getParentFolder()->requestArrange(); +		getParentFolder()->requestArrange();  	}  	if(set_selection)  	{ diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp index c7034aea3a..047472a282 100644 --- a/indra/newview/llimhandler.cpp +++ b/indra/newview/llimhandler.cpp @@ -71,34 +71,34 @@ bool LLIMHandler::processNotification(const LLNotificationPtr& notification)  		initChannel();  	} -		LLSD substitutions = notification->getSubstitutions(); - -		// According to comments in LLIMMgr::addMessage(), if we get message -		// from ourselves, the sender id is set to null. This fixes EXT-875. -		LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); -		if (avatar_id.isNull()) -			avatar_id = gAgentID; - -		LLToastIMPanel::Params im_p; -		im_p.notification = notification; -		im_p.avatar_id = avatar_id; -		im_p.from = substitutions["FROM"].asString(); -		im_p.time = substitutions["TIME"].asString(); -		im_p.message = substitutions["MESSAGE"].asString(); -		im_p.session_id = substitutions["SESSION_ID"].asUUID(); - -		LLToastIMPanel* im_box = new LLToastIMPanel(im_p); - -		LLToast::Params p; -		p.notif_id = notification->getID(); -		p.session_id = im_p.session_id; -		p.notification = notification; -		p.panel = im_box; -		p.can_be_stored = false; -		LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); -		if(channel) -			channel->addToast(p); -	} +	LLSD substitutions = notification->getSubstitutions(); + +	// According to comments in LLIMMgr::addMessage(), if we get message +	// from ourselves, the sender id is set to null. This fixes EXT-875. +	LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); +	if (avatar_id.isNull()) +		avatar_id = gAgentID; + +	LLToastIMPanel::Params im_p; +	im_p.notification = notification; +	im_p.avatar_id = avatar_id; +	im_p.from = substitutions["FROM"].asString(); +	im_p.time = substitutions["TIME"].asString(); +	im_p.message = substitutions["MESSAGE"].asString(); +	im_p.session_id = substitutions["SESSION_ID"].asUUID(); + +	LLToastIMPanel* im_box = new LLToastIMPanel(im_p); + +	LLToast::Params p; +	p.notif_id = notification->getID(); +	p.session_id = im_p.session_id; +	p.notification = notification; +	p.panel = im_box; +	p.can_be_stored = false; +	LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); +	if(channel) +		channel->addToast(p); +  	return false;  } diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp index 50db4737ce..6946b78cbf 100644 --- a/indra/newview/llnotificationgrouphandler.cpp +++ b/indra/newview/llnotificationgrouphandler.cpp @@ -43,6 +43,7 @@ LLGroupHandler::LLGroupHandler()  	// Getting a Channel for our notifications  	LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();  	if(channel) +	{  		channel->addOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));  		mChannel = channel->getHandle();  	} diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 805e29e2a4..83d228e799 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -95,7 +95,7 @@ public:  	// base interface functions  	/*virtual*/ void onAdd(LLNotificationPtr p) { processNotification(p); }  	/*virtual*/ void onLoad(LLNotificationPtr p) { processNotification(p); } -	/*virtual*/ void onDelete(LLNotificationPtr p) { if (mChannel) mChannel->killToastByNotificationID(p->getID());} +	/*virtual*/ void onDelete(LLNotificationPtr p) { if (mChannel.get()) mChannel.get()->killToastByNotificationID(p->getID());}  	virtual bool processNotification(const LLNotificationPtr& notify)=0; diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 52cc518968..2112b0d35e 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -48,7 +48,7 @@ LLOfferHandler::LLOfferHandler()  	if(channel)  	{  		channel->setControlHovering(true); -		channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); +		channel->addOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1));  		mChannel = channel->getHandle();  	}  } diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index f07109335d..3588721849 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -82,61 +82,56 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)  		// archive message in nearby chat  	if (notification->canLogToChat()) -		{ -			LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); - -			// don't show toast if Nearby Chat is opened -			LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); -			LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance(); -			if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible()) -			{ -				return false; -			} -		} +	{ +		LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); -		std::string session_name = notification->getPayload()["SESSION_NAME"]; -		const std::string name = notification->getSubstitutions()["NAME"]; -		if (session_name.empty()) +		// don't show toast if Nearby Chat is opened +		LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); +		LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance(); +		if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible())  		{ -			session_name = name; +			return false;  		} -		LLUUID from_id = notification->getPayload()["from_id"]; +	} + +	std::string session_name = notification->getPayload()["SESSION_NAME"]; +	const std::string name = notification->getSubstitutions()["NAME"]; +	if (session_name.empty()) +	{ +		session_name = name; +	} +	LLUUID from_id = notification->getPayload()["from_id"];  	if (notification->canLogToIM()) -		{ -			LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, -					notification->getMessage(), from_id, from_id); -		} +	{ +		LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, +				notification->getMessage(), from_id, from_id); +	}  	if (notification->canLogToIM() && notification->hasFormElements()) -		{ -			LLHandlerUtil::spawnIMSession(name, from_id); -		} +	{ +		LLHandlerUtil::spawnIMSession(name, from_id); +	}  	if (notification->canLogToIM() && LLHandlerUtil::isIMFloaterOpened(notification)) -		{ -			return false; -		} +	{ +		return false; +	} -		LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); +	LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); -		LLToast::Params p; -		p.notif_id = notification->getID(); -		p.notification = notification; -		p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); -		p.panel = notify_box; -		p.is_tip = true; -		p.can_be_stored = false; +	LLToast::Params p; +	p.notif_id = notification->getID(); +	p.notification = notification; +	p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); +	p.panel = notify_box; +	p.is_tip = true; +	p.can_be_stored = false; -		removeExclusiveNotifications(notification); +	removeExclusiveNotifications(notification); -		LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); -		if(channel) -			channel->addToast(p); -	} -	else if (notify["sigtype"].asString() == "delete") -	{ -		mChannel->killToastByNotificationID(notification->getID()); -	} +	LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); +	if(channel) +		channel->addToast(p);  	return false;  } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 117078bcd1..32f693b009 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1542,14 +1542,14 @@ LLViewerWindow::LLViewerWindow(const Params& p)  	// pass its value right now. Instead, pass it a nullary function that  	// will, when we later need it, return the value of gKeyboard.  	// boost::lambda::var() constructs such a functor on the fly. -	mWindowListener(new LLWindowListener(this, boost::lambda::var(gKeyboard))), -	mViewerWindowListener(new LLViewerWindowListener(this)), +	mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); +	mViewerWindowListener.reset(new LLViewerWindowListener(this)); -	LLNotificationChannelPtr vw_alerts_channel(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"))); -	LLNotificationChannelPtr vw_alerts_modal_channel(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"))); +	mAlertsChannel.reset(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"))); +	mModalAlertsChannel.reset(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"))); -	vw_alerts_channel->connectChanged(&LLViewerWindow::onAlert); -	vw_alerts_modal_channel->connectChanged(&LLViewerWindow::onAlert); +	mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); +	mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert);  	LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications"));  	llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 6efcaeaf18..ee6a7793f8 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -418,6 +418,9 @@ private:  	bool			mActive;  	bool			mUIVisible; +	boost::shared_ptr<class LLNotificationChannel>	mAlertsChannel, +													mModalAlertsChannel; +  	LLRect			mWindowRectRaw;				// whole window, including UI  	LLRect			mWindowRectScaled;			// whole window, scaled by UI size  	LLRect			mWorldViewRectRaw;			// area of screen for 3D world  | 
