From b87974df51c4caf12c47009dec03b7dc8afe543d Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Tue, 20 Nov 2012 15:18:19 +0200
Subject: CHUI-447 Additional fix(Show only display name for user that starts
 conversation )

---
 indra/newview/llavataractions.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 4f57498506..f5d8998ce5 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -180,7 +180,7 @@ void LLAvatarActions::offerTeleport(const uuid_vec_t& ids)
 static void on_avatar_name_cache_start_im(const LLUUID& agent_id,
 										  const LLAvatarName& av_name)
 {
-	std::string name = av_name.getCompleteName();
+	std::string name = av_name.mDisplayName;
 	LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id);
 	if (session_id != LLUUID::null)
 	{
-- 
cgit v1.2.3


From e52c0218c718fe96a7927f0524c4616022be510e Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Tue, 20 Nov 2012 18:40:53 +0200
Subject: CHUI-523 FIXED Set visibility of warning message depending on
 combobox state.

---
 indra/newview/llfloaterpreference.cpp | 30 ++++++++++++++++++++++++++++++
 indra/newview/llfloaterpreference.h   |  4 ++++
 2 files changed, 34 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ffd59ba8b6..d08a1d0034 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -443,12 +443,25 @@ BOOL LLFloaterPreference::postBuild()
 
 	getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));
 
+	getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions"));
+	getChild<LLComboBox>("NonFriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NonFriendIMOptions"));
+	getChild<LLComboBox>("ConferenceIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ConferenceIMOptions"));
+	getChild<LLComboBox>("GroupChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"GroupChatOptions"));
+	getChild<LLComboBox>("NearbyChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NearbyChatOptions"));
+
 	// if floater is opened before login set default localized do not disturb message
 	if (LLStartUp::getStartupState() < STATE_STARTED)
 	{
 		gSavedPerAccountSettings.setString("DoNotDisturbModeResponse", LLTrans::getString("DoNotDisturbModeResponseDefault"));
 	}
 
+	//get the options that were checked
+	onNotificationsChange("FriendIMOptions");
+	onNotificationsChange("NonFriendIMOptions");
+	onNotificationsChange("ConferenceIMOptions");
+	onNotificationsChange("GroupChatOptions");
+	onNotificationsChange("NearbyChatOptions");
+
 	return TRUE;
 }
 
@@ -863,6 +876,23 @@ void LLFloaterPreference::onLanguageChange()
 	}
 }
 
+void LLFloaterPreference::onNotificationsChange(const std::string& OptionName)
+{
+	mNotificationOptions[OptionName] = getChild<LLComboBox>(OptionName)->getSelectedItemLabel();
+
+	bool show_notifications_alert = true;
+	for (notifications_map::iterator it_notification = mNotificationOptions.begin(); it_notification != mNotificationOptions.end(); it_notification++)
+	{
+		if(it_notification->second != "None")
+		{
+			show_notifications_alert = false;
+			break;
+		}
+	}
+
+	getChild<LLTextBox>("notifications_alert")->setVisible(show_notifications_alert);
+}
+
 void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue)
 {
 	LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("background");
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 4c1c122fb1..37a531e99e 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -45,6 +45,8 @@ class LLSliderCtrl;
 class LLSD;
 class LLTextBox;
 
+typedef std::map<std::string, std::string> notifications_map;
+
 typedef enum
 	{
 		GS_LOW_GRAPHICS,
@@ -93,6 +95,7 @@ protected:
 	void		onClickClearCache();			// Clear viewer texture cache, vfs, and VO cache on next startup
 	void		onClickBrowserClearCache();		// Clear web history and caches as well as viewer caches above
 	void		onLanguageChange();
+	void		onNotificationsChange(const std::string& OptionName);
 	void		onNameTagOpacityChange(const LLSD& newvalue);
 
 	// set value of "DoNotDisturbResponseChanged" in account settings depending on whether do not disturb response
@@ -170,6 +173,7 @@ public:
 
 private:
 	static std::string sSkin;
+	notifications_map mNotificationOptions;
 	bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user.
 	bool mGotPersonalInfo;
 	bool mOriginalIMViaEmail;
-- 
cgit v1.2.3


From 81478d6c4475f4650a23ad0e87496e3d425d5709 Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Tue, 20 Nov 2012 18:57:29 +0200
Subject: CHUI-490 FIXED Small ui changes. Changed sound that is playing when
 floater is opened. Call startIM() when user clicks on "Open IM instead"
 button.

---
 indra/newview/llimview.cpp                         | 23 +++------
 .../skins/default/xui/en/floater_incoming_call.xml | 58 +++++++++++-----------
 2 files changed, 36 insertions(+), 45 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b5dc4a7967..a4e356f6a9 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -29,6 +29,7 @@
 #include "llimview.h"
 
 #include "llavatarnamecache.h"	// IDEVO
+#include "llavataractions.h"
 #include "llfloaterreg.h"
 #include "llfontgl.h"
 #include "llgl.h"
@@ -1713,7 +1714,7 @@ BOOL LLCallDialog::postBuild()
 		return FALSE;
 	
 	dockToToolbarButton("speak");
-	
+
 	return TRUE;
 }
 
@@ -2110,7 +2111,6 @@ BOOL LLIncomingCallDialog::postBuild()
 	getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup");
 
 	setCanDrag(FALSE);
-
 	return TRUE;
 }
 
