diff options
| author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-16 11:18:22 -0800 | 
|---|---|---|
| committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-16 11:18:22 -0800 | 
| commit | d6358e120fd5f6b6e987c05469c18b9ef186dba0 (patch) | |
| tree | 9455f1b9f640044988e5642b2d986aa4440457c9 | |
| parent | 568d818ffe214c358f92717ceb86dd20cb4aed26 (diff) | |
| parent | 4cf894dc77d31d029e77fa9f1212deaa75d9f844 (diff) | |
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
| -rw-r--r-- | indra/llui/llfloater.cpp | 10 | ||||
| -rw-r--r-- | indra/llui/llnotifications.cpp | 10 | ||||
| -rw-r--r-- | indra/llui/llnotifications.h | 1 | ||||
| -rw-r--r-- | indra/llui/llnotificationtemplate.h | 6 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llimview.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 1 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_list_item.xml | 1 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 1 | 
12 files changed, 50 insertions, 10 deletions
| diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 1b6e4ed0e5..ada2bde55e 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -64,6 +64,8 @@  // use this to control "jumping" behavior when Ctrl-Tabbing  const S32 TABBED_FLOATER_OFFSET = 0; +extern LLControlGroup gSavedSettings; +  namespace LLInitParam  {  	void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues() @@ -660,7 +662,13 @@ void LLFloater::openFloater(const LLSD& key)  		&& !getFloaterHost()  		&& (!getVisible() || isMinimized()))  	{ -		make_ui_sound("UISndWindowOpen"); +        //Don't play a sound for incoming voice call based upon chat preference setting +        bool playSound = !(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE); + +        if(playSound) +        { +            make_ui_sound("UISndWindowOpen"); +        }  	}  	//RN: for now, we don't allow rehosting from one multifloater to another diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 929b7da081..9618c002f5 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -413,12 +413,13 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par  	mDefaultFunctor(p.functor.isProvided() ? p.functor() : p.name()),  	mLogToChat(p.log_to_chat),  	mLogToIM(p.log_to_im), -	mShowToast(p.show_toast) +	mShowToast(p.show_toast), +    mSoundName("")  {  	if (p.sound.isProvided()  		&& LLUI::sSettingGroups["config"]->controlExists(p.sound))  	{ -		mSoundEffect = LLUUID(LLUI::sSettingGroups["config"]->getString(p.sound)); +		mSoundName = p.sound;  	}  	BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts) @@ -899,6 +900,11 @@ bool LLNotification::hasFormElements() const  	return mTemplatep->mForm->getNumElements() != 0;  } +void LLNotification::playSound() +{  +    make_ui_sound(mTemplatep->mSoundName.c_str()); +} +  LLNotification::ECombineBehavior LLNotification::getCombineBehavior() const  {  	return mTemplatep->mCombineBehavior; diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index c677dfe298..088931858a 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -524,6 +524,7 @@ public:  	bool canLogToIM() const;  	bool canShowToast() const;  	bool hasFormElements() const; +    void playSound();  	typedef enum e_combine_behavior  	{ diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index 9434efe1b9..906b83a400 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -323,10 +323,8 @@ struct LLNotificationTemplate      LLNotificationFormPtr mForm;  	// default priority for notifications of this type  	ENotificationPriority mPriority; -	// UUID of the audio file to be played when this notification arrives -	// this is loaded as a name, but looked up to get the UUID upon template load. -	// If null, it wasn't specified. -	LLUUID mSoundEffect; +	// Stores the sound name which can then be used to play the sound using make_ui_sound +	std::string mSoundName;  	// List of tags that rules can match against.  	std::list<std::string> mTags; diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 3a1cc2880a..da77ca0079 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -165,6 +165,11 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)  					|| gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))  			{  				floater_container->addFloater(conversp, TRUE, LLTabContainer::END); + +				if (!floater_container->getVisible()) +				{ +					LLFloaterReg::toggleInstanceOrBringToFront("im_container");			 +				}  			}  			else  			{ diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 50e2b48f30..a38153c315 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2495,7 +2495,11 @@ void LLIMMgr::addMessage(  			return;  		} -		make_ui_sound("UISndNewIncomingIMSession"); +        //Play sound for new conversations +        if(gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE) +        { +            make_ui_sound("UISndNewIncomingIMSession"); +        }  	}  	bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 6e641575fa..91003c7d53 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -117,6 +117,17 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)  			LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());  			if(channel)  				channel->addToast(p); + +            //Will not play a notification sound for inventory and teleport offer based upon chat preference +            bool playSound = !((notification->getName() == "UserGiveItem" +                                    && gSavedSettings.getBOOL("PlaySoundInventoryOffer") == FALSE) +                                ||  notification->getName() == "TeleportOffered" +                                    && gSavedSettings.getBOOL("PlaySoundTeleportOffer") == FALSE); + +            if(playSound) +            { +                notification->playSound(); +            }  		}  		if (notification->canLogToIM()) diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index ccad49bc30..844d7314d9 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -493,6 +493,8 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )  	}  	// adjust panel's height to the text size  	snapToMessageHeight(mTextBox, MAX_LENGTH); + +  } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index eaa020ff49..94307d2f93 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6461,7 +6461,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th     icon="notify.tga"     name="UserGiveItem"     log_to_im ="true" -   type="offer"> +   type="offer" +   sound="UISndNewIncomingIMSession">  [NAME_SLURL] has given you this [OBJECTTYPE]:  [ITEM_SLURL]      <form name="form"> @@ -6518,7 +6519,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th     name="TeleportOffered"     log_to_im="true"     log_to_chat="false" -   type="offer"> +   type="offer" +   sound="UISndNewIncomingIMSession">  [NAME_SLURL] has offered to teleport you to their location:  “[MESSAGE]” diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index b7c58eb6ab..aa1b929412 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -129,6 +129,7 @@       left_pad="3"       right="-53"       name="info_btn" +     tool_tip="More info"       tab_stop="false"       top_delta="0"       width="16" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index 12735026fa..cfe3aeb7c9 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -56,6 +56,7 @@       left_pad="3"       right="-31"       name="info_btn" +     tool_tip="More info"       tab_stop="false"       top_delta="-2"       width="16" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 8ab5c9a99c..712e8bff7f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -322,6 +322,7 @@          name="incoming_voice_call"          width="150" />      <check_box +        enabled="false"          control_name="PlaySoundGroupChatMessages"          height="16"          label="Group chat messages" | 
