diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-01-14 17:23:06 -0800 | 
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-01-14 17:23:06 -0800 | 
| commit | 0e90e94a4d5cbac2d186f0056821a51078e8d1bd (patch) | |
| tree | b8642c92ccfa722a9b443e16685ecc9dbc790519 /indra | |
| parent | 44737a3992b112c8191593e71533c19e4c10f911 (diff) | |
CHUI-668: The user's most intrusive notification is not used anymore when coming out of DND mode with IMs. Adjusted code to just open the converseation floater (which was changed also in a prior fix by PE).
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/lldonotdisturbnotificationstorage.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llimview.cpp | 19 | 
2 files changed, 16 insertions, 16 deletions
| diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 5cc0ab2081..12ff308a77 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -33,6 +33,7 @@  #include "lldir.h"  #include "llerror.h"  #include "llfasttimer_class.h" +#include "llfloaterreg.h"  #include "llnotifications.h"  #include "llnotificationhandler.h"  #include "llnotificationstorage.h" @@ -103,6 +104,7 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()  	}  	LLNotifications& instance = LLNotifications::instance(); +    bool imToastExists = false;  	for (LLSD::array_const_iterator notification_it = data.beginArray();  		 notification_it != data.endArray(); @@ -110,8 +112,14 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()  	{  		LLSD notification_params = *notification_it;          const LLUUID& notificationID = notification_params["id"]; +        std::string notificationName = notification_params["name"];          LLNotificationPtr notification = instance.find(notificationID); +        if(notificationName == "IMToast") +        { +            imToastExists = true; +        } +          //Notification already exists in notification pipeline (same instance of app running)  		if (notification)  		{ @@ -138,6 +146,11 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()  		}  	} +    if(imToastExists) +    { +        LLFloaterReg::showInstance("im_container"); +    } +  	// Clear the communication channel history and rewrite the save file to empty it as well  	LLNotificationChannelPtr channelPtr = getCommunicationChannel();  	LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get()); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 32b4afcfef..ff171fc0f8 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -128,18 +128,11 @@ void process_dnd_im(const LLSD& notification)              false,               false); //will need slight refactor to retrieve whether offline message or not (assume online for now)      } - -    // open conversation floater -	LLFloaterIMContainer* container_floater = -			LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); -	if (container_floater && !(container_floater->isFrontmost())) -    { -		container_floater->openFloater(); -		container_floater->setFrontmost(TRUE); -    }  } + +  static void on_avatar_name_cache_toast(const LLUUID& agent_id,  									   const LLAvatarName& av_name,  									   LLSD msg) @@ -2626,13 +2619,7 @@ void LLIMMgr::addMessage(  	// Open conversation floater if offline messages are present  	if (is_offline_msg)      { -		LLFloaterIMContainer* container_floater = -				LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); -		if (container_floater && !(container_floater->isFrontmost())) -		{ -			container_floater->openFloater(); -			container_floater->setFrontmost(TRUE); -		} +        LLFloaterReg::showInstance("im_container");      }  } | 