@@ -2118,7 +2118,6 @@ void LLIncomingCallDialog::setCallerName(const std::string& ui_title,
 										 const std::string& ui_label,
 										 const std::string& call_type)
 {
-	setTitle(ui_title);
 
 	// call_type may be a string like " is calling."
 	LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
@@ -2136,7 +2135,7 @@ void LLIncomingCallDialog::onAvatarNameCache(const LLUUID& agent_id,
 void LLIncomingCallDialog::onOpen(const LLSD& key)
 {
 	LLCallDialog::onOpen(key);
-
+	make_ui_sound("UISndStartIM");
 	LLStringUtil::format_map_t args;
 	LLGroupData data;
 	// if it's a group call, retrieve group name to use it in question
@@ -2144,18 +2143,6 @@ void LLIncomingCallDialog::onOpen(const LLSD& key)
 	{
 		args["[GROUP]"] = data.mName;
 	}
-	// tell the user which voice channel they would be leaving
-	LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel();
-	if (voice && !voice->getSessionName().empty())
-	{
-		args["[CURRENT_CHAT]"] = voice->getSessionName();
-		getChild<LLUICtrl>("question")->setValue(getString(key["question_type"].asString(), args));
-	}
-	else
-	{
-		args["[CURRENT_CHAT]"] = getString("localchat");
-		getChild<LLUICtrl>("question")->setValue(getString(key["question_type"].asString(), args));
-	}
 }
 
 //static
@@ -2216,6 +2203,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
 			{
 				gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL);
 			}
+			else
+			{
+				LLAvatarActions::startIM(caller_id);
+			}
 
 			gIMMgr->clearPendingAgentListUpdates(session_id);
 			gIMMgr->clearPendingInvitation(session_id);
diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
index 81194f61cf..a7864381a9 100644
--- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
@@ -8,8 +8,8 @@
  layout="topleft"
  name="incoming call"
  help_topic="incoming_call"
- title="Incoming call"
- width="410">
+ sound_flags="0"
+ width="550">
     <floater.string
      name="lifetime">
         5
@@ -24,7 +24,7 @@
     </floater.string>
     <floater.string
      name="VoiceInviteP2P">
-        is calling.
+        is calling you.
     </floater.string>
     <floater.string
      name="VoiceInviteAdHoc">
@@ -49,14 +49,14 @@
      image_name="icon_avatar_online.tga"
      layout="topleft"
      left_delta="19"
-     top="35"
+     top="20"
      width="36" />
     <group_icon
      enabled="false"
      follows="left|top"
      height="36"
      layout="topleft"
-     top="35"
+     top="20"
      width="36" />
     <text
      clip_partial="true"
@@ -67,43 +67,43 @@
      name="caller name"
      top="20"
      use_ellipses="true"
-     width="315"
+     width="475"
      word_wrap="true" />
-    <text
-     clip_partial="true"
-     font="SansSerif"
-     height="30"
-     layout="topleft"
-     left="77"
-     name="question"
-     top_pad="5"
-     use_ellipses="true"
-     width="315"
-     word_wrap="true">
-     Do you want to leave [CURRENT_CHAT] and join this voice chat?
-    </text>
-    <button
+     <button
      height="24"
-     label="Accept"
-     label_selected="Accept"
+     label="Answer"
+     label_selected="Answer"
      layout="topleft"
      left="70"
      name="Accept"
-     top="92"
-     width="100" />
+     top_pad="5"
+     width="120" />
     <button
      height="24"
-     label="Reject"
-     label_selected="Reject"
+     label="Ignore"
+     label_selected="Ignore"
      layout="topleft"
      name="Reject"
      left_pad="10"
-     width="100" />
+     width="120" />
     <button
      height="24"
-     label="Start IM"
+     label="Open IM instead"
      layout="topleft"
      name="Start IM"
      left_pad="10"
-     width="100" />
+     width="120" />
+    <text
+     clip_partial="true"
+     font="SansSerif"
+     height="30"
+     layout="topleft"
+     left="77"
+     name="question"
+     top_pad="5"
+     use_ellipses="true"
+     width="475"
+     word_wrap="true">
+     If you answer, you will be disconnected from your current voice conversation.
+    </text>
 </floater>
-- 
cgit v1.2.3


From 3361c9b911447cf30355d1491ce8dd8962676685 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Tue, 20 Nov 2012 19:47:56 +0200
Subject: CHUI-522 FIXED Implement check box item 'Keep a conversation log and
 transcript'

---
 indra/newview/llfloaterimcontainer.cpp             | 23 +++++++++++++---------
 .../skins/default/xui/en/menu_participant_view.xml |  5 ++++-
 2 files changed, 18 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 39cd16acfa..c1a5c9ceeb 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1022,16 +1022,21 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata)
 
 bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 {
-    std::string item = userdata.asString();
+    const std::string& item = userdata.asString();
 	uuid_vec_t uuids;
 	getParticipantUUIDs(uuids);
 
-    if(item == std::string("can_activate_group"))
+    if("can_activate_group" == item)
     {
     	LLUUID selected_group_id = getCurSelectedViewModelItem()->getUUID();
     	return gAgent.getGroupID() != selected_group_id;
     }
 
+	if("conversation_log" == item)
+	{
+		return gSavedSettings.getBOOL("KeepConversationLogTranscripts");
+	}
+
 	if(uuids.size() <= 0)
     {
         return false;
@@ -1040,12 +1045,12 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
     // Note: can_block and can_delete is used only for one person selected menu
     // so we don't need to go over all uuids.
 
-    if (item == std::string("can_block"))
+    if ("can_block" == item)
     {
 		const LLUUID& id = uuids.front();
         return LLAvatarActions::canBlock(id);
     }
-    else if (item == std::string("can_add"))
+    else if ("can_add" == item)
     {
         // We can add friends if:
         // - there are selected people
@@ -1074,7 +1079,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 
         return result;
     }
-    else if (item == std::string("can_delete"))
+    else if ("can_delete" == item)
     {
         // We can remove friends if:
         // - there are selected people
@@ -1097,18 +1102,18 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 
         return result;
     }
-    else if (item == std::string("can_call"))
+    else if ("can_call" == item)
     {
         return LLAvatarActions::canCall();
     }
-    else if (item == std::string("can_show_on_map"))
+    else if ("can_show_on_map" == item)
     {
 		const LLUUID& id = uuids.front();
 
         return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id))
             || gAgent.isGodlike();
     }
-    else if(item == std::string("can_offer_teleport"))
+    else if("can_offer_teleport" == item)
     {
 		return LLAvatarActions::canOfferTeleport(uuids);
     }
@@ -1117,7 +1122,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 		return enableModerateContextMenuItem(item);
 	}
 
-    return false;
+	return false;
 }
 
 bool LLFloaterIMContainer::checkContextMenuItem(const LLSD& userdata)
diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml
index 523ce7b35b..33d7bd7c01 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml
@@ -85,5 +85,8 @@
         <menu_item_check.on_click
          function="Floater.Toggle"
          parameter="conversation" />
-      </menu_item_check>
+        <menu_item_check.on_enable
+         function="Avatar.EnableItem"
+         parameter="conversation_log" />
+    </menu_item_check>
 </toggleable_menu>
-- 
cgit v1.2.3


From 1ece38912188650c9bc5a1cf906ca4a88acc21c4 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Tue, 20 Nov 2012 19:17:25 +0200
Subject: CHUI-528, CHUI-536, CHUI-538, CHUI-540 Built single processor of
 different types of notifications

---
 indra/newview/llfloaterimsessiontab.cpp |   8 ---
 indra/newview/llimview.cpp              | 110 +++++++++++++++++---------------
 2 files changed, 59 insertions(+), 59 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 9795df78ae..a21ee07d47 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -335,14 +335,6 @@ void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD &args)
 	if (im_box)
 	{
 		im_box->setTimeNow(mSessionID,chat.mFromID);
-
-		// TODO: Warning! The next two lines of code are included below only temporarily
-		// to demonstrate the correct format call the appropriate functions.
-		// They should be moved to the right places when working on CHUI-486. ~Alex ProductEngine.
-		// ---- start demo ----
-        //    im_box->flashConversationItemWidget(mSessionID, true); // flashing of the conversation's item
-        //    gToolBarView->flashCommand(LLCommandId("chat"), true); // flashing of the FUI button "Chat"
-        // ---- end demo -----
 	}
 	
 
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index a4e356f6a9..f0e2f45db3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -114,76 +114,84 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id,
 	LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID()));
 }
 
-void toast_callback(const LLSD& msg){
-	// do not show toast in do not disturb mode or it goes from agent
-	if (gAgent.isDoNotDisturb() || gAgent.getID() == msg["from_id"])
-	{
-		return;
-	}
+void on_new_message(const LLSD& msg)
+{
+	std::string action;
+	LLUUID participant_id = msg["from_id"].asUUID();
+	LLUUID session_id = msg["session_id"];
+    LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
 
-    // Skip toasting if we have open window of IM with this session id
-    LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(msg["session_id"]);
-    if (
-           open_im_floater
-           && open_im_floater->isInVisibleChain()
-           && open_im_floater->hasFocus()
-           && !open_im_floater->isMinimized()
-           && !(open_im_floater->getHost()
-                   && open_im_floater->getHost()->isMinimized())
-       )
+    // determine action for this session
+    if (session_id.isNull())
     {
-        return;
+    	action = gSavedSettings.getString("NotificationNearbyChatOptions");
     }
-
-	// Skip toasting for system messages
-	if (msg["from_id"].asUUID() == LLUUID::null)
-	{
-		return;
-	}
-
-    // *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea
-    LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
-        msg["session_id"]);
-
-
-    //Ignore P2P Friend/Non-Friend toasts
-    if(session->isP2PSessionType())
+    else if(session->isP2PSessionType())
     {
-        //Ignores non-friends
-        if((LLAvatarTracker::instance().getBuddyInfo(msg["from_id"]) == NULL) 
-            && (gSavedSettings.getString("NotificationNonFriendIMOptions") != "toast"))
+        if (LLAvatarTracker::instance().isBuddy(msg["from_id"].asUUID()))
         {
-            return;
+        	action = gSavedSettings.getString("NotificationFriendIMOptions");
         }
-        //Ignores friends
-        else if(gSavedSettings.getString("NotificationFriendIMOptions") != "toast")
+        else
         {
-            return;
+        	action = gSavedSettings.getString("NotificationNonFriendIMOptions");
         }
     }
-    //Ignore Ad Hoc Toasts
-    else if(session->isAdHocSessionType() 
-            && (gSavedSettings.getString("NotificationConferenceIMOptions") != "toast"))
+    else if(session->isAdHocSessionType())
     {
-        return;
+    	action = gSavedSettings.getString("NotificationConferenceIMOptions");
     }
-    //Ignore Group Toasts
-    else if(session->isGroupSessionType() 
-            && (gSavedSettings.getString("NotificationGroupChatOptions") != "toast"))
+    else if(session->isGroupSessionType())
     {
-        return;
+    	action = gSavedSettings.getString("NotificationGroupChatOptions");
     }
 
-    //Show toast
-	LLAvatarNameCache::get(msg["from_id"].asUUID(),
-		boost::bind(&on_avatar_name_cache_toast,
-			_1, _2, msg));
+	// do not show notification in "do not disturb" mode or it goes from agent
+	if (gAgent.isDoNotDisturb() || gAgent.getID() == participant_id)
+	{
+		return;
+	}
+
+	if ("toast" == action)
+	{
+	    // Skip toasting if we have open window of IM with this session id
+        LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(msg["session_id"]);
+        if (
+             open_im_floater
+             && open_im_floater->isInVisibleChain()
+             && open_im_floater->hasFocus()
+             && !open_im_floater->isMinimized()
+             && !(open_im_floater->getHost()
+                   && open_im_floater->getHost()->isMinimized())
+           )
+        {
+            return;
+        }
+
+	    // Skip toasting for system messages
+	    if (participant_id.isNull())
+	    {
+		    return;
+	    }
+
+        //Show toast
+	    LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+	}
+	else if ("flash" == action)
+	{
+		LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+		if (im_box)
+        {
+			im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+        }
+        gToolBarView->flashCommand(LLCommandId("chat"), true); // flashing of the FUI button "Chat"
+	}
 }
 
 LLIMModel::LLIMModel() 
 {
 	addNewMsgCallback(boost::bind(&LLFloaterIMSession::newIMCallback, _1));
-	addNewMsgCallback(boost::bind(&toast_callback, _1));
+	addNewMsgCallback(boost::bind(&on_new_message, _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, bool has_offline_msg)
-- 
cgit v1.2.3


From da5792fcecd1e0a3d84634c0a81bd16d4c04488f Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Wed, 21 Nov 2012 15:14:47 +0200
Subject: CHUI-533 FIXED Check that mConversationsRoot is not null

---
 indra/newview/llfloaterimsessiontab.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index a21ee07d47..0057ed3231 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -496,8 +496,11 @@ void LLFloaterIMSessionTab::refreshConversation()
 	}
 	
 	mConversationViewModel.requestSortAll();
-	mConversationsRoot->arrangeAll();
-	mConversationsRoot->update();
+	if(mConversationsRoot != NULL)
+	{
+		mConversationsRoot->arrangeAll();
+		mConversationsRoot->update();
+	}
 	updateHeaderAndToolbar();
 	refresh();
 }
-- 
cgit v1.2.3


From a4a6e5a17d2ae715d8f225d90598a079f8adb17d Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Wed, 21 Nov 2012 15:26:56 +0200
Subject: CHUI-523 Additional fix

---
 indra/newview/llfloaterpreference.cpp | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d08a1d0034..2c3f460701 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -455,13 +455,6 @@ BOOL LLFloaterPreference::postBuild()
 		gSavedPerAccountSettings.setString("DoNotDisturbModeResponse", LLTrans::getString("DoNotDisturbModeResponseDefault"));
 	}
 
-	//get the options that were checked
-	onNotificationsChange("FriendIMOptions");
-	onNotificationsChange("NonFriendIMOptions");
-	onNotificationsChange("ConferenceIMOptions");
-	onNotificationsChange("GroupChatOptions");
-	onNotificationsChange("NearbyChatOptions");
-
 	return TRUE;
 }
 
@@ -703,6 +696,14 @@ void LLFloaterPreference::onOpen(const LLSD& key)
 	// while preferences floater was closed.
 	buildPopupLists();
 
+
+	//get the options that were checked
+	onNotificationsChange("FriendIMOptions");
+	onNotificationsChange("NonFriendIMOptions");
+	onNotificationsChange("ConferenceIMOptions");
+	onNotificationsChange("GroupChatOptions");
+	onNotificationsChange("NearbyChatOptions");
+
 	LLPanelLogin::setAlwaysRefresh(true);
 	refresh();
 	
-- 
cgit v1.2.3