From ad8478c47038c09f016da26669570a571753f397 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Sat, 23 Jun 2012 19:28:28 -0400
Subject: STORM-1892 Add Apply button to the edit content permission floater

---
 indra/newview/llfloaterbulkpermission.cpp             |  7 +++++++
 indra/newview/llfloaterbulkpermission.h               |  1 +
 .../skins/default/xui/en/floater_bulk_perms.xml       | 19 +++++++++++++++----
 3 files changed, 23 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 90f40628a8..d9577eb74a 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -57,6 +57,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
 	mDone(FALSE)
 {
 	mID.generate();
+	mCommitCallbackRegistrar.add("BulkPermission.Ok",		boost::bind(&LLFloaterBulkPermission::onOkBtn, this));
 	mCommitCallbackRegistrar.add("BulkPermission.Apply",	boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
 	mCommitCallbackRegistrar.add("BulkPermission.Close",	boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
 	mCommitCallbackRegistrar.add("BulkPermission.CheckAll",	boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
@@ -144,6 +145,12 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
 	}
 }
 
+void LLFloaterBulkPermission::onOkBtn()
+{
+	doApply();
+	closeFloater();
+}
+
 void LLFloaterBulkPermission::onApplyBtn()
 {
 	doApply();
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 7dd05df7ee..58e4467f4d 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -72,6 +72,7 @@ private:
 								bool is_new);
 
 	void onCloseBtn();
+	void onOkBtn();
 	void onApplyBtn();
 	void onCommitCopy();
 	void onCheckAll() { doCheckUncheckAll(TRUE); }
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
index 4e0cfb0cd4..e7ab3cacdc 100644
--- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
@@ -6,7 +6,7 @@
  layout="topleft"
  name="floaterbulkperms"
  help_topic="floaterbulkperms"
- title="EDIT CONTENT PERMISSIONS"
+ title="ADJUST CONTENT PERMISSIONS"
  width="410">
     <floater.string
      name="nothing_to_modify_text">
@@ -192,7 +192,7 @@
      name="newperms"
      top="90"
      width="250">
-        New Content Permissions
+        Adjust Content Permissions To
     </text>
       <text
        type="string"
@@ -292,9 +292,20 @@
      height="23"
      label="OK"
      layout="topleft"
-     left="205"
-     name="apply"
+     left="110"
+     name="ok"
      top_pad="10"
+     width="90">
+      <button.commit_callback
+       function="BulkPermission.Ok"/>
+    </button>
+    <button
+     follows="left|top"
+     height="23"
+     label="Apply"
+     layout="topleft"
+     left_pad="5"
+     name="apply"
      width="90">
       <button.commit_callback
        function="BulkPermission.Apply"/>
-- 
cgit v1.2.3


From 75a76491ede4bd0386277e0837ae0804c6edd67e Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Mon, 25 Jun 2012 14:21:19 -0400
Subject: STORM-1894 UIScaleFactor: raise limit from 1.4 to at least 1.5

---
 indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 2cc9d9c1b0..50fd57494f 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -138,7 +138,7 @@
    initial_value="1"
    layout="topleft"
    left_pad="0"
-   max_val="1.4"
+   max_val="1.5"
    min_val="0.75"
    name="ui_scale_slider"
    top_pad="-14"
-- 
cgit v1.2.3


From 80ae45238b3312fd4fdf6730116341f8c1d5d6e4 Mon Sep 17 00:00:00 2001
From: LanceCorrimal <none@none>
Date: Thu, 13 Sep 2012 23:01:14 +0200
Subject: STORM-1910: Adds the count of groups and the remaining free group
 slots to the group list

---
 indra/newview/llpanelpeople.cpp                     |  4 ++++
 indra/newview/skins/default/xui/en/panel_people.xml | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index f1380e7a36..f158a7ea43 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -75,6 +75,8 @@ static const std::string RECENT_TAB_NAME	= "recent_panel";
 
 static const std::string COLLAPSED_BY_USER  = "collapsed_by_user";
 
+extern S32 gMaxAgentGroups;
+
 /** Comparator for comparing avatar items by last interaction date */
 class LLAvatarItemRecentComparator : public LLAvatarItemComparator
 {
@@ -878,6 +880,8 @@ void LLPanelPeople::updateButtons()
 		LLPanel* groups_panel = mTabContainer->getCurrentPanel();
 		groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected
 		groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull());
+		groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+		groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
 	}
 	else
 	{
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 98c7c49ff4..4383c83a5c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -434,12 +434,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
             <group_list
              allow_select="true" 
              follows="all"
-             height="356"
+             height="340"
              layout="topleft"
              left="3"
              name="group_list"
              top="0"
              width="307" />
+    <text
+     type="string"
+     length="1"
+     follows="left|bottom"
+     height="14"
+     layout="topleft"
+     right="-10"
+     name="groupcount">
+You belong to [COUNT] groups, and can join [REMAINING] more.
+    </text>
             <panel
              background_visible="true"
              follows="left|right|bottom"
-- 
cgit v1.2.3


From 005cd4024794752e0cd57714656f76a8208d3105 Mon Sep 17 00:00:00 2001
From: MartinRJ Fayray <fuerholz@gmx.net>
Date: Wed, 19 Sep 2012 00:49:34 +0200
Subject: STORM-1911: Go-to line function for the internal LSL script editor

---
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/llfloatergotoline.cpp                | 160 +++++++++++++++++++++
 indra/newview/llfloatergotoline.h                  |  66 +++++++++
 indra/newview/llpreviewscript.cpp                  |  21 +++
 indra/newview/llpreviewscript.h                    |   3 +
 .../skins/default/xui/en/floater_goto_line.xml     |  44 ++++++
 .../skins/default/xui/en/panel_script_ed.xml       |   4 +
 7 files changed, 300 insertions(+)
 create mode 100644 indra/newview/llfloatergotoline.cpp
 create mode 100644 indra/newview/llfloatergotoline.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_goto_line.xml

(limited to 'indra/newview')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c0a252637f..eb2d220bce 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -202,6 +202,7 @@ set(viewer_SOURCE_FILES
     llfloaterfonttest.cpp
     llfloatergesture.cpp
     llfloatergodtools.cpp
+    llfloatergotoline.cpp
     llfloatergroupinvite.cpp
     llfloatergroups.cpp
     llfloaterhandler.cpp
@@ -778,6 +779,7 @@ set(viewer_HEADER_FILES
     llfloaterfonttest.h
     llfloatergesture.h
     llfloatergodtools.h
+    llfloatergotoline.h
     llfloatergroupinvite.h
     llfloatergroups.h
     llfloaterhandler.h
diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp
new file mode 100644
index 0000000000..d66e418926
--- /dev/null
+++ b/indra/newview/llfloatergotoline.cpp
@@ -0,0 +1,160 @@
+/**
+ * @file llfloatergotoline.h
+ * @author MartinRJ
+ * @brief LLFloaterGotoLine class implementation
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2012, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llfloatergotoline.h"
+#include "llpreviewscript.h"
+#include "llfloaterreg.h"
+#include "lllineeditor.h"
+#include "llviewertexteditor.h"
+#include "llviewerwindow.h"
+
+LLFloaterGotoLine* LLFloaterGotoLine::sInstance = NULL;
+
+LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core)
+:       LLFloater(LLSD()),
+        mGotoBox(NULL),
+        mEditorCore(editor_core)
+{
+        buildFromFile("floater_goto_line.xml");
+
+        sInstance = this;
+        
+        // find floater in which script panel is embedded
+        LLView* viewp = (LLView*)editor_core;
+        while(viewp)
+        {
+                LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
+                if (floaterp)
+                {
+                        floaterp->addDependentFloater(this);
+                        break;
+                }
+                viewp = viewp->getParent();
+        }
+}
+
+BOOL LLFloaterGotoLine::postBuild()
+{
+	mGotoBox = getChild<LLLineEditor>("goto_line");
+	mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this));
+	mGotoBox->setCommitOnFocusLost(FALSE);
+        getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
+        childSetAction("goto_btn", onBtnGoto,this);
+        setDefaultBtn("goto_btn");
+
+        return TRUE;
+}
+
+//static 
+void LLFloaterGotoLine::show(LLScriptEdCore* editor_core)
+{
+        if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
+        {
+                sInstance->closeFloater();
+                delete sInstance;
+        }
+
+        if (!sInstance)
+        {
+                // sInstance will be assigned in the constructor.
+                new LLFloaterGotoLine(editor_core);
+        }
+
+        sInstance->openFloater();
+}
+
+LLFloaterGotoLine::~LLFloaterGotoLine()
+{
+        sInstance = NULL;
+}
+
+// static 
+void LLFloaterGotoLine::onBtnGoto(void *userdata)
+{
+        LLFloaterGotoLine* self = (LLFloaterGotoLine*)userdata;
+        self->handleBtnGoto();
+}
+
+void LLFloaterGotoLine::handleBtnGoto()
+{
+        S32 row = 0;
+        S32 column = 0;
+        row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
+        if (row >= 0)
+        {
+                if (mEditorCore && mEditorCore->mEditor)
+                {
+			mEditorCore->mEditor->deselect();
+			mEditorCore->mEditor->setCursor(row, column);
+			mEditorCore->mEditor->setFocus(TRUE);
+                }
+        }
+}
+
+bool LLFloaterGotoLine::hasAccelerators() const
+{
+        if (mEditorCore)
+        {
+                return mEditorCore->hasAccelerators();
+        }
+        return FALSE;
+}
+
+BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask)
+{
+        if (mEditorCore)
+        {
+                return mEditorCore->handleKeyHere(key, mask);
+        }
+
+        return FALSE;
+}
+
+void LLFloaterGotoLine::onGotoBoxCommit()
+{
+        S32 row = 0;
+        S32 column = 0;
+        row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
+        if (row >= 0)
+        {
+                if (mEditorCore && mEditorCore->mEditor)
+                {
+			mEditorCore->mEditor->setCursor(row, column);
+
+			S32 rownew = 0;
+			S32 columnnew = 0;
+			mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE );  // don't include wordwrap
+			if (rownew == row && columnnew == column)
+			{
+			        mEditorCore->mEditor->deselect();
+			        mEditorCore->mEditor->setFocus(TRUE);
+			        sInstance->closeFloater();
+			} //else do nothing (if the cursor-position didn't change)
+                }
+        }
+}
diff --git a/indra/newview/llfloatergotoline.h b/indra/newview/llfloatergotoline.h
new file mode 100644
index 0000000000..058d601752
--- /dev/null
+++ b/indra/newview/llfloatergotoline.h
@@ -0,0 +1,66 @@
+/**
+ * @file llfloatergotoline.h
+ * @author MartinRJ
+ * @brief LLFloaterGotoLine class definition
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2012, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERGOTOLINE_H
+#define LL_LLFLOATERGOTOLINE_H
+
+#include "llfloater.h"
+#include "lllineeditor.h"
+#include "llpreviewscript.h"
+
+class LLScriptEdCore;
+
+class LLFloaterGotoLine : public LLFloater
+{
+public:
+        LLFloaterGotoLine(LLScriptEdCore* editor_core);
+        ~LLFloaterGotoLine();
+
+        /*virtual*/     BOOL    postBuild();
+        static void show(LLScriptEdCore* editor_core);
+
+        static void onBtnGoto(void* userdata);
+        void handleBtnGoto();
+
+        LLScriptEdCore* getEditorCore() { return mEditorCore; }
+        static LLFloaterGotoLine* getInstance() { return sInstance; }
+
+        virtual bool hasAccelerators() const;
+        virtual BOOL handleKeyHere(KEY key, MASK mask);
+
+private:
+
+        LLScriptEdCore* mEditorCore;
+
+        static LLFloaterGotoLine*       sInstance;
+
+protected:
+	LLLineEditor*			mGotoBox;
+        void onGotoBoxCommit();
+};
+
+#endif  // LL_LLFLOATERGOTOLINE_H
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 88727bf59b..5aba654796 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -86,6 +86,7 @@
 #include "lltrans.h"
 #include "llviewercontrol.h"
 #include "llappviewer.h"
+#include "llfloatergotoline.h"
 
 const std::string HELLO_LSL =
 	"default\n"
@@ -193,12 +194,17 @@ private:
 	LLScriptEdCore* mEditorCore;
 
 	static LLFloaterScriptSearch*	sInstance;
+
+protected:
+	LLLineEditor*			mSearchBox;
+        void onSearchBoxCommit();
 };
 
 LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
 
 LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
 :	LLFloater(LLSD()),
+	mSearchBox(NULL),
 	mEditorCore(editor_core)
 {
 	buildFromFile("floater_script_search.xml");
@@ -221,6 +227,9 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
 
 BOOL LLFloaterScriptSearch::postBuild()
 {
+	mSearchBox = getChild<LLLineEditor>("search_text");
+	mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this));
+	mSearchBox->setCommitOnFocusLost(FALSE);
 	childSetAction("search_btn", onBtnSearch,this);
 	childSetAction("replace_btn", onBtnReplace,this);
 	childSetAction("replace_all_btn", onBtnReplaceAll,this);
@@ -311,6 +320,15 @@ BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask)
 	return FALSE;
 }
 
+void LLFloaterScriptSearch::onSearchBoxCommit()
+{
+	if (mEditorCore && mEditorCore->mEditor)
+	{
+		LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
+		mEditorCore->mEditor->selectNext(getChild<LLUICtrl>("search_text")->getValue().asString(), caseChk->get());
+	}
+}
+
 /// ---------------------------------------------------------------------------
 /// LLScriptEdCore
 /// ---------------------------------------------------------------------------
@@ -499,6 +517,9 @@ void LLScriptEdCore::initMenu()
 	menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
 	menuItem->setClickCallback(boost::bind(&LLFloaterScriptSearch::show, this));
 
+	menuItem = getChild<LLMenuItemCallGL>("Go to line...");
+	menuItem->setClickCallback(boost::bind(&LLFloaterGotoLine::show, this));
+
 	menuItem = getChild<LLMenuItemCallGL>("Help...");
 	menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnHelp, this));
 
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 7563cecd9d..9fb0a4fb63 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -34,6 +34,7 @@
 #include "llcombobox.h"
 #include "lliconctrl.h"
 #include "llframetimer.h"
+#include "llfloatergotoline.h"
 
 class LLLiveLSLFile;
 class LLMessageSystem;
@@ -49,6 +50,7 @@ class LLKeywordToken;
 class LLVFS;
 class LLViewerInventoryItem;
 class LLScriptEdContainer;
+class LLFloaterGotoLine;
 
 // Inner, implementation class.  LLPreviewScript and LLLiveLSLEditor each own one of these.
 class LLScriptEdCore : public LLPanel
@@ -58,6 +60,7 @@ class LLScriptEdCore : public LLPanel
 	friend class LLLiveLSLEditor;
 	friend class LLFloaterScriptSearch;
 	friend class LLScriptEdContainer;
+	friend class LLFloaterGotoLine;
 
 protected:
 	// Supposed to be invoked only by the container.
diff --git a/indra/newview/skins/default/xui/en/floater_goto_line.xml b/indra/newview/skins/default/xui/en/floater_goto_line.xml
new file mode 100644
index 0000000000..b236888219
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_goto_line.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ default_tab_group="1"
+ height="90"
+ layout="topleft"
+ name="script goto"
+ help_topic="script_goto"
+ title="GO TO LINE"
+ width="200">
+    <button
+     height="24"
+     label="OK"
+     label_selected="OK"
+     layout="topleft"
+     left="55"
+     name="goto_btn"
+     top="53"
+     width="90" />
+    <text
+     type="string"
+     length="1"
+     follows="left|top"
+     height="16"
+     layout="topleft"
+     left="10"
+     name="txt"
+     top="21"
+     width="65">
+        Go to line
+    </text>
+    <line_editor
+     border_style="line"
+     border_thickness="1"
+     follows="left|top"
+     height="16"
+     layout="topleft"
+     left="75"
+     max_length_bytes="9"
+     name="goto_line"
+     tab_group="1"
+     top="21"
+     width="85" />
+</floater>
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index f6a8af0973..8b2a6692d9 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -125,6 +125,10 @@
              label="Search / Replace..."
              layout="topleft"
              name="Search / Replace..." />
+            <menu_item_call
+             label="Go to line..."
+             layout="topleft"
+             name="Go to line..." />
         </menu>
         <menu
          top="0"
-- 
cgit v1.2.3


From 51ee1f38029adce4804fc8f1d687ce3d50444388 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Wed, 31 Oct 2012 21:22:52 -0400
Subject: storm-1850: ensure that last exec event reports apply only to the
 same version

---
 indra/newview/llappviewer.cpp | 165 ++++++++++++++++++++++++++++++++----------
 indra/newview/llappviewer.h   |   6 +-
 2 files changed, 129 insertions(+), 42 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4de80037ed..21bc69d950 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -322,7 +322,7 @@ BOOL gLogoutInProgress = FALSE;
 ////////////////////////////////////////////////////////////
 // Internal globals... that should be removed.
 static std::string gArgs;
-
+const int MAX_MARKER_LENGTH = 1024;
 const std::string MARKER_FILE_NAME("SecondLife.exec_marker");
 const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
 const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker");
@@ -622,7 +622,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
 
 LLAppViewer::LLAppViewer() : 
 	mMarkerFile(),
-	mLogoutMarkerFile(NULL),
+	mLogoutMarkerFile(),
 	mReportedCrash(false),
 	mNumSessions(0),
 	mPurgeCache(false),
@@ -3145,8 +3145,8 @@ void LLAppViewer::writeSystemInfo()
 	}
 	
 	// Dump some debugging info
-	LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME")
-			<< " version " << LLVersionInfo::getShortVersion() << LL_ENDL;
+	LL_INFOS("SystemInfo") << "Application: " << LLTrans::getString("APP_NAME") << LL_ENDL;
+	LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL;
 
 	// Dump the local time and time zone
 	time_t now;
@@ -3274,22 +3274,27 @@ void LLAppViewer::handleViewerCrash()
 	//we're already in a crash situation	
 	if (gDirUtilp)
 	{
-		std::string crash_file_name;
-		if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME);
-		else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
-		llinfos << "Creating crash marker file " << crash_file_name << llendl;
+		std::string crash_file_name = ( gLLErrorActivated )
+			? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME)
+			: gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
+		LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL;
 		
 		LLAPRFile crash_file ;
 		crash_file.open(crash_file_name, LL_APR_W);
 		if (crash_file.getFileHandle())
 		{
 			LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL;
+			recordMarkerVersion(crash_file);
 		}
 		else
 		{
 			LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_file_name << LL_ENDL;
 		}		
 	}
+	else
+	{
+		LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL;
+	}		
 	
 	if (gMessageSystem && gDirUtilp)
 	{
@@ -3341,7 +3346,7 @@ bool LLAppViewer::anotherInstanceRunning()
 	// If the file is currently locked, that means another process is already running.
 
 	std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME);
-	LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;
+	LL_DEBUGS("MarkerFile") << "Checking marker file '"<< marker_file << "' for lock..." << LL_ENDL;
 
 	//Freeze case checks
 	if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB))
@@ -3367,6 +3372,46 @@ bool LLAppViewer::anotherInstanceRunning()
 	return false;
 }
 
+// static
+void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file) 
+{		
+	std::string marker_version(LLVersionInfo::getChannelAndVersion());
+	if ( marker_version.length() > MAX_MARKER_LENGTH )
+	{
+		LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL;
+	}
+
+	// record the viewer version in the marker file
+	marker_file.write(marker_version.data(), marker_version.length());
+}
+
+bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const
+{
+	bool sameVersion = false;
+
+	std::string my_version(LLVersionInfo::getChannelAndVersion());
+	char marker_version[MAX_MARKER_LENGTH];
+	S32  marker_version_length;
+
+	LLAPRFile marker_file;
+	marker_file.open(marker_name, LL_APR_RB);
+	if (marker_file.getFileHandle())
+	{
+		marker_version_length = marker_file.read(marker_version, sizeof(marker_version));
+		LL_DEBUGS("MarkerFile") << "Compare markers: ";
+		std::string marker_string(marker_version, marker_version_length);
+		LL_CONT << "\n   mine '" << my_version    << "'"
+				<< "\n marker '" << marker_string << "'"
+				<< LL_ENDL;
+		if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) )
+		{
+			sameVersion = true;
+		}
+		marker_file.close();
+	}
+	return sameVersion;
+}
+
 void LLAppViewer::initMarkerFile()
 {
 	//First, check for the existence of other files.
@@ -3389,27 +3434,55 @@ void LLAppViewer::initMarkerFile()
 
 	if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning())
 	{
-		gLastExecEvent = LAST_EXEC_FROZE;
-		LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL;
+		if ( markerIsSameVersion(mMarkerFileName) )
+		{
+			LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found" << LL_ENDL;
+			gLastExecEvent = LAST_EXEC_FROZE;
+		}
+		else
+		{
+			LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL;
+		}
 	}    
 	if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB))
 	{
-		gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
-		LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		if (markerIsSameVersion(logout_marker_file))
+		{
+			gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
+			LL_INFOS("MarkerFile") << "Logout crashed '"<< logout_marker_file << "', setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		}
+		else
+		{
+			LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "' found, but versions did not match" << LL_ENDL;
+		}
 		LLAPRFile::remove(logout_marker_file);
 	}
 	if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB))
 	{
-		if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
-		else gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
-		LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		if (markerIsSameVersion(llerror_marker_file))
+		{
+			gLastExecEvent = ( gLastExecEvent == LAST_EXEC_LOGOUT_FROZE )
+				? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_LLERROR_CRASH;
+			LL_INFOS("MarkerFile") << "Last exec LLError '"<< llerror_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		}
+		else
+		{
+			LL_INFOS("MarkerFile") << "Last exec LLError marker '"<< llerror_marker_file << "' found, but versions did not match" << LL_ENDL;
+		}
 		LLAPRFile::remove(llerror_marker_file);
 	}
 	if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
 	{
-		if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
-		else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
-		LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		if (markerIsSameVersion(error_marker_file))
+		{
+			gLastExecEvent = (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE)
+				? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_OTHER_CRASH;
+			LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
+		}
+		else
+		{
+			LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL;
+		}
 		LLAPRFile::remove(error_marker_file);
 	}
 
@@ -3425,35 +3498,48 @@ void LLAppViewer::initMarkerFile()
 
 	if (s == APR_SUCCESS && mMarkerFile.getFileHandle())
 	{
-		LL_DEBUGS("MarkerFile") << "Marker file created." << LL_ENDL;
+		LL_DEBUGS("MarkerFile") << "Marker file '"<< mMarkerFileName << "' created." << LL_ENDL;
+		if (APR_SUCCESS == apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE)) 
+		{
+			recordMarkerVersion(mMarkerFile);
+			LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL;
+		}
+		else
+		{
+			LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL;
+		}
 	}
 	else
 	{
-		LL_INFOS("MarkerFile") << "Failed to create marker file." << LL_ENDL;
-		return;
-	}
-	if (apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) 
-	{
-		mMarkerFile.close() ;
-		LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL;
-		return;
+		LL_INFOS("MarkerFile") << "Failed to create marker file '"<< mMarkerFileName << "'." << LL_ENDL;
 	}
-
-	LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL;
 }
 
 void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
 {
-	LL_DEBUGS("MarkerFile") << "removeMarkerFile()" << LL_ENDL;
+	LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<leave_logout_marker<<")" << LL_ENDL;
 	if (mMarkerFile.getFileHandle())
 	{
-		mMarkerFile.close() ;
+		LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"'"<< LL_ENDL;
+		mMarkerFile.close();
 		LLAPRFile::remove( mMarkerFileName );
 	}
-	if (mLogoutMarkerFile != NULL && !leave_logout_marker)
+	else
 	{
+		LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
+	}
+	if (!leave_logout_marker)
+	{
+		if (mLogoutMarkerFile.getFileHandle())
+		{
+			LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
+			mLogoutMarkerFile.close();
+		}
+		else
+		{
+			LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL;
+		}
 		LLAPRFile::remove( mLogoutMarkerFileName );
-		mLogoutMarkerFile = NULL;
 	}
 }
 
@@ -4654,16 +4740,15 @@ void LLAppViewer::sendLogoutRequest()
 		mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
 		
 		LLAPRFile outfile ;
-		outfile.open(mLogoutMarkerFileName, LL_APR_W);
-		mLogoutMarkerFile =  outfile.getFileHandle() ;
-		if (mLogoutMarkerFile)
+		mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_W);
+		if (mLogoutMarkerFile.getFileHandle())
 		{
-			llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl;
-    		apr_file_close(mLogoutMarkerFile);
+			LL_INFOS("MarkerFile") << "Created logout marker file '"<< mLogoutMarkerFileName << "' " << mLogoutMarkerFileName << LL_ENDL;
+			recordMarkerVersion(outfile);
 		}
 		else
 		{
-			llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl;
+			LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL;
 		}		
 	}
 }
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index ae3c795d1e..095887d8c9 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -209,7 +209,9 @@ private:
 
 	bool anotherInstanceRunning(); 
 	void initMarkerFile(); 
-    
+	static void recordMarkerVersion(LLAPRFile& marker_file);
+	bool markerIsSameVersion(const std::string& marker_name) const;
+	
     void idle(); 
     void idleShutdown();
 	// update avatar SLID and display name caches
@@ -229,7 +231,7 @@ private:
 	LLAPRFile mMarkerFile; // A file created to indicate the app is running.
 
 	std::string mLogoutMarkerFileName;
-	apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running.
+	LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running.
 
 	
 	LLOSInfo mSysOSInfo; 
-- 
cgit v1.2.3


From b8e036dff57dd83fbe2069453544050339ff102d Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 13 Nov 2012 12:15:36 -0500
Subject: STORM-1918 Part of the group notice attachment box does not allow
 dropping of assets.

---
 indra/newview/skins/default/xui/en/panel_group_notices.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 6d5fb51e85..c8ce5cdebf 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -202,14 +202,14 @@ Maximum 200 per group daily
             Drag and drop item here to attach it:
         </text>
         <icon
-         height="72"
+         height="48"
          image_name="DropTarget"
          layout="topleft"
          left_pad="10"
          mouse_opaque="true"
          name="drop_icon"
          top_delta="-10"
-         width="72" />
+         width="110" />
         <button
          follows="left|top"
          layout="topleft"
-- 
cgit v1.2.3


From b70cc0ba53ae2dba3e6773e9966546d41be1e83e Mon Sep 17 00:00:00 2001
From: Ricky Curtice <kf6kjg+hg@gmail.com>
Date: Mon, 26 Nov 2012 18:39:37 -0800
Subject: STORM-1919: Fixed snapping of rotation in the edge-on case

Simply had to guard the snapping code, making sure that the last "else" case was preserved when either the outer or the inner tests failed.
---
 indra/newview/llmaniprotate.cpp | 232 +++++++++++++++++++++-------------------
 1 file changed, 122 insertions(+), 110 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 826e8d560a..c8b446872b 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1376,74 +1376,28 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
 		BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
 		projected_mouse -= snap_plane_center;
 
-		S32 snap_plane = 0;
-
-		F32 dot = cam_to_snap_plane * constraint_axis;
-		if (llabs(dot) < 0.01f)
-		{
-			// looking at ring edge on, project onto view plane and check if mouse is past ring
-			getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
-			projected_mouse -= snap_plane_center;
-			dot = projected_mouse * constraint_axis;
-			if (projected_mouse * constraint_axis > 0)
-			{
-				snap_plane = 1;
-			}
-			projected_mouse -= dot * constraint_axis;
-		}
-		else if (dot > 0.f)
-		{
-			// look for mouse position outside and in front of snap circle
-			if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
-			{
-				snap_plane = 1;
-			}
-		}
-		else
-		{
-			// look for mouse position inside or in back of snap circle
-			if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
-			{
-				snap_plane = 1;
-			}
-		}
-
-		if (snap_plane == 0)
-		{
-			// try other plane
-			snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f));
-			if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
-			{
-				cam_to_snap_plane.setVec(1.f, 0.f, 0.f);
-			}
-			else
-			{
-				cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent();
-				cam_to_snap_plane.normVec();
-			}
-
-			hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
-			projected_mouse -= snap_plane_center;
-
-			dot = cam_to_snap_plane * constraint_axis;
+		if (gSavedSettings.getBOOL("SnapEnabled")) {
+			S32 snap_plane = 0;
+	
+			F32 dot = cam_to_snap_plane * constraint_axis;
 			if (llabs(dot) < 0.01f)
 			{
 				// looking at ring edge on, project onto view plane and check if mouse is past ring
 				getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
 				projected_mouse -= snap_plane_center;
 				dot = projected_mouse * constraint_axis;
-				if (projected_mouse * constraint_axis < 0)
+				if (projected_mouse * constraint_axis > 0)
 				{
-					snap_plane = 2;
+					snap_plane = 1;
 				}
 				projected_mouse -= dot * constraint_axis;
 			}
-			else if (dot < 0.f)
+			else if (dot > 0.f)
 			{
 				// look for mouse position outside and in front of snap circle
 				if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
 				{
-					snap_plane = 2;
+					snap_plane = 1;
 				}
 			}
 			else
@@ -1451,78 +1405,136 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
 				// look for mouse position inside or in back of snap circle
 				if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
 				{
-					snap_plane = 2;
+					snap_plane = 1;
 				}
 			}
-		}
-
-		if (snap_plane > 0)
-		{
-			LLVector3 cam_at_axis;
-			if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
-			{
-				cam_at_axis.setVec(1.f, 0.f, 0.f);
-			}
-			else
-			{
-				cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent();
-				cam_at_axis.normVec();
-			}
-
-			// first, project mouse onto screen plane at point tangent to rotation radius. 
-			getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis);
-			// project that point onto rotation plane
-			projected_mouse -= snap_plane_center;
-			projected_mouse -= projected_vec(projected_mouse, constraint_axis);
-
-			F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec());
-			F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters;
-			if (llabs(mouse_lateral_dist) > 0.01f)
-			{
-				mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - 
-									(mouse_lateral_dist * mouse_lateral_dist));
-			}
-			LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis);
-			projected_mouse -= mouse_depth * projected_camera_at;
-
-			if (!mInSnapRegime)
+	
+			if (snap_plane == 0)
 			{
-				mSmoothRotate = TRUE;
+				// try other plane
+				snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f));
+				if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
+				{
+					cam_to_snap_plane.setVec(1.f, 0.f, 0.f);
+				}
+				else
+				{
+					cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent();
+					cam_to_snap_plane.normVec();
+				}
+	
+				hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
+				projected_mouse -= snap_plane_center;
+	
+				dot = cam_to_snap_plane * constraint_axis;
+				if (llabs(dot) < 0.01f)
+				{
+					// looking at ring edge on, project onto view plane and check if mouse is past ring
+					getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
+					projected_mouse -= snap_plane_center;
+					dot = projected_mouse * constraint_axis;
+					if (projected_mouse * constraint_axis < 0)
+					{
+						snap_plane = 2;
+					}
+					projected_mouse -= dot * constraint_axis;
+				}
+				else if (dot < 0.f)
+				{
+					// look for mouse position outside and in front of snap circle
+					if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
+					{
+						snap_plane = 2;
+					}
+				}
+				else
+				{
+					// look for mouse position inside or in back of snap circle
+					if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
+					{
+						snap_plane = 2;
+					}
+				}
 			}
-			mInSnapRegime = TRUE;
-			// 0 to 360 deg
-			F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
 			
-			F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
-			//fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
-
-			LLVector3 object_axis;
-			getObjectAxisClosestToMouse(object_axis);
-			object_axis = object_axis * first_object_node->mSavedRotation;
-
-			// project onto constraint plane
-			object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis();
-			object_axis.normVec();
-
-			if (relative_mouse_angle < SNAP_ANGLE_DETENTE)
+			if (snap_plane > 0)
 			{
-				F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f));
-				angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+				LLVector3 cam_at_axis;
+				if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
+				{
+					cam_at_axis.setVec(1.f, 0.f, 0.f);
+				}
+				else
+				{
+					cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent();
+					cam_at_axis.normVec();
+				}
+	
+				// first, project mouse onto screen plane at point tangent to rotation radius. 
+				getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis);
+				// project that point onto rotation plane
+				projected_mouse -= snap_plane_center;
+				projected_mouse -= projected_vec(projected_mouse, constraint_axis);
+	
+				F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec());
+				F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters;
+				if (llabs(mouse_lateral_dist) > 0.01f)
+				{
+					mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - 
+										(mouse_lateral_dist * mouse_lateral_dist));
+				}
+				LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis);
+				projected_mouse -= mouse_depth * projected_camera_at;
+	
+				if (!mInSnapRegime)
+				{
+					mSmoothRotate = TRUE;
+				}
+				mInSnapRegime = TRUE;
+				// 0 to 360 deg
+				F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
+				
+				F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
+				//fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
+	
+				LLVector3 object_axis;
+				getObjectAxisClosestToMouse(object_axis);
+				object_axis = object_axis * first_object_node->mSavedRotation;
+	
+				// project onto constraint plane
+				object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis();
+				object_axis.normVec();
+	
+				if (relative_mouse_angle < SNAP_ANGLE_DETENTE)
+				{
+					F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f));
+					angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+				}
+				else
+				{
+					angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+				}
+				return LLQuaternion( -angle, constraint_axis );
 			}
 			else
 			{
-				angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+				if (mInSnapRegime)
+				{
+					mSmoothRotate = TRUE;
+				}
+				mInSnapRegime = FALSE;
 			}
-			return LLQuaternion( -angle, constraint_axis );
 		}
-		else
-		{
+		else {
 			if (mInSnapRegime)
 			{
 				mSmoothRotate = TRUE;
 			}
 			mInSnapRegime = FALSE;
-
+		}
+		
+		if (!mInSnapRegime)
+		{
 			LLVector3 up_from_axis = mCenterToCamNorm % constraint_axis;
 			up_from_axis.normVec();
 			LLVector3 cur_intersection;
-- 
cgit v1.2.3


From c3c8ae2782df14cf923c4c4954566ab6f1446340 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 15 Jan 2013 16:56:21 -0500
Subject: STORM-1892 Revert checkboxes to initial values when Cancel is clicked

---
 indra/newview/llfloaterbulkpermission.cpp | 29 +++++++++++++++++++++++++++++
 indra/newview/llfloaterbulkpermission.h   | 15 +++++++++++++++
 2 files changed, 44 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index d9577eb74a..0ab97ea095 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -67,6 +67,21 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
 
 BOOL LLFloaterBulkPermission::postBuild()
 {
+	mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations");
+	mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts");
+	mBulkChangeIncludeClothing = gSavedSettings.getBOOL("BulkChangeIncludeClothing");
+	mBulkChangeIncludeGestures = gSavedSettings.getBOOL("BulkChangeIncludeGestures");
+	mBulkChangeIncludeNotecards = gSavedSettings.getBOOL("BulkChangeIncludeNotecards");
+	mBulkChangeIncludeObjects = gSavedSettings.getBOOL("BulkChangeIncludeObjects");
+	mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts");
+	mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds");
+	mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures");
+	mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup");
+	mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy");
+	mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify");
+	mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
+	mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer");
+
 	return TRUE;
 }
 
@@ -158,6 +173,20 @@ void LLFloaterBulkPermission::onApplyBtn()
 
 void LLFloaterBulkPermission::onCloseBtn()
 {
+	gSavedSettings.setBOOL("BulkChangeIncludeAnimations", mBulkChangeIncludeAnimations);
+	gSavedSettings.setBOOL("BulkChangeIncludeBodyParts", mBulkChangeIncludeBodyParts);
+	gSavedSettings.setBOOL("BulkChangeIncludeClothing", mBulkChangeIncludeClothing);
+	gSavedSettings.setBOOL("BulkChangeIncludeGestures", mBulkChangeIncludeGestures);
+	gSavedSettings.setBOOL("BulkChangeIncludeNotecards", mBulkChangeIncludeNotecards);
+	gSavedSettings.setBOOL("BulkChangeIncludeObjects", mBulkChangeIncludeObjects);
+	gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts);
+	gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds);
+	gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures);
+	gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup);
+	gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy);
+	gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify);
+	gSavedSettings.setBOOL("BulkChangeNextOwnerCopy", mBulkChangeNextOwnerCopy);
+	gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", mBulkChangeNextOwnerTransfer);
 	closeFloater();
 }
 
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 58e4467f4d..25e76eca65 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -95,6 +95,21 @@ private:
 	LLUUID mCurrentObjectID;
 	BOOL mDone;
 
+	bool mBulkChangeIncludeAnimations;
+	bool mBulkChangeIncludeBodyParts;
+	bool mBulkChangeIncludeClothing;
+	bool mBulkChangeIncludeGestures;
+	bool mBulkChangeIncludeNotecards;
+	bool mBulkChangeIncludeObjects;
+	bool mBulkChangeIncludeScripts;
+	bool mBulkChangeIncludeSounds;
+	bool mBulkChangeIncludeTextures;
+	bool mBulkChangeShareWithGroup;
+	bool mBulkChangeEveryoneCopy;
+	bool mBulkChangeNextOwnerModify;
+	bool mBulkChangeNextOwnerCopy;
+	bool mBulkChangeNextOwnerTransfer;
+
 	LLUUID mID;
 
 	const char* mStartString;
-- 
cgit v1.2.3


From 2474385a2a447a9e9d05bb170c6f7a4be8d43249 Mon Sep 17 00:00:00 2001
From: Ansariel <none@none>
Date: Fri, 22 Feb 2013 11:19:51 +0100
Subject: STORM-1931: Added option to disable chat animations
 (say/whisper/shout)

---
 indra/newview/app_settings/settings.xml              | 11 +++++++++++
 indra/newview/llchatbar.cpp                          |  2 +-
 indra/newview/llfloaterimnearbychat.cpp              |  2 +-
 indra/newview/llfloaterimnearbychatlistener.cpp      |  4 ++--
 .../skins/default/xui/en/panel_preferences_chat.xml  | 20 ++++++++++++++++----
 5 files changed, 31 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 79376f7467..6436f11967 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6845,6 +6845,17 @@
       <key>Value</key>
       <real>90.0</real>
     </map>
+    <key>PlayChatAnim</key>
+    <map>
+      <key>Comment</key>
+      <string>Your avatar plays the chat animation whenever you say, shout or whisper something in nearby chat</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
     <key>PlayTypingAnim</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 7d0331757b..b3bc0ba966 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -381,7 +381,7 @@ void LLChatBar::sendChat( EChatType type )
 			if (!utf8_revised_text.empty())
 			{
 				// Chat with animation
-				sendChatFromViewer(utf8_revised_text, type, TRUE);
+				sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
 			}
 		}
 	}
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 430326203f..c0a2c2e13f 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -511,7 +511,7 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
 			if (!utf8_revised_text.empty())
 			{
 				// Chat with animation
-				sendChatFromViewer(utf8_revised_text, type, TRUE);
+				sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
 			}
 		}
 
diff --git a/indra/newview/llfloaterimnearbychatlistener.cpp b/indra/newview/llfloaterimnearbychatlistener.cpp
index 14a22bcd84..5a5f6c72c8 100644
--- a/indra/newview/llfloaterimnearbychatlistener.cpp
+++ b/indra/newview/llfloaterimnearbychatlistener.cpp
@@ -33,7 +33,7 @@
 
 #include "llagent.h"
 #include "llchat.h"
-
+#include "llviewercontrol.h"
 
 
 LLFloaterIMNearbyChatListener::LLFloaterIMNearbyChatListener(LLFloaterIMNearbyChat & chatbar)
@@ -95,6 +95,6 @@ void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const
 	}
 
 	// Send it as if it was typed in
-	mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, (BOOL)(channel == 0));
+	mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim"));
 }
 
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 9db3816c92..e737938493 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -29,13 +29,24 @@
         width="330">
     </check_box>
 
+    <check_box
+        control_name="PlayChatAnim"
+        height="16"
+        initial_value="true"
+        label="Play chat animations when chatting in nearby chat"
+        layout="topleft"
+        top_pad="2"
+        name="play_chat_animation"
+        width="330">
+    </check_box>
+
     <check_box
         enabled="false"
         height="16"
         label="Email me IMs when I'm offline"
         layout="topleft"
         name="send_im_to_email"
-        top_pad="6"
+        top_pad="2"
         width="330">
     </check_box>
 
@@ -45,7 +56,7 @@
         label="Only friends and groups can call or IM me"
         layout="topleft"
         name="voice_call_friends_only_check"
-        top_pad="6"
+        top_pad="2"
         width="350">     
     </check_box>
 
@@ -98,6 +109,7 @@
       height="165"
       layout="topleft"
       left="13"
+      top_pad="12"
       width="517">
 
     <text
@@ -284,7 +296,7 @@
         height="13"
         name="notifications_alert"
         width="500"
-        top_pad="9"
+        top_pad="7"
         visible="true"
         text_color="DrYellow">
       To temporarily stop all notifications, use Communicate &gt; Do Not Disturb.
@@ -297,7 +309,7 @@
       height="50"
       layout="topleft"
       left="13"
-      top_pad="10"
+      top_pad="7"
       width="517">
 
     <text
-- 
cgit v1.2.3


From 50810975472a1674e955a063f537011a000dc775 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Wed, 20 Mar 2013 16:17:05 -0400
Subject: storm-1910 fix merge of people panel with chui

---
 .../newview/skins/default/xui/en/panel_people.xml  | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 39a46829b9..ed274d0233 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -396,16 +396,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
      *NOTE: no_groups_msg & group_list attributes are not defined as translatable in VLT. See EXT-5931
      Values are set from appropriate strings at the top of file via LLPeoplePanel::postBuild()
     -->
-    <text
-     type="string"
-     length="1"
-     follows="left|bottom"
-     height="14"
-     layout="topleft"
-     right="-10"
-     name="groupcount">
-You belong to [COUNT] groups, and can join [REMAINING] more.
-    </text>
             <panel
              follows="left|top|right"
              height="27"
@@ -490,10 +480,22 @@ You belong to [COUNT] groups, and can join [REMAINING] more.
                      function="People.Group.Minus" />
                 </dnd_button>
             </panel>
+            <text
+                type="string"
+                length="1"
+                follows="all"
+                height="14"
+                layout="topleft"
+                right="-10"
+                top_pad="4"
+                left="3"
+                name="groupcount">
+              You belong to [COUNT] groups, and can join [REMAINING] more.
+            </text>
             <group_list
              allow_select="true" 
              follows="all"
-             height="406"
+             height="388"
              layout="topleft"
              left="3"
              name="group_list"
-- 
cgit v1.2.3


From cfaadff2fb146654693b7530c7cd46898f565ad5 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 21 Mar 2013 14:21:56 -0400
Subject: storm-1931: make the new PlayChatAnim setting hidden

---
 .../skins/default/xui/en/panel_preferences_chat.xml  | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

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 e737938493..9db3816c92 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -29,24 +29,13 @@
         width="330">
     </check_box>
 
-    <check_box
-        control_name="PlayChatAnim"
-        height="16"
-        initial_value="true"
-        label="Play chat animations when chatting in nearby chat"
-        layout="topleft"
-        top_pad="2"
-        name="play_chat_animation"
-        width="330">
-    </check_box>
-
     <check_box
         enabled="false"
         height="16"
         label="Email me IMs when I'm offline"
         layout="topleft"
         name="send_im_to_email"
-        top_pad="2"
+        top_pad="6"
         width="330">
     </check_box>
 
@@ -56,7 +45,7 @@
         label="Only friends and groups can call or IM me"
         layout="topleft"
         name="voice_call_friends_only_check"
-        top_pad="2"
+        top_pad="6"
         width="350">     
     </check_box>
 
@@ -109,7 +98,6 @@
       height="165"
       layout="topleft"
       left="13"
-      top_pad="12"
       width="517">
 
     <text
@@ -296,7 +284,7 @@
         height="13"
         name="notifications_alert"
         width="500"
-        top_pad="7"
+        top_pad="9"
         visible="true"
         text_color="DrYellow">
       To temporarily stop all notifications, use Communicate &gt; Do Not Disturb.
@@ -309,7 +297,7 @@
       height="50"
       layout="topleft"
       left="13"
-      top_pad="7"
+      top_pad="10"
       width="517">
 
     <text
-- 
cgit v1.2.3


From 61f49cdee48de0d5fa6cda7080bcfce0b449f115 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Fri, 22 Mar 2013 09:57:52 -0400
Subject: correct validity errors in llsd files

---
 indra/newview/app_settings/settings.xml         | 2 +-
 indra/newview/app_settings/settings_minimal.xml | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2e91d10cd3..a9a6707a54 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10853,7 +10853,7 @@
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <integer>0.0</integer>
+      <real>0.0</real>
     </map>
     <key>TextureFetchUpdateSkipLowPriority</key>
     <map>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 01a70f2671..863b5b0435 100644
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -1 +1,2 @@
-<llsd/>
\ No newline at end of file
+<?xml version="1.0"?>
+<llsd/>
-- 
cgit v1.2.3


From 697bb80968e1fc539a023284ad5135e15d38d150 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Fri, 22 Mar 2013 09:57:52 -0400
Subject: correct validity errors in llsd files

---
 indra/newview/app_settings/settings.xml         | 3 ++-
 indra/newview/app_settings/settings_minimal.xml | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2e91d10cd3..b2c0b030b0 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10853,7 +10853,7 @@
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <integer>0.0</integer>
+      <real>0.0</real>
     </map>
     <key>TextureFetchUpdateSkipLowPriority</key>
     <map>
@@ -12492,6 +12492,7 @@
       <key>Type</key>
       <string>LLSD</string>
       <key>Value</key>
+      <array/>
     </map>
     <key>VFSOldSize</key>
     <map>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 01a70f2671..e660c1a33b 100644
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -1 +1,4 @@
-<llsd/>
\ No newline at end of file
+<?xml version="1.0"?>
+<llsd>
+  <undef/>
+</llsd>
-- 
cgit v1.2.3


From e09959df0d51eb8f4d37719d2753d2016390b25b Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Tue, 2 Apr 2013 17:11:07 -0700
Subject: CHUI-849 : WIP : Prevents Finding Widgets in highly used code by
 getting pointers to widgets in PostBuild

---
 indra/newview/llfloaterimcontainer.cpp  |  4 ++--
 indra/newview/llfloaterimcontainer.h    |  1 +
 indra/newview/llfloaterimsessiontab.cpp | 34 ++++++++++++++++-----------------
 indra/newview/llfloaterimsessiontab.h   |  3 +++
 indra/newview/llpanelmaininventory.cpp  |  7 ++++---
 indra/newview/llpanelmaininventory.h    |  1 +
 6 files changed, 27 insertions(+), 23 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7296ec3ced..e481e056f1 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -221,7 +221,8 @@ BOOL LLFloaterIMContainer::postBuild()
 	mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this));
 	mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
 	mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
-	getChild<LLButton>("speak_btn")->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
+    mSpeakBtn = getChild<LLButton>("speak_btn");
+	mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
 
 	childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
 
@@ -1873,7 +1874,6 @@ void LLFloaterIMContainer::reSelectConversation()
 
 void LLFloaterIMContainer::updateSpeakBtnState()
 {
-	LLButton* mSpeakBtn = getChild<LLButton>("speak_btn");
 	mSpeakBtn->setToggleState(LLVoiceClient::getInstance()->getUserPTTState());
 	mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak"));
 }
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 52b672241f..0890f694d9 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -168,6 +168,7 @@ private:
 
 	LLButton* mExpandCollapseBtn;
 	LLButton* mStubCollapseBtn;
+    LLButton* mSpeakBtn;
 	LLPanel* mStubPanel;
 	LLTextBox* mStubTextBox;
 	LLLayoutPanel* mMessagesPane;
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index ce6e639305..3c9cf3321e 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -241,7 +241,10 @@ BOOL LLFloaterIMSessionTab::postBuild()
 	mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this));
 
 	mGearBtn = getChild<LLButton>("gear_btn");
-
+    mAddBtn = getChild<LLButton>("add_btn");
+	mVoiceButton = getChild<LLButton>("voice_call_btn");
+    mTranslationCheckBox = getChild<LLUICtrl>("translate_chat_checkbox_lp");
+    
 	mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
 	mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder");
 
@@ -372,7 +375,7 @@ void LLFloaterIMSessionTab::draw()
 
 void LLFloaterIMSessionTab::enableDisableCallBtn()
 {
-    getChildView("voice_call_btn")->setEnabled(
+    mVoiceButton->setEnabled(
     		mSessionID.notNull()
     		&& mSession
     		&& mSession->mSessionInitialized
@@ -758,7 +761,7 @@ void LLFloaterIMSessionTab::reshapeChatLayoutPanel()
 
 void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show)
 {
-	getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(mIsNearbyChat? show : FALSE);
+	mTranslationCheckBox->setVisible(mIsNearbyChat && show);
 }
 
 // static
@@ -805,15 +808,10 @@ void LLFloaterIMSessionTab::reloadEmptyFloaters()
 
 void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive)
 {
-	LLButton* voiceButton = getChild<LLButton>("voice_call_btn");
-	voiceButton->setImageOverlay(
-			callIsActive? getString("call_btn_stop") : getString("call_btn_start"));
-
-	voiceButton->setToolTip(
-			callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip"));
+	mVoiceButton->setImageOverlay(callIsActive? getString("call_btn_stop") : getString("call_btn_start"));
+	mVoiceButton->setToolTip(callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip"));
 
 	enableDisableCallBtn();
-
 }
 
 void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
@@ -953,8 +951,8 @@ void LLFloaterIMSessionTab::updateGearBtn()
 	if(prevVisibility != mGearBtn->getVisible())
 	{
 		LLRect gear_btn_rect =  mGearBtn->getRect();
-		LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
-		LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
+		LLRect add_btn_rect = mAddBtn->getRect();
+		LLRect call_btn_rect = mVoiceButton->getRect();
 		S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
 		S32 right_shift = gear_btn_rect.getWidth() + gap_width;
 		if(mGearBtn->getVisible())
@@ -968,24 +966,24 @@ void LLFloaterIMSessionTab::updateGearBtn()
 			add_btn_rect.translate(-right_shift,0);
 			call_btn_rect.translate(-right_shift,0);
 		}
-		getChild<LLButton>("add_btn")->setRect(add_btn_rect);
-		getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
+		mAddBtn->setRect(add_btn_rect);
+		mVoiceButton->setRect(call_btn_rect);
 	}
 }
 
 void LLFloaterIMSessionTab::initBtns()
 {
 	LLRect gear_btn_rect =  mGearBtn->getRect();
-	LLRect add_btn_rect = getChild<LLButton>("add_btn")->getRect();
-	LLRect call_btn_rect = getChild<LLButton>("voice_call_btn")->getRect();
+	LLRect add_btn_rect = mAddBtn->getRect();
+	LLRect call_btn_rect = mVoiceButton->getRect();
 	S32 gap_width = call_btn_rect.mLeft - add_btn_rect.mRight;
 	S32 right_shift = gear_btn_rect.getWidth() + gap_width;
 
 	add_btn_rect.translate(-right_shift,0);
 	call_btn_rect.translate(-right_shift,0);
 
-	getChild<LLButton>("add_btn")->setRect(add_btn_rect);
-	getChild<LLButton>("voice_call_btn")->setRect(call_btn_rect);
+	mAddBtn->setRect(add_btn_rect);
+	mVoiceButton->setRect(call_btn_rect);
 }
 
 // static
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 302d5a8066..ba80d2369a 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -182,6 +182,9 @@ protected:
 	LLButton* mTearOffBtn;
 	LLButton* mCloseBtn;
 	LLButton* mGearBtn;
+	LLButton* mAddBtn;
+    LLButton* mVoiceButton;
+    LLUICtrl* mTranslationCheckBox;
 
 private:
 	// Handling selection and contextual menu
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index d6535c88e9..53deded2f2 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -130,6 +130,8 @@ BOOL LLPanelMainInventory::postBuild()
 	mFilterTabs = getChild<LLTabContainer>("inventory filter tabs");
 	mFilterTabs->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterSelected, this));
 	
+    mCounterCtrl = getChild<LLUICtrl>("ItemcountText");
+    
 	//panel->getFilter().markDefault();
 
 	// Set up the default inv. panel/filter settings.
@@ -566,7 +568,7 @@ void LLPanelMainInventory::draw()
 void LLPanelMainInventory::updateItemcountText()
 {
 	// *TODO: Calling setlocale() on each frame may be inefficient.
-	LLLocale locale(LLStringUtil::getLocale());
+	//LLLocale locale(LLStringUtil::getLocale());
 	std::string item_count_string;
 	LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
 
@@ -589,8 +591,7 @@ void LLPanelMainInventory::updateItemcountText()
 		text = getString("ItemcountUnknown");
 	}
 	
-	// *TODO: Cache the LLUICtrl* for the ItemcountText control
-	getChild<LLUICtrl>("ItemcountText")->setValue(text);
+    mCounterCtrl->setValue(text);
 }
 
 void LLPanelMainInventory::onFocusReceived()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 899931aa89..394b004e20 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -121,6 +121,7 @@ private:
 
 	LLFilterEditor*				mFilterEditor;
 	LLTabContainer*				mFilterTabs;
+    LLUICtrl*                   mCounterCtrl;
 	LLHandle<LLFloater>			mFinderHandle;
 	LLInventoryPanel*			mActivePanel;
 	bool						mResortActivePanel;
-- 
cgit v1.2.3


From e21a0f09b3bf6dfe592c3667e40dd80295bca251 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Wed, 3 Apr 2013 13:50:50 +0300
Subject: CHUI-911 FIXED [CHUIBUG]When Chat side of Conversations floater is
 reduced to it's minimum width the scroll bar is half-obscured.

---
 indra/newview/skins/default/xui/en/floater_im_session.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 2152a9f6e9..08ecc37d21 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -78,7 +78,7 @@
          right="-5"
          bottom="-1"
          top="0"
-         left="5"
+         left="3"
          border_size="0"
          layout="topleft"
          orientation="vertical"
@@ -86,6 +86,7 @@
          tab_group="1">
             <layout_panel
              auto_resize="false"
+             user_resize="false"
              name="toolbar_panel"
              height="35"
              right="-1"
@@ -200,7 +201,9 @@
             <layout_panel
              name="body_panel"
              top="1"
-             bottom="-1">
+             bottom="-1"
+             auto_resize="true"
+             user_resize="false">
                 <layout_stack
                  default_tab_group="2"
                  follows="all"
@@ -273,6 +276,7 @@
              height="26"
              bottom="-1"
              auto_resize="false"
+             user_resize="false"
              name="chat_layout_panel">
                 <layout_stack
                  animate="false"
-- 
cgit v1.2.3


From 7b0c364a6bfc3dc47197d1bb0af025b303ef5079 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 3 Apr 2013 15:07:26 +0300
Subject: CHUI-838 FIXED (Opening chat history for groups only works once per
 session, if at all)

---
 indra/newview/llfloaterimcontainer.cpp |  3 ++-
 indra/newview/lllogchat.cpp            | 28 ++++++++++++++++++++++------
 indra/newview/lllogchat.h              |  2 +-
 3 files changed, 25 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 58817485fb..7e281bd99b 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1211,7 +1211,8 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 	//Enable Chat history item for ad-hoc and group conversations
 	if ("can_chat_history" == item && uuids.size() > 0)
 	{
-		return LLLogChat::isTranscriptExist(uuids.front());
+		bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP);
+		return LLLogChat::isTranscriptExist(uuids.front(),is_group);
 	}
 
 	// If nothing is selected(and selected item is not group chat), everything needs to be disabled
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 2d7454b636..82409da4ba 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -631,7 +631,7 @@ void LLLogChat::deleteTranscripts()
 }
 
 // static
-bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id)
+bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id, bool is_group)
 {
 	std::vector<std::string> list_of_transcriptions;
 	LLLogChat::getListOfTranscriptFiles(list_of_transcriptions);
@@ -641,15 +641,31 @@ bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id)
 		LLAvatarName avatar_name;
 		LLAvatarNameCache::get(avatar_id, &avatar_name);
 		std::string avatar_user_name = avatar_name.getAccountName();
-		std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_');
-
-		BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions)
+		if(!is_group)
 		{
-			if (std::string::npos != transcript_file_name.find(avatar_user_name))
+			std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_');
+			BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions)
 			{
-				return true;
+				if (std::string::npos != transcript_file_name.find(avatar_user_name))
+				{
+					return true;
+				}
 			}
 		}
+		else
+		{
+			std::string file_name;
+			gCacheName->getGroupName(avatar_id, file_name);
+			file_name = makeLogFileName(file_name);
+			BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions)
+			{
+				if (transcript_file_name == file_name)
+				{
+					return true;
+				}
+			}
+		}
+
 	}
 
 	return false;
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index e819f00dd9..77bb2a1570 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -67,7 +67,7 @@ public:
 		std::vector<std::string>& listOfFilesToMove);
 
 	static void deleteTranscripts();
-	static bool isTranscriptExist(const LLUUID& avatar_id);
+	static bool isTranscriptExist(const LLUUID& avatar_id, bool is_group=false);
 
 private:
 	static std::string cleanFileName(std::string filename);
-- 
cgit v1.2.3


From 2d7a09839ea75bf8b87220f5585e5d6fd2a11d72 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Wed, 3 Apr 2013 20:39:35 +0300
Subject: CHUI-841 FIXED No warning given that you cannot leave a group you are
 the last owner of in conversation floater and people floater Added check in
 LLGroupActions::leave() method for number of members in the group and whether
 avatar is the owner. Also added LLFetchGroupMemberData class which sends and
 handles async request for group member data and used in the above method.

---
 indra/newview/llgroupactions.cpp                   | 124 +++++++++++++++++++--
 indra/newview/llgroupactions.h                     |   8 ++
 .../newview/skins/default/xui/en/notifications.xml |  11 ++
 3 files changed, 132 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index a0f2918bd7..40d4c46689 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -116,6 +116,79 @@ public:
 };
 LLGroupHandler gGroupHandler;
 
+// This object represents a pending request for specified group member information
+// which is needed to check whether avatar can leave group
+class LLFetchGroupMemberData : public LLGroupMgrObserver
+{
+public:
+	LLFetchGroupMemberData(const LLUUID& group_id) : 
+		mGroupId(group_id),
+		mRequestProcessed(false),
+		LLGroupMgrObserver(group_id) 
+	{
+		llinfos << "Sending new group member request for group_id: "<< group_id << llendl;
+		LLGroupMgr* mgr = LLGroupMgr::getInstance();
+		// register ourselves as an observer
+		mgr->addObserver(this);
+		// send a request
+		mgr->sendGroupPropertiesRequest(group_id);
+		mgr->sendCapGroupMembersRequest(group_id);
+	}
+
+	~LLFetchGroupMemberData()
+	{
+		if (!mRequestProcessed)
+		{
+			// Request is pending
+			llwarns << "Destroying pending group member request for group_id: "
+				<< mGroupId << llendl;
+		}
+		// Remove ourselves as an observer
+		LLGroupMgr::getInstance()->removeObserver(this);
+	}
+
+	void changed(LLGroupChange gc)
+	{
+		if (gc == GC_MEMBER_DATA && !mRequestProcessed)
+		{
+			LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupId);
+			if (!gdatap)
+			{
+				llwarns << "LLGroupMgr::getInstance()->getGroupData() was NULL" << llendl;
+			} 
+			else if (!gdatap->isMemberDataComplete())
+			{
+				llwarns << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was FALSE" << llendl;
+			}
+			else
+			{
+				processGroupData();
+				mRequestProcessed = true;
+			}
+		}
+	}
+
+	LLUUID getGroupId() { return mGroupId; }
+	virtual void processGroupData() = 0;
+protected:
+	LLUUID mGroupId;
+private:
+	bool mRequestProcessed;
+};
+
+LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;
+class LLFetchLeaveGroupData: public LLFetchGroupMemberData
+{
+public:
+	 LLFetchLeaveGroupData(const LLUUID& group_id)
+		 : LLFetchGroupMemberData(group_id)
+	 {}
+	 void processGroupData()
+	 {
+		 LLGroupActions::processLeaveGroupDataResponse(mGroupId);
+	 }
+};
+
 // static
 void LLGroupActions::search()
 {
@@ -208,23 +281,52 @@ bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
 void LLGroupActions::leave(const LLUUID& group_id)
 {
 	if (group_id.isNull())
+	{
 		return;
+	}
 
-	S32 count = gAgent.mGroups.count();
-	S32 i;
-	for (i = 0; i < count; ++i)
+	LLGroupData group_data;
+	if (gAgent.getGroupData(group_id, group_data))
 	{
-		if(gAgent.mGroups.get(i).mID == group_id)
-			break;
+		LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id);
+		if (!gdatap || !gdatap->isMemberDataComplete())
+		{
+			if (gFetchLeaveGroupData != NULL)
+			{
+				delete gFetchLeaveGroupData;
+				gFetchLeaveGroupData = NULL;
+			}
+			gFetchLeaveGroupData = new LLFetchLeaveGroupData(group_id);
+		}
+		else
+		{
+			processLeaveGroupDataResponse(group_id);
+		}
 	}
-	if (i < count)
+}
+
+//static
+void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id)
+{
+	LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id);
+	LLUUID agent_id = gAgent.getID();
+	LLGroupMgrGroupData::member_list_t::iterator mit = gdatap->mMembers.find(agent_id);
+	//get the member data for the group
+	if ( mit != gdatap->mMembers.end() )
 	{
-		LLSD args;
-		args["GROUP"] = gAgent.mGroups.get(i).mName;
-		LLSD payload;
-		payload["group_id"] = group_id;
-		LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
+		LLGroupMemberData* member_data = (*mit).second;
+
+		if ( member_data && member_data->isOwner() && gdatap->mMemberCount == 1)
+		{
+			LLNotificationsUtil::add("OwnerCannotLeaveGroup");
+			return;
+		}
 	}
+	LLSD args;
+	args["GROUP"] = gdatap->mName;
+	LLSD payload;
+	payload["group_id"] = group_id;
+	LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
 }
 
 // static
diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h
index 3f9852f194..afc4686dd7 100644
--- a/indra/newview/llgroupactions.h
+++ b/indra/newview/llgroupactions.h
@@ -114,6 +114,14 @@ public:
 private:
 	static bool onJoinGroup(const LLSD& notification, const LLSD& response);
 	static bool onLeaveGroup(const LLSD& notification, const LLSD& response);
+	
+	/**
+	 * This function is called by LLFetchLeaveGroupData upon receiving a response to a group 
+	 * members data request.
+	 */
+	static void processLeaveGroupDataResponse(const LLUUID group_id);
+
+	friend class LLFetchLeaveGroupData;
 };
 
 #endif // LL_LLGROUPACTIONS_H
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 105bef7321..49e2ddfb14 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3648,6 +3648,17 @@ Leave Group?
      yestext="OK"/>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="OwnerCannotLeaveGroup"
+   type="alertmodal">
+    Unable to leave group. You cannot leave the group because you are the last owner of the group. Please assign another member to the owner role first.
+    <tag>group</tag>
+    <usetemplate
+     name="okbutton"
+     yestext="OK"/>
+  </notification>
+
   <notification
    icon="alert.tga"
    name="ConfirmKick"
-- 
cgit v1.2.3


From b9a96474e35790ee8e5c4f2f479d90ce0466d1d4 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Thu, 4 Apr 2013 15:25:33 +0300
Subject: fix build

---
 indra/newview/llgroupactions.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 40d4c46689..302d21c2e4 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -176,7 +176,6 @@ private:
 	bool mRequestProcessed;
 };
 
-LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;
 class LLFetchLeaveGroupData: public LLFetchGroupMemberData
 {
 public:
@@ -189,6 +188,8 @@ public:
 	 }
 };
 
+LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;
+
 // static
 void LLGroupActions::search()
 {
-- 
cgit v1.2.3


From c081d4e249487031c3dd9028f6d0450cba5776a7 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 4 Apr 2013 16:12:29 +0300
Subject: =?UTF-8?q?=D0=A1HUI-818=20FIXED=20For=20group=20toasts:=20show=20?=
 =?UTF-8?q?name=20of=20the=20group=20in=20Titlebar;=20add=20[From=20User?=
 =?UTF-8?q?=5FDisplayName]=20before=20text=20of=20the=20message.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 indra/newview/lltoastimpanel.cpp | 26 ++++++++++++++++++++++++--
 indra/newview/lltoastimpanel.h   |  2 ++
 2 files changed, 26 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 75e6e3d13a..025ef3945d 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -28,6 +28,7 @@
 #include "lltoastimpanel.h"
 
 #include "llagent.h"
+#include "llavatarnamecache.h"
 #include "llfloaterreg.h"
 #include "llgroupactions.h"
 #include "llgroupiconctrl.h"
@@ -61,6 +62,15 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif
 	style_params.font.name(font_name);
 	style_params.font.size(font_size);
 	
+	LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(p.session_id);
+	mIsGroupMsg = (im_session->mSessionType == LLIMModel::LLIMSession::GROUP_SESSION);
+	if(mIsGroupMsg)
+	{
+		mAvatarName->setValue(im_session->mName);
+		LLAvatarName avatar_name;
+		LLAvatarNameCache::get(p.avatar_id, &avatar_name);
+		p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message;
+	}
 	
 	//Handle IRC styled /me messages.
 	std::string prefix = p.message.substr(0, 4);
@@ -81,12 +91,17 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif
 		mMessage->setText(p.message, style_params);
 	}
 
-	mAvatarName->setValue(p.from);
+	if(!mIsGroupMsg)
+	{
+		mAvatarName->setValue(p.from);
+	}
 	mTime->setValue(p.time);
 	mSessionID = p.session_id;
 	mAvatarID = p.avatar_id;
 	mNotification = p.notification;
 
+
+
 	initIcon();
 
 	S32 maxLinesCount;
@@ -147,7 +162,14 @@ void LLToastIMPanel::spawnNameToolTip()
 
 	LLToolTip::Params params;
 	params.background_visible(false);
-	params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE));
+	if(!mIsGroupMsg)
+	{
+		params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE));
+	}
+	else
+	{
+		params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE));
+	}
 	params.delay_time(0.0f);		// spawn instantly on hover
 	params.image(LLUI::getUIImage("Info_Small"));
 	params.message("");
diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h
index 3eb11fb3bc..767617dabc 100644
--- a/indra/newview/lltoastimpanel.h
+++ b/indra/newview/lltoastimpanel.h
@@ -73,6 +73,8 @@ private:
 	LLTextBox*			mAvatarName;
 	LLTextBox*			mTime;
 	LLTextBox*			mMessage;
+
+	bool                mIsGroupMsg;
 };
 
 #endif // LLTOASTIMPANEL_H_
-- 
cgit v1.2.3


From dabce05d1eed47944e39438e50b3c788b7df649d Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Wed, 3 Apr 2013 19:58:46 +0300
Subject: CHUI-820 FIXED Cannot snap or move collapsed conversation window to
 left or right edge of viewer window

---
 indra/newview/llviewerwindow.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4afd90b44c..be508ad17d 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1798,9 +1798,7 @@ void LLViewerWindow::initBase()
 
 	// Constrain floaters to inside the menu and status bar regions.
 	gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
-	gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
 	gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
-	
 
 	// Console
 	llassert( !gConsole );
-- 
cgit v1.2.3


From 776d63b128bebb7dd5cd8f25a2d7352b69d2deec Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 8 Apr 2013 13:23:08 +0300
Subject: CHUI-914 FIXED Restore previous text after gestures were triggered.

---
 indra/newview/llfloaterimnearbychat.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 49f36a2f32..266b5b20ee 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -582,6 +582,7 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
 			if (!utf8_revised_text.empty())
 			{
 				// Chat with animation
+				utf8_revised_text = utf8text;
 				sendChatFromViewer(utf8_revised_text, type, TRUE);
 			}
 		}
-- 
cgit v1.2.3


From d533a33f4229244405ed0b247fce410513b6c3e9 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Mon, 8 Apr 2013 18:59:21 -0700
Subject: CHUI-912 : WIP : Add traces to various aspects of the inventory
 filtering, sorting and arranging (to be deleted)

---
 indra/newview/llfolderviewmodelinventory.cpp | 27 +++++++++++++++++++++------
 indra/newview/llfolderviewmodelinventory.h   |  3 +++
 indra/newview/llinventoryfilter.cpp          |  9 +++++++++
 indra/newview/llinventorypanel.cpp           |  3 +++
 4 files changed, 36 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 586965e5a0..5ad94bfaba 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -35,6 +35,13 @@
 // class LLFolderViewModelInventory
 //
 static LLFastTimer::DeclareTimer FTM_INVENTORY_SORT("Sort");
+static S32 sModelInstance = 0;
+
+LLFolderViewModelInventory::LLFolderViewModelInventory()
+{
+    mModelInstance = sModelInstance++;
+    llinfos << "Merov : LLFolderViewModelInventory::LLFolderViewModelInventory, instance = " << mModelInstance << llendl;
+}
 
 bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>& items)
 {
@@ -64,6 +71,7 @@ bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>&
 void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
 {
 	LLFastTimer _(FTM_INVENTORY_SORT);
+    llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << llendl;
 
 	if (!needsSort(folder->getViewModelItem())) return;
 
@@ -174,7 +182,16 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 	const S32 filter_generation = filter.getCurrentGeneration();
 	const S32 must_pass_generation = filter.getFirstRequiredGeneration();
 
-	if (getLastFilterGeneration() >= must_pass_generation 
+    if (getSearchableName() == "A NOUNOURS")
+    {
+        llinfos << "Merov : LLFolderViewModelItemInventory::filter : special NOUNOURS case, filter count = " << filter.getFilterCount() << ", must pass = " << must_pass_generation << ", current = " << filter_generation << ", item last = " << getLastFilterGeneration() << ", folder last = " << getLastFolderFilterGeneration() << llendl;
+    }
+    else
+    {
+        llinfos << "Merov : LLFolderViewModelItemInventory::filter : filter count = " << filter.getFilterCount() << llendl;
+    }
+   
+    if (getLastFilterGeneration() >= must_pass_generation
 		&& getLastFolderFilterGeneration() >= must_pass_generation
 		&& !passedFilter(must_pass_generation))
 	{
@@ -185,14 +202,12 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		return true;
 	}
 
-	const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) 
-		? filter.checkFolder(this)
-		: true;
+	const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
 	setPassedFolderFilter(passed_filter_folder, filter_generation);
 
-	if(!mChildren.empty()
+	if (!mChildren.empty()
 		&& (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
-			|| descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
+            || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
 	{
 		// now query children
 		for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end();
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 890d03d1c9..3201acf91e 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -106,6 +106,8 @@ class LLFolderViewModelInventory
 public:
 	typedef LLFolderViewModel<LLInventorySort,   LLFolderViewModelItemInventory, LLFolderViewModelItemInventory,   LLInventoryFilter> base_t;
 
+    LLFolderViewModelInventory();
+    
 	void setTaskID(const LLUUID& id) {mTaskID = id;}
 
 	void sort(LLFolderViewFolder* folder);
@@ -114,5 +116,6 @@ public:
 
 private:
 	LLUUID mTaskID;
+    S32 mModelInstance;
 };
 #endif // LL_LLFOLDERVIEWMODELINVENTORY_H
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 92f2d33073..eef0adda52 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -100,6 +100,15 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
 	passed = passed && checkAgainstFilterLinks(listener);
 	passed = passed && passed_clipboard;
 
+    if (listener->getSearchableName() == "A NOUNOURS")
+    {
+        llinfos << "Merov : LLInventoryFilter::check : Here we go with our special NOUNOURS case, checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
+    }
+    else
+    {
+        llinfos << "Merov : LLInventoryFilter::check : checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
+    }
+
 	return passed;
 }
 
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index fabcd50c7d..1430d9fe3a 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -148,6 +148,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mViewsInitialized(false),
 	mInvFVBridgeBuilder(NULL)
 {
+    llinfos << "Merov : LLInventoryPanel::LLInventoryPanel, name = " << getName() << ", label = " << getLabel() << llendl;
+
 	mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
 
 	if (!sColorSetInitialized)
@@ -476,6 +478,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
 		{
 			if (view_item)
 			{
+                // Merov??
 				view_item->refresh();
 			}
 		}
-- 
cgit v1.2.3


From d35c61a21a42867551cb9b7c8893bc6097e3d5f8 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 9 Apr 2013 14:53:22 +0300
Subject: CHUI-923 FIXED Show toasts if Conversation floater is focussed and
 current conversation is not selected.

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

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index afac94af07..fefbe941a4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -299,9 +299,8 @@ void on_new_message(const LLSD& msg)
 
     // 4. Toast
     if ((("toast" == user_preferences) &&
-    		(CLOSED == conversations_floater_status
-    		    || NOT_ON_TOP == conversations_floater_status))
-    		    || !session_floater->isMessagePaneExpanded())
+    	(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status))
+    	|| !session_floater->isMessagePaneExpanded())
 
     {
         //Show IM toasts (upper right toasts)
-- 
cgit v1.2.3


From f1affa28972d3b746274380825bb9c72ede03daa Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 9 Apr 2013 19:21:48 +0300
Subject: CHUI-922 FIXED Panel width was increased

---
 indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 08ecc37d21..f8ab2dbcbb 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -273,7 +273,7 @@
             <layout_panel
              top_delta="0"
              top="0"
-             height="26"
+             height="30"
              bottom="-1"
              auto_resize="false"
              user_resize="false"
-- 
cgit v1.2.3


From 2aca9b39d467f48984c246d93e3393b9851929db Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 10 Apr 2013 19:39:56 +0300
Subject: CHUI-932 FIXED Restore previous text only if there is no gesture.

---
 indra/newview/llfloaterimnearbychat.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 266b5b20ee..7e472466ed 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -568,7 +568,10 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
 			if (0 == channel)
 			{
 				// discard returned "found" boolean
-				LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text);
+				if(!LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text))
+				{
+					utf8_revised_text = utf8text;
+				}
 			}
 			else
 			{
@@ -582,7 +585,6 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
 			if (!utf8_revised_text.empty())
 			{
 				// Chat with animation
-				utf8_revised_text = utf8text;
 				sendChatFromViewer(utf8_revised_text, type, TRUE);
 			}
 		}
-- 
cgit v1.2.3


From c59aeef9664a1d9b6357a66a6eff0eab6d24b3eb Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Thu, 11 Apr 2013 00:18:00 +0300
Subject: CHUI-921 FIXED Default position of open floaters starts at left edge
 of viewer behind toolbar

---
 indra/newview/llviewerwindow.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index be508ad17d..45ff75bb34 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1798,6 +1798,7 @@ void LLViewerWindow::initBase()
 
 	// Constrain floaters to inside the menu and status bar regions.
 	gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
+	gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
 	gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
 
 	// Console
-- 
cgit v1.2.3


From 33d6f8a5953a6860bf1233d4a715f16a5b627cc0 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 12 Apr 2013 14:58:11 +0300
Subject: CHUI-934 FIXED Don't try to close Session floater if it is already
 doesn't exist.

---
 indra/newview/llfloaterimsession.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index edc25a7d7e..6ed04f8716 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -469,7 +469,10 @@ void LLFloaterIMSession::addP2PSessionParticipants(const LLSD& notification, con
 	temp_ids.insert(temp_ids.end(), uuids.begin(), uuids.end());
 
 	// then we can close the current session
-	onClose(false);
+	if(findInstance(mSessionID))
+	{
+		onClose(false);
+	}
 
 	// we start a new session so reset the initialization flag
 	mSessionInitialized = false;
-- 
cgit v1.2.3


From 9ab92603ce9ca54d4ef5571196f34ba5f0875286 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 17 Apr 2013 14:41:05 +0300
Subject: CHUI-936 FIXED Do not show Conversation log floater if logging is
 disabled.

---
 indra/newview/lldonotdisturbnotificationstorage.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 82affcf068..1cb650e4ea 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -215,7 +215,8 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
         LLFloaterReg::showInstance("im_container");
     }
 
-	if(group_ad_hoc_toast_exists)
+    bool isConversationLoggingAllowed = gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
+	if(group_ad_hoc_toast_exists && isConversationLoggingAllowed)
 	{
 		LLFloaterReg::showInstance("conversation");
 	}
-- 
cgit v1.2.3


From fa36f85b007a124c418fd8cfc0e836cc7fdc86cf Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pavelkproductengine@lindenlab.com>
Date: Tue, 9 Apr 2013 20:50:54 +0300
Subject: CHUI-797 FIXED Only one separated conversation window is shown after
 exiting from mouselook view Added all separated conversation floaters to skip
 list used in gFloaterView->popVisibleAll(skip_list) in llagent.cpp since
 LLFloaterIMContainer::setVisible() takes control of them by itself.

---
 indra/newview/llagent.cpp              | 13 ++++++++++++-
 indra/newview/llconversationview.cpp   | 14 +++++++++-----
 indra/newview/llconversationview.h     |  2 ++
 indra/newview/llfloaterimcontainer.cpp | 18 ++++++++++++++++++
 indra/newview/llfloaterimcontainer.h   |  2 ++
 5 files changed, 43 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 094d502078..e0ab70bac7 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -45,6 +45,7 @@
 #include "llenvmanager.h"
 #include "llfirstuse.h"
 #include "llfloatercamera.h"
+#include "llfloaterimcontainer.h"
 #include "llfloaterreg.h"
 #include "llfloatertools.h"
 #include "llgroupactions.h"
@@ -90,6 +91,7 @@
 #include "llworld.h"
 #include "llworldmap.h"
 #include "stringize.h"
+#include "boost/foreach.hpp"
 
 using namespace LLVOAvatarDefines;
 
@@ -2002,7 +2004,16 @@ void LLAgent::endAnimationUpdateUI()
 			{
 				skip_list.insert(LLFloaterReg::findInstance("mini_map"));
 			}
-		
+
+			LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+			LLFloaterIMContainer::floater_list_t conversations;
+			im_box->getDetachedConversationFloaters(conversations);
+			BOOST_FOREACH(LLFloater* conversation, conversations)
+			{
+				llinfos << "skip_list.insert(session_floater): " << conversation->getTitle() << llendl;
+				skip_list.insert(conversation);
+			}
+
 			gFloaterView->popVisibleAll(skip_list);
 #endif
 			mViewsPushed = FALSE;
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index b6c53e5e30..911e14bcd5 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -340,16 +340,20 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
 {
 	// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
 	// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
-	LLFolderViewModelItem* item = mViewModelItem;
-	LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
-	LLFloater* session_floater = LLFloaterIMSessionTab::getConversation(session_uuid);
-	
-	if (session_floater && !session_floater->getHost() && !session_floater->isMinimized())
+	LLFloater* session_floater = getSessionFloater();
+	if (session_floater && session_floater->isDetachedAndNotMinimized())
 	{
 		session_floater->setVisible(visible);
 	}
 }
 
+LLFloater* LLConversationViewSession::getSessionFloater()
+{
+	LLFolderViewModelItem* item = mViewModelItem;
+	LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
+	return LLFloaterIMSessionTab::getConversation(session_uuid);
+}
+
 LLConversationViewParticipant* LLConversationViewSession::findParticipant(const LLUUID& participant_id)
 {
 	// This is *not* a general tree parsing algorithm. We search only in the mItems list
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 3eb2e63792..7e432804d0 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -87,6 +87,8 @@ public:
 
 	/*virtual*/ void setFlashState(bool flash_state);
 
+	LLFloater* getSessionFloater();
+
 private:
 
 	void onCurrentVoiceSessionChanged(const LLUUID& session_id);
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index f89e818928..8575f6f055 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -54,6 +54,7 @@
 #include "llworld.h"
 #include "llsdserialize.h"
 #include "llviewerobjectlist.h"
+#include "boost/foreach.hpp"
 
 //
 // LLFloaterIMContainer
@@ -660,6 +661,23 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
 	LLMultiFloater::setVisible(visible);
 }
 
+void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters)
+{
+	typedef conversations_widgets_map::value_type conv_pair;
+	BOOST_FOREACH(conv_pair item, mConversationsWidgets)
+	{
+		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second);
+		if (widget)
+		{
+			LLFloater* session_floater = widget->getSessionFloater();
+			if (session_floater && session_floater->isDetachedAndNotMinimized())
+			{
+				floaters.push_back(session_floater);
+			}
+		}
+	}
+}
+
 void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
 {
 	LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index f6c716e2cf..5ea1a38c63 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -194,6 +194,8 @@ public:
 	bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget);
 	boost::signals2::connection mMicroChangedSignal;
 	S32 getConversationListItemSize() { return mConversationsWidgets.size(); }
+	typedef std::list<LLFloater*> floater_list_t;
+	void getDetachedConversationFloaters(floater_list_t& floaters);
 
 private:
 	LLConversationViewSession* createConversationItemWidget(LLConversationItem* item);
-- 
cgit v1.2.3


From 0b41fd503bf4388e911b21ab98479baebd5da31a Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Wed, 10 Apr 2013 00:07:02 +0300
Subject: CHUI-899 (The size of conversations panel does not persist between
 sessions if user relogin while messages pane is collapsed. )

---
 indra/newview/llfloaterimcontainer.cpp | 8 +++++++-
 indra/newview/llfloaterimcontainer.h   | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7e281bd99b..f89e818928 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -63,7 +63,8 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
 	mExpandCollapseBtn(NULL),
 	mConversationsRoot(NULL),
 	mConversationsEventStream("ConversationsEvents"),
-	mInitialized(false)
+	mInitialized(false),
+	mIsFirstLaunch(true)
 {
     mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2));
 	mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction,  this, _2));
@@ -663,6 +664,11 @@ void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& k
 {
 	LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
     selectConversationPair(getSelectedSession(), false, take_focus);
+	if (mInitialized && mIsFirstLaunch)
+	{
+		collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed"));
+		mIsFirstLaunch = false;
+	}
 }
 
 void LLFloaterIMContainer::updateResizeLimits()
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index e39d20ec35..f6c716e2cf 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -176,6 +176,7 @@ private:
 	LLLayoutStack* mConversationsStack;
 	
 	bool mInitialized;
+	bool mIsFirstLaunch;
 
 	LLUUID mSelectedSession;
 	std::string mGeneralTitle;
-- 
cgit v1.2.3


From b05bf882dbf5cdcb4683b4c6201ea50a38491a7b Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Thu, 11 Apr 2013 19:02:16 -0700
Subject: CHUI-912 : WIP : Fix resize test when folder is empty, add more
 traces (to be deleted)

---
 indra/newview/llinventorypanel.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 1430d9fe3a..17dd3024ea 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -194,7 +194,9 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
     p.show_item_link_overlays = mShowItemLinkOverlays;
     p.root = NULL;
     p.options_menu = "menu_inventory.xml";
-	
+
+    llinfos << "Merov : LLInventoryPanel::createFolderRoot, name = " << getName() << ", label = " << getLabel() << ", root id = " << root_id << llendl;
+
     return LLUICtrlFactory::create<LLFolderView>(p);
 }
 
@@ -403,6 +405,8 @@ void LLInventoryPanel::modelChanged(U32 mask)
 	static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
 	LLFastTimer t2(FTM_REFRESH);
 
+    llinfos << "Merov : LLInventoryPanel::modelChanged, mask = " << mask << ", name = " << getName() << ", label = " << getLabel() << llendl;
+
 	bool handled = false;
 
 	if (!mViewsInitialized) return;
-- 
cgit v1.2.3


From 0ecbbe9571be298284c2410ea441877b611bd875 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Mon, 15 Apr 2013 11:16:57 -0700
Subject: CHUI-912 : WIP : Try to change the return value of filter() so to
 trigger arrange on the fly.

---
 indra/newview/llfolderviewmodelinventory.cpp | 27 ++++++++++++---------------
 indra/newview/llinventoryfilter.cpp          |  4 ----
 indra/newview/llpanelobjectinventory.cpp     |  1 +
 3 files changed, 13 insertions(+), 19 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 5ad94bfaba..49b72485e0 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -71,7 +71,7 @@ bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>&
 void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
 {
 	LLFastTimer _(FTM_INVENTORY_SORT);
-    llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << llendl;
+    llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << ", folder = " << folder->getName() << llendl;
 
 	if (!needsSort(folder->getViewModelItem())) return;
 
@@ -155,11 +155,12 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 {
 	S32 filter_generation = filter.getCurrentGeneration();
 
-	bool continue_filtering = true;
+//	bool continue_filtering = true;
+	bool new_filtered_item = false;
 	if (item->getLastFilterGeneration() < filter_generation)
 	{
 		// recursive application of the filter for child items
-		continue_filtering = item->filter( filter );
+		new_filtered_item = item->filter( filter );
 	}
 
 	// track latest generation to pass any child items, for each folder up to root
@@ -174,7 +175,7 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 		}
 	}
 
-	return continue_filtering;
+	return new_filtered_item;
 }
 
 bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
@@ -186,10 +187,6 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
     {
         llinfos << "Merov : LLFolderViewModelItemInventory::filter : special NOUNOURS case, filter count = " << filter.getFilterCount() << ", must pass = " << must_pass_generation << ", current = " << filter_generation << ", item last = " << getLastFilterGeneration() << ", folder last = " << getLastFolderFilterGeneration() << llendl;
     }
-    else
-    {
-        llinfos << "Merov : LLFolderViewModelItemInventory::filter : filter count = " << filter.getFilterCount() << llendl;
-    }
    
     if (getLastFilterGeneration() >= must_pass_generation
 		&& getLastFolderFilterGeneration() >= must_pass_generation
@@ -199,12 +196,14 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		// go ahead and flag this item as done
 		setPassedFilter(false, filter_generation);
 		setPassedFolderFilter(false, filter_generation);
-		return true;
+		return false;
 	}
 
 	const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
 	setPassedFolderFilter(passed_filter_folder, filter_generation);
 
+	bool new_filtered_item = false;
+
 	if (!mChildren.empty()
 		&& (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
             || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
@@ -214,7 +213,8 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 			iter != end_iter && filter.getFilterCount() > 0;
 			++iter)
 		{
-			if (!filterChildItem((*iter), filter))
+			new_filtered_item |= filterChildItem((*iter), filter);
+            if (filter.getFilterCount() <= 0)
 			{
 				break;
 			}
@@ -230,12 +230,9 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 
 		const bool passed_filter = filter.check(this);
 		setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
-		return true;
-	}
-	else
-	{
-		return false;
+        new_filtered_item |= passed_filter;
 	}
+    return new_filtered_item;
 }
 
 LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel()
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index eef0adda52..d3f5d68708 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -104,10 +104,6 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
     {
         llinfos << "Merov : LLInventoryFilter::check : Here we go with our special NOUNOURS case, checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
     }
-    else
-    {
-        llinfos << "Merov : LLInventoryFilter::check : checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
-    }
 
 	return passed;
 }
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 7555ac7b2c..4d8fa07336 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1492,6 +1492,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mIsInventoryEmpty(TRUE),
 	mInventoryNeedsUpdate(FALSE)
 {
+    llinfos << "Merov : LLPanelObjectInventory::LLPanelObjectInventory, name = " << getName() << ", label = " << getLabel() << llendl;
 	// Setup context menu callbacks
 	mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
 	mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
-- 
cgit v1.2.3


From 0193a7b74ccc09788e8d2503244f30ac231546cc Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Tue, 16 Apr 2013 04:55:09 +0300
Subject: CHUI-808 FIXED Draggable separator between conversations and message
 pane is not discoverable:  - final solution;

---
 indra/newview/llfloaterimcontainer.cpp             |  15 ++--
 indra/newview/llfloaterimsessiontab.cpp            |   2 +-
 indra/newview/skins/default/colors.xml             |  15 ++++
 indra/newview/skins/default/textures/textures.xml  |   3 +
 .../textures/widgets/horizontal_drag_handle.png    | Bin 0 -> 197 bytes
 .../textures/widgets/vertical_drag_handle.png      | Bin 0 -> 196 bytes
 .../skins/default/xui/en/floater_im_container.xml  | 100 +++++++++++----------
 .../skins/default/xui/en/floater_im_session.xml    |  88 ++++++++----------
 8 files changed, 111 insertions(+), 112 deletions(-)
 create mode 100644 indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
 create mode 100644 indra/newview/skins/default/textures/widgets/vertical_drag_handle.png

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 8575f6f055..043ffacffb 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -817,15 +817,12 @@ void LLFloaterIMContainer::assignResizeLimits()
 	bool is_conv_pane_expanded = !mConversationsPane->isCollapsed();
 	bool is_msg_pane_expanded = !mMessagesPane->isCollapsed();
 
-	// With two panels visible number of borders is three, because the borders
-	// between the panels are merged into one
-    S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3);
-    S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH;
-	S32 conv_pane_target_width = is_conv_pane_expanded?
-			(is_msg_pane_expanded?
-					mConversationsPane->getRect().getWidth()
-					: mConversationsPane->getExpandedMinDim())
-			: mConversationsPane->getMinDim();
+    S32 summary_width_of_visible_borders = (is_msg_pane_expanded ? mConversationsStack->getPanelSpacing() : 0) + 1;
+
+	S32 conv_pane_target_width = is_conv_pane_expanded
+		? ( is_msg_pane_expanded?mConversationsPane->getRect().getWidth():mConversationsPane->getExpandedMinDim() )
+		: mConversationsPane->getMinDim();
+
 	S32 msg_pane_min_width  = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0;
 	S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders;
 
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index ce6e639305..7d96fd0d6c 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -212,7 +212,7 @@ void LLFloaterIMSessionTab::assignResizeLimits()
 	mRightPartPanel->setIgnoreReshape(is_participants_pane_collapsed);
 
     S32 participants_pane_target_width = is_participants_pane_collapsed?
-    		0 : (mParticipantListPanel->getRect().getWidth() + LLPANEL_BORDER_WIDTH);
+    		0 : (mParticipantListPanel->getRect().getWidth() + mParticipantListAndHistoryStack->getPanelSpacing());
 
     S32 new_min_width = participants_pane_target_width + mRightPartPanel->getExpandedMinDim() + mFloaterExtraWidth;
 
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 0de217fc0d..b0dfd471e0 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -864,4 +864,19 @@
   <color
     name="blue"
     value="0 0 1 1"/>
+
+  <!--Resize bar colors -->
+
+  <color
+    name="ResizebarBorderlight"
+    value="0.231 0.231 0.231 1"/>
+
+  <color
+    name="ResizebarBorderDark"
+    value="0.133 0.133 0.133 1"/>
+
+  <color
+    name="ResizebarBody"
+    value="0.208 0.208 0.208 1"/>
+    
 </colors>
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 93c9cb02cb..d99c3a8bda 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -776,4 +776,7 @@ with the same filename but different name
   <texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/>
   <texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/>
   <texture name="NavBar Separator" file_name="navbar/separator.png"/>
+
+  <texture name="Horizontal Drag Handle" file_name="widgets/horizontal_drag_handle.png"/>
+  <texture name="Vertical Drag Handle" file_name="widgets/vertical_drag_handle.png"/>
 </textures>
diff --git a/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png
new file mode 100644
index 0000000000..642eac4065
Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/horizontal_drag_handle.png differ
diff --git a/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png
new file mode 100644
index 0000000000..b06b70cf36
Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/vertical_drag_handle.png differ
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 65f623a47e..3e8c6c76cc 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -25,23 +25,27 @@
     <layout_stack
      animate="true" 
      bottom="-1"
+     drag_handle_gap="6"
+     drag_handle_first_indent="27"
+     drag_handle_second_indent="10"
      follows="all"
      layout="topleft"
      left="0"
      name="conversations_stack"
      orientation="horizontal"
      right="-1"
+     show_drag_handle="true"
      top="0">
         <layout_panel
          auto_resize="false"
          user_resize="true"        
          name="conversations_layout_panel"
          min_dim="38"
-         expanded_min_dim="156">
+         expanded_min_dim="136">
             <layout_stack
              animate="false" 
              follows="left|top|right"
-             height="35"
+             height="27"
              layout="topleft"
              left="0"
              name="conversations_pane_buttons_stack"
@@ -50,7 +54,6 @@
              top="0">
                 <layout_panel
                  auto_resize="true"
-                 height="35"
                  name="conversations_pane_buttons_expanded">
                     <menu_button
                      follows="top|left"
@@ -64,7 +67,7 @@
                      left="5"
                      name="sort_btn"
                      tool_tip="View/sort options"
-                     top="5"
+                     top="1"
                      width="31" />
                     <button
                      follows="top|left"
@@ -74,7 +77,7 @@
                      image_selected="Toolbar_Middle_Selected"
                      image_unselected="Toolbar_Middle_Off"
                      layout="topleft"
-                     top="5"
+                     top="1"
                      left_pad="2"
                      name="add_btn"
                      tool_tip="Start a new conversation"
@@ -87,7 +90,7 @@
                      image_selected="Toolbar_Middle_Selected"
                      image_unselected="Toolbar_Middle_Off"
                      layout="topleft"
-                     top="5"
+                     top="1"
                      left_pad="2"
                      name="speak_btn"
                      tool_tip="Speak with people using your microphone"
@@ -95,9 +98,8 @@
                 </layout_panel>
                 <layout_panel
                  auto_resize="false"
-                 height="35"
                  name="conversations_pane_buttons_collapsed"
-                 width="41">
+                 width="31">
                     <button
                      follows="right|top"
                      height="25"
@@ -106,8 +108,8 @@
                      image_selected="Toolbar_Middle_Selected"
                      image_unselected="Toolbar_Middle_Off"
                      layout="topleft"
-                     top="5"
-                     left="1"
+                     top="1"
+                     left="0"
                      name="expand_collapse_btn"
                      tool_tip="Collapse/Expand this list"
                      width="31" />
@@ -119,7 +121,7 @@
              layout="topleft"
              name="conversations_list_panel"
              opaque="true"
-             top="35"
+             top_pad="0"
              left="5"
              right="-1"/>
         </layout_panel>
@@ -127,7 +129,7 @@
          auto_resize="true"
          user_resize="true"
          name="messages_layout_panel"
-         expanded_min_dim="222">
+         expanded_min_dim="232">
             <panel_container
              bottom="-1"
              follows="all"
@@ -136,44 +138,44 @@
              name="im_box_tab_container"
              right="-1"
              top="0">
-             <panel
-               bottom="-1"
-               follows="all"
-               layout="topleft"
-               name="stub_panel"
-               opaque="true"
-               top_pad="0"
-               left="0"
-               right="-1">
-                 <button
-                 follows="right|top"
-                 height="25"
-                 image_hover_unselected="Toolbar_Middle_Over"
-                 image_overlay="Conv_toolbar_collapse"
-                 image_selected="Toolbar_Middle_Selected"
-                 image_unselected="Toolbar_Middle_Off"
+                <panel
+                 bottom="-1"
+                 follows="all"
                  layout="topleft"
-                 top="5"
-                 right="-10"
-                 name="stub_collapse_btn"
-                 tool_tip="Collapse this pane"
-                 width="31" />
-                 <text
-                   type="string"
-                   clip_partial="false"
-                   follows="left|top|right"
-                   layout="topleft"
-                   left="15"
-                   right="-15"
-                   name="stub_textbox"
-                   top="25"
-                   height="40"
-                   valign="center"
-                   parse_urls="true"
-                   wrap="true">
-                   This conversation is in a separate window.   [secondlife:/// Bring it back.]
-                 </text>
-             </panel>
+                 name="stub_panel"
+                 opaque="true"
+                 top_pad="0"
+                 left="0"
+                 right="-1">
+                    <button
+                     follows="right|top"
+                     height="25"
+                     image_hover_unselected="Toolbar_Middle_Over"
+                     image_overlay="Conv_toolbar_collapse"
+                     image_selected="Toolbar_Middle_Selected"
+                     image_unselected="Toolbar_Middle_Off"
+                     layout="topleft"
+                     top="1"
+                     right="-10"
+                     name="stub_collapse_btn"
+                     tool_tip="Collapse this pane"
+                     width="31" />
+                    <text
+                     type="string"
+                     clip_partial="false"
+                     follows="left|top|right"
+                     layout="topleft"
+                     left="15"
+                     right="-15"
+                     name="stub_textbox"
+                     top="25"
+                     height="40"
+                     valign="center"
+                     parse_urls="true"
+                     wrap="true">
+                         This conversation is in a separate window.   [secondlife:/// Bring it back.]
+                    </text>
+                </panel>
             </panel_container>
         </layout_panel>
     </layout_stack>
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index f8ab2dbcbb..c0ed2e6a78 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -70,27 +70,23 @@
      top="0"
      left="0"
      right="-1"
-     bottom="-3">
+     bottom="-1">
         <layout_stack
          animate="false" 
+         bottom="-1"
          default_tab_group="2"
          follows="all"
-         right="-5"
-         bottom="-1"
-         top="0"
          left="3"
-         border_size="0"
          layout="topleft"
-         orientation="vertical"
          name="main_stack"
-         tab_group="1">
+         right="-3"
+         orientation="vertical"
+         tab_group="1"
+         top="0">
             <layout_panel
              auto_resize="false"
-             user_resize="false"
              name="toolbar_panel"
-             height="35"
-             right="-1"
-             left="1">
+             height="25">
                 <menu_button
                  menu_filename="menu_im_session_showmodes.xml"
                  follows="top|left"
@@ -103,7 +99,7 @@
                  left="5"
                  name="view_options_btn"
                  tool_tip="View/sort options"
-                 top="5"
+                 top="1"
                  width="31" />
                 <menu_button
                  menu_filename="menu_im_conversation.xml"
@@ -114,7 +110,7 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 top="5"
+                 top="1"
                  left_pad="2"
                  name="gear_btn"
                  visible="false"
@@ -129,7 +125,7 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 top="5"
+                 top="1"
                  left_pad="2"
                  name="add_btn"
                  tool_tip="Add someone to this conversation"
@@ -142,7 +138,7 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 top="5"
+                 top="1"
                  left_pad="2"
                  name="voice_call_btn"
                  tool_tip="Open voice connection"
@@ -167,8 +163,8 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 top="5"
-                 right="-67"
+                 top="1"
+                 right="-70"
                  name="close_btn"
                  tool_tip="End this conversation"
                  width="31" />
@@ -180,7 +176,7 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 top="5"
+                 top="1"
                  left_pad="2"
                  name="expand_collapse_btn"
                  tool_tip="Collapse/Expand this pane"
@@ -195,20 +191,21 @@
                  layout="topleft"
                  left_pad="2"
                  name="tear_off_btn"
-                 top="5"
+                 top="1"
                  width="31" />
             </layout_panel>
             <layout_panel
              name="body_panel"
-             top="1"
-             bottom="-1"
-             auto_resize="true"
-             user_resize="false">
+             height="235">
                 <layout_stack
                  default_tab_group="2"
+                 drag_handle_gap="6"
+                 drag_handle_first_indent="0"
+                 drag_handle_second_indent="1"
                  follows="all"
                  orientation="horizontal"
                  name="im_panels"
+                 show_drag_handle="true"
                  tab_group="1"
                  top="0"
                  right="-1"
@@ -220,14 +217,12 @@
                      min_dim="0"
                      width="150" 
                      user_resize="true"
-                     auto_resize="false" 
-                     bottom="-1" />
+                     auto_resize="false" />
                     <layout_panel
                      default_tab_group="3"
                      tab_group="2"
                      name="right_part_holder"
-                     min_width="221"
-                     bottom="-1">
+                     min_width="221">
                         <layout_stack
                          animate="true" 
                          default_tab_group="2"
@@ -236,7 +231,7 @@
                          name="translate_and_chat_stack"
                          tab_group="1"
                          top="0"
-                         left="0"
+                         left="1"
                          right="-1"
                          bottom="-1">
                             <layout_panel
@@ -262,7 +257,7 @@
                                  parse_highlights="true"
                                  parse_urls="true"
                                  right="-1"
-                                 left="5"
+                                 left="0"
                                  top="0"
                                  bottom="-1" />
                             </layout_panel>
@@ -271,12 +266,8 @@
                 </layout_stack>
             </layout_panel>
             <layout_panel
-             top_delta="0"
-             top="0"
-             height="30"
-             bottom="-1"
+             height="35"
              auto_resize="false"
-             user_resize="false"
              name="chat_layout_panel">
                 <layout_stack
                  animate="false"
@@ -285,15 +276,11 @@
                  orientation="horizontal"
                  name="input_panels"
                  top="0"
-                 bottom="-2"
+                 bottom="-1"
                  left="0"
                  right="-1">
                     <layout_panel
-                     name="input_editor_layout_panel"
-                     auto_resize="true"
-                     user_resize="false"
-                     top="0"
-                     bottom="-1">
+                     name="input_editor_layout_panel">
                         <chat_editor
                          layout="topleft"
                          expand_lines_count="5"
@@ -306,32 +293,27 @@
                          max_length="1023"
                          spellcheck="true"
                          tab_group="3"
-                         top="1"
-                         bottom="-2"
-                         left="4"
-                         right="-4"
+                         bottom="-8"
+                         left="5"
+                         right="-5"
                          wrap="true" />
                     </layout_panel>
                     <layout_panel
                      auto_resize="false"
-                     user_resize="false"
                      name="input_button_layout_panel"
-                     width="30"
-                     top="0"
-                     bottom="-1">
+                     width="32">
                         <button
-                         layout="topleft"
                          left="1"
-                         right="-1"
-                         top="1"
-                         height="22"
+                         top="4"
+                         height="25"
                          follows="left|right|top"
                          image_hover_unselected="Toolbar_Middle_Over"
                          image_overlay="Conv_expand_one_line"
                          image_selected="Toolbar_Middle_Selected"
                          image_unselected="Toolbar_Middle_Off"
                          name="minz_btn"
-                         tool_tip="Shows/hides message panel" />
+                         tool_tip="Shows/hides message panel"
+                         width="28" />
                     </layout_panel>
                 </layout_stack>
             </layout_panel>
-- 
cgit v1.2.3


From e84c97e86d51b4f890695182c8087288481b6955 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Tue, 16 Apr 2013 19:24:47 -0700
Subject: CHUI-912, CHUI-849 : Propagate arrange request correctly, limit sort,
 improve filter perf, clear traces, add comments.

---
 indra/newview/llfolderviewmodelinventory.cpp | 43 ++++++++++++++--------------
 indra/newview/llfolderviewmodelinventory.h   |  3 --
 indra/newview/llinventoryfilter.cpp          | 26 ++++-------------
 indra/newview/llinventoryfilter.h            |  4 ++-
 indra/newview/llinventorypanel.cpp           |  8 +-----
 indra/newview/llpanelobjectinventory.cpp     |  1 -
 6 files changed, 32 insertions(+), 53 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 49b72485e0..1894314513 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -40,7 +40,6 @@ static S32 sModelInstance = 0;
 LLFolderViewModelInventory::LLFolderViewModelInventory()
 {
     mModelInstance = sModelInstance++;
-    llinfos << "Merov : LLFolderViewModelInventory::LLFolderViewModelInventory, instance = " << mModelInstance << llendl;
 }
 
 bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>& items)
@@ -71,7 +70,6 @@ bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>&
 void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
 {
 	LLFastTimer _(FTM_INVENTORY_SORT);
-    llinfos << "Merov : LLFolderViewModelInventory::sort of instance = " << mModelInstance << ", folder = " << folder->getName() << llendl;
 
 	if (!needsSort(folder->getViewModelItem())) return;
 
@@ -82,6 +80,7 @@ void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
 		it != end_it;
 		++it)
 	{
+        // Recursive call to sort() on child (CHUI-849)
 		LLFolderViewFolder* child_folderp = *it;
 		sort(child_folderp);
 
@@ -136,13 +135,12 @@ void LLFolderViewModelItemInventory::requestSort()
 
 void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
 {
+	bool before = passedFilter();
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
 
-	bool passed_filter_before = mPrevPassedAllFilters;
-	mPrevPassedAllFilters = passedFilter(filter_generation);
-
-	if (passed_filter_before != mPrevPassedAllFilters)
+    if (before != passed)
 	{
+        // Need to rearrange the folder if the filtered state of the item changed
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
 		if (parent_folder)
 		{
@@ -155,15 +153,14 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 {
 	S32 filter_generation = filter.getCurrentGeneration();
 
-//	bool continue_filtering = true;
 	bool new_filtered_item = false;
 	if (item->getLastFilterGeneration() < filter_generation)
 	{
-		// recursive application of the filter for child items
+		// Recursive application of the filter for child items (CHUI-849)
 		new_filtered_item = item->filter( filter );
 	}
 
-	// track latest generation to pass any child items, for each folder up to root
+	// Update latest generation to pass filter in parent and propagate up to root
 	if (item->passedFilter())
 	{
 		LLFolderViewModelItemInventory* view_model = this;
@@ -182,23 +179,30 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 {
 	const S32 filter_generation = filter.getCurrentGeneration();
 	const S32 must_pass_generation = filter.getFirstRequiredGeneration();
+    const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration();
 
-    if (getSearchableName() == "A NOUNOURS")
-    {
-        llinfos << "Merov : LLFolderViewModelItemInventory::filter : special NOUNOURS case, filter count = " << filter.getFilterCount() << ", must pass = " << must_pass_generation << ", current = " << filter_generation << ", item last = " << getLastFilterGeneration() << ", folder last = " << getLastFolderFilterGeneration() << llendl;
-    }
-   
     if (getLastFilterGeneration() >= must_pass_generation
 		&& getLastFolderFilterGeneration() >= must_pass_generation
 		&& !passedFilter(must_pass_generation))
 	{
 		// failed to pass an earlier filter that was a subset of the current one
-		// go ahead and flag this item as done
+		// go ahead and flag this item as not pass
 		setPassedFilter(false, filter_generation);
 		setPassedFolderFilter(false, filter_generation);
 		return false;
 	}
 
+    if (getLastFilterGeneration() >= sufficient_pass_generation
+		&& getLastFolderFilterGeneration() >= sufficient_pass_generation
+		&& passedFilter(sufficient_pass_generation))
+	{
+		// passed an earlier filter that was a superset of the current one
+		// go ahead and flag this item as pass
+		setPassedFilter(true, filter_generation);
+		setPassedFolderFilter(true, filter_generation);
+		return true;
+	}
+    
 	const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
 	setPassedFolderFilter(passed_filter_folder, filter_generation);
 
@@ -221,13 +225,11 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		}
 	}
 
-	// if we didn't use all filter iterations
-	// that means we filtered all of our descendants
-	// so filter ourselves now
+	// If we didn't use all filter iterations that means we filtered all of our descendants so filter ourselves now
 	if (filter.getFilterCount() > 0)
 	{
+        // This is where filter count is hit and filter check on the item done (CHUI-849)
 		filter.decrementFilterCount();
-
 		const bool passed_filter = filter.check(this);
 		setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
         new_filtered_item |= passed_filter;
@@ -320,7 +322,6 @@ bool LLInventorySort::operator()(const LLFolderViewModelItemInventory* const& a,
 }
 
 LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) 
-	:	LLFolderViewModelItemCommon(root_view_model),
-	mPrevPassedAllFilters(false)
+	:	LLFolderViewModelItemCommon(root_view_model)
 {
 }
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 3201acf91e..540a87354d 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -59,9 +59,6 @@ public:
 
 	virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
 	virtual LLToolDragAndDrop::ESource getDragSource() const = 0;
-
-protected:
-	bool								mPrevPassedAllFilters;
 };
 
 class LLInventorySort
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index d3f5d68708..b0c75cb176 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -73,8 +73,6 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
 	mFirstSuccessGeneration(0),
 	mFilterCount(0)
 {
-	mNextFilterGeneration = mCurrentGeneration + 1;
-
 	// copy mFilterOps into mDefaultFilterOps
 	markDefault();
 }
@@ -92,35 +90,23 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
 		return passed_clipboard;
 	}
 
-	std::string::size_type string_offset = mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) : std::string::npos;
-
-	BOOL passed = (mFilterSubString.size() == 0 || string_offset != std::string::npos);
+	bool passed = (mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) != std::string::npos : true);
 	passed = passed && checkAgainstFilterType(listener);
 	passed = passed && checkAgainstPermissions(listener);
 	passed = passed && checkAgainstFilterLinks(listener);
 	passed = passed && passed_clipboard;
 
-    if (listener->getSearchableName() == "A NOUNOURS")
-    {
-        llinfos << "Merov : LLInventoryFilter::check : Here we go with our special NOUNOURS case, checked for string '" << mFilterSubString << "', passed = " << passed << ", name = " << listener->getSearchableName() << llendl;
-    }
-
 	return passed;
 }
 
 bool LLInventoryFilter::check(const LLInventoryItem* item)
 {
-	std::string::size_type string_offset = mFilterSubString.size() ? item->getName().find(mFilterSubString) : std::string::npos;
-
+	const bool passed_string = (mFilterSubString.size() ? item->getName().find(mFilterSubString) != std::string::npos : true);
 	const bool passed_filtertype = checkAgainstFilterType(item);
 	const bool passed_permissions = checkAgainstPermissions(item);
-	const BOOL passed_clipboard = checkAgainstClipboard(item->getUUID());
-	const bool passed = (passed_filtertype 
-		&& passed_permissions
-		&& passed_clipboard 
-		&&	(mFilterSubString.size() == 0 || string_offset != std::string::npos));
+	const bool passed_clipboard = checkAgainstClipboard(item->getUUID());
 
-	return passed;
+	return passed_filtertype && passed_permissions && passed_clipboard && passed_string;
 }
 
 bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const
@@ -444,7 +430,7 @@ void LLInventoryFilter::updateFilterTypes(U64 types, U64& current_types)
 		current_types = types;
 		if (more_bits_set && fewer_bits_set)
 		{
-			// neither less or more restrive, both simultaneously
+			// neither less or more restrictive, both simultaneously
 			// so we need to filter from scratch
 			setModified(FILTER_RESTART);
 		}
@@ -719,7 +705,7 @@ void LLInventoryFilter::resetDefault()
 void LLInventoryFilter::setModified(EFilterModified behavior)
 {
 	mFilterText.clear();
-	mCurrentGeneration = mNextFilterGeneration++;
+	mCurrentGeneration++;
 
 	if (mFilterModified == FILTER_NONE)
 	{
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 4912b5ca91..ac6be196ef 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -262,9 +262,11 @@ private:
 	const std::string		mName;
 
 	S32						mCurrentGeneration;
+    // The following makes checking for pass/no pass possible even if the item is not checked against the current generation
+    // Any item that *did not pass* the "required generation" will *not pass* the current one
+    // Any item that *passes* the "success generation" will *pass* the current one
 	S32						mFirstRequiredGeneration;
 	S32						mFirstSuccessGeneration;
-	S32						mNextFilterGeneration;
 
 	S32						mFilterCount;
 	EFilterModified 		mFilterModified;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 17dd3024ea..db8370e994 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -148,8 +148,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mViewsInitialized(false),
 	mInvFVBridgeBuilder(NULL)
 {
-    llinfos << "Merov : LLInventoryPanel::LLInventoryPanel, name = " << getName() << ", label = " << getLabel() << llendl;
-
 	mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
 
 	if (!sColorSetInitialized)
@@ -195,8 +193,6 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
     p.root = NULL;
     p.options_menu = "menu_inventory.xml";
 
-    llinfos << "Merov : LLInventoryPanel::createFolderRoot, name = " << getName() << ", label = " << getLabel() << ", root id = " << root_id << llendl;
-
     return LLUICtrlFactory::create<LLFolderView>(p);
 }
 
@@ -400,13 +396,12 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
 	return getFilter().getShowFolderState();
 }
 
+// Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849)
 void LLInventoryPanel::modelChanged(U32 mask)
 {
 	static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
 	LLFastTimer t2(FTM_REFRESH);
 
-    llinfos << "Merov : LLInventoryPanel::modelChanged, mask = " << mask << ", name = " << getName() << ", label = " << getLabel() << llendl;
-
 	bool handled = false;
 
 	if (!mViewsInitialized) return;
@@ -482,7 +477,6 @@ void LLInventoryPanel::modelChanged(U32 mask)
 		{
 			if (view_item)
 			{
-                // Merov??
 				view_item->refresh();
 			}
 		}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 4d8fa07336..7555ac7b2c 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1492,7 +1492,6 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mIsInventoryEmpty(TRUE),
 	mInventoryNeedsUpdate(FALSE)
 {
-    llinfos << "Merov : LLPanelObjectInventory::LLPanelObjectInventory, name = " << getName() << ", label = " << getLabel() << llendl;
 	// Setup context menu callbacks
 	mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
 	mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
-- 
cgit v1.2.3


From 6ad4822a05fa2d0cb0a9ab616384b374dc877883 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Wed, 17 Apr 2013 19:55:13 +0300
Subject: CHUI-933 FIXED No notification of IMs when coming out of Do Not
 Disturb mode with Flash Toolbar button preference

---
 indra/newview/llconversationview.cpp               |   7 +
 indra/newview/llconversationview.h                 |   1 +
 .../newview/lldonotdisturbnotificationstorage.cpp  |  10 -
 indra/newview/llfloaterimcontainer.cpp             |  11 +
 indra/newview/llfloaterimcontainer.h               |   1 +
 indra/newview/llimview.cpp                         | 261 ++++++++++++---------
 6 files changed, 171 insertions(+), 120 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 911e14bcd5..42104ea20a 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -118,6 +118,13 @@ void LLConversationViewSession::setFlashState(bool flash_state)
 	mFlashTimer->stopFlashing();
 }
 
+void LLConversationViewSession::setHighlightState(bool hihglight_state)
+{
+	mFlashStateOn = hihglight_state;
+	mFlashStarted = true;
+	mFlashTimer->stopFlashing();
+}
+
 void LLConversationViewSession::startFlashing()
 {
 	if (isInVisibleChain() && mFlashStateOn && !mFlashStarted)
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 7e432804d0..879d496dc7 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -86,6 +86,7 @@ public:
 	virtual void refresh();
 
 	/*virtual*/ void setFlashState(bool flash_state);
+	void setHighlightState(bool hihglight_state);
 
 	LLFloater* getSessionFloater();
 
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 1cb650e4ea..b9e3b60240 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -210,11 +210,6 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
 
 	}
 
-    if(imToastExists)
-    {
-        LLFloaterReg::showInstance("im_container");
-    }
-
     bool isConversationLoggingAllowed = gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
 	if(group_ad_hoc_toast_exists && isConversationLoggingAllowed)
 	{
@@ -267,11 +262,6 @@ void LLDoNotDisturbNotificationStorage::updateNotifications()
         }
     }
 
-    if(imToastExists)
-    {   
-        LLFloaterReg::showInstance("im_container");
-    }
-
     if(imToastExists || offerExists)
     {
         make_ui_sound("UISndNewIncomingIMSession");
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 31bad41773..1fce71898b 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1947,6 +1947,17 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id,
 	}
 }
 
+void LLFloaterIMContainer::highlightConversationItemWidget(const LLUUID& session_id, bool is_highlighted)
+{
+	//Finds the conversation line item to highlight using the session_id
+	LLConversationViewSession * widget = dynamic_cast<LLConversationViewSession *>(get_ptr_in_map(mConversationsWidgets,session_id));
+
+	if (widget)
+	{
+		widget->setHighlightState(is_highlighted);
+	}
+}
+
 bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget)
 {
 	llassert(conversation_item_widget != NULL);
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index ddcd1e4f7c..4d7f208578 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -192,6 +192,7 @@ public:
 	void updateSpeakBtnState();
 	static bool isConversationLoggingAllowed();
 	void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes);
+	void highlightConversationItemWidget(const LLUUID& session_id, bool is_highlighted);
 	bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget);
 	boost::signals2::connection mMicroChangedSignal;
 	S32 getConversationListItemSize() { return mConversationsWidgets.size(); }
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fefbe941a4..9403a1ed14 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -103,6 +103,7 @@ BOOL LLSessionTimeoutTimer::tick()
 }
 
 
+void notify_of_message(const LLSD& msg, bool is_dnd_msg);
 
 void process_dnd_im(const LLSD& notification)
 {
@@ -129,15 +130,9 @@ void process_dnd_im(const LLSD& notification)
             fromID, 
             false, 
             false); //will need slight refactor to retrieve whether offline message or not (assume online for now)
+	}
 
-		LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
-		
-		if (im_box)
-		{
-			im_box->flashConversationItemWidget(sessionID, true);
-		}
-
-    }
+	notify_of_message(data, true);
 }
 
 
@@ -158,87 +153,89 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id,
 	LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID()));
 }
 
-void on_new_message(const LLSD& msg)
+void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 {
-    std::string user_preferences;
-    LLUUID participant_id = msg["from_id"].asUUID();
-    LLUUID session_id = msg["session_id"].asUUID();
-    LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
+	std::string user_preferences;
+	LLUUID participant_id = msg[is_dnd_msg ? "FROM_ID" : "from_id"].asUUID();
+	LLUUID session_id = msg[is_dnd_msg ? "SESSION_ID" : "session_id"].asUUID();
+	LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
 
-    // do not show notification which goes from agent
-    if (gAgent.getID() == participant_id)
-    {
-        return;
-    }
+	// do not show notification which goes from agent
+	if (gAgent.getID() == participant_id)
+	{
+		return;
+	}
 
-    // determine state of conversations floater
-    enum {CLOSED, NOT_ON_TOP, ON_TOP, ON_TOP_AND_ITEM_IS_SELECTED} conversations_floater_status;
+	// determine state of conversations floater
+	enum {CLOSED, NOT_ON_TOP, ON_TOP, ON_TOP_AND_ITEM_IS_SELECTED} conversations_floater_status;
 
 
-    LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+	LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
 	LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+	bool store_dnd_message = false; // flag storage of a dnd message
 
 	if (!LLFloater::isVisible(im_box) || im_box->isMinimized())
 	{
 		conversations_floater_status = CLOSED;
 	}
 	else if (!im_box->hasFocus() &&
-			    !(session_floater && LLFloater::isVisible(session_floater)
-	            && !session_floater->isMinimized() && session_floater->hasFocus()))
+		!(session_floater && LLFloater::isVisible(session_floater)
+		&& !session_floater->isMinimized() && session_floater->hasFocus()))
 	{
 		conversations_floater_status = NOT_ON_TOP;
 	}
 	else if (im_box->getSelectedSession() != session_id)
 	{
 		conversations_floater_status = ON_TOP;
-    }
+	}
 	else
 	{
 		conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED;
 	}
 
-    //  determine user prefs for this session
-    if (session_id.isNull())
-    {
-    	user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
-    }
-    else if(session->isP2PSessionType())
-    {
-        if (LLAvatarTracker::instance().isBuddy(participant_id))
-        {
-        	user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
-        }
-        else
-        {
-        	user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
-        }
-    }
-    else if(session->isAdHocSessionType())
-    {
-    	user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
-    }
-    else if(session->isGroupSessionType())
-    {
-    	user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
-    }
-
-    // actions:
+	//  determine user prefs for this session
+	if (session_id.isNull())
+	{
+		user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+	}
+	else if(session->isP2PSessionType())
+	{
+		if (LLAvatarTracker::instance().isBuddy(participant_id))
+		{
+			user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
+		}
+		else
+		{
+			user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
+		}
+	}
+	else if(session->isAdHocSessionType())
+	{
+		user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
+	}
+	else if(session->isGroupSessionType())
+	{
+		user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
+	}
 
-    // 0. nothing - exit
-    if (("none" == user_preferences ||
-    		ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
-    	    && session_floater->isMessagePaneExpanded())
-    {
-    	return;
-    }
+	// actions:
 
-    // 1. open floater and [optional] surface it
-    if ("openconversations" == user_preferences &&
-    		(CLOSED == conversations_floater_status
-    				|| NOT_ON_TOP == conversations_floater_status))
-    {
-    	if(!gAgent.isDoNotDisturb())
-        {
+	// 0. nothing - exit
+	if (("none" == user_preferences ||
+		ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
+		&& session_floater->isMessagePaneExpanded())
+	{
+		return;
+	}
+	
+	// 1. open floater and [optional] surface it
+	if (("openconversations" == user_preferences &&
+		(CLOSED == conversations_floater_status
+		|| NOT_ON_TOP == conversations_floater_status))
+		|| is_dnd_msg )
+	{
+		if(!gAgent.isDoNotDisturb())
+		{
 			// Open conversations floater
 			LLFloaterReg::showInstance("im_container");
 			im_box->collapseMessagesPane(false);
@@ -260,56 +257,100 @@ void on_new_message(const LLSD& msg)
 				}
 			}
 		}
-        else
-        {
-            //If in DND mode, allow notification to be stored so upon DND exit
-            //useMostItrusiveIMNotification will be called to notify user a message exists
-            if(session_id.notNull()
-               && participant_id.notNull()
-		       && !session_floater->isShown())
-            {
-                LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
-	        }
-        }
-    }
+		else
+		{
+			store_dnd_message = true;
+		}
 
-    // 2. Flash line item
-    if ("openconversations" == user_preferences
-    		|| ON_TOP == conversations_floater_status
-    		|| ("toast" == user_preferences && ON_TOP != conversations_floater_status)
-    		|| ("flash" == user_preferences && CLOSED == conversations_floater_status))
-    {
-    	if(!LLMuteList::getInstance()->isMuted(participant_id))
-    	{
-    		im_box->flashConversationItemWidget(session_id, true);
-    	}
-    }
+	}
 
-    // 3. Flash FUI button
-    if (("toast" == user_preferences || "flash" == user_preferences) &&
-    		(CLOSED == conversations_floater_status
-    		    || NOT_ON_TOP == conversations_floater_status))
-    {
-    	if(!LLMuteList::getInstance()->isMuted(participant_id)
-            && !gAgent.isDoNotDisturb())
-    	{
-    		gToolBarView->flashCommand(LLCommandId("chat"), true);
-    	}
-    }
+	// 2. Flash line item
+	if ("openconversations" == user_preferences
+		|| ON_TOP == conversations_floater_status
+		|| ("toast" == user_preferences && ON_TOP != conversations_floater_status)
+		|| ("flash" == user_preferences && CLOSED == conversations_floater_status)
+		|| is_dnd_msg)
+	{
+		if(!LLMuteList::getInstance()->isMuted(participant_id))
+		{
+			if(gAgent.isDoNotDisturb())
+			{
+				store_dnd_message = true;
+			}
+			else
+			{
+				if (is_dnd_msg && (ON_TOP == conversations_floater_status || 
+									NOT_ON_TOP == conversations_floater_status || 
+									CLOSED == conversations_floater_status))
+				{
+					im_box->highlightConversationItemWidget(session_id, true);
+				}
+				else
+				{
+					im_box->flashConversationItemWidget(session_id, true);
+				}
+			}
+		}
+	}
+
+	// 3. Flash FUI button
+	if (("toast" == user_preferences || "flash" == user_preferences) &&
+		(CLOSED == conversations_floater_status
+		|| NOT_ON_TOP == conversations_floater_status)
+		&& !is_dnd_msg) //prevent flashing FUI button because the conversation floater will have already opened
+	{
+		if(!LLMuteList::getInstance()->isMuted(participant_id))
+		{
+			if(!gAgent.isDoNotDisturb())
+			{
+				gToolBarView->flashCommand(LLCommandId("chat"), true);
+			}
+			else
+			{
+				store_dnd_message = true;
+			}
+		}
+	}
 
-    // 4. Toast
-    if ((("toast" == user_preferences) &&
-    	(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status))
-    	|| !session_floater->isMessagePaneExpanded())
+	// 4. Toast
+	if ((("toast" == user_preferences) &&
+		(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status))
+		|| !session_floater->isMessagePaneExpanded())
 
-    {
-        //Show IM toasts (upper right toasts)
-        // Skip toasting for system messages and for nearby chat
-        if(session_id.notNull() && participant_id.notNull())
-        {
-            LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
-        }
-    }
+	{
+		//Show IM toasts (upper right toasts)
+		// Skip toasting for system messages and for nearby chat
+		if(session_id.notNull() && participant_id.notNull())
+		{
+			if(!is_dnd_msg)
+			{
+				if(gAgent.isDoNotDisturb())
+				{
+					store_dnd_message = true;
+				}
+				else
+				{
+					LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+				}
+			}
+		}
+	}
+	if (store_dnd_message)
+	{
+		// If in DND mode, allow notification to be stored so upon DND exit 
+		// the user will be notified with some limitations (see 'is_dnd_msg' flag checks)
+		if(session_id.notNull()
+			&& participant_id.notNull()
+			&& !session_floater->isShown())
+		{
+			LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+		}
+	}
+}
+
+void on_new_message(const LLSD& msg)
+{
+	notify_of_message(msg, false);
 }
 
 LLIMModel::LLIMModel() 
-- 
cgit v1.2.3


From 88528cb901c4023817c05010ed85a11160d266ab Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 19 Apr 2013 00:45:59 +0300
Subject: CHUI-808 FIXED Draggable separator between conversations and message
 pane is not discoverable: minor fix;

---
 indra/newview/skins/default/colors.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index b0dfd471e0..ac1289c4b8 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -868,7 +868,7 @@
   <!--Resize bar colors -->
 
   <color
-    name="ResizebarBorderlight"
+    name="ResizebarBorderLight"
     value="0.231 0.231 0.231 1"/>
 
   <color
-- 
cgit v1.2.3


From 03ad10d258095487d6ae8f26634932bc832f10df Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Thu, 18 Apr 2013 19:46:08 -0700
Subject: CHUI-849 : WIP : Filter limit on time instead of number of items

---
 indra/newview/app_settings/settings.xml      | 11 ++++++++++
 indra/newview/llconversationmodel.h          |  6 ++++-
 indra/newview/llfolderviewmodelinventory.cpp | 33 +++++++++++++++-------------
 indra/newview/llinventoryfilter.cpp          | 20 +++++++++++++++++
 indra/newview/llinventoryfilter.h            |  9 ++++++++
 5 files changed, 63 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4c305e1d60..a28c6366c0 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3402,6 +3402,17 @@
       <key>Value</key>
       <integer>500</integer>
     </map>
+    <key>FilterItemsMaxTimePerFrame</key>
+    <map>
+        <key>Comment</key>
+        <string>Max time devoted to items filtering per frame (in milliseconds)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>S32</string>
+        <key>Value</key>
+        <integer>100</integer>
+    </map>
     <key>FindLandArea</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 8766585049..5c942b1c40 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -256,7 +256,11 @@ public:
 	void 				setFilterCount(S32 count) { }
 	S32 				getFilterCount() const { return 0; }
 	void 				decrementFilterCount() { }
-		
+
+  	void 				resetTime(S32 timeout) { }
+    bool                isTimedOut() { return false; }
+	void 				incrementFilterCount() { } // Temp!
+   
 	bool 				isDefault() const { return true; }
 	bool 				isNotDefault() const { return false; }
 	void 				markDefault() { }
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 1894314513..ce957edcbd 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -153,11 +153,11 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 {
 	S32 filter_generation = filter.getCurrentGeneration();
 
-	bool new_filtered_item = false;
+	bool continue_filtering = true;
 	if (item->getLastFilterGeneration() < filter_generation)
 	{
 		// Recursive application of the filter for child items (CHUI-849)
-		new_filtered_item = item->filter( filter );
+		continue_filtering = item->filter( filter );
 	}
 
 	// Update latest generation to pass filter in parent and propagate up to root
@@ -172,14 +172,13 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 		}
 	}
 
-	return new_filtered_item;
+	return continue_filtering;
 }
 
 bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 {
 	const S32 filter_generation = filter.getCurrentGeneration();
 	const S32 must_pass_generation = filter.getFirstRequiredGeneration();
-    const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration();
 
     if (getLastFilterGeneration() >= must_pass_generation
 		&& getLastFolderFilterGeneration() >= must_pass_generation
@@ -189,9 +188,11 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		// go ahead and flag this item as not pass
 		setPassedFilter(false, filter_generation);
 		setPassedFolderFilter(false, filter_generation);
-		return false;
+		return true;
 	}
 
+    /*
+     const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration();
     if (getLastFilterGeneration() >= sufficient_pass_generation
 		&& getLastFolderFilterGeneration() >= sufficient_pass_generation
 		&& passedFilter(sufficient_pass_generation))
@@ -202,23 +203,23 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		setPassedFolderFilter(true, filter_generation);
 		return true;
 	}
+     */
     
 	const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true;
 	setPassedFolderFilter(passed_filter_folder, filter_generation);
 
-	bool new_filtered_item = false;
+	bool continue_filtering = true;
 
 	if (!mChildren.empty()
 		&& (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
             || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
 	{
 		// now query children
-		for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end();
-			iter != end_iter && filter.getFilterCount() > 0;
-			++iter)
+		for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter)
 		{
-			new_filtered_item |= filterChildItem((*iter), filter);
-            if (filter.getFilterCount() <= 0)
+			continue_filtering = filterChildItem((*iter), filter);
+            //if (filter.getFilterCount() <= 0)
+            if (!continue_filtering)
 			{
 				break;
 			}
@@ -226,15 +227,17 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 	}
 
 	// If we didn't use all filter iterations that means we filtered all of our descendants so filter ourselves now
-	if (filter.getFilterCount() > 0)
+	//if (filter.getFilterCount() > 0)
+    if (continue_filtering)
 	{
         // This is where filter count is hit and filter check on the item done (CHUI-849)
-		filter.decrementFilterCount();
+		//filter.decrementFilterCount();
+		filter.incrementFilterCount(); // Temp
 		const bool passed_filter = filter.check(this);
 		setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
-        new_filtered_item |= passed_filter;
+        continue_filtering = !filter.isTimedOut();
 	}
-    return new_filtered_item;
+    return continue_filtering;
 }
 
 LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel()
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index b0c75cb176..3b712925e1 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -1026,6 +1026,26 @@ void LLInventoryFilter::decrementFilterCount()
 	mFilterCount--; 
 }
 
+void LLInventoryFilter::incrementFilterCount()
+{
+	mFilterCount++;
+}
+
+bool LLInventoryFilter::isTimedOut()
+{
+	return mFilterTime.hasExpired();
+}
+
+void LLInventoryFilter::resetTime(S32 timeout)
+{
+    mFilterCount = 0;
+	mFilterTime.reset();
+    F32 time_in_sec = (F32)(timeout)/1000.0;
+	mFilterTime.setTimerExpirySec(time_in_sec);
+}
+
+
+
 S32 LLInventoryFilter::getCurrentGeneration() const 
 { 
 	return mCurrentGeneration;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index ac6be196ef..034fcf4a62 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -221,6 +221,13 @@ public:
 	S32 				getFilterCount() const;
 	void 				decrementFilterCount();
 
+	// +-------------------------------------------------------------------+
+	// + Time
+	// +-------------------------------------------------------------------+
+	void 				resetTime(S32 timeout);
+    bool                isTimedOut();
+	void 				incrementFilterCount(); // Temp!
+    
 	// +-------------------------------------------------------------------+
 	// + Default
 	// +-------------------------------------------------------------------+
@@ -271,6 +278,8 @@ private:
 	S32						mFilterCount;
 	EFilterModified 		mFilterModified;
 
+	LLTimer                 mFilterTime;
+    
 	std::string 			mFilterText;
 	std::string 			mEmptyLookupMessage;
 };
-- 
cgit v1.2.3


From 09b70845e52f75a33c608062db6516784b31fa72 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 19 Apr 2013 14:52:37 +0300
Subject: CHUI-946 FIXED Return FALSE if key is not handled here.

---
 indra/newview/llfloaterimcontainer.cpp  | 7 ++++++-
 indra/newview/llfloaterimsessiontab.cpp | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 043ffacffb..6291f8fb53 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1962,23 +1962,28 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve
 
 BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask )
 {
+	BOOL handled = FALSE;
+
 	if(mask == MASK_ALT)
 	{
 		if (KEY_RETURN == key )
 		{
 			expandConversation();
+			handled = TRUE;
 		}
 
 		if ((KEY_DOWN == key ) || (KEY_RIGHT == key))
 		{
 			selectNextorPreviousConversation(true);
+			handled = TRUE;
 		}
 		if ((KEY_UP == key) || (KEY_LEFT == key))
 		{
 			selectNextorPreviousConversation(false);
+			handled = TRUE;
 		}
 	}
-	return TRUE;
+	return handled;
 }
 
 bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected)
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 7d96fd0d6c..4833484952 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -1083,21 +1083,26 @@ void LLFloaterIMSessionTab::saveCollapsedState()
 }
 BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
 {
+	BOOL handled = FALSE;
+
 	if(mask == MASK_ALT)
 	{
 		LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
 		if (KEY_RETURN == key && !isTornOff())
 		{
 			floater_container->expandConversation();
+			handled = TRUE;
 		}
 		if ((KEY_UP == key) || (KEY_LEFT == key))
 		{
 			floater_container->selectNextorPreviousConversation(false);
+			handled = TRUE;
 		}
 		if ((KEY_DOWN == key ) || (KEY_RIGHT == key))
 		{
 			floater_container->selectNextorPreviousConversation(true);
+			handled = TRUE;
 		}
 	}
-	return TRUE;
+	return handled;
 }
-- 
cgit v1.2.3


From 6a339649844a6e016e35e440004a61d07dd490e6 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Fri, 19 Apr 2013 15:31:19 +0300
Subject: CHUI-915 ([CHUIBUG]Control+W hides Conversations floater instead of
 closing active tab)

---
 indra/newview/llfloaterimcontainer.cpp | 24 ++++++++++++++++++++++--
 indra/newview/llfloaterimcontainer.h   |  1 +
 2 files changed, 23 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index f89e818928..29a6060b0e 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2020,7 +2020,9 @@ void LLFloaterIMContainer::expandConversation()
 	}
 }
 
-void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
+// For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation.
+// This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
+void LLFloaterIMContainer::onClickCloseBtn()
 {
 	// Always unminimize before trying to close.
 	// Most of the time the user will never see this state.
@@ -2029,7 +2031,25 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 		LLMultiFloater::setMinimized(FALSE);
 	}
 	
-	LLFloater::closeFloater(app_quitting);
+	LLFloater::closeFloater();
+}
+
+void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
+{
+	// Check for currently active session
+	LLUUID session_id = getSelectedSession();
+	// If current session is Nearby Chat or there is only one session remaining, close the floater
+	if (mConversationsItems.size() == 1 || session_id == LLUUID())
+	{
+		onClickCloseBtn();
+	}
+
+	// Otherwise, close current conversation
+	LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
+	if (active_conversation)
+	{
+		active_conversation->closeFloater();
+	}
 }
 
 // EOF
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index f6c716e2cf..060b81c603 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -130,6 +130,7 @@ private:
 	void onStubCollapseButtonClicked();
 	void processParticipantsStyleUpdate();
 	void onSpeakButtonClicked();
+	/*virtual*/ void onClickCloseBtn();
 
 	void collapseConversationsPane(bool collapse, bool save_is_allowed=true);
 
-- 
cgit v1.2.3


From 2cc1fb250f78df3a4b8f33b13b30defef7efb78a Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Fri, 19 Apr 2013 16:51:44 -0700
Subject: CHUI-849 : Use a time limit for filtering instead of number limit,
 use a different limit for visible and unvisible lists

---
 indra/newview/app_settings/settings.xml      | 24 ++++++++++++------------
 indra/newview/llconversationmodel.h          |  5 -----
 indra/newview/llfolderviewmodelinventory.cpp |  9 +++------
 indra/newview/llinventoryfilter.cpp          | 27 ++-------------------------
 indra/newview/llinventoryfilter.h            | 10 ----------
 5 files changed, 17 insertions(+), 58 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a28c6366c0..cd2b15ef2b 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3391,27 +3391,27 @@
         <key>Value</key>
             <real>10.0</real>
         </map>
-    <key>FilterItemsPerFrame</key>
+    <key>FilterItemsMaxTimePerFrameVisible</key>
     <map>
-      <key>Comment</key>
-      <string>Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>500</integer>
+        <key>Comment</key>
+        <string>Max time devoted to items filtering per frame for visible inventory listings (in milliseconds)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>S32</string>
+        <key>Value</key>
+        <integer>10</integer>
     </map>
-    <key>FilterItemsMaxTimePerFrame</key>
+    <key>FilterItemsMaxTimePerFrameUnvisible</key>
     <map>
         <key>Comment</key>
-        <string>Max time devoted to items filtering per frame (in milliseconds)</string>
+        <string>Max time devoted to items filtering per frame for non visible inventory listings (in milliseconds)</string>
         <key>Persist</key>
         <integer>1</integer>
         <key>Type</key>
         <string>S32</string>
         <key>Value</key>
-        <integer>100</integer>
+        <integer>1</integer>
     </map>
     <key>FindLandArea</key>
     <map>
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 5c942b1c40..d8cdcdfc97 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -252,14 +252,9 @@ public:
 	const std::string& 	getName() const { return mEmpty; }
 	const std::string& 	getFilterText() { return mEmpty; }
 	void 				setModified(EFilterModified behavior = FILTER_RESTART) { }
-		
-	void 				setFilterCount(S32 count) { }
-	S32 				getFilterCount() const { return 0; }
-	void 				decrementFilterCount() { }
 
   	void 				resetTime(S32 timeout) { }
     bool                isTimedOut() { return false; }
-	void 				incrementFilterCount() { } // Temp!
    
 	bool 				isDefault() const { return true; }
 	bool 				isNotDefault() const { return false; }
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index ce957edcbd..4a51d26693 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -191,6 +191,7 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		return true;
 	}
 
+    // *TODO : Revise the logic for fast pass on less restrictive filter case
     /*
      const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration();
     if (getLastFilterGeneration() >= sufficient_pass_generation
@@ -218,7 +219,6 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter)
 		{
 			continue_filtering = filterChildItem((*iter), filter);
-            //if (filter.getFilterCount() <= 0)
             if (!continue_filtering)
 			{
 				break;
@@ -226,13 +226,10 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
 		}
 	}
 
-	// If we didn't use all filter iterations that means we filtered all of our descendants so filter ourselves now
-	//if (filter.getFilterCount() > 0)
+	// If we didn't use all the filter time that means we filtered all of our descendants so we can filter ourselves now
     if (continue_filtering)
 	{
-        // This is where filter count is hit and filter check on the item done (CHUI-849)
-		//filter.decrementFilterCount();
-		filter.incrementFilterCount(); // Temp
+        // This is where filter check on the item done (CHUI-849)
 		const bool passed_filter = filter.check(this);
 		setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
         continue_filtering = !filter.isTimedOut();
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 3b712925e1..3c6974cf6d 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -70,8 +70,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
 	mFilterSubString(p.substring),
 	mCurrentGeneration(0),
 	mFirstRequiredGeneration(0),
-	mFirstSuccessGeneration(0),
-	mFilterCount(0)
+	mFirstSuccessGeneration(0)
 {
 	// copy mFilterOps into mDefaultFilterOps
 	markDefault();
@@ -1012,25 +1011,6 @@ LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const
 	return mFilterOps.mShowFolderState; 
 }
 
-void LLInventoryFilter::setFilterCount(S32 count) 
-{ 
-	mFilterCount = count; 
-}
-S32 LLInventoryFilter::getFilterCount() const
-{
-	return mFilterCount;
-}
-
-void LLInventoryFilter::decrementFilterCount() 
-{ 
-	mFilterCount--; 
-}
-
-void LLInventoryFilter::incrementFilterCount()
-{
-	mFilterCount++;
-}
-
 bool LLInventoryFilter::isTimedOut()
 {
 	return mFilterTime.hasExpired();
@@ -1038,15 +1018,12 @@ bool LLInventoryFilter::isTimedOut()
 
 void LLInventoryFilter::resetTime(S32 timeout)
 {
-    mFilterCount = 0;
 	mFilterTime.reset();
     F32 time_in_sec = (F32)(timeout)/1000.0;
 	mFilterTime.setTimerExpirySec(time_in_sec);
 }
 
-
-
-S32 LLInventoryFilter::getCurrentGeneration() const 
+S32 LLInventoryFilter::getCurrentGeneration() const
 { 
 	return mCurrentGeneration;
 }
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 034fcf4a62..ce516af0b9 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -214,19 +214,11 @@ public:
 	//RN: this is public to allow system to externally force a global refilter
 	void 				setModified(EFilterModified behavior = FILTER_RESTART);
 
-	// +-------------------------------------------------------------------+
-	// + Count
-	// +-------------------------------------------------------------------+
-	void 				setFilterCount(S32 count);
-	S32 				getFilterCount() const;
-	void 				decrementFilterCount();
-
 	// +-------------------------------------------------------------------+
 	// + Time
 	// +-------------------------------------------------------------------+
 	void 				resetTime(S32 timeout);
     bool                isTimedOut();
-	void 				incrementFilterCount(); // Temp!
     
 	// +-------------------------------------------------------------------+
 	// + Default
@@ -275,9 +267,7 @@ private:
 	S32						mFirstRequiredGeneration;
 	S32						mFirstSuccessGeneration;
 
-	S32						mFilterCount;
 	EFilterModified 		mFilterModified;
-
 	LLTimer                 mFilterTime;
     
 	std::string 			mFilterText;
-- 
cgit v1.2.3


From f59af8d27c419d97596fff65fb9aa412499c52be Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Fri, 19 Apr 2013 19:02:21 -0700
Subject: CHUI-912 : Some clean up of vestigial debug code

---
 indra/newview/llfolderviewmodelinventory.cpp | 9 ++-------
 indra/newview/llfolderviewmodelinventory.h   | 3 ---
 2 files changed, 2 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 4a51d26693..e2a6eb78c6 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -35,12 +35,6 @@
 // class LLFolderViewModelInventory
 //
 static LLFastTimer::DeclareTimer FTM_INVENTORY_SORT("Sort");
-static S32 sModelInstance = 0;
-
-LLFolderViewModelInventory::LLFolderViewModelInventory()
-{
-    mModelInstance = sModelInstance++;
-}
 
 bool LLFolderViewModelInventory::startDrag(std::vector<LLFolderViewModelItem*>& items)
 {
@@ -137,8 +131,9 @@ void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_gen
 {
 	bool before = passedFilter();
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
+	bool after = passedFilter();
 
-    if (before != passed)
+    if (before != after)
 	{
         // Need to rearrange the folder if the filtered state of the item changed
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 540a87354d..10a958a142 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -103,8 +103,6 @@ class LLFolderViewModelInventory
 public:
 	typedef LLFolderViewModel<LLInventorySort,   LLFolderViewModelItemInventory, LLFolderViewModelItemInventory,   LLInventoryFilter> base_t;
 
-    LLFolderViewModelInventory();
-    
 	void setTaskID(const LLUUID& id) {mTaskID = id;}
 
 	void sort(LLFolderViewFolder* folder);
@@ -113,6 +111,5 @@ public:
 
 private:
 	LLUUID mTaskID;
-    S32 mModelInstance;
 };
 #endif // LL_LLFOLDERVIEWMODELINVENTORY_H
-- 
cgit v1.2.3


From 022dd124604c8a0a3d83b481d03a687556fcf2c4 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Mon, 22 Apr 2013 15:51:15 -0700
Subject: CHUI-912 : Fixed! Filtering with types do work correctly again
 (including None).

---
 indra/newview/llfolderviewmodelinventory.cpp | 11 ++++++-----
 indra/newview/llfolderviewmodelinventory.h   |  2 ++
 2 files changed, 8 insertions(+), 5 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index e2a6eb78c6..c28657dbcd 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -129,11 +129,11 @@ void LLFolderViewModelItemInventory::requestSort()
 
 void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
 {
-	bool before = passedFilter();
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
-	bool after = passedFilter();
+	bool before = mPrevPassedAllFilters;
+	mPrevPassedAllFilters = passedFilter(filter_generation);
 
-    if (before != after)
+    if (before != mPrevPassedAllFilters)
 	{
         // Need to rearrange the folder if the filtered state of the item changed
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
@@ -316,7 +316,8 @@ bool LLInventorySort::operator()(const LLFolderViewModelItemInventory* const& a,
 	}
 }
 
-LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) 
-	:	LLFolderViewModelItemCommon(root_view_model)
+LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) :
+    LLFolderViewModelItemCommon(root_view_model),
+    mPrevPassedAllFilters(false)
 {
 }
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 10a958a142..9dcfdfa185 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -59,6 +59,8 @@ public:
 
 	virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
 	virtual LLToolDragAndDrop::ESource getDragSource() const = 0;
+protected:
+    bool mPrevPassedAllFilters;
 };
 
 class LLInventorySort
-- 
cgit v1.2.3


From 25c222e31770cb2c10e262b02ae9065521986349 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 23 Apr 2013 15:09:41 +0300
Subject: CHUI-943 FIXED "Chat history" menu item is added to context menu for
 Nearby chat.

---
 indra/newview/llconversationmodel.cpp  |  4 ++++
 indra/newview/llfloaterimcontainer.cpp | 28 +++++++++++++++++++++++++---
 indra/newview/lllogchat.cpp            | 17 +++++++++++++++++
 indra/newview/lllogchat.h              |  1 +
 4 files changed, 47 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index c74ce24872..6e95df8383 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -386,6 +386,10 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
         addVoiceOptions(items);
         items.push_back(std::string("chat_history"));
     }
+    else if(this->getType() == CONV_SESSION_NEARBY)
+    {
+        items.push_back(std::string("chat_history"));
+    }
 
     hide_context_entries(menu, items, disabled_items);
 }
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 1fce71898b..984c658b55 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1164,7 +1164,7 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
         }
         else if("chat_history" == command)
         {
-			if (selectedIDS.size() > 0)
+        	if (selectedIDS.size() > 0)
 			{
 				LLAvatarActions::viewChatHistory(selectedIDS.front());
 			}
@@ -1177,6 +1177,17 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
         	}
         }
     }
+    //if there is no LLFloaterIMSession* instance for selected conversation it might be Nearby chat
+    else
+    {
+    	if(conversationItem->getType() == LLConversationItem::CONV_SESSION_NEARBY)
+    	{
+    		if("chat_history" == command)
+    	    {
+    	      	LLFloaterReg::showInstance("preview_conversation", LLSD(LLUUID::null), true);
+    	    }
+    	}
+    }
 }
 
 void LLFloaterIMContainer::doToSelected(const LLSD& userdata)
@@ -1232,8 +1243,19 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 	//Enable Chat history item for ad-hoc and group conversations
 	if ("can_chat_history" == item && uuids.size() > 0)
 	{
-		bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP);
-		return LLLogChat::isTranscriptExist(uuids.front(),is_group);
+		//Disable menu item if selected participant is user agent
+		if(uuids.front() != gAgentID)
+		{
+			if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_NEARBY)
+			{
+				return LLLogChat::isNearbyTranscriptExist();
+			}
+			else
+			{
+				bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP);
+				return LLLogChat::isTranscriptExist(uuids.front(),is_group);
+			}
+		}
 	}
 
 	// If nothing is selected(and selected item is not group chat), everything needs to be disabled
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 82409da4ba..379bbc5f8d 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -671,6 +671,23 @@ bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id, bool is_group)
 	return false;
 }
 
+bool LLLogChat::isNearbyTranscriptExist()
+{
+	std::vector<std::string> list_of_transcriptions;
+	LLLogChat::getListOfTranscriptFiles(list_of_transcriptions);
+
+	std::string file_name;
+	file_name = makeLogFileName("chat");
+	BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions)
+	{
+	   	if (transcript_file_name == file_name)
+	   	{
+			return true;
+		 }
+	}
+	return false;
+}
+
 //*TODO mark object's names in a special way so that they will be distinguishable form avatar name 
 //which are more strict by its nature (only firstname and secondname)
 //Example, an object's name can be written like "Object <actual_object's_name>"
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index 77bb2a1570..bd70dbaac9 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -68,6 +68,7 @@ public:
 
 	static void deleteTranscripts();
 	static bool isTranscriptExist(const LLUUID& avatar_id, bool is_group=false);
+	static bool isNearbyTranscriptExist();
 
 private:
 	static std::string cleanFileName(std::string filename);
-- 
cgit v1.2.3


From df7596e9015ea7f190d5ebb96587dd23d37bf1f8 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Tue, 23 Apr 2013 18:51:26 +0300
Subject: CHUI-950 (Reduce min width of messages panel )

---
 indra/newview/skins/default/xui/en/floater_im_container.xml | 2 +-
 indra/newview/skins/default/xui/en/floater_im_session.xml   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 3e8c6c76cc..a56b90a29d 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -129,7 +129,7 @@
          auto_resize="true"
          user_resize="true"
          name="messages_layout_panel"
-         expanded_min_dim="232">
+         expanded_min_dim="183">
             <panel_container
              bottom="-1"
              follows="all"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index c0ed2e6a78..8da4213c65 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -222,7 +222,7 @@
                      default_tab_group="3"
                      tab_group="2"
                      name="right_part_holder"
-                     min_width="221">
+                     min_width="172">
                         <layout_stack
                          animate="true" 
                          default_tab_group="2"
-- 
cgit v1.2.3


From e4207901d782c8f1167736d7beee9d0ce0ae1086 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 25 Apr 2013 14:52:28 +0300
Subject: CHUI-934 FIXED Do not add to vector if session is closed to avoid
 crash.

---
 indra/newview/llfloaterimsession.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 6ed04f8716..9cf393f512 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -442,8 +442,11 @@ void LLFloaterIMSession::addSessionParticipants(const uuid_vec_t& uuids)
 	}
 	else
 	{
-		// remember whom we have invited, to notify others later, when the invited ones actually join
-		mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
+		if(findInstance(mSessionID))
+		{
+			// remember whom we have invited, to notify others later, when the invited ones actually join
+			mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
+		}
 		
 		inviteToSession(uuids);
 	}
@@ -472,13 +475,15 @@ void LLFloaterIMSession::addP2PSessionParticipants(const LLSD& notification, con
 	if(findInstance(mSessionID))
 	{
 		onClose(false);
+
+		// remember whom we have invited, to notify others later, when the invited ones actually join
+		mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
 	}
 
 	// we start a new session so reset the initialization flag
 	mSessionInitialized = false;
 
-	// remember whom we have invited, to notify others later, when the invited ones actually join
-	mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
+
 
 	// Start a new ad hoc voice call if we invite new participants to a P2P call,
 	// or start a text chat otherwise.
-- 
cgit v1.2.3


From 724cab416f15cbbe60116fbd956032c088010ce7 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 26 Apr 2013 14:33:17 +0300
Subject: CHUI-952 FIXED Disable single line mode when restoring floater.

---
 indra/newview/llfloaterimsessiontab.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 08a8d8adf8..cc2859c099 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -896,6 +896,7 @@ void LLFloaterIMSessionTab::restoreFloater()
 		mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon"));
 		setMessagePaneExpanded(true);
 		saveCollapsedState();
+		mInputEditor->enableSingleLineMode(false);
 		enableResizeCtrls(true, true, true);
 	}
 }
-- 
cgit v1.2.3


From d2c9543a19fa4ed008bbda841885bd1f34c289a0 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 26 Apr 2013 06:39:08 +0300
Subject: CHUI-859 FIXED Conversation panel moves when new message received
 with Open Conversation window preference

---
 indra/newview/llfloaterimcontainer.cpp                      | 13 ++++++-------
 indra/newview/llfloaterimcontainer.h                        |  2 ++
 indra/newview/skins/default/xui/en/floater_im_container.xml |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7519942901..a3a0093346 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -804,13 +804,6 @@ void LLFloaterIMContainer::reshapeFloaterAndSetResizeLimits(bool collapse, S32 d
 	setCanMinimize(at_least_one_panel_is_expanded);
 
     assignResizeLimits();
-
-    // force set correct size for the title after show/hide minimize button
-	LLRect cur_rect = getRect();
-	LLRect force_rect = cur_rect;
-	force_rect.mRight = cur_rect.mRight + 1;
-    setRect(force_rect);
-    setRect(cur_rect);
 }
 
 void LLFloaterIMContainer::assignResizeLimits()
@@ -2105,4 +2098,10 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	}
 }
 
+void LLFloaterIMContainer::handleReshape(const LLRect& rect, bool by_user)
+{
+	LLMultiFloater::handleReshape(rect, by_user);
+	storeRectControl();
+}
+
 // EOF
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 04e27f9b9d..74c3640bad 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -63,6 +63,8 @@ public:
 	/*virtual*/ void setVisible(BOOL visible);
 	/*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
 	/*virtual*/ void updateResizeLimits();
+	/*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
+
 	void onCloseFloater(LLUUID& id);
 
 	/*virtual*/ void addFloater(LLFloater* floaterp, 
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index a56b90a29d..2d605bc010 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -129,7 +129,7 @@
          auto_resize="true"
          user_resize="true"
          name="messages_layout_panel"
-         expanded_min_dim="183">
+         expanded_min_dim="212">
             <panel_container
              bottom="-1"
              follows="all"
-- 
cgit v1.2.3


From 503605641a6285064765b6057dbad67df84140e2 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Mon, 29 Apr 2013 23:01:07 +0300
Subject: CHUI-956 FIXED Vertical scrollbar in conversation list not scrolls
 off bottom

---
 indra/newview/llfloaterimcontainer.cpp                      | 1 +
 indra/newview/skins/default/xui/en/floater_im_container.xml | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index a3a0093346..1bb2ce01e4 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -206,6 +206,7 @@ BOOL LLFloaterIMContainer::postBuild()
 	// a scroller for folder view
 	LLRect scroller_view_rect = mConversationsListPanel->getRect();
 	scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
+	scroller_view_rect.mBottom += getChild<LLLayoutStack>("conversations_pane_buttons_stack")->getRect().getHeight();
 	LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>());
 	scroller_params.rect(scroller_view_rect);
 
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 2d605bc010..da016462db 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -24,7 +24,7 @@
      value="Conv_toolbar_expand"/>
     <layout_stack
      animate="true" 
-     bottom="-1"
+     bottom="-5"
      drag_handle_gap="6"
      drag_handle_first_indent="27"
      drag_handle_second_indent="10"
-- 
cgit v1.2.3


From 8431da8de0e8130aedc1ce134b45ba4f6dfb5d83 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 30 Apr 2013 16:09:52 +0300
Subject: CHUI-953 FIXED Close conversation floater when quitting viewer

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

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 1bb2ce01e4..b88888da3b 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2086,7 +2086,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	// Check for currently active session
 	LLUUID session_id = getSelectedSession();
 	// If current session is Nearby Chat or there is only one session remaining, close the floater
-	if (mConversationsItems.size() == 1 || session_id == LLUUID())
+	if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting)
 	{
 		onClickCloseBtn();
 	}
-- 
cgit v1.2.3


From d07fab9e165e354678f5f8f78d331f8cfe8618d2 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Thu, 25 Apr 2013 18:47:09 +0300
Subject: CHUI-759 FIXED Group invites never received in do not disturb mode
 when leaving do not disturb mode

---
 indra/newview/lldonotdisturbnotificationstorage.cpp  | 3 ++-
 indra/newview/llviewermessage.cpp                    | 3 ++-
 indra/newview/skins/default/xui/en/notifications.xml | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index b9e3b60240..71bc4f15d2 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -115,7 +115,8 @@ void LLDoNotDisturbNotificationStorage::saveNotifications()
 	{
 		LLNotificationPtr notificationPtr = historyIter->second;
 
-		if (!notificationPtr->isRespondedTo() && !notificationPtr->isCancelled() && !notificationPtr->isExpired())
+		if (!notificationPtr->isRespondedTo() && !notificationPtr->isCancelled() &&
+			!notificationPtr->isExpired() && !notificationPtr->isPersistent())
 		{
 			data.append(notificationPtr->asLLSD(true));
 		}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a13c793899..92a050e29b 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2644,7 +2644,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			{
 				send_do_not_disturb_message(msg, from_id);
 			}
-			else
+			
+			if (!is_muted)
 			{
 				LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL;
 				// Read the binary bucket for more information.
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 49e2ddfb14..bb3044a0d5 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6524,7 +6524,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
    icon="notify.tga"
    name="JoinGroup"
    persist="true"
-   type="notify">
+   type="offer">
     <tag>group</tag>
 [MESSAGE]
     <form name="form">
-- 
cgit v1.2.3


From 5f05e5841f5e748984a7dd7ac4e18070fc716857 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Fri, 3 May 2013 13:01:00 +0300
Subject: CHUI-963 (Toggling chat fui button twice tears off nearby chat to
 lower left corner also deletes other open conversations)

---
 indra/newview/llfloaterimcontainer.cpp | 5 +++++
 indra/newview/llfloaterimcontainer.h   | 1 +
 2 files changed, 6 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index b88888da3b..7626a3eab8 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2081,6 +2081,11 @@ void LLFloaterIMContainer::onClickCloseBtn()
 	LLFloater::closeFloater();
 }
 
+void LLFloaterIMContainer::closeHostedFloater()
+{
+	onClickCloseBtn();
+}
+
 void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
 	// Check for currently active session
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 74c3640bad..259b28f952 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -133,6 +133,7 @@ private:
 	void processParticipantsStyleUpdate();
 	void onSpeakButtonClicked();
 	/*virtual*/ void onClickCloseBtn();
+	/*virtual*/ void closeHostedFloater();
 
 	void collapseConversationsPane(bool collapse, bool save_is_allowed=true);
 
-- 
cgit v1.2.3


From 5ff0d34ab71a6795b7314603272035f72afe2a17 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 13 May 2013 15:13:16 +0300
Subject: CHUI-944 FIXED Show Voice indicator for P2P torn off conversations.

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

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 848d5c34d2..1de6effa2b 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -109,7 +109,7 @@ void LLFloaterIMSession::refresh()
 void LLFloaterIMSession::onTearOffClicked()
 {
     LLFloaterIMSessionTab::onTearOffClicked();
-
+    mSpeakingIndicator->setVisible(mIsP2PChat);
     if(mIsP2PChat)
     {
         if(isTornOff())
-- 
cgit v1.2.3


From 38c1cd2d29fa48b1a28a6ba1d7ef49ae00c9a5e0 Mon Sep 17 00:00:00 2001
From: Cinders <cinder@cinderblocks.biz>
Date: Mon, 13 May 2013 17:18:38 -0600
Subject: STORM-1948 - Fix for Set home to here - screen_home.bmp not saved

---
 indra/newview/llviewermessage.cpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3c0d6189ac..6fa44ec23c 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5929,6 +5929,15 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 				return true;
 			}
 		}
+		// HACK -- handle callbacks for specific alerts.
+		if( notificationID == "HomePositionSet" )
+		{
+			// save the home location image to disk
+			std::string snap_filename = gDirUtilp->getLindenUserDir();
+			snap_filename += gDirUtilp->getDirDelimiter();
+			snap_filename += SCREEN_HOME_FILENAME;
+			gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
+		}
 		
 		LLNotificationsUtil::add(notificationID, llsdBlock);
 		return true;
@@ -6004,14 +6013,6 @@ void process_alert_core(const std::string& message, BOOL modal)
 	{
 		LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
 	}
-	else if( message == "Home position set." )
-	{
-		// save the home location image to disk
-		std::string snap_filename = gDirUtilp->getLindenUserDir();
-		snap_filename += gDirUtilp->getDirDelimiter();
-		snap_filename += SCREEN_HOME_FILENAME;
-		gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
-	}
 
 	const std::string ALERT_PREFIX("ALERT: ");
 	const std::string NOTIFY_PREFIX("NOTIFY: ");
-- 
cgit v1.2.3


From 0f35d68d6ffe0485cac6309bb98b36a2578afd8f Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 15 May 2013 14:57:11 +0300
Subject: CHUI-913 FIXED Show toasts for torn-off windows that aren't
 collapsed.

---
 indra/newview/llfloaterimnearbychathandler.cpp | 1 +
 indra/newview/llimview.cpp                     | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 9ce5e12897..0b183bf51c 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -606,6 +606,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
 
 		//Don't show nearby toast, if conversation is visible and selected
 		if ((nearby_chat->hasFocus()) ||
+			(nearby_chat->isTornOff() && !nearby_chat->isMinimized()) ||
 		    ((im_box->getSelectedSession().isNull() &&
 				((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost())
 						|| (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost())))))
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 214b177a1b..2552ddbb1e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -314,7 +314,8 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 
 	// 4. Toast
 	if ((("toast" == user_preferences) &&
-		(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status))
+		(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) &&
+		(!session_floater->isTornOff()))
 		|| !session_floater->isMessagePaneExpanded())
 
 	{
-- 
cgit v1.2.3


From 75f97d4ffe517d07e4b528de9e5f2d2c800510fb Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Thu, 16 May 2013 09:16:58 +0300
Subject: CHUI-963 (Toggling chat fui button twice tears off nearby chat to
 lower left corner also deletes other open conversations)

---
 indra/newview/llfloaterimcontainer.cpp | 9 +++++++++
 indra/newview/llfloaterimcontainer.h   | 1 +
 2 files changed, 10 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7626a3eab8..51796b7486 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2067,6 +2067,15 @@ void LLFloaterIMContainer::expandConversation()
 	}
 }
 
+// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs
+// So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself
+/*virtual*/
+BOOL LLFloaterIMContainer::isFrontmost()
+{
+	LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession);
+	return (selected_session && selected_session->isFrontmost()) || LLFloater::isFrontmost();
+}
+
 // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation.
 // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
 void LLFloaterIMContainer::onClickCloseBtn()
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 259b28f952..072a83d547 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -118,6 +118,7 @@ public:
 	void assignResizeLimits();
 	virtual BOOL handleKeyHere(KEY key, MASK mask );
 	/*virtual*/ void closeFloater(bool app_quitting = false);
+	/*virtual*/ BOOL isFrontmost();
 
 private:
 	typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
-- 
cgit v1.2.3


From 73fa7a46b54941a3f7f7745e8ae037ba49a47969 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 16 May 2013 19:04:52 +0300
Subject: CHUI-913 Additional fix

---
 indra/newview/llfloaterimnearbychathandler.cpp | 2 +-
 indra/newview/llimview.cpp                     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 0b183bf51c..cc00b6fd10 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -606,7 +606,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
 
 		//Don't show nearby toast, if conversation is visible and selected
 		if ((nearby_chat->hasFocus()) ||
-			(nearby_chat->isTornOff() && !nearby_chat->isMinimized()) ||
+			(LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized()) ||
 		    ((im_box->getSelectedSession().isNull() &&
 				((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost())
 						|| (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost())))))
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 2552ddbb1e..ff163f5b25 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -315,7 +315,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	// 4. Toast
 	if ((("toast" == user_preferences) &&
 		(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) &&
-		(!session_floater->isTornOff()))
+		(!session_floater->isTornOff() || !LLFloater::isVisible(session_floater)))
 		|| !session_floater->isMessagePaneExpanded())
 
 	{
-- 
cgit v1.2.3


From bf5f53bf6467fca2783f10d07eae8d111af5dd82 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 20 May 2013 15:55:06 +0300
Subject: CHUI-953 FIXED Set dnd and close all conversation before quittinq.

---
 indra/newview/llfloaterimcontainer.cpp | 30 +++++++++++++++++++++++++++++-
 indra/newview/llfloaterimcontainer.h   |  2 ++
 2 files changed, 31 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 51796b7486..700bc94105 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1212,7 +1212,7 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata)
 
     if (action == "group_profile")
     {
-        LLGroupActions::show(mSelectedSession);
+    	LLGroupActions::show(mSelectedSession);
     }
     else if (action == "activate_group")
     {
@@ -2095,8 +2095,31 @@ void LLFloaterIMContainer::closeHostedFloater()
 	onClickCloseBtn();
 }
 
+void LLFloaterIMContainer::closeAllConversations()
+{
+	conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
+	for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+	{
+		if (widget_it->first != LLUUID())
+		{
+			LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
+			if (widget)
+			{
+				widget->destroyView();
+				mConversationsItems.erase(widget_it->first);
+				mConversationsWidgets.erase(widget_it->first);
+			}
+		}
+	}
+}
 void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
+	if(app_quitting)
+	{
+		gAgent.setDoNotDisturb(true);
+		closeAllConversations();
+	}
+
 	// Check for currently active session
 	LLUUID session_id = getSelectedSession();
 	// If current session is Nearby Chat or there is only one session remaining, close the floater
@@ -2110,6 +2133,11 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	if (active_conversation)
 	{
 		active_conversation->closeFloater();
+		if(app_quitting)
+		{
+			LLFloater::closeFloater(app_quitting);
+		}
+
 	}
 }
 
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 072a83d547..5121e902cb 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -118,8 +118,10 @@ public:
 	void assignResizeLimits();
 	virtual BOOL handleKeyHere(KEY key, MASK mask );
 	/*virtual*/ void closeFloater(bool app_quitting = false);
+    void closeAllConversations();
 	/*virtual*/ BOOL isFrontmost();
 
+
 private:
 	typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
 	avatarID_panel_map_t mSessions;
-- 
cgit v1.2.3


From 3187ee18e1fa5a8b3f719f26f32b01b817791a4e Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Wed, 15 May 2013 20:31:47 +0300
Subject: CHUI-945 FIXED Add Object IMs to Chat Notification Preferences

---
 indra/newview/app_settings/settings.xml            | 105 +++++++++++++++-
 indra/newview/llfloaterpreference.cpp              |   4 +-
 indra/newview/llimview.cpp                         |  35 +++++-
 indra/newview/llviewermessage.cpp                  |   1 +
 .../default/xui/en/panel_preferences_chat.xml      | 140 +++++++++++++++++----
 5 files changed, 250 insertions(+), 35 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 03135caf93..5f1348e3c5 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6398,7 +6398,10 @@
     <key>NotificationConferenceIMOptions</key>
     <map>
       <key>Comment</key>
-      <string>Specifies how the UI responds to Conference IM Notifications.</string>
+      <string>
+        Specifies how the UI responds to Conference IM Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -6409,7 +6412,10 @@
     <key>NotificationFriendIMOptions</key>
     <map>
       <key>Comment</key>
-      <string>Specifies how the UI responds to Friend IM Notifications.</string>
+      <string>
+        Specifies how the UI responds to Friend IM Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -6420,7 +6426,10 @@
     <key>NotificationGroupChatOptions</key>
     <map>
       <key>Comment</key>
-      <string>Specifies how the UI responds to Group Chat Notifications.</string>
+      <string>
+        Specifies how the UI responds to Group Chat Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -6431,7 +6440,10 @@
     <key>NotificationNearbyChatOptions</key>
     <map>
       <key>Comment</key>
-      <string>Specifies how the UI responds to Nearby Chat Notifications.</string>
+      <string>
+        Specifies how the UI responds to Nearby Chat Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -6442,7 +6454,10 @@
     <key>NotificationNonFriendIMOptions</key>
     <map>
       <key>Comment</key>
-      <string>Specifies how the UI responds to Non Friend IM Notifications.</string>
+      <string>
+        Specifies how the UI responds to Non Friend IM Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -6450,6 +6465,20 @@
       <key>Value</key>
       <string>toast</string>
     </map>  
+    <key>NotificationObjectIMOptions</key>
+    <map>
+      <key>Comment</key>
+      <string>
+        Specifies how the UI responds to Object IM Notifications.
+        Allowed values: [openconversations,toast,flash,noaction]
+      </string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>noaction</string>
+    </map>  
     <key>NotificationToastLifeTime</key>
     <map>
       <key>Comment</key>
@@ -6988,6 +7017,72 @@
       <key>Value</key>
       <integer>0</integer>
     </map>  
+    <key>PlaySoundFriendIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when friend's IM received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>PlaySoundNonFriendIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when non-friend's IM received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>PlaySoundConferenceIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when conference IM received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>PlaySoundGroupChatIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when group chat IM received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>PlaySoundNearbyChatIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when nearby chat IM received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>PlaySoundObjectIM</key>
+    <map>
+      <key>Comment</key>
+      <string>Plays a sound when IM fom an object received.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>PlaySoundNewConversation</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index bbf88060c1..7ada4cfd00 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -452,6 +452,7 @@ BOOL LLFloaterPreference::postBuild()
 	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"));
+	getChild<LLComboBox>("ObjectIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ObjectIMOptions"));
 
 	// if floater is opened before login set default localized do not disturb message
 	if (LLStartUp::getStartupState() < STATE_STARTED)
@@ -721,6 +722,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
 	onNotificationsChange("ConferenceIMOptions");
 	onNotificationsChange("GroupChatOptions");
 	onNotificationsChange("NearbyChatOptions");
+	onNotificationsChange("ObjectIMOptions");
 
 	LLPanelLogin::setAlwaysRefresh(true);
 	refresh();
@@ -928,7 +930,7 @@ void LLFloaterPreference::onNotificationsChange(const std::string& OptionName)
 	bool show_notifications_alert = true;
 	for (notifications_map::iterator it_notification = mNotificationOptions.begin(); it_notification != mNotificationOptions.end(); it_notification++)
 	{
-		if(it_notification->second != "None")
+		if(it_notification->second != "No action")
 		{
 			show_notifications_alert = false;
 			break;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ff163f5b25..892038722d 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -196,32 +196,63 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	//  determine user prefs for this session
 	if (session_id.isNull())
 	{
-		user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+		if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT)
+		{
+			user_preferences = gSavedSettings.getString("NotificationObjectIMOptions");
+			if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == TRUE))
+			{
+				make_ui_sound("UISndNewIncomingIMSession");
+			}
+		}
+		else
+		{
+			user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+			if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == TRUE))
+			{
+				make_ui_sound("UISndNewIncomingIMSession");
+			}
+		}
 	}
 	else if(session->isP2PSessionType())
 	{
 		if (LLAvatarTracker::instance().isBuddy(participant_id))
 		{
 			user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
+			if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == TRUE))
+			{
+				make_ui_sound("UISndNewIncomingIMSession");
+			}
 		}
 		else
 		{
 			user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
+			if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == TRUE))
+			{
+				make_ui_sound("UISndNewIncomingIMSession");
+			}
 		}
 	}
 	else if(session->isAdHocSessionType())
 	{
 		user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
+		if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == TRUE))
+		{
+			make_ui_sound("UISndNewIncomingIMSession");
+		}
 	}
 	else if(session->isGroupSessionType())
 	{
 		user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
+		if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == TRUE))
+		{
+			make_ui_sound("UISndNewIncomingIMSession");
+		}
 	}
 
 	// actions:
 
 	// 0. nothing - exit
-	if (("none" == user_preferences ||
+	if (("noaction" == user_preferences ||
 		ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
 		&& session_floater->isMessagePaneExpanded())
 	{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3a57e2a3c9..013d8c86f8 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3666,6 +3666,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
 		LLSD msg_notify = LLSD(LLSD::emptyMap());
 		msg_notify["session_id"] = LLUUID();
         msg_notify["from_id"] = chat.mFromID;
+		msg_notify["source_type"] = chat.mSourceType;
         on_new_message(msg_notify);
 	}
 }
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 bd096ebb88..2fd26e3f01 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -100,14 +100,6 @@
       left="13"
       width="517">
 
-    <text
-        layout="topleft"
-        height="12"
-        name="notifications"
-        left="0"
-        width="120">
-      Notifications
-    </text>
     <text
         layout="topleft"
         height="12"
@@ -138,17 +130,27 @@
           name="FlashToolbarButton"
           value="flash"/>
       <item
-          label="None"
-          name="None"
-          value="none"/>
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
     </combo_box>
+    <check_box
+        control_name="PlaySoundFriendIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_friend_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
     <text
         layout="topleft"
         height="12"
         name="non_friend_ims"
         width="145"
         left="0"
-        top_pad="9">
+        top_pad="11">
       Non-friend IMs:
     </text>
     <combo_box
@@ -172,17 +174,27 @@
           name="FlashToolbarButton"
           value="flash"/>
       <item
-          label="None"
-          name="None"
-          value="none"/>
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
     </combo_box>
+    <check_box
+        control_name="PlaySoundNonFriendIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_non_friend_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
     <text
         layout="topleft"
         left="0"
         height="13"
         name="conference_ims"
         width="145"
-        top_pad="9">
+        top_pad="11">
       Conference IMs:
     </text>
     <combo_box
@@ -206,17 +218,27 @@
           name="FlashToolbarButton"
           value="flash"/>
       <item
-          label="None"
-          name="None"
-          value="none"/>
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
     </combo_box>
+    <check_box
+        control_name="PlaySoundConferenceIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_conference_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
     <text
         layout="topleft"
         left="0"
         height="13"
         name="group_chat"
         width="145"
-        top_pad="9">
+        top_pad="11">
       Group chat:
     </text>
     <combo_box
@@ -240,17 +262,27 @@
           name="FlashToolbarButton"
           value="flash"/>
       <item
-          label="None"
-          name="None"
-          value="none"/>
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
     </combo_box>
+    <check_box
+        control_name="PlaySoundGroupChatIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_group_chat_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
     <text
         layout="topleft"
         left="0"
         height="12"
         name="nearby_chat"
         width="145"
-        top_pad="9">
+        top_pad="11">
       Nearby chat:
     </text>
     <combo_box
@@ -274,10 +306,64 @@
           name="FlashToolBarButton"
           value="flash"/>
       <item
-          label="None"
-          name="None"
-          value="none"/>
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
     </combo_box>
+    <check_box
+        control_name="PlaySoundNearbyChatIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_nearby_chat_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
+    <text
+        layout="topleft"
+        left="0"
+        height="12"
+        name="object_ims"
+        width="145"
+        top_pad="11">
+      Object IMs:
+    </text>
+    <combo_box
+        control_name="NotificationObjectIMOptions"
+        height="23"
+        layout="topleft"
+        left_pad="5"
+        top_delta="-6"
+        name="ObjectIMOptions"
+        width="223">
+      <item
+          label="Open Conversations window"
+          name="OpenConversationsWindow"
+          value="openconversations"/>
+      <item
+          label="Pop up the message"
+          name="PopUpMessage"
+          value="toast"/>
+      <item
+          label="Flash toolbar button"
+          name="FlashToolBarButton"
+          value="flash"/>
+      <item
+          label="No action"
+          name="NoAction"
+          value="noaction"/>
+    </combo_box>
+    <check_box
+        control_name="PlaySoundObjectIM"
+        height="23"
+        label="Play sound"
+        layout="topleft"
+        name="play_sound_object_im"
+        left_pad="7"
+        top_delta="-3"
+        width="28">
+    </check_box>
     <text
         layout="topleft"
         left="0"
-- 
cgit v1.2.3


From 34142d3f44d8f2a6fa5fb1ccf03f1ade1730c881 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 22 May 2013 15:16:45 +0300
Subject: CHUI-841 FIXED Show warning toast even if Nearby chat is open

---
 indra/newview/llnotificationtiphandler.cpp | 7 -------
 1 file changed, 7 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index a85335f1ba..4ca961c1f9 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -83,13 +83,6 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
 	if (notification->canLogToChat())
 	{
 		LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
-
-		// don't show toast if Nearby Chat is opened
-		LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
-		if (nearby_chat->isChatVisible())
-		{
-			return false;
-		}
 	}
 
 	std::string session_name = notification->getPayload()["SESSION_NAME"];
-- 
cgit v1.2.3


From f52b5dbcd36062e29b2d7fb35a23606531c446d4 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 24 May 2013 19:42:37 +0300
Subject: CHUI-955 FIXED Docked Group and Torn off p2p panel can be resized
 small enough for buttons to overlap

---
 indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 8da4213c65..2853f94b16 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -222,7 +222,7 @@
                      default_tab_group="3"
                      tab_group="2"
                      name="right_part_holder"
-                     min_width="172">
+                     min_width="236">
                         <layout_stack
                          animate="true" 
                          default_tab_group="2"
-- 
cgit v1.2.3


From 706200e2348b050fe90624c3cda7045e53d72f2f Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 24 May 2013 21:44:11 +0300
Subject: CHUI-955 FIXED Docked Group and Torn off p2p panel can be resized
 small enough for buttons to overlap:  - reverting previous fix;

---
 indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 2853f94b16..8da4213c65 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -222,7 +222,7 @@
                      default_tab_group="3"
                      tab_group="2"
                      name="right_part_holder"
-                     min_width="236">
+                     min_width="172">
                         <layout_stack
                          animate="true" 
                          default_tab_group="2"
-- 
cgit v1.2.3


From c272809aa6e52873c842b79ae47832ddf41dfcdb Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 27 May 2013 14:31:08 +0300
Subject: CHUI-867 FIXED Set focus to Session floater(if it is torn off) after
 clicking appropriate conversation item.

---
 indra/newview/llconversationview.cpp | 18 ++++++++++++++++++
 indra/newview/llconversationview.h   |  1 +
 2 files changed, 19 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 42104ea20a..0695337241 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -270,6 +270,24 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
 	return result;
 }
 
+BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
+{
+	BOOL result = LLFolderViewFolder::handleMouseUp(x, y, mask);
+
+	if(result && getRoot())
+    {
+		LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
+		LLUUID session_id = item? item->getUUID() : LLUUID();
+		LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
+		if(!session_floater->getHost() && !session_floater->hasFocus())
+		{
+			session_floater->setFocus(true);
+		}
+    }
+
+	return result;
+}
+
 BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask )
 {
     BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask);
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 879d496dc7..5a74974302 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -69,6 +69,7 @@ public:
 	/*virtual*/ void draw();
 	/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
 	/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+	/*virtual*/ BOOL handleMouseUp( S32 x, S32 y, MASK mask );
 
 	/*virtual*/ S32 arrange(S32* width, S32* height);
 
-- 
cgit v1.2.3


From eff548310117faaa9b8489891f60b4f2742da4cb Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Fri, 24 May 2013 18:19:10 +0300
Subject: CHUI-964 FIXED Oversized "To" input field hides actual IM text

---
 indra/newview/skins/default/xui/en/floater_im_container.xml | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index da016462db..1215efb7f9 100755
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -4,6 +4,7 @@
  can_minimize="true"
  can_resize="true"
  height="210"
+ min_height="210"
  layout="topleft"
  name="floater_im_box"
  help_topic="floater_im_box"
-- 
cgit v1.2.3


From ca6ba9f4fd514cca28e690fb1219e20e22f6a8e4 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 27 May 2013 18:09:31 +0300
Subject: CHUI-827 FIXED "Linksets" menu item is added

---
 indra/newview/skins/default/xui/en/menu_viewer.xml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index a11cd13fdb..909bde7c51 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -874,6 +874,15 @@
                  function="Tools.EnableSelectNextPart" />
             </menu_item_call>
         </menu>
+        <menu_item_call
+            label="Linksets..."
+            name="pathfinding_linkset_menu_item">
+          <menu_item_call.on_click
+              function="Floater.ToggleOrBringToFront"
+              parameter="pathfinding_linksets" />
+          <menu_item_call.on_enable
+              function="Tools.EnablePathfinding" />
+        </menu_item_call> 
         <menu_item_separator/>
 
         <menu_item_call
@@ -896,7 +905,7 @@
           <menu_item_call.on_enable
              function="Tools.SomethingSelectedNoHUD" />
         </menu_item_call>
-
+		 
         <menu_item_separator/>
 
         <menu
-- 
cgit v1.2.3


From ef69d31b993fe849526799f225dd0eda12c82dab Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 29 May 2013 15:53:36 +0300
Subject: CHUI-918 FIXED "Close all conversations" menu item is added to
 context menu.

---
 indra/newview/llconversationmodel.cpp              |  3 +++
 indra/newview/llfloaterimcontainer.cpp             | 27 +++++++++++++---------
 .../skins/default/xui/en/menu_conversation.xml     |  6 +++++
 3 files changed, 25 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 6e95df8383..ee55b8fe80 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -367,12 +367,14 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
     if(this->getType() == CONV_SESSION_1_ON_1)
     {
         items.push_back(std::string("close_conversation"));
+        items.push_back(std::string("close_all_conversations"));
         items.push_back(std::string("separator_disconnect_from_voice"));
         buildParticipantMenuOptions(items, flags);
     }
     else if(this->getType() == CONV_SESSION_GROUP)
     {
         items.push_back(std::string("close_conversation"));
+        items.push_back(std::string("close_all_conversations"));
         addVoiceOptions(items);
         items.push_back(std::string("chat_history"));
         items.push_back(std::string("separator_chat_history"));
@@ -383,6 +385,7 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
     else if(this->getType() == CONV_SESSION_AD_HOC)
     {
         items.push_back(std::string("close_conversation"));
+        items.push_back(std::string("close_all_conversations"));
         addVoiceOptions(items);
         items.push_back(std::string("chat_history"));
     }
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 700bc94105..4bfb19ce36 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -977,7 +977,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order)
 			conversation_floater->setSortOrder(order);
 		}
 	}
-	
+
 	gSavedSettings.setU32("ConversationSortOrder", (U32)order);
 }
 
@@ -1149,6 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
         {
             LLFloater::onClickClose(conversationFloater);
         }
+        else if("close_all_conversations" == command)
+        {
+        	closeAllConversations();
+        }
         else if("open_voice_conversation" == command)
         {
             gIMMgr->startCall(conversationItem->getUUID());
@@ -2097,20 +2101,21 @@ void LLFloaterIMContainer::closeHostedFloater()
 
 void LLFloaterIMContainer::closeAllConversations()
 {
-	conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
-	for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+	LLDynamicArray<LLUUID> ids;
+	for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++)
 	{
-		if (widget_it->first != LLUUID())
+		LLUUID session_id = it_session->first;
+		if (session_id != LLUUID())
 		{
-			LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
-			if (widget)
-			{
-				widget->destroyView();
-				mConversationsItems.erase(widget_it->first);
-				mConversationsWidgets.erase(widget_it->first);
-			}
+			ids.push_back(session_id);
 		}
 	}
+
+	for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); 	++it)
+	{
+		LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it);
+		LLFloater::onClickClose(conversationFloater);
+	}
 }
 void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 5a13ef0a59..7494309315 100755
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -12,6 +12,12 @@
      name="close_conversation">
         <on_click function="Avatar.DoToSelected" parameter="close_conversation"/>
 	 </menu_item_call>
+	 <menu_item_call
+     label="Close All conversations"
+     layout="topleft"
+     name="close_all_conversations">
+        <on_click function="Avatar.DoToSelected" parameter="close_all_conversations"/>
+	 </menu_item_call>
      <menu_item_call
      label="Open voice conversation"
      layout="topleft"
-- 
cgit v1.2.3


From 773a296383ebad29ad3f7a618405535e306d71b1 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Wed, 29 May 2013 19:04:02 +0300
Subject: CHUI-915 ([CHUIBUG]Control+W hides Conversations floater instead of
 closing active tab)

---
 indra/newview/llfloaterimcontainer.cpp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 4bfb19ce36..3783ae60e7 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2132,17 +2132,19 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	{
 		onClickCloseBtn();
 	}
-
-	// Otherwise, close current conversation
-	LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
-	if (active_conversation)
+	else
 	{
-		active_conversation->closeFloater();
-		if(app_quitting)
+		// Otherwise, close current conversation
+		LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
+		if (active_conversation)
 		{
-			LLFloater::closeFloater(app_quitting);
-		}
+			active_conversation->closeFloater();
+			if(app_quitting)
+			{
+				LLFloater::closeFloater(app_quitting);
+			}
 
+		}
 	}
 }
 
-- 
cgit v1.2.3


From 5287578d932f562e317bcdd409b9b30ecf43a403 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 29 May 2013 20:22:45 +0300
Subject: CHUI-918 FIXED "Close all conversations" menu item is added to
 context menu.

---
 indra/newview/llimview.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 892038722d..4614ce8fcb 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -299,7 +299,8 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	if ("openconversations" == user_preferences
 		|| ON_TOP == conversations_floater_status
 		|| ("toast" == user_preferences && ON_TOP != conversations_floater_status)
-		|| ("flash" == user_preferences && CLOSED == conversations_floater_status)
+		|| ("flash" == user_preferences && (CLOSED == conversations_floater_status
+				 	 	 	 	 	 	|| NOT_ON_TOP == conversations_floater_status))
 		|| is_dnd_msg)
 	{
 		if(!LLMuteList::getInstance()->isMuted(participant_id))
-- 
cgit v1.2.3


From 705d85fb2f0856fdc19fd5f71f4dea33951db015 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Thu, 30 May 2013 17:04:19 +0300
Subject: CHUI-942 FIXED Choose Resident picker problems

---
 indra/newview/llfloateravatarpicker.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 113aa9a8f2..c0afb72cff 100755
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -513,6 +513,7 @@ void LLFloaterAvatarPicker::find()
 			url += "/";
 		}
 		url += "?page_size=100&names=";
+		std::replace(text.begin(), text.end(), '.', ' ');
 		url += LLURI::escape(text);
 		llinfos << "avatar picker " << url << llendl;
 		LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID, getKey().asString()));
@@ -748,7 +749,12 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
 		{
 			getChildView("ok_btn")->setEnabled(true);
 			search_results->setEnabled(true);
-			search_results->selectFirstItem();
+			search_results->sortByColumnIndex(1, TRUE);
+			std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
+			if (!search_results->selectItemByLabel(text, TRUE, 1))
+			{
+				search_results->selectFirstItem();
+			}			
 			onList();
 			search_results->setFocus(TRUE);
 		}
-- 
cgit v1.2.3


From 168f4d8de0bf4f6a211366d5183a777b577b5cfe Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 30 May 2013 20:07:09 +0300
Subject: CHUI-971 FIXED Unnecessary checking was removed.

---
 indra/newview/llfloaterimnearbychat.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 7e472466ed..d3351fac2e 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -639,10 +639,7 @@ void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLS
 
 void LLFloaterIMNearbyChat::onChatBoxCommit()
 {
-	if (mInputEditor->getText().length() > 0)
-	{
-		sendChat(CHAT_TYPE_NORMAL);
-	}
+	sendChat(CHAT_TYPE_NORMAL);
 
 	gAgent.stopTyping();
 }
-- 
cgit v1.2.3


From 430af6f731b2b822dd91d3163d7e206e3559a211 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 4 Jun 2013 14:49:07 +0300
Subject: CHUI-918 FIXED Close only selected conversations instead of closing
 all conversations.

---
 indra/newview/llconversationmodel.cpp              |  8 +++----
 indra/newview/llfloaterimcontainer.cpp             | 25 ++++++++++++++++++----
 indra/newview/llfloaterimcontainer.h               |  3 ++-
 .../skins/default/xui/en/menu_conversation.xml     | 14 ++++++------
 4 files changed, 34 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index ee55b8fe80..27caedf472 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -363,18 +363,19 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
     lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl;
     menuentry_vec_t items;
     menuentry_vec_t disabled_items;
-
+    if(flags & ITEM_IN_MULTI_SELECTION)
+    {
+    	items.push_back(std::string("close_selected_conversations"));
+    }
     if(this->getType() == CONV_SESSION_1_ON_1)
     {
         items.push_back(std::string("close_conversation"));
-        items.push_back(std::string("close_all_conversations"));
         items.push_back(std::string("separator_disconnect_from_voice"));
         buildParticipantMenuOptions(items, flags);
     }
     else if(this->getType() == CONV_SESSION_GROUP)
     {
         items.push_back(std::string("close_conversation"));
-        items.push_back(std::string("close_all_conversations"));
         addVoiceOptions(items);
         items.push_back(std::string("chat_history"));
         items.push_back(std::string("separator_chat_history"));
@@ -385,7 +386,6 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
     else if(this->getType() == CONV_SESSION_AD_HOC)
     {
         items.push_back(std::string("close_conversation"));
-        items.push_back(std::string("close_all_conversations"));
         addVoiceOptions(items);
         items.push_back(std::string("chat_history"));
     }
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 3783ae60e7..60ece0aab1 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -981,7 +981,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order)
 	gSavedSettings.setU32("ConversationSortOrder", (U32)order);
 }
 
-void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids)
+void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids, bool participant_uuids/* = true*/)
 {
     const std::set<LLFolderViewItem*> selectedItems = mConversationsRoot->getSelectionList();
 
@@ -994,7 +994,7 @@ void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids)
         conversationItem = static_cast<LLConversationItem *>((*it)->getViewModelItem());
       
 		//When a one-on-one conversation exists, retrieve the participant id from the conversation floater
-		if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
+		if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1 && participant_uuids)
 		{
 			LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(conversationItem->getUUID());
 			LLUUID participant_id = conversation_floaterp->getOtherParticipantUUID();
@@ -1149,9 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
         {
             LLFloater::onClickClose(conversationFloater);
         }
-        else if("close_all_conversations" == command)
+        else if("close_selected_conversations" == command)
         {
-        	closeAllConversations();
+        	getSelectedUUIDs(selectedIDS,false);
+        	closeSelectedConversations(selectedIDS);
         }
         else if("open_voice_conversation" == command)
         {
@@ -2117,6 +2118,22 @@ void LLFloaterIMContainer::closeAllConversations()
 		LLFloater::onClickClose(conversationFloater);
 	}
 }
+
+void LLFloaterIMContainer::closeSelectedConversations(const uuid_vec_t& ids)
+{
+	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+	{
+		//We don't need to close Nearby chat, so skip it
+		if (*it != LLUUID())
+		{
+			LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it);
+			if(conversationFloater)
+			{
+				LLFloater::onClickClose(conversationFloater);
+			}
+		}
+	}
+}
 void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
 	if(app_quitting)
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 5121e902cb..5cd92beed1 100755
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -119,6 +119,7 @@ public:
 	virtual BOOL handleKeyHere(KEY key, MASK mask );
 	/*virtual*/ void closeFloater(bool app_quitting = false);
     void closeAllConversations();
+    void closeSelectedConversations(const uuid_vec_t& ids);
 	/*virtual*/ BOOL isFrontmost();
 
 
@@ -151,7 +152,7 @@ private:
 	void setSortOrderParticipants(const LLConversationFilter::ESortOrderType order);
 	void setSortOrder(const LLConversationSort& order);
 
-    void getSelectedUUIDs(uuid_vec_t& selected_uuids);
+    void getSelectedUUIDs(uuid_vec_t& selected_uuids, bool participant_uuids = true);
     const LLConversationItem * getCurSelectedViewModelItem();
     void getParticipantUUIDs(uuid_vec_t& selected_uuids);
     void doToSelected(const LLSD& userdata);
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 7494309315..b3d28788da 100755
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -11,13 +11,7 @@
      layout="topleft"
      name="close_conversation">
         <on_click function="Avatar.DoToSelected" parameter="close_conversation"/>
-	 </menu_item_call>
-	 <menu_item_call
-     label="Close All conversations"
-     layout="topleft"
-     name="close_all_conversations">
-        <on_click function="Avatar.DoToSelected" parameter="close_all_conversations"/>
-	 </menu_item_call>
+	 </menu_item_call>	 
      <menu_item_call
      label="Open voice conversation"
      layout="topleft"
@@ -31,6 +25,12 @@
         <on_click function="Avatar.DoToSelected" parameter="disconnect_from_voice"/>
     </menu_item_call>	
 	<menu_item_separator layout="topleft" name="separator_disconnect_from_voice"/>	
+	<menu_item_call
+     label="Close Selected"
+     layout="topleft"
+     name="close_selected_conversations">
+        <on_click function="Avatar.DoToSelected" parameter="close_selected_conversations"/>
+	 </menu_item_call>
     <menu_item_call
      label="View Profile"
      layout="topleft"
-- 
cgit v1.2.3


From 4965a0de28ad91da099bcd3a981675cfe7d7fc23 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Sat, 1 Jun 2013 01:30:32 +0300
Subject: CHUI-966 FIXED WARNING: LLSysWellWindow::removeItemByID: Unable to
 remove notification given when deleting notification

---
 indra/newview/llsyswellwindow.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index e92bd766ca..1a3add2bfb 100755
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -423,9 +423,18 @@ void LLNotificationWellWindow::onItemClick(LLSysWellItem* item)
 void LLNotificationWellWindow::onItemClose(LLSysWellItem* item)
 {
 	LLUUID id = item->getID();
-	removeItemByID(id);
+	
 	if(mChannel)
+	{
+		// removeItemByID() is invoked from killToastByNotificationID() and item will removed;
 		mChannel->killToastByNotificationID(id);
+	}
+	else
+	{
+		// removeItemByID() should be called one time for each item to remove it from notification well
+		removeItemByID(id);
+	}
+
 }
 
 void LLNotificationWellWindow::onAdd( LLNotificationPtr notify )
-- 
cgit v1.2.3


From 0bcb1db3ea8056e96b6cb087758e6ee57bc122a3 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 4 Jun 2013 20:24:10 +0300
Subject: CHUI-972 FIXED Don't show voice request in DND mode, even if session
 with participant exists.

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

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 4614ce8fcb..ba96c5ee24 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3043,10 +3043,9 @@ void LLIMMgr::inviteToSession(
 	{
 		bool isRejectGroupCall = (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && (notify_box_type == "VoiceInviteGroup"));
 		bool isRejectNonFriendCall = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL));
-		bool isRejectDoNotDisturb = (gAgent.isDoNotDisturb() && !hasSession(session_id));
-		if	(isRejectGroupCall || isRejectNonFriendCall || isRejectDoNotDisturb)
+		if	(isRejectGroupCall || isRejectNonFriendCall || gAgent.isDoNotDisturb())
 		{
-			if (isRejectDoNotDisturb && !isRejectGroupCall && !isRejectNonFriendCall)
+			if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall)
 			{
 				LLSD args;
 				addSystemMessage(session_id, "you_auto_rejected_call", args);
-- 
cgit v1.2.3


From d5d8fd674ec6c81021e2921f71d7b98a45b2db84 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 5 Jun 2013 16:31:49 +0300
Subject: CHUI-968 FIXED "name" attribute was added for panels

---
 indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra/newview')

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 2fd26e3f01..8e867259c5 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -14,6 +14,7 @@
       border="false"
       height="60"
       layout="topleft"
+      name="general_chat_settings" 
       top="10"
       left="13"
       width="517">
@@ -97,6 +98,7 @@
       border="false"
       height="165"
       layout="topleft"
+      name="im_notification_settings" 	
       left="13"
       width="517">
 
@@ -382,6 +384,7 @@
       border="false"
       height="50"
       layout="topleft"
+      name="play_sound_settings"  	
       left="13"
       top_pad="10"
       width="517">
@@ -444,6 +447,7 @@
   <panel
       height="50"
       layout="topleft"
+      name="log_settings" 	
       left="13"
       top_pad="10"
       width="505">
-- 
cgit v1.2.3


From 58d2896a0717f993c8848f6b5bf08f650ec9f272 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 5 Jun 2013 19:27:48 +0300
Subject: CHUI-918 Don't show "Close Selected" item if Nearby chat is selected

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

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 27caedf472..192a594c9d 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -363,7 +363,7 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
     lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl;
     menuentry_vec_t items;
     menuentry_vec_t disabled_items;
-    if(flags & ITEM_IN_MULTI_SELECTION)
+    if((flags & ITEM_IN_MULTI_SELECTION) && (this->getType() != CONV_SESSION_NEARBY))
     {
     	items.push_back(std::string("close_selected_conversations"));
     }
-- 
cgit v1.2.3


From 57b21335ba232d4023ec2cda81153d02bc190f6b Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Wed, 5 Jun 2013 20:57:54 +0300
Subject: CHUI-953 (Viewer does not quit after confirming to quit first time)
 removed DND hack

---
 indra/newview/llfloaterimcontainer.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 3783ae60e7..01278e0637 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2121,8 +2121,8 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
 	if(app_quitting)
 	{
-		gAgent.setDoNotDisturb(true);
 		closeAllConversations();
+		onClickCloseBtn();
 	}
 
 	// Check for currently active session
@@ -2139,11 +2139,6 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 		if (active_conversation)
 		{
 			active_conversation->closeFloater();
-			if(app_quitting)
-			{
-				LLFloater::closeFloater(app_quitting);
-			}
-
 		}
 	}
 }
-- 
cgit v1.2.3


From 497789c47632f1d1756832c3231d7d4ca5b84c11 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 6 Jun 2013 19:00:11 +0300
Subject: CHUI-973 FIXED Speaking indicator was removed

---
 indra/newview/llfloaterimsession.cpp                      | 12 ------------
 indra/newview/llfloaterimsessiontab.cpp                   |  3 ---
 indra/newview/llfloaterimsessiontab.h                     |  3 +--
 indra/newview/skins/default/xui/en/floater_im_session.xml | 14 +-------------
 4 files changed, 2 insertions(+), 30 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 1de6effa2b..5cb9df5625 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -109,18 +109,6 @@ void LLFloaterIMSession::refresh()
 void LLFloaterIMSession::onTearOffClicked()
 {
     LLFloaterIMSessionTab::onTearOffClicked();
-    mSpeakingIndicator->setVisible(mIsP2PChat);
-    if(mIsP2PChat)
-    {
-        if(isTornOff())
-        {
-            mSpeakingIndicator->setSpeakerId(mOtherParticipantUUID, mSessionID);
-        }
-        else
-        {
-            mSpeakingIndicator->setSpeakerId(LLUUID::null);
-        }
-    }
 }
 
 // virtual
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index cc2859c099..53b439b32e 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -55,7 +55,6 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
   ,  mSessionID(session_id.asUUID())
   , mConversationsRoot(NULL)
   , mScroller(NULL)
-  , mSpeakingIndicator(NULL)
   , mChatHistory(NULL)
   , mInputEditor(NULL)
   , mInputEditorPad(0)
@@ -259,8 +258,6 @@ BOOL LLFloaterIMSessionTab::postBuild()
 	scroller_params.rect(scroller_view_rect);
 	mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
 	mScroller->setFollowsAll();
-	
-    mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
 
 	// Insert that scroller into the panel widgets hierarchy
 	mParticipantListPanel->addChild(mScroller);	
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index ba80d2369a..e5f17a25f4 100755
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -171,8 +171,7 @@ protected:
 	LLFolderView* mConversationsRoot;
 	LLScrollContainer* mScroller;
 
-    LLOutputMonitorCtrl* mSpeakingIndicator;
-	LLChatHistory* mChatHistory;
+    LLChatHistory* mChatHistory;
 	LLChatEntry* mInputEditor;
 	LLLayoutPanel * mChatLayoutPanel;
 	LLLayoutStack * mInputPanels;
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 8da4213c65..43d0f2fb18 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -142,19 +142,7 @@
                  left_pad="2"
                  name="voice_call_btn"
                  tool_tip="Open voice connection"
-                 width="31"/>
-                <output_monitor
-                 auto_update="true"
-                 follows="top|left"
-                 draw_border="false"
-                 height="16"
-                 layout="topleft"
-                 top="10"
-                 left_pad="10"
-                 mouse_opaque="true"
-                 name="speaking_indicator"
-                 visible="false"
-                 width="20" />
+                 width="31"/>                
                 <button
                  follows="right|top"
                  height="25"
-- 
cgit v1.2.3


From 64fc027a0bd87be0629ef95a5b7d0ab736c97a9e Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 6 Jun 2013 19:11:28 +0300
Subject: CHUI-975 FIXED Message text is changed

---
 indra/newview/skins/default/xui/en/notifications.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9d1973f267..7c4ad2b819 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5954,9 +5954,7 @@ Your calling card was declined.
    icon="notifytip.tga"
    name="TeleportToPerson"
    type="notifytip">
-    To contact Residents like &apos;[NAME]&apos;, click on the &quot;People&quot; button , select a Resident from the window that opens, then click &apos;IM&apos; at the
-    bottom of the window.
-    (You can also double-click on their name in the list, or right-click and choose &apos;IM&apos;).
+    To open a private conversation with someone, right-click on their avatar and choose "IM" from the menu.
   </notification>
 
   <notification
-- 
cgit v1.2.3


From d952a1b5fc883debc12d64f78a9df43987976499 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 6 Jun 2013 19:15:49 +0300
Subject: CHUI-975 Fixed apostrophes

---
 indra/newview/skins/default/xui/en/notifications.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 7c4ad2b819..6ed5f6b2cc 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5954,7 +5954,7 @@ Your calling card was declined.
    icon="notifytip.tga"
    name="TeleportToPerson"
    type="notifytip">
-    To open a private conversation with someone, right-click on their avatar and choose "IM" from the menu.
+    To open a private conversation with someone, right-click on their avatar and choose &apos;IM&apos; from the menu.
   </notification>
 
   <notification
-- 
cgit v1.2.3


From bad8c183fe1e0f29685e7d648551effebfb096d9 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Thu, 6 Jun 2013 15:15:33 +0300
Subject: CHUI-945 ADD FIX Add Object IMs to Chat Notification Preferences

---
 indra/newview/app_settings/settings.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 411e5f9005..313eb550fd 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6499,7 +6499,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>noaction</string>
+      <string>toast</string>
     </map>  
     <key>NotificationToastLifeTime</key>
     <map>
-- 
cgit v1.2.3


From ab37c8b8f5d830af7155bf63c084dad76070cb42 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Thu, 6 Jun 2013 19:49:42 +0300
Subject: CHUI-896 ADD FIX Line flashing and FUI button flashing not working
 correctly for CHUI notifications Fixed line flashing when conversations
 floater is open but does not have focus

---
 indra/newview/llconversationview.cpp | 5 ++++-
 indra/newview/llimview.cpp           | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 0695337241..9bb9c826e5 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -127,7 +127,10 @@ void LLConversationViewSession::setHighlightState(bool hihglight_state)
 
 void LLConversationViewSession::startFlashing()
 {
-	if (isInVisibleChain() && mFlashStateOn && !mFlashStarted)
+	LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+
+	// Need to start flashing only when "Conversations" is opened or brought on top
+	if (isInVisibleChain() && !im_box->isMinimized() && mFlashStateOn && !mFlashStarted)
 	{
 		mFlashStarted = true;
 		mFlashTimer->startFlashing();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ba96c5ee24..8d055be263 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -311,9 +311,10 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 			}
 			else
 			{
-				if (is_dnd_msg && (ON_TOP == conversations_floater_status || 
+				if ((is_dnd_msg && (ON_TOP == conversations_floater_status || 
 									NOT_ON_TOP == conversations_floater_status || 
 									CLOSED == conversations_floater_status))
+					|| CLOSED == conversations_floater_status)
 				{
 					im_box->highlightConversationItemWidget(session_id, true);
 				}
-- 
cgit v1.2.3


From 0b458690ceb8d7cbb9b1b8b5620def2a08af2524 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Fri, 7 Jun 2013 20:05:43 +0300
Subject: CHUI-953 (Viewer does not quit after confirming to quit first time)
 Added missing "else" statement

---
 indra/newview/llfloaterimcontainer.cpp | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 918c85b07e..5432e68f14 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2141,21 +2141,23 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 		closeAllConversations();
 		onClickCloseBtn();
 	}
-
-	// Check for currently active session
-	LLUUID session_id = getSelectedSession();
-	// If current session is Nearby Chat or there is only one session remaining, close the floater
-	if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting)
-	{
-		onClickCloseBtn();
-	}
 	else
 	{
-		// Otherwise, close current conversation
-		LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
-		if (active_conversation)
+		// Check for currently active session
+		LLUUID session_id = getSelectedSession();
+		// If current session is Nearby Chat or there is only one session remaining, close the floater
+		if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting)
 		{
-			active_conversation->closeFloater();
+			onClickCloseBtn();
+		}
+		else
+		{
+			// Otherwise, close current conversation
+			LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
+			if (active_conversation)
+			{
+				active_conversation->closeFloater();
+			}
 		}
 	}
 }
-- 
cgit v1.2.3


From 45f3ca1667f404190ff2bb762f39cedd58ef7abb Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 10 Jun 2013 17:37:19 +0300
Subject: CHUI-866 FIXED Disable menu item if Conversation Logging isn't
 allowed.

---
 indra/newview/skins/default/xui/en/menu_people_friends_view.xml | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
index dde9432867..8790fde7c5 100755
--- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
@@ -44,6 +44,8 @@
     <menu_item_check.on_check
      function="Floater.Visible"
      parameter="conversation" />
+    <menu_item_check.on_enable
+     function="Conversation.IsConversationLoggingAllowed" />
     <menu_item_check.on_click
      function="Floater.Toggle"
      parameter="conversation" />
-- 
cgit v1.2.3


From 0cf9597bd55782b4a463f3e07767269e80432db6 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 11 Jun 2013 15:30:31 +0300
Subject: CHUI-926 FIXED FUI button will stay highlight(orange) if there are
 unread IMs when the conversation floater is minimized.

---
 indra/newview/llfloaterimcontainer.cpp | 2 ++
 indra/newview/llimview.cpp             | 2 +-
 indra/newview/lltoolbarview.cpp        | 4 ++--
 indra/newview/lltoolbarview.h          | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5432e68f14..8b38e54a8e 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -47,6 +47,7 @@
 #include "llfloaterpreference.h"
 #include "llimview.h"
 #include "llnotificationsutil.h"
+#include "lltoolbarview.h"
 #include "lltransientfloatermgr.h"
 #include "llviewercontrol.h"
 #include "llconversationview.h"
@@ -597,6 +598,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b)
 	//Switching from minimized to un-minimized
 	if(was_minimized && !b)
 	{
+		gToolBarView->flashCommand(LLCommandId("chat"), false);
 		LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession);
 
 		if(session_floater && !session_floater->isTornOff())
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 8d055be263..ecd22a5c1b 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -336,7 +336,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 		{
 			if(!gAgent.isDoNotDisturb())
 			{
-				gToolBarView->flashCommand(LLCommandId("chat"), true);
+				gToolBarView->flashCommand(LLCommandId("chat"), true, im_box->isMinimized());
 			}
 			else
 			{
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index b2318f9158..4f2c99fba8 100755
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -180,13 +180,13 @@ S32 LLToolBarView::stopCommandInProgress(const LLCommandId& commandId)
 	return command_location;
 }
 
-S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash)
+S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing/* = false */)
 {
 	S32 command_location = hasCommand(commandId);
 
 	if (command_location != TOOLBAR_NONE)
 	{
-		mToolbars[command_location]->flashCommand(commandId, flash);
+		mToolbars[command_location]->flashCommand(commandId, flash, force_flashing);
 	}
 
 	return command_location;
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 7125dd9990..dcc3862074 100755
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -90,7 +90,7 @@ public:
 	S32 removeCommand(const LLCommandId& commandId, int& rank);	// Sets the rank the removed command was at, RANK_NONE if not found
 	S32 enableCommand(const LLCommandId& commandId, bool enabled);
 	S32 stopCommandInProgress(const LLCommandId& commandId);
-	S32 flashCommand(const LLCommandId& commandId, bool flash);
+	S32 flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing = false);
 
 	// Loads the toolbars from the existing user or default settings
 	bool loadToolbars(bool force_default = false);	// return false if load fails
-- 
cgit v1.2.3


From e65de16ea11079040d01dbc255b69b08c61d7263 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Tue, 11 Jun 2013 16:06:24 +0300
Subject: CHUI-974 FIXED "resident" accounts unable to see favorite landmarks
 on login screen

---
 indra/newview/llpanellogin.cpp | 33 +--------------------------------
 1 file changed, 1 insertion(+), 32 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index bcb90bcb56..911ecaad9d 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -82,10 +82,6 @@ const S32 MAX_PASSWORD = 16;
 LLPanelLogin *LLPanelLogin::sInstance = NULL;
 BOOL LLPanelLogin::sCapslockDidNotification = FALSE;
 
-// Helper for converting a user name into the canonical "Firstname Lastname" form.
-// For new accounts without a last name "Resident" is added as a last name.
-static std::string canonicalize_username(const std::string& name);
-
 class LLLoginRefreshHandler : public LLCommandHandler
 {
 public:
@@ -266,7 +262,6 @@ void LLPanelLogin::addFavoritesToStartLocation()
 
 	// Load favorites into the combo.
 	std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
-	std::string canonical_user_name = canonicalize_username(user_defined_name);
 	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
 	LLSD fav_llsd;
 	llifstream file;
@@ -279,7 +274,7 @@ void LLPanelLogin::addFavoritesToStartLocation()
 		// The account name in stored_favorites.xml has Resident last name even if user has
 		// a single word account name, so it can be compared case-insensitive with the
 		// user defined "firstname lastname".
-		S32 res = LLStringUtil::compareInsensitive(canonical_user_name, iter->first);
+		S32 res = LLStringUtil::compareInsensitive(user_defined_name, iter->first);
 		if (res != 0)
 		{
 			lldebugs << "Skipping favorites for " << iter->first << llendl;
@@ -1012,29 +1007,3 @@ void LLPanelLogin::onLocationSLURL()
 
 	LLStartUp::setStartSLURL(location); // calls onUpdateStartSLURL, above 
 }
-
-
-std::string canonicalize_username(const std::string& name)
-{
-	std::string cname = name;
-	LLStringUtil::trim(cname);
-
-	// determine if the username is a first/last form or not.
-	size_t separator_index = cname.find_first_of(" ._");
-	std::string first = cname.substr(0, separator_index);
-	std::string last;
-	if (separator_index != cname.npos)
-	{
-		last = cname.substr(separator_index+1, cname.npos);
-		LLStringUtil::trim(last);
-	}
-	else
-	{
-		// ...on Linden grids, single username users as considered to have
-		// last name "Resident"
-		last = "Resident";
-	}
-
-	// Username in traditional "firstname lastname" form.
-	return first + ' ' + last;
-}
-- 
cgit v1.2.3


From 4f7b8a7e861ee25f1e0f7b0df2e9c8372254f46d Mon Sep 17 00:00:00 2001
From: Cinders <cinder.roxley@phoenixviewer.com>
Date: Tue, 11 Jun 2013 18:54:54 -0600
Subject: STORM-1952: Add a confirmation modal when ejecting a member from a
 group

---
 indra/newview/llpanelgrouproles.cpp                | 66 ++++++++++++++++------
 indra/newview/llpanelgrouproles.h                  |  1 +
 .../newview/skins/default/xui/en/notifications.xml | 27 +++++++++
 3 files changed, 78 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index cfdac11d26..d225a4c324 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1101,27 +1101,61 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
 }
 
 void LLPanelGroupMembersSubTab::handleEjectMembers()
-{
-	//send down an eject message
-	uuid_vec_t selected_members;
-
+{	
 	std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
 	if (selection.empty()) return;
-
-	std::vector<LLScrollListItem*>::iterator itor;
-	for (itor = selection.begin() ; 
-		 itor != selection.end(); ++itor)
+	
+	S32 selection_count = selection.size();
+	if (selection_count == 1)
 	{
-		LLUUID member_id = (*itor)->getUUID();
-		selected_members.push_back( member_id );
+		LLSD args;
+		std::string fullname;
+		gCacheName->getFullName(mMembersList->getValue(), fullname);
+		args["AVATAR_NAME"] = fullname;
+		LLSD payload;
+		LLNotificationsUtil::add("EjectGroupMemberWarning",
+								 args,
+								 payload,
+								 boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
 	}
+	else
+	{
+		LLSD args;
+		args["COUNT"] = llformat("%d", selection_count);
+		LLSD payload;
+		LLNotificationsUtil::add("EjectGroupMembersWarning",
+								 args,
+								 payload,
+								 boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
+	}
+}
 
-	mMembersList->deleteSelectedItems();
-
-	sendEjectNotifications(mGroupID, selected_members);
-
-	LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID,
-									 selected_members);
+bool LLPanelGroupMembersSubTab::handleEjectCallback(const LLSD& notification, const LLSD& response)
+{
+	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+	if (0 == option) // Eject button
+	{
+		//send down an eject message
+		uuid_vec_t selected_members;
+		
+		std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
+		if (selection.empty()) return false;
+		
+		std::vector<LLScrollListItem*>::iterator itor;
+		for (itor = selection.begin() ;
+			 itor != selection.end(); ++itor)
+		{
+			LLUUID member_id = (*itor)->getUUID();
+			selected_members.push_back( member_id );
+		}
+		
+		mMembersList->deleteSelectedItems();
+		
+		sendEjectNotifications(mGroupID, selected_members);
+		
+		LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID, selected_members);
+	}
+	return false;
 }
 
 void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members)
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 78bb3c57a1..0cf272f3ee 100755
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -167,6 +167,7 @@ public:
 	static void onEjectMembers(void*);
 	void handleEjectMembers();
 	void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members);
+	bool handleEjectCallback(const LLSD& notification, const LLSD& response);
 
 	static void onRoleCheck(LLUICtrl* check, void* user_data);
 	void handleRoleCheck(const LLUUID& role_id,
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 970a11c6c4..620154fe51 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -506,6 +506,33 @@ Add this Ability to &apos;[ROLE_NAME]&apos;?
      notext="No"
      yestext="Yes"/>
   </notification>
+  
+  <notification
+    icon="alertmodal.tga"
+    name="EjectGroupMemberWarning"
+    type="alertmodal">
+     You are about to eject [AVATAR_NAME] from the group.
+     <tag>group</tag>
+     <tag>confirm</tag>
+     <usetemplate
+      ignoretext="Confirm ejecting a participant from group"
+      name="okcancelignore"
+      notext="Cancel"
+      yestext="Eject"/>
+  </notification>
+  <notification
+    icon="alertmodal.tga"
+    name="EjectGroupMembersWarning"
+    type="alertmodal">
+     You are about to eject [COUNT] members from the group.
+     <tag>group</tag>
+     <tag>confirm</tag>
+     <usetemplate
+      ignoretext="Confirm ejecting multiple members from group"
+      name="okcancelignore"
+      notext="Cancel"
+      yestext="Eject"/>
+  </notification>
 
   <notification
    icon="alertmodal.tga"
-- 
cgit v1.2.3


From 452832b26f0d4c4e94da7ebd9b98f2fc337950c3 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 12 Jun 2013 15:05:15 +0300
Subject: CHUI-976 FIXED Correct way to show Nearby chat is used now.

---
 indra/newview/llchatitemscontainerctrl.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index a1a9463d43..46fd7996d4 100755
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -323,12 +323,12 @@ BOOL	LLFloaterIMNearbyChatToastPanel::handleMouseUp	(S32 x, S32 y, MASK mask)
 			return TRUE;
 		else
 		{
-			(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->showHistory();
+			LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat");
 			return FALSE;
 		}
 	}
 
-	(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->showHistory();
+	LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat");
 	return LLPanel::handleMouseUp(x,y,mask);
 }
 
-- 
cgit v1.2.3


From 2a93df9888c8a755b51a5a9e39e089550ca9d1f2 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Wed, 12 Jun 2013 19:22:27 +0300
Subject: CHUI-896 ADD FIX Line flashing and FUI button flashing not working
 correctly for CHUI notifications 1) Fixed line flashing upon conversation
 floater opening (previously was highlight only) 2) Fixed line highlight (and
 flashing) clearing when clicking Chat input field

---
 indra/newview/llfloaterimsessiontab.cpp | 10 ++++++++++
 indra/newview/llfloaterimsessiontab.h   |  2 ++
 indra/newview/llimview.cpp              |  3 +--
 3 files changed, 13 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 53b439b32e..559e9ab23f 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -270,6 +270,7 @@ BOOL LLFloaterIMSessionTab::postBuild()
 	mInputPanels = getChild<LLLayoutStack>("input_panels");
 	
 	mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this));
+	mInputEditor->setMouseUpCallback(boost::bind(&LLFloaterIMSessionTab::onInputEditorClicked, this));
 	mInputEditor->setCommitOnFocusLost( FALSE );
 	mInputEditor->setPassDelete(TRUE);
 	mInputEditor->setFont(LLViewerChat::getChatFont());
@@ -399,6 +400,15 @@ void LLFloaterIMSessionTab::onFocusLost()
 	LLTransientDockableFloater::onFocusLost();
 }
 
+void LLFloaterIMSessionTab::onInputEditorClicked()
+{
+	LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance();
+	if (im_box)
+	{
+		im_box->flashConversationItemWidget(mSessionID,false);
+	}
+}
+
 std::string LLFloaterIMSessionTab::appendTime()
 {
 	time_t utc_time;
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index e5f17a25f4..e7b05a584b 100755
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -203,6 +203,8 @@ private:
 	 */
 	void reshapeChatLayoutPanel();
 
+	void onInputEditorClicked();
+
 	bool checkIfTornOff();
     bool mIsHostAttached;
     bool mHasVisibleBeenInitialized;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ecd22a5c1b..b43e9296f9 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -311,10 +311,9 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 			}
 			else
 			{
-				if ((is_dnd_msg && (ON_TOP == conversations_floater_status || 
+				if (is_dnd_msg && (ON_TOP == conversations_floater_status || 
 									NOT_ON_TOP == conversations_floater_status || 
 									CLOSED == conversations_floater_status))
-					|| CLOSED == conversations_floater_status)
 				{
 					im_box->highlightConversationItemWidget(session_id, true);
 				}
-- 
cgit v1.2.3


From 882ab04ef3e412716f0f034e348007b5f3016f3c Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Thu, 13 Jun 2013 20:21:24 +0300
Subject: CHUI-809 (Right-click menu on user name in compat chat mode doesn't
 have "IM") Added callback for friendship checking

---
 indra/newview/llchathistory.cpp                       | 1 +
 indra/newview/llpanelprofile.cpp                      | 6 ++++++
 indra/newview/skins/default/xui/en/menu_url_agent.xml | 9 ++++++++-
 indra/newview/skins/default/xui/en/strings.xml        | 3 ++-
 4 files changed, 17 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 0f138873ac..af3c6eff11 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -628,6 +628,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
 	editor_params.enabled = false; // read only
 	editor_params.show_context_menu = "true";
 	mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);
+	mEditor->setIsFriendCallback(LLAvatarActions::isFriend);
 }
 
 LLSD LLChatHistory::getValue() const
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index e2e7006773..3b95b46476 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -137,6 +137,12 @@ public:
 			return true;
 		}
 
+		if (verb == "removefriend")
+		{
+			LLAvatarActions::removeFriendDialog(avatar_id);
+			return true;
+		}
+
 		if (verb == "mute")
 		{
 			if (! LLAvatarActions::isBlocked(avatar_id))
diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml
index 7cd56f257a..e8b6116026 100755
--- a/indra/newview/skins/default/xui/en/menu_url_agent.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml
@@ -21,8 +21,15 @@
      layout="topleft"
      name="add_friend">
         <menu_item_call.on_click
-         function="Url.AddFriend" />        
+         function="Url.AddFriend" />
     </menu_item_call>
+    <menu_item_call
+     label="Remove Friend..."
+     layout="topleft"
+     name="remove_friend">
+        <menu_item_call.on_click
+         function="Url.RemoveFriend" />
+        </menu_item_call>
     <menu_item_separator
      layout="topleft" />
     <menu_item_call
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 3b57ff5fd6..521aed698a 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -209,7 +209,8 @@ Please try logging in again in a minute.</string>
 	<string name="SLappAgentIM">IM</string>
 	<string name="SLappAgentPay">Pay</string>
 	<string name="SLappAgentOfferTeleport">Offer Teleport to </string>
-	<string name="SLappAgentRequestFriend">Friend Request </string>
+	<string name="SLappAgentRequestFriend">Friend Request</string>
+  <string name="SLappAgentRemoveFriend">Friend Removal</string>
 
 	<!-- ButtonToolTips, llfloater.cpp -->
 	<string name="BUTTON_CLOSE_DARWIN">Close (&#8984;W)</string>
-- 
cgit v1.2.3


From 9b23298970e930aff0f46b70724eaf110cb05d81 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Thu, 13 Jun 2013 15:40:12 -0400
Subject: STORM-1953 Notifications that involve deleting something -- errors in
 text

---
 indra/newview/skins/default/xui/en/notifications.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 970a11c6c4..4cad8482d0 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2682,7 +2682,7 @@ Please enter a higher price.
    icon="alertmodal.tga"
    name="ConfirmItemDeleteHasLinks"
    type="alertmodal">
-At least one of the items you has link items that point to it.  If you delete this item, its links will permanently stop working.  It is strongly advised to delete the links first.
+At least one of the items has links that point to it.  If you delete this item, its links will permanently stop working.  It is strongly advised to delete the links first.
 
 Are you sure you want to delete these items?
     <tag>confirm</tag>
@@ -2724,7 +2724,7 @@ Are you sure you want to delete these items?
    icon="alertmodal.tga"
    name="ConfirmObjectDeleteNoOwn"
    type="alertmodal">
-You do not own least one of the items you have selected.
+You do not own at least one of the items you have selected.
 
 Are you sure you want to delete these items?
     <tag>confirm</tag>
@@ -2754,7 +2754,7 @@ Are you sure you want to delete these items?
    name="ConfirmObjectDeleteLockNoOwn"
    type="alertmodal">
 At least one object is locked.
-You do not own least one object.
+You do not own at least one object.
 
 Are you sure you want to delete these items?
     <tag>confirm</tag>
@@ -2769,7 +2769,7 @@ Are you sure you want to delete these items?
    name="ConfirmObjectDeleteNoCopyNoOwn"
    type="alertmodal">
 At least one object is not copyable.
-You do not own least one object.
+You do not own at least one object.
 
 Are you sure you want to delete these items?
     <tag>confirm</tag>
@@ -2785,13 +2785,13 @@ Are you sure you want to delete these items?
    type="alertmodal">
 At least one object is locked.
 At least one object is not copyable.
-You do not own least one object.
+You do not own at least one object.
 
 Are you sure you want to delete these items?
     <tag>confirm</tag>
     <usetemplate
      name="okcancelbuttons"
-     notext="cancel"
+     notext="Cancel"
      yestext="OK"/>
   </notification>
 
-- 
cgit v1.2.3


From f29fab5f73fc6dc0eefd0a623c69640abdcba3e8 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 17 Jun 2013 20:14:56 +0300
Subject: CHUI-506 FIXED Don't change dropdown position if items are unchanged.

---
 indra/newview/llfavoritesbar.cpp | 7 ++++++-
 indra/newview/llfavoritesbar.h   | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6d90667194..b35ef3a961 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -400,6 +400,8 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
 	mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
 	addChild(mMoreTextBox);
 
+	mDropDownItemsCount = 0;
+
 	LLTextBox::Params label_param(p.label);
 	mBarLabel = LLUICtrlFactory::create<LLTextBox> (label_param);
 	addChild(mBarLabel);
@@ -820,11 +822,13 @@ void LLFavoritesBarCtrl::updateButtons()
 		}
 		// Update overflow menu
 		LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get());
-		if (overflow_menu && overflow_menu->getVisible())
+		if (overflow_menu && overflow_menu->getVisible() && (overflow_menu->getItemCount() != mDropDownItemsCount))
 		{
 			overflow_menu->setVisible(FALSE);
 			if (mUpdateDropDownItems)
+			{
 				showDropDownMenu();
+			}
 		}
 	}
 	else
@@ -940,6 +944,7 @@ void LLFavoritesBarCtrl::showDropDownMenu()
 		menu->updateParent(LLMenuGL::sMenuContainer);
 		menu->setButtonRect(mMoreTextBox->getRect(), this);
 		positionAndShowMenu(menu);
+		mDropDownItemsCount = menu->getItemCount();
 	}
 }
 
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index f06e9b9b64..211d3c4ce3 100755
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -101,6 +101,7 @@ protected:
 	LLUUID mFavoriteFolderId;
 	const LLFontGL *mFont;
 	S32 mFirstDropDownItem;
+	S32 mDropDownItemsCount;
 	bool mUpdateDropDownItems;
 	bool mRestoreOverflowMenu;
 
-- 
cgit v1.2.3


From f922605ec68aace1ac9f039efc4b497a315326e8 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 18 Jun 2013 20:43:18 +0300
Subject: CHUI-979 FIXED Clear highlight after clicking in chat input. Do not
 flash chat button if current conversation is focused and torned off.

---
 indra/newview/llfloaterimsessiontab.cpp | 1 +
 indra/newview/llimview.cpp              | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 559e9ab23f..0ccfdb9a7b 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -407,6 +407,7 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
 	{
 		im_box->flashConversationItemWidget(mSessionID,false);
 	}
+	gToolBarView->flashCommand(LLCommandId("chat"), false);
 }
 
 std::string LLFloaterIMSessionTab::appendTime()
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b43e9296f9..afe1f72019 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -173,7 +173,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
 	LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
 	bool store_dnd_message = false; // flag storage of a dnd message
-
+	bool is_session_focused = session_floater->isTornOff() && session_floater->hasFocus();
 	if (!LLFloater::isVisible(im_box) || im_box->isMinimized())
 	{
 		conversations_floater_status = CLOSED;
@@ -329,6 +329,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	if (("toast" == user_preferences || "flash" == user_preferences) &&
 		(CLOSED == conversations_floater_status
 		|| NOT_ON_TOP == conversations_floater_status)
+		&& !is_session_focused
 		&& !is_dnd_msg) //prevent flashing FUI button because the conversation floater will have already opened
 	{
 		if(!LLMuteList::getInstance()->isMuted(participant_id))
-- 
cgit v1.2.3


From db803e193efee4a54fc0ca3a7fe1a6d4e089c06a Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Wed, 19 Jun 2013 13:51:12 -0700
Subject: Merge conflict mixup, use noaction instead of none for user
 preference

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

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6ca94436c6..09f47c136f 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -252,7 +252,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
 	// actions:
 
     // 0. nothing - exit
-    if (("none" == user_preferences ||
+    if (("noaction" == user_preferences ||
     		ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
     	&& session_floater->isMessagePaneExpanded())
     {
-- 
cgit v1.2.3


From 2b8beeeff1485682e2b47f330dc8b3c24e966961 Mon Sep 17 00:00:00 2001
From: mberezhnoy <mberezhnoy@productengine.com>
Date: Thu, 20 Jun 2013 12:45:22 +0300
Subject: CHUI-809 (Right-click menu on user name in compat chat mode doesn't
 have "IM") Fixed "Add friend" option always being greyed out, add ability to
 block object via context menu in compact chat mode.

---
 indra/newview/llpanelprofile.cpp                         | 14 ++++++++++++++
 indra/newview/skins/default/xui/en/menu_url_objectim.xml |  7 +++++++
 2 files changed, 21 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3b95b46476..5acc98904b 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -36,6 +36,8 @@
 #include "lltabcontainer.h"
 #include "llviewercontrol.h"
 #include "llviewernetwork.h"
+#include "llmutelist.h"
+#include "llpanelblockedlist.h"
 
 static const std::string PANEL_PICKS = "panel_picks";
 
@@ -161,6 +163,18 @@ public:
 			return true;
 		}
 
+		if (verb == "block")
+		{
+			if (params.size() > 2)
+			{
+				const std::string object_name = params[2].asString();
+				LLMute mute(avatar_id, object_name, LLMute::OBJECT);
+				LLMuteList::getInstance()->add(mute);
+				LLPanelBlockedList::showPanelAndSelect(mute.mID);
+			}
+			return true;
+		}
+
 		return false;
 	}
 };
diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
index 87ab58e622..b9d003b841 100755
--- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
@@ -9,6 +9,13 @@
         <menu_item_call.on_click
          function="Url.Execute" />
     </menu_item_call>
+    <menu_item_call
+     label="Block..."
+     layout="topleft"
+     name="block_object">
+        <menu_item_call.on_click
+         function="Url.Block" />
+    </menu_item_call>
     <menu_item_separator
      layout="topleft" />
     <menu_item_call
-- 
cgit v1.2.3


From 725b107e0861c9370c56baf7c876fb7e3c37857a Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Thu, 20 Jun 2013 20:11:15 +0300
Subject: CHUI-850 FIXED Unread notifications are lost after relog in certain
 circumstances

---
 indra/newview/llchannelmanager.cpp                 |  2 --
 .../newview/lldonotdisturbnotificationstorage.cpp  |  3 ++-
 indra/newview/llnotificationstorage.h              |  1 +
 indra/newview/llpersistentnotificationstorage.cpp  | 24 +++++++++++++++++++---
 indra/newview/llpersistentnotificationstorage.h    |  3 +++
 indra/newview/llstartup.cpp                        |  6 ++++++
 6 files changed, 33 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 43757d0174..8b2d9e639f 100755
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -139,8 +139,6 @@ void LLChannelManager::onLoginCompleted()
 	}
 
 	LLPersistentNotificationStorage::getInstance()->loadNotifications();
-
-	LLDoNotDisturbNotificationStorage::getInstance()->initialize();
 	LLDoNotDisturbNotificationStorage::getInstance()->loadNotifications();
 }
 
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 71bc4f15d2..495cd01349 100755
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -70,7 +70,7 @@ BOOL LLDoNotDisturbNotificationStorageTimer::tick()
 
 LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage()
 	: LLSingleton<LLDoNotDisturbNotificationStorage>()
-	, LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml"))
+	, LLNotificationStorage("")
     , mDirty(false)
 {
     nameToPayloadParameterMap[toastName] = "SESSION_ID";
@@ -83,6 +83,7 @@ LLDoNotDisturbNotificationStorage::~LLDoNotDisturbNotificationStorage()
 
 void LLDoNotDisturbNotificationStorage::initialize()
 {
+	setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml"));
 	getCommunicationChannel()->connectFailedFilter(boost::bind(&LLDoNotDisturbNotificationStorage::onChannelChanged, this, _1));
 }
 
diff --git a/indra/newview/llnotificationstorage.h b/indra/newview/llnotificationstorage.h
index 7aabf7d09e..53fd898ea4 100755
--- a/indra/newview/llnotificationstorage.h
+++ b/indra/newview/llnotificationstorage.h
@@ -44,6 +44,7 @@ public:
 protected:
 	bool writeNotifications(const LLSD& pNotificationData) const;
 	bool readNotifications(LLSD& pNotificationData) const;
+	void setFileName(std::string pFileName) {mFileName = pFileName;}
 
 	LLNotificationResponderInterface* createResponder(const std::string& pNotificationName, const LLSD& pParams) const;
 
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index 666f10df96..076c3e0235 100755
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -38,7 +38,8 @@
 
 LLPersistentNotificationStorage::LLPersistentNotificationStorage()
 	: LLSingleton<LLPersistentNotificationStorage>()
-	, LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"))
+	, LLNotificationStorage("")
+	, mLoaded(false)
 {
 }
 
@@ -89,8 +90,13 @@ void LLPersistentNotificationStorage::loadNotifications()
 
 	LL_INFOS("LLPersistentNotificationStorage") << "start loading notifications" << LL_ENDL;
 
-	LLNotifications::instance().getChannel("Persistent")->
-		connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
+	if (mLoaded)
+	{
+		LL_INFOS("LLPersistentNotificationStorage") << "notifications already loaded, exiting" << LL_ENDL;
+		return;
+	}
+
+	mLoaded = true;
 
 	LLSD input;
 	if (!readNotifications(input) ||input.isUndefined())
@@ -135,8 +141,20 @@ void LLPersistentNotificationStorage::loadNotifications()
 	LL_INFOS("LLPersistentNotificationStorage") << "finished loading notifications" << LL_ENDL;
 }
 
+void LLPersistentNotificationStorage::initialize()
+{
+	setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"));
+	LLNotifications::instance().getChannel("Persistent")->
+		connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
+}
+
 bool LLPersistentNotificationStorage::onPersistentChannelChanged(const LLSD& payload)
 {
+	// In case we received channel changed signal but haven't yet loaded notifications, do it
+	if (!mLoaded)
+	{
+		loadNotifications();
+	}
 	// we ignore "load" messages, but rewrite the persistence file on any other
 	const std::string sigtype = payload["sigtype"].asString();
 	if ("load" != sigtype)
diff --git a/indra/newview/llpersistentnotificationstorage.h b/indra/newview/llpersistentnotificationstorage.h
index 98a825d2c1..bf0306380e 100755
--- a/indra/newview/llpersistentnotificationstorage.h
+++ b/indra/newview/llpersistentnotificationstorage.h
@@ -53,10 +53,13 @@ public:
 	void saveNotifications();
 	void loadNotifications();
 
+	void initialize();
+
 protected:
 
 private:
 	bool onPersistentChannelChanged(const LLSD& payload);
+	bool mLoaded;
 };
 
 #endif // LL_LLPERSISTENTNOTIFICATIONSTORAGE_H
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index cff3a7e02a..67a76460a7 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -51,6 +51,7 @@
 #include "lllandmark.h"
 #include "llcachename.h"
 #include "lldir.h"
+#include "lldonotdisturbnotificationstorage.h"
 #include "llerrorcontrol.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
@@ -68,6 +69,7 @@
 #include "llfloaterimnearbychat.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
+#include "llpersistentnotificationstorage.h"
 #include "llteleporthistory.h"
 #include "llregionhandle.h"
 #include "llsd.h"
@@ -900,6 +902,10 @@ bool idle_startup()
 		gDirUtilp->setLindenUserDir(userid);
 		LLFile::mkdir(gDirUtilp->getLindenUserDir());
 
+		// As soon as directories are ready initialize notification storages
+		LLPersistentNotificationStorage::getInstance()->initialize();
+		LLDoNotDisturbNotificationStorage::getInstance()->initialize();
+
 		// Set PerAccountSettingsFile to the default value.
 		gSavedSettings.setString("PerAccountSettingsFile",
 			gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, 
-- 
cgit v1.2.3


From b7ac6c6b537fe144f2f9b01d04c3c87103bad548 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 24 Jun 2013 16:49:47 -0400
Subject: CHOP-955, CHOP-957: Platform-specific switches files =>
 settings_install.xml. Instead of generating viewer command-line switch
 overrides into the Windows shortcut, an arguments.txt file on Mac, or a
 gridargs.dat file on Linux, generate a platform-independent
 settings_install.xml file containing 'sourceid' key (if 'sourceid' found in
 TeamCity environment variables). All command-line override switches
 previously found in the aforementioned files have happily become moot.

---
 indra/newview/viewer_manifest.py | 76 +++++++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 33 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 35451c9621..eb2cd73cc9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -34,9 +34,13 @@ import tarfile
 import time
 import random
 viewer_dir = os.path.dirname(__file__)
-# add llmanifest library to our path so we don't have to muck with PYTHONPATH
-sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
-from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
+# add indra/lib/python to our path so we don't have to muck with PYTHONPATH
+sys.path.append(os.path.join(viewer_dir, os.pardir, "lib", "python"))
+from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
+try:
+    from llbase import llsd
+except ImportError:
+    from indra.base import llsd
 
 class ViewerManifest(LLManifest):
     def is_packaging_viewer(self):
@@ -99,6 +103,21 @@ class ViewerManifest(LLManifest):
                     self.path("dictionaries")
                     self.end_prefix(pkgdir)
 
+                # CHOP-955: If we have "sourceid" in the build process
+                # environment, generate it into settings_install.xml.
+                try:
+                    sourceid = os.environ["sourceid"]
+                except KeyError:
+                    # no sourceid, no settings_install.xml file
+                    pass
+                else:
+                    # Single-entry subset of the LLSD content of settings.xml
+                    content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
+                                                 Persist=1,
+                                                 Type='String',
+                                                 Value=sourceid))
+                    self.put_in_file(llsd.format_pretty_xml(content), "settings_install.xml")
+
                 self.end_prefix("app_settings")
 
             if self.prefix(src="character"):
@@ -196,24 +215,26 @@ class ViewerManifest(LLManifest):
         """ Convenience function that returns the command-line flags
         for the grid"""
 
-        # Set command line flags relating to the target grid
-        grid_flags = ''
-        if not self.default_grid():
-            grid_flags = "--grid %(grid)s "\
-                         "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
-                           {'grid':self.grid()}
-
-        # Deal with settings 
-        setting_flags = ''
-        if not self.default_channel() or not self.default_grid():
-            if self.default_grid():
-                setting_flags = '--settings settings_%s.xml'\
-                                % self.channel_lowerword()
-            else:
-                setting_flags = '--settings settings_%s_%s.xml'\
-                                % (self.grid(), self.channel_lowerword())
-                                                
-        return " ".join((grid_flags, setting_flags)).strip()
+        # The original role of this method seems to have been to build a
+        # grid-specific viewer: one that would, on launch, preselect a
+        # particular grid. (Apparently that dates back to when the protocol
+        # between viewer and simulator required them to be updated in
+        # lockstep, so that "the beta grid" required "a beta viewer.") But
+        # those viewer command-line switches no longer work without tweaking
+        # user_settings/grids.xml. In fact, going forward, it's unclear what
+        # use case that would address.
+
+        # This method also set a channel-specific (or grid-and-channel-
+        # specific) user_settings/settings_something.xml file. It has become
+        # clear that saving user settings in a channel-specific file causes
+        # more problems (confusion) than it solves, so we've discontinued that.
+
+        # In fact we now avoid forcing viewer command-line switches at all,
+        # instead introducing a settings_install.xml file. Command-line
+        # switches don't aggregate well; for instance the generated --channel
+        # switch actually prevented the user specifying --channel on the
+        # command line. Settings files have well-defined override semantics.
+        return None
 
     def extract_names(self,src):
         try:
@@ -529,8 +550,7 @@ class WindowsManifest(ViewerManifest):
             'final_exe' : self.final_exe(),
             'grid':self.args['grid'],
             'grid_caps':self.args['grid'].upper(),
-            # escape quotes becase NSIS doesn't handle them well
-            'flags':self.flags_list().replace('"', '$\\"'),
+            'flags':'',
             'channel':self.channel(),
             'channel_oneword':self.channel_oneword(),
             'channel_unique':self.channel_unique(),
@@ -757,9 +777,6 @@ class DarwinManifest(ViewerManifest):
 
                     self.end_prefix("llplugin")
 
-                # command line arguments for connecting to the proper grid
-                self.put_in_file(self.flags_list(), 'arguments.txt')
-
                 self.end_prefix("Resources")
 
             self.end_prefix("Contents")
@@ -805,10 +822,6 @@ class DarwinManifest(ViewerManifest):
                                  'bundle': self.get_dst_prefix()
                 })
 
-        channel_standin = 'Second Life Viewer'  # hah, our default channel is not usable on its own
-        if not self.default_channel():
-            channel_standin = self.channel()
-
         imagename="SecondLife_" + '_'.join(self.args['version'])
 
         # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
@@ -926,9 +939,6 @@ class LinuxManifest(ViewerManifest):
             self.path("install.sh")
             self.end_prefix("linux_tools")
 
-        # Create an appropriate gridargs.dat for this package, denoting required grid.
-        self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
-
         if self.prefix(src="", dst="bin"):
             self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
             self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
-- 
cgit v1.2.3


From 316f1fd02629f6cdae6d08644c8d45085dd19166 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 25 Jun 2013 17:08:16 -0400
Subject: CHOP-957: Stop reading gridargs.dat in 'secondlife' wrapper script.
 However, for backwards compatibility, continue to recognize and discard
 --skip-gridargs switch.

---
 indra/newview/linux_tools/wrapper.sh | 34 +++++++++-------------------------
 1 file changed, 9 insertions(+), 25 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh
index d8440eebf1..c23401d5a6 100755
--- a/indra/newview/linux_tools/wrapper.sh
+++ b/indra/newview/linux_tools/wrapper.sh
@@ -121,37 +121,21 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
 
 export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}"
 
-# Have to deal specially with gridargs.dat; typical contents look like:
-# --channel "Second Life Test"  --settings settings_test.xml
-# Simply embedding $(<etc/gridargs.dat) into a command line treats each of
-# Second, Life and Developer as separate args -- no good. We need bash to
-# process quotes using eval.
-# First, check if we have been instructed to skip reading in gridargs.dat:
-skip_gridargs=false
-argnum=0
+# Copy "$@" to ARGS array specifically to delete the --skip-gridargs switch.
+# The gridargs.dat file is no more, but we still want to avoid breaking
+# scripts that invoke this one with --skip-gridargs.
+ARGS=()
 for ARG in "$@"; do
-    if [ "--skip-gridargs" == "$ARG" ]; then
-        skip_gridargs=true
-    else
-        ARGS[$argnum]="$ARG"
-        argnum=$(($argnum+1))
+    if [ "--skip-gridargs" != "$ARG" ]; then
+        ARGS[${#ARGS[*]}]="$ARG"
     fi
 done
 
-# Second, read it without scanning, then scan that string. Break quoted words
-# into a bash array. Note that if gridargs.dat is empty, or contains only
-# whitespace, the resulting gridargs array will be empty -- zero entries --
-# therefore "${gridargs[@]}" entirely vanishes from the command line below,
-# just as we want.
-if ! $skip_gridargs ; then
-    eval gridargs=("$(<etc/gridargs.dat)")
-fi
-
 # Run the program.
 # Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the
-# command line. But DO quote "$@": preserve separate args as individually
-# quoted. Similar remarks about the contents of gridargs.
-$LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${gridargs[@]}" "${ARGS[@]}"
+# command line. But DO quote "${ARGS[@]}": preserve separate args as
+# individually quoted.
+$LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${ARGS[@]}"
 LL_RUN_ERR=$?
 
 # Handle any resulting errors
-- 
cgit v1.2.3


From b0d7619f20c7ec3da0f9f19dfcc9162c6f0feb9a Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 25 Jun 2013 17:33:36 -0400
Subject: CHOP-957: Stop looking for, or parsing, Mac arguments.txt file.

---
 indra/newview/llappviewermacosx.cpp | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 4d340cafa9..c7b437598c 100755
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -148,28 +148,13 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
 	// The next two lines add the support for parsing the mac -psn_XXX arg.
 	clp.addOptionDesc("psn", NULL, 1, "MacOSX process serial number");
 	clp.setCustomParser(parse_psn);
-	
-    // First read in the args from arguments txt.
-    const char* filename = "arguments.txt";
-	llifstream ifs(filename, llifstream::binary);
-	if (!ifs.is_open())
-	{
-		llwarns << "Unable to open file" << filename << llendl;
-		return false;
-	}
-	
-	if(clp.parseCommandLineFile(ifs) == false)
-	{
-		return false;
-	}
 
-	// Then parse the user's command line, so that any --url arg can appear last
-	// Succesive calls to clp.parse... will NOT override earlier options. 
+	// parse the user's command line
 	if(clp.parseCommandLine(gArgC, gArgV) == false)
 	{
 		return false;
 	}
-    	
+
 	// Get the user's preferred language string based on the Mac OS localization mechanism.
 	// To add a new localization:
 		// go to the "Resources" section of the project
-- 
cgit v1.2.3


From 9da29e2ccc9d51553434ff6975287602420ac08f Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 26 Jun 2013 19:23:00 +0300
Subject: CHUI-983 FIXED Call showHistory() after clicking toast as it was
 before. Minor change in showHistory()

---
 indra/newview/llchatitemscontainerctrl.cpp | 5 ++---
 indra/newview/llfloaterimnearbychat.cpp    | 6 ++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 46fd7996d4..fd4f17b694 100755
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -323,12 +323,11 @@ BOOL	LLFloaterIMNearbyChatToastPanel::handleMouseUp	(S32 x, S32 y, MASK mask)
 			return TRUE;
 		else
 		{
-			LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat");
+			LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
 			return FALSE;
 		}
 	}
-
-	LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat");
+	LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
 	return LLPanel::handleMouseUp(x,y,mask);
 }
 
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 6bb3caadb9..59593d776b 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -350,11 +350,17 @@ bool LLFloaterIMNearbyChat::isChatVisible() const
 void LLFloaterIMNearbyChat::showHistory()
 {
 	openFloater();
+	LLFloaterIMContainer::getInstance()->selectConversation(LLUUID(NULL));
+
 	if(!isMessagePaneExpanded())
 	{
 		restoreFloater();
 		setFocus(true);
 	}
+	else
+	{
+		LLFloaterIMContainer::getInstance()->setFocus(TRUE);
+	}
 	setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
 }
 
-- 
cgit v1.2.3


From d5febe1ab553749808198ec4e0c78ec64d4d9588 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 27 Jun 2013 11:07:12 -0400
Subject: CHOP-956: Add settings_install.xml to settings_files.xml. Also
 clarify comment for ELLPath in lldir.h: ELLPath int values are read from
 settings_files.xml.

---
 indra/newview/app_settings/settings_files.xml | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml
index bfc09286e3..4a9e522a96 100755
--- a/indra/newview/app_settings/settings_files.xml
+++ b/indra/newview/app_settings/settings_files.xml
@@ -4,6 +4,9 @@
     <file name="Global"
           file_name="settings.xml"
           required="true"/>
+    <file name="Global"
+          file_name="settings_install.xml"
+          required="false"/>
     <file name="PerAccount"
           file_name="settings_per_account.xml"
           required="true"/>
-- 
cgit v1.2.3


From aa9282be1fca61445c49a91c7ad512bd6b561bf6 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Mon, 8 Jul 2013 16:03:01 +0300
Subject: CHUI-982 FIXED Clicking on conversation in conversation list to bring
 focus to conversation removes text entry prompt for chat bar

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

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 9bb9c826e5..54baaeee53 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -282,7 +282,7 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
 		LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
 		LLUUID session_id = item? item->getUUID() : LLUUID();
 		LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
-		if(!session_floater->getHost() && !session_floater->hasFocus())
+		if(!session_floater->hasFocus())
 		{
 			session_floater->setFocus(true);
 		}
-- 
cgit v1.2.3


From 13361137d0d2ccb750d6002826763579d3d1cc69 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 9 Jul 2013 15:13:38 +0300
Subject: CHUI-978 FIXED Load data from chat log file in separate thread to
 prevent viewer freeze

---
 indra/newview/llfloaterconversationpreview.cpp |  42 ++++-
 indra/newview/llfloaterconversationpreview.h   |   3 +
 indra/newview/lllogchat.cpp                    | 248 ++++++++++++++++++-------
 indra/newview/lllogchat.h                      |  21 +++
 indra/newview/skins/default/xui/en/strings.xml |   3 +
 5 files changed, 245 insertions(+), 72 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index a3d715530d..1a3fa27593 100755
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -50,6 +50,7 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i
 BOOL LLFloaterConversationPreview::postBuild()
 {
 	mChatHistory = getChild<LLChatHistory>("chat_history");
+	LLLoadHistoryThread::setLoadEndSignal(boost::bind(&LLFloaterConversationPreview::SetPages, this, _1, _2));
 
 	const LLConversation* conv = LLConversationLog::instance().getConversation(mSessionID);
 	std::string name;
@@ -70,7 +71,7 @@ BOOL LLFloaterConversationPreview::postBuild()
 		name = LLTrans::getString("NearbyChatTitle");
 		file = "chat";
 	}
-
+	mChatHistoryFileName = file;
 	LLStringUtil::format_map_t args;
 	args["[NAME]"] = name;
 	std::string title = getString("Title", args);
@@ -80,23 +81,46 @@ BOOL LLFloaterConversationPreview::postBuild()
 	load_params["load_all_history"] = true;
 	load_params["cut_off_todays_date"] = false;
 
-	LLLogChat::loadChatHistory(file, mMessages, load_params);
-	mCurrentPage = mMessages.size() / mPageSize;
 
+	LLSD loading;
+	loading[LL_IM_TEXT] = LLTrans::getString("loading_chat_logs");
+	mMessages.push_back(loading);
 	mPageSpinner = getChild<LLSpinCtrl>("history_page_spin");
 	mPageSpinner->setCommitCallback(boost::bind(&LLFloaterConversationPreview::onMoreHistoryBtnClick, this));
 	mPageSpinner->setMinValue(1);
-	mPageSpinner->setMaxValue(mCurrentPage + 1);
-	mPageSpinner->set(mCurrentPage + 1);
-
-	std::string total_page_num = llformat("/ %d", mCurrentPage + 1);
-	getChild<LLTextBox>("page_num_label")->setValue(total_page_num);
-
+	mPageSpinner->set(1);
+	mPageSpinner->setEnabled(false);
+	mChatHistoryLoaded = false;
+	LLLogChat::startChatHistoryThread(file, load_params);
 	return LLFloater::postBuild();
 }
 
+void LLFloaterConversationPreview::SetPages(std::list<LLSD>& messages, const std::string& file_name)
+{
+	if(file_name == mChatHistoryFileName)
+	{
+		mMessages = messages;
+
+
+		mCurrentPage = mMessages.size() / mPageSize;
+		mPageSpinner->setEnabled(true);
+		mPageSpinner->setMaxValue(mCurrentPage+1);
+		mPageSpinner->set(mCurrentPage+1);
+
+		std::string total_page_num = llformat("/ %d", mCurrentPage+1);
+		getChild<LLTextBox>("page_num_label")->setValue(total_page_num);
+		mChatHistoryLoaded = true;
+
+	}
+
+}
 void LLFloaterConversationPreview::draw()
 {
+	if(mChatHistoryLoaded)
+	{
+		showHistory();
+		mChatHistoryLoaded = false;
+	}
 	LLFloater::draw();
 }
 
diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h
index b17ae84b63..389f3dfd09 100755
--- a/indra/newview/llfloaterconversationpreview.h
+++ b/indra/newview/llfloaterconversationpreview.h
@@ -42,6 +42,7 @@ public:
 	virtual ~LLFloaterConversationPreview(){};
 
 	virtual BOOL postBuild();
+	void SetPages(std::list<LLSD>& messages,const std::string& file_name);
 
 	virtual void draw();
 	virtual void onOpen(const LLSD& key);
@@ -59,6 +60,8 @@ private:
 	std::list<LLSD> mMessages;
 	std::string		mAccountName;
 	std::string		mCompleteName;
+	std::string     mChatHistoryFileName;
+	bool			mChatHistoryLoaded;
 };
 
 #endif /* LLFLOATERCONVERSATIONPREVIEW_H_ */
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 379bbc5f8d..afaec48e7b 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -25,7 +25,7 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-
+#include "llfloaterconversationpreview.h"
 #include "llagent.h"
 #include "llagentui.h"
 #include "llavatarnamecache.h"
@@ -206,6 +206,7 @@ private:
 };
 
 LLLogChat::save_history_signal_t * LLLogChat::sSaveHistorySignal = NULL;
+LLLoadHistoryThread::load_end_signal_t * LLLoadHistoryThread::mLoadEndSignal = NULL;
 
 //static
 std::string LLLogChat::makeLogFileName(std::string filename)
@@ -336,75 +337,83 @@ void LLLogChat::saveHistory(const std::string& filename,
 void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params)
 {
 	if (file_name.empty())
-	{
-		llwarns << "Session name is Empty!" << llendl;
-		return ;
-	}
+				{
+					LL_WARNS("LLLogChat::loadChatHistory") << "Session name is Empty!" << LL_ENDL;
+					return ;
+				}
 
-	bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false;
+				bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false;
 
-	LLFILE* fptr = LLFile::fopen(makeLogFileName(file_name), "r");/*Flawfinder: ignore*/
-	if (!fptr)
-	{
-		fptr = LLFile::fopen(oldLogFileName(file_name), "r");/*Flawfinder: ignore*/
-		if (!fptr)
-		{
-			return;						//No previous conversation with this name.
-		}
-	}
- 
-	char buffer[LOG_RECALL_SIZE];		/*Flawfinder: ignore*/
-	char *bptr;
-	S32 len;
-	bool firstline = TRUE;
-
-	if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1  , SEEK_END))
-	{	//We need to load the whole historyFile or it's smaller than recall size, so get it all.
-		firstline = FALSE;
-		if (fseek(fptr, 0, SEEK_SET))
-		{
-			fclose(fptr);
-			return;
-		}
-	}
+				LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r");/*Flawfinder: ignore*/
+				if (!fptr)
+				{
+					fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/
+					if (!fptr)
+					{
+						return;						//No previous conversation with this name.
+					}
+				}
 
-	while (fgets(buffer, LOG_RECALL_SIZE, fptr)  && !feof(fptr)) 
-	{
-		len = strlen(buffer) - 1;		/*Flawfinder: ignore*/
-		for (bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--)	*bptr='\0';
-		
-		if (firstline)
-		{
-			firstline = FALSE;
-			continue;
-		}
+				char buffer[LOG_RECALL_SIZE];		/*Flawfinder: ignore*/
+				char *bptr;
+				S32 len;
+				bool firstline = TRUE;
+
+				if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1  , SEEK_END))
+				{	//We need to load the whole historyFile or it's smaller than recall size, so get it all.
+					firstline = FALSE;
+					if (fseek(fptr, 0, SEEK_SET))
+					{
+						fclose(fptr);
+						return;
+					}
+				}
+			while (fgets(buffer, LOG_RECALL_SIZE, fptr)  && !feof(fptr))
+				{
+					len = strlen(buffer) - 1;		/*Flawfinder: ignore*/
+					for (bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--)	*bptr='\0';
+
+					if (firstline)
+					{
+						firstline = FALSE;
+						continue;
+					}
+
+					std::string line(buffer);
+
+					//updated 1.23 plain text log format requires a space added before subsequent lines in a multilined message
+					if (' ' == line[0])
+					{
+						line.erase(0, MULTI_LINE_PREFIX.length());
+						append_to_last_message(messages, '\n' + line);
+					}
+					else if (0 == len && ('\n' == line[0] || '\r' == line[0]))
+					{
+						//to support old format's multilined messages with new lines used to divide paragraphs
+						append_to_last_message(messages, line);
+					}
+					else
+					{
+						LLSD item;
+						if (!LLChatLogParser::parse(line, item, load_params))
+						{
+							item[LL_IM_TEXT] = line;
+						}
+						messages.push_back(item);
+					}
+				}
+				fclose(fptr);
 
-		std::string line(buffer);
 
-		//updated 1.23 plaint text log format requires a space added before subsequent lines in a multilined message
-		if (' ' == line[0])
-		{
-			line.erase(0, MULTI_LINE_PREFIX.length());
-			append_to_last_message(messages, '\n' + line);
-		}
-		else if (0 == len && ('\n' == line[0] || '\r' == line[0]))
-		{
-			//to support old format's multilined messages with new lines used to divide paragraphs
-			append_to_last_message(messages, line);
-		}
-		else
-		{
-			LLSD item;
-			if (!LLChatLogParser::parse(line, item, load_params))
-			{
-				item[LL_IM_TEXT] = line;
-			}
-			messages.push_back(item);
-		}
-	}
-	fclose(fptr);
 }
 
+void LLLogChat::startChatHistoryThread(const std::string& file_name, const LLSD& load_params)
+{
+
+	LLLoadHistoryThread* mThread = new LLLoadHistoryThread();
+	mThread->start();
+	mThread->setHistoryParams(file_name, load_params);
+}
 // static
 std::string LLLogChat::oldLogFileName(std::string filename)
 {
@@ -828,3 +837,116 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params
 	im[LL_IM_TEXT] = name_and_text[IDX_TEXT];
 	return true;  //parsed name and message text, maybe have a timestamp too
 }
+
+
+
+	LLLoadHistoryThread::LLLoadHistoryThread() : LLThread("load chat history")
+ 	{
+		mNewLoad = false;
+	}
+
+	void LLLoadHistoryThread::run()
+	{
+		while (!LLApp::isQuitting())
+			{
+			    if(mNewLoad)
+				{
+					loadHistory(mFileName,mMessages,mLoadParams);
+					shutdown();
+				}
+			}
+	}
+	void LLLoadHistoryThread::setHistoryParams(const std::string& file_name, const LLSD& load_params)
+	{
+		mFileName = file_name;
+		mLoadParams = load_params;
+		mNewLoad = true;
+	}
+	void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params)
+	{
+
+		if (file_name.empty())
+			{
+			LL_WARNS("LLLogChat::loadHistory") << "Session name is Empty!" << LL_ENDL;
+				return ;
+			}
+
+			bool load_all_history = load_params.has("load_all_history") ? load_params["load_all_history"].asBoolean() : false;
+
+			LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r");/*Flawfinder: ignore*/
+			if (!fptr)
+			{
+				fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/
+				if (!fptr)
+				{
+					mNewLoad = false;
+					(*mLoadEndSignal)(messages, file_name);
+					return;						//No previous conversation with this name.
+				}
+			}
+
+			char buffer[LOG_RECALL_SIZE];		/*Flawfinder: ignore*/
+			char *bptr;
+			S32 len;
+			bool firstline = TRUE;
+
+			if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1  , SEEK_END))
+			{	//We need to load the whole historyFile or it's smaller than recall size, so get it all.
+				firstline = FALSE;
+				if (fseek(fptr, 0, SEEK_SET))
+				{
+					fclose(fptr);
+					mNewLoad = false;
+					(*mLoadEndSignal)(messages, file_name);
+					return;
+				}
+			}
+		while (fgets(buffer, LOG_RECALL_SIZE, fptr)  && !feof(fptr))
+			{
+				len = strlen(buffer) - 1;		/*Flawfinder: ignore*/
+				for (bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--)	*bptr='\0';
+
+				if (firstline)
+				{
+					firstline = FALSE;
+					continue;
+				}
+
+				std::string line(buffer);
+
+				//updated 1.23 plaint text log format requires a space added before subsequent lines in a multilined message
+				if (' ' == line[0])
+				{
+					line.erase(0, MULTI_LINE_PREFIX.length());
+					append_to_last_message(messages, '\n' + line);
+				}
+				else if (0 == len && ('\n' == line[0] || '\r' == line[0]))
+				{
+					//to support old format's multilined messages with new lines used to divide paragraphs
+					append_to_last_message(messages, line);
+				}
+				else
+				{
+					LLSD item;
+					if (!LLChatLogParser::parse(line, item, load_params))
+					{
+						item[LL_IM_TEXT] = line;
+					}
+					messages.push_back(item);
+				}
+			}
+			fclose(fptr);
+			mNewLoad = false;
+			(*mLoadEndSignal)(messages, file_name);
+	}
+
+	//static
+	boost::signals2::connection LLLoadHistoryThread::setLoadEndSignal(const load_end_signal_t::slot_type& cb)
+	{
+		if (NULL == mLoadEndSignal)
+		{
+			mLoadEndSignal = new load_end_signal_t();
+		}
+
+		return mLoadEndSignal->connect(cb);
+	}
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index bd70dbaac9..acee99afa2 100755
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -28,6 +28,24 @@
 #define LL_LLLOGCHAT_H
 
 class LLChat;
+class LLLoadHistoryThread : public LLThread
+{
+private:
+	std::string mFileName;
+	std::list<LLSD> mMessages;
+	LLSD mLoadParams;
+	bool mNewLoad;
+public:
+	LLLoadHistoryThread();
+
+	void setHistoryParams(const std::string& file_name, const LLSD& load_params);
+	virtual void loadHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params);
+    virtual void run();
+
+   typedef boost::signals2::signal<void (std::list<LLSD>& messages,const std::string& file_name)> load_end_signal_t;
+   static load_end_signal_t * mLoadEndSignal;
+   static boost::signals2::connection setLoadEndSignal(const load_end_signal_t::slot_type& cb);
+};
 
 class LLLogChat
 {
@@ -39,6 +57,7 @@ public:
 		LOG_LLSD,
 		LOG_END
 	};
+
 	static std::string timestamp(bool withdate = false);
 	static std::string makeLogFileName(std::string(filename));
 	/**
@@ -54,6 +73,7 @@ public:
 	static void getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions);
 
 	static void loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, const LLSD& load_params = LLSD());
+	static void startChatHistoryThread(const std::string& file_name, const LLSD& load_params);
 
 	typedef boost::signals2::signal<void ()> save_history_signal_t;
 	static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb);
@@ -127,6 +147,7 @@ protected:
 	virtual ~LLChatLogParser() {};
 };
 
+
 // LLSD map lookup constants
 extern const std::string LL_IM_TIME; //("time");
 extern const std::string LL_IM_TEXT; //("message");
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index dcd2bf5ba7..f1e551695f 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3928,5 +3928,8 @@ Try enclosing path to the editor with double quotes.
   <string name="logging_calls_enabled_log_empty">
     There are no logged conversations. After you contact someone, or someone contacts you, a log entry will be shown here.
   </string>
+  <string name="loading_chat_logs">
+    Loading...
+  </string>
   
   </strings>
-- 
cgit v1.2.3


From ae01baa0567a5e0c3f9c63936bd939cd7dc4f45d Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Wed, 10 Jul 2013 19:44:29 +0300
Subject: CHUI-984 FIX Clicking on voice icon no longer brings up voice volume
 slider

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

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 54baaeee53..9faa12b2ee 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -277,8 +277,13 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
 {
 	BOOL result = LLFolderViewFolder::handleMouseUp(x, y, mask);
 
-	if(result && getRoot())
-    {
+	LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
+	LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
+	if (result 
+		&& getRoot()
+		&& !(volume_floater && volume_floater->isShown() && volume_floater->hasFocus())
+		&& !(chat_volume_floater && chat_volume_floater->isShown() && chat_volume_floater->hasFocus()))
+	{
 		LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
 		LLUUID session_id = item? item->getUUID() : LLUUID();
 		LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
-- 
cgit v1.2.3


From 170e01e7eb0f3785491d567b5734e8d493ecce22 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 16 Jul 2013 14:56:25 +0300
Subject: CHUI-978 FIXED Add Nearby chat history to the list of transcriptions
 if it exists(to enable "Chat history" menu item for Nearby chat)

---
 indra/newview/lllogchat.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index afaec48e7b..90b169ecd3 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -470,6 +470,13 @@ void LLLogChat::findTranscriptFiles(std::string pattern, std::vector<std::string
 		LLFILE * filep = LLFile::fopen(fullname, "rb");
 		if (NULL != filep)
 		{
+			if(makeLogFileName("chat")== fullname)
+			{
+				//Add Nearby chat history to the list of transcriptions
+				list_of_transcriptions.push_back(gDirUtilp->add(dirname, filename));
+				LLFile::close(filep);
+				return;
+			}
 			char buffer[LOG_RECALL_SIZE];
 
 			fseek(filep, 0, SEEK_END);			// seek to end of file
-- 
cgit v1.2.3


From 8349b8234fba4df5a3e4b36e8f226d85e30d8a4c Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 17 Jul 2013 20:48:22 +0300
Subject: =?UTF-8?q?CHUI-987=20FIXED=20(Viewer=20crashes=20when=20you=20try?=
 =?UTF-8?q?=20drag=20and=20drop=20any=20object=20from=20inventory=20onto?=
 =?UTF-8?q?=20avatar=E2=80=99s=20name=20in=20resident=20picker)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 indra/newview/llfloaterimcontainer.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 29216f8d9a..396e31dd27 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -116,6 +116,10 @@ void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::str
 
 void LLFloaterIMContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
 {
+	if(!isInVisibleChain())
+	{
+		setVisibleAndFrontmost(false);
+	}
 	selectConversationPair(session_id, true);
 	collapseMessagesPane(false);
 }
-- 
cgit v1.2.3


From b60b6e5452825654ff4b3718d72c28cf66cf1692 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Fri, 19 Jul 2013 20:25:21 +0300
Subject: CHUI-985 POSTPONED [CHUIBUG]User receives three friendship offer
 notifications simultaneously when he accept/decline friendship offer

---
 indra/newview/llviewermessage.cpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3766b30438..61353dba7d 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -259,11 +259,15 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
 		    break;
 	    }
 
-	    LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm()));
-	    modified_form->setElementEnabled("Accept", false);
-	    modified_form->setElementEnabled("Decline", false);
-	    notification_ptr->updateForm(modified_form);
-	    notification_ptr->repost();
+		// TODO: this set of calls has undesirable behavior under Windows OS (CHUI-985):
+		// here appears three additional toasts instead one modified
+		// need investigation and fix
+
+	    // LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm()));
+	    // modified_form->setElementEnabled("Accept", false);
+	    // modified_form->setElementEnabled("Decline", false);
+	    // notification_ptr->updateForm(modified_form);
+	    // notification_ptr->repost();
     }
 
 	return false;
-- 
cgit v1.2.3


From d59b6e1d0a5accbff43167c8e4be1874917fc4e8 Mon Sep 17 00:00:00 2001
From: PavelK ProductEngine <pkrivich@productengine.com>
Date: Thu, 27 Jun 2013 18:28:54 +0300
Subject: CHUI-817 FIX Revealing the "Conversations" window reveals hidden
 Nearby Chat window as well

---
 indra/newview/llfloaterimcontainer.cpp  | 28 ++++++++++++++++------------
 indra/newview/llfloaterimcontainer.h    |  2 --
 indra/newview/llfloaterimnearbychat.cpp | 28 +++++++++++++++-------------
 3 files changed, 31 insertions(+), 27 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 396e31dd27..4591b80ac4 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -267,7 +267,6 @@ BOOL LLFloaterIMContainer::postBuild()
 void LLFloaterIMContainer::onOpen(const LLSD& key)
 {
 	LLMultiFloater::onOpen(key);
-	openNearbyChat();
 	reSelectConversation();
 	assignResizeLimits();
 }
@@ -631,7 +630,6 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
 			LLFloaterReg::toggleInstanceOrBringToFront(name);
             selectConversationPair(LLUUID(NULL), false, false);
 		}
-		openNearbyChat();
 		flashConversationItemWidget(mSelectedSession,false);
 
 		LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession);
@@ -661,7 +659,11 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
 		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
 		if (widget)
 		{
-		    widget->setVisibleIfDetached(visible);
+			LLFloater* session_floater = widget->getSessionFloater();
+			if (session_floater != nearby_chat)
+			{
+				widget->setVisibleIfDetached(visible);
+			}
 		}
 	}
 	
@@ -689,7 +691,12 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float
 void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
 {
 	LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
-    selectConversationPair(getSelectedSession(), false, take_focus);
+	// Do not select "Nearby Chat" conversation, since it will bring its window to front
+	// Only select other sessions
+	if (!getSelectedSession().isNull())
+	{
+		selectConversationPair(getSelectedSession(), false, take_focus);
+	}
 	if (mInitialized && mIsFirstLaunch)
 	{
 		collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed"));
@@ -1936,13 +1943,6 @@ void LLFloaterIMContainer::openNearbyChat()
 	}
 }
 
-void LLFloaterIMContainer::onNearbyChatClosed()
-{
-	// If nearby chat is the only remaining conversation and it is closed, close whole conversation floater as well
-	if (mConversationsItems.size() == 1)
-		closeFloater();
-}
-
 void LLFloaterIMContainer::reSelectConversation()
 {
 	LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession);
@@ -2080,11 +2080,15 @@ void LLFloaterIMContainer::expandConversation()
 
 // By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs
 // So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself
+// Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought
+// to front independently
 /*virtual*/
 BOOL LLFloaterIMContainer::isFrontmost()
 {
 	LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession);
-	return (selected_session && selected_session->isFrontmost()) || LLFloater::isFrontmost();
+	LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
+	return (selected_session && selected_session->isFrontmost() && (selected_session != nearby_chat))
+		|| LLFloater::isFrontmost();
 }
 
 // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation.
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 5cd92beed1..36da457cac 100755
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -107,8 +107,6 @@ public:
 	LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); }
 	LLConversationSort& getSortOrder() { return mConversationViewModel.getSorter(); }
 
-	void onNearbyChatClosed();
-
 	// Handling of lists of participants is public so to be common with llfloatersessiontab
 	// *TODO : Find a better place for this.
     bool checkContextMenuItem(const std::string& item, uuid_vec_t& selectedIDS);
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 59593d776b..5999c74d51 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -138,19 +138,28 @@ BOOL LLFloaterIMNearbyChat::postBuild()
 // virtual
 void LLFloaterIMNearbyChat::closeHostedFloater()
 {
-	// Should check how many conversations are ongoing. Close all if 1 only (the Nearby Chat), select next one otherwise
+	// If detached from conversations window close anyway
+	if (!getHost())
+	{
+		setVisible(FALSE);
+	}
+
+	// Should check how many conversations are ongoing. Select next to "Nearby Chat" in case there are some other besides.
+	// Close conversations window in case "Nearby Chat" is attached and the only conversation
 	LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
 	if (floater_container->getConversationListItemSize() == 1)
 	{
-		floater_container->closeFloater();
+		if (getHost())
+		{
+			floater_container->closeFloater();
+		}
 	}
 	else
 	{
 		if (!getHost())
 		{
-			setVisible(FALSE);
+			floater_container->selectNextConversationByID(LLUUID());
 		}
-		floater_container->selectNextConversationByID(LLUUID());
 	}
 }
 
@@ -262,7 +271,7 @@ void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD&
 {
 	LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key);
 
-	if(!isTornOff() && matchesKey(key))
+	if(matchesKey(key))
 	{
 		LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, take_focus);
 	}
@@ -296,7 +305,6 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)
 {
 	// Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater
 	LLFloaterIMSessionTab::restoreFloater();
-	onClickCloseBtn();
 }
 
 // virtual
@@ -306,13 +314,7 @@ void LLFloaterIMNearbyChat::onClickCloseBtn()
 	{
 		return;
 	}
-	LLFloaterIMSessionTab::onTearOffClicked();
-	
-	LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance();
-	if (im_box)
-	{
-		im_box->onNearbyChatClosed();
-	}
+	closeHostedFloater();
 }
 
 void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp)
-- 
cgit v1.2.3


From e060f7a6e529d0ef83106db85969a2d047a2247a Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 27 Jun 2013 12:50:06 -0400
Subject: CHOP-955, CHOP-957: Prioritize indra.util.llmanifest in same source
 repo. It seems that certain build hosts have an (obsolete? broken?) install
 of indra.util.llmanifest under the system Python. If we append the local repo
 indra/lib/python to sys.path, viewer_manifest.py pulls in the broken
 llmanifest. Prepend to sys.path instead to ensure we get the right one.

---
 indra/newview/viewer_manifest.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index eb2cd73cc9..1429fe4c7a 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -34,8 +34,10 @@ import tarfile
 import time
 import random
 viewer_dir = os.path.dirname(__file__)
-# add indra/lib/python to our path so we don't have to muck with PYTHONPATH
-sys.path.append(os.path.join(viewer_dir, os.pardir, "lib", "python"))
+# Add indra/lib/python to our path so we don't have to muck with PYTHONPATH.
+# Put it FIRST because some of our build hosts have an ancient install of
+# indra.util.llmanifest under their system Python!
+sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
 from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
 try:
     from llbase import llsd
-- 
cgit v1.2.3


From 4a9b688b4d46f67e1b00e04ebe972470b61e560a Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 27 Jun 2013 16:11:48 -0400
Subject: CHOP-959: Make settings.xml actually valid XML LLSD. UserLoginInfo
 block had <key>Value</key> without the required subsequent element to provide
 any actual value. This confused at least the Python LLSD reader.

---
 indra/newview/app_settings/settings.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 12ca902c59..997bde37ce 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12859,12 +12859,13 @@
     <key>UserLoginInfo</key>
     <map>
       <key>Comment</key>
-      <string>Users loging data.</string>
+      <string>User login data.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>LLSD</string>
       <key>Value</key>
+      <string/>
     </map>
     <key>VFSOldSize</key>
     <map>
-- 
cgit v1.2.3


From c08b60ac6fee74f613ed3f5f8702291ed1c2376f Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 28 Jun 2013 15:26:18 -0400
Subject: CHOP-959: Streamline processing for --graphicslevel switch. Use
 map-to in cmd_line.xml to inform the command-line processor that the target
 variable for --graphicslevel is RenderQualityPerformance. That lets us
 eliminate clunky llappviewer.cpp switch from '0' to 0, etc. Moreover,
 previous switch statement only accepted 0 - 3, whereas
 LLFeatureManager::setGraphicsLevel() actually accepts 0 - 6. Introduce
 LLFeatureManager::isValidGraphicsLevel() and use that to validate. Replace
 switch statement in setGraphicsLevel() mapping int constants to string
 literals with static vector of level names, using same data for mapping as
 for validating level numbers.

---
 indra/newview/app_settings/cmd_line.xml |   2 +
 indra/newview/llappviewer.cpp           |  43 ++----------
 indra/newview/llfeaturemanager.cpp      | 117 +++++++++++++++++++-------------
 indra/newview/llfeaturemanager.h        |  14 +++-
 4 files changed, 88 insertions(+), 88 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 7ab7787d77..8ca33fbf54 100755
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -96,6 +96,8 @@
 0 - low, 1 - medium, 2 - high, 3 - ultra</string>
       <key>count</key>
       <integer>1</integer>
+      <key>map-to</key>
+      <string>RenderQualityPerformance</string>
     </map>
 
     <key>grid</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f92274dbbd..5b301c03a1 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2311,13 +2311,6 @@ bool LLAppViewer::initConfiguration()
 {	
 	//Load settings files list
 	std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml");
-	//LLControlGroup settings_control("SettingsFiles");
-	//llinfos << "Loading settings file list " << settings_file_list << llendl;
-	//if (0 == settings_control.loadFromFile(settings_file_list))
-	//{
- //       llerrs << "Cannot load default configuration file " << settings_file_list << llendl;
-	//}
-
 	LLXMLNodePtr root;
 	BOOL success  = LLXMLNode::parseFile(settings_file_list, root, NULL);
 	if (!success)
@@ -2376,9 +2369,7 @@ bool LLAppViewer::initConfiguration()
 	{
 		c->setValue(true, false);
 	}
-#endif
 
-#ifndef	LL_RELEASE_FOR_DOWNLOAD
 	gSavedSettings.setBOOL("QAMode", TRUE );
 	gSavedSettings.setS32("WatchdogEnabled", 0);
 #endif
@@ -2582,36 +2573,10 @@ bool LLAppViewer::initConfiguration()
 
 	if (clp.hasOption("graphicslevel"))
 	{
-		const LLCommandLineParser::token_vector_t& value = clp.getOption("graphicslevel");
-        if(value.size() != 1)
-        {
-			llwarns << "Usage: -graphicslevel <0-3>" << llendl;
-        }
-        else
-        {
-			std::string detail = value.front();
-			mForceGraphicsDetail = TRUE;
-			
-			switch (detail.c_str()[0])
-			{
-				case '0': 
-					gSavedSettings.setU32("RenderQualityPerformance", 0);		
-					break;
-				case '1': 
-					gSavedSettings.setU32("RenderQualityPerformance", 1);		
-					break;
-				case '2': 
-					gSavedSettings.setU32("RenderQualityPerformance", 2);		
-					break;
-				case '3': 
-					gSavedSettings.setU32("RenderQualityPerformance", 3);		
-					break;
-				default:
-					mForceGraphicsDetail = FALSE;
-					llwarns << "Usage: -graphicslevel <0-3>" << llendl;
-					break;
-			}
-        }
+		// User explicitly requested --graphicslevel on the command line.
+		// We expect this switch has already set RenderQualityPerformance.
+		mForceGraphicsDetail =
+			LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"));
 	}
 
 	if (clp.hasOption("analyzeperformance"))
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index ddb9d3bc43..9d292ce7bb 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -30,6 +30,7 @@
 #include <fstream>
 
 #include <boost/regex.hpp>
+#include <boost/assign/list_of.hpp>
 
 #include "llfeaturemanager.h"
 #include "lldir.h"
@@ -52,6 +53,8 @@
 #include "llboost.h"
 #include "llweb.h"
 #include "llviewershadermgr.h"
+#include "llstring.h"
+#include "stringize.h"
 
 #if LL_WINDOWS
 #include "lldxhardware.h"
@@ -187,6 +190,55 @@ void LLFeatureList::dump()
 	LL_DEBUGS("RenderInit") << LL_ENDL;
 }
 
+static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of
+	("Low")
+	("LowMid")
+	("Mid")
+	("MidHigh")
+	("High")
+	("HighUltra")
+	("Ultra")
+;
+
+U32 LLFeatureManager::getMaxGraphicsLevel() const
+{
+	return sGraphicsLevelNames.size() - 1;
+}
+
+bool LLFeatureManager::isValidGraphicsLevel(U32 level) const
+{
+	return (level <= getMaxGraphicsLevel());
+}
+
+std::string LLFeatureManager::getNameForGraphicsLevel(U32 level) const
+{
+	if (isValidGraphicsLevel(level))
+	{
+		return sGraphicsLevelNames[level];
+	}
+	return STRINGIZE("Invalid graphics level " << level << ", valid are 0 .. "
+					 << getMaxGraphicsLevel());
+}
+
+S32 LLFeatureManager::getGraphicsLevelForName(const std::string& name) const
+{
+	const std::string FixedFunction("FixedFunction");
+	std::string rname(name);
+	if (LLStringUtil::endsWith(rname, FixedFunction))
+	{
+		// chop off any "FixedFunction" suffix
+		rname = rname.substr(0, rname.length() - FixedFunction.length());
+	}
+	for (S32 i(0), iend(getMaxGraphicsLevel()); i <= iend; ++i)
+	{
+		if (sGraphicsLevelNames[i] == rname)
+		{
+			return i;
+		}
+	}
+	return -1;
+}
+
 LLFeatureList *LLFeatureManager::findMask(const std::string& name)
 {
 	if (mMaskList.count(name))
@@ -620,7 +672,7 @@ void LLFeatureManager::applyRecommendedSettings()
 {
 	// apply saved settings
 	// cap the level at 2 (high)
-	S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
+	U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
 
 	llinfos << "Applying Recommended Features" << llendl;
 
@@ -696,62 +748,33 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
 	}
 }
 
-void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
+void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures)
 {
 	LLViewerShaderMgr::sSkipReload = true;
 
 	applyBaseMasks();
-	
-	switch (level)
+
+	// if we're passed an invalid level, default to "Low"
+	std::string features(isValidGraphicsLevel(level)? getNameForGraphicsLevel(level) : "Low");
+	if (features == "Low")
 	{
-		case 0:
 #if LL_DARWIN
-			// This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac
-			// systems which support them instead of falling back to fixed-function unnecessarily
-			// MAINT-2157
-			//
-			if (gGLManager.mGLVersion < 2.1f)
-			{
-				maskFeatures("LowFixedFunction");			
-			}
-			else
-			{ //same as low, but with "Basic Shaders" enabled
-				maskFeatures("Low");
-			}
+		// This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac
+		// systems which support them instead of falling back to fixed-function unnecessarily
+		// MAINT-2157
+		if (gGLManager.mGLVersion < 2.1f)
 #else
-			if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
-			{ //only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
-				maskFeatures("LowFixedFunction");			
-			}
-			else
-			{ //same as low, but with "Basic Shaders" enabled
-				maskFeatures("Low");
-			}
+		// only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
+		if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
 #endif
-			break;
-		case 1:
-			maskFeatures("LowMid");
-			break;
-		case 2:
-			maskFeatures("Mid");
-			break;
-		case 3:
-			maskFeatures("MidHigh");
-			break;
-		case 4:
-			maskFeatures("High");
-			break;
-		case 5:
-			maskFeatures("HighUltra");
-			break;
-		case 6:
-			maskFeatures("Ultra");
-			break;
-		default:
-			maskFeatures("Low");
-			break;
+		{
+            // same as Low, but with "Basic Shaders" disabled
+			features = "LowFixedFunction";
+		}
 	}
 
+	maskFeatures(features);
+
 	applyFeatures(skipFeatures);
 
 	LLViewerShaderMgr::sSkipReload = false;
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h
index ad72c16743..3b8d251236 100755
--- a/indra/newview/llfeaturemanager.h
+++ b/indra/newview/llfeaturemanager.h
@@ -134,8 +134,18 @@ public:
 	// skipFeatures forces skipping of mostly hardware settings
 	// that we don't want to change when we change graphics
 	// settings
-	void setGraphicsLevel(S32 level, bool skipFeatures);
-	
+	void setGraphicsLevel(U32 level, bool skipFeatures);
+
+	// What 'level' values are valid to pass to setGraphicsLevel()?
+	// 0 is the low end...
+	U32 getMaxGraphicsLevel() const;
+	bool isValidGraphicsLevel(U32 level) const;
+
+	// setGraphicsLevel() levels have names.
+	std::string getNameForGraphicsLevel(U32 level) const;
+	// returns -1 for unrecognized name (hence S32 rather than U32)
+	S32 getGraphicsLevelForName(const std::string& name) const;
+
 	void applyBaseMasks();
 	void applyRecommendedSettings();
 
-- 
cgit v1.2.3


From 3d9c74dcc869d7ce3708426a0b45bfb838529d3f Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 1 Jul 2013 16:19:24 -0400
Subject: CHOP-959: Introduce and use settings vars for some cmd_line switches.
 The cmd_line.xml entries: analyzeperformance crashonstartup debugsession
 disablecrashlogger logmetrics logperformance noquicktime replaysession all
 specify map-to settings.xml variables -- none of which existed! Introduce
 such variables. Instead of detecting the presence of a particular switch in
 the command-line parser, use the value of its corresponding settings
 variable.

---
 indra/newview/app_settings/settings.xml | 88 +++++++++++++++++++++++++++++++++
 indra/newview/llappviewer.cpp           | 52 ++++++-------------
 2 files changed, 103 insertions(+), 37 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 997bde37ce..a39b447cca 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -126,6 +126,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>AnalyzePerformance</key>
+    <map>
+      <key>Comment</key>
+      <string>Request performance analysis for a particular viewer run</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>AnimateTextures</key>
     <map>
       <key>Comment</key>
@@ -1916,6 +1927,17 @@
       <key>Value</key>
       <integer>262144</integer>
     </map>
+    <key>CrashOnStartup</key>
+    <map>
+      <key>Comment</key>
+      <string>User-requested crash on viewer startup</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>CreateToolCopyCenters</key>
     <map>
       <key>Comment</key>
@@ -2158,6 +2180,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>DebugSession</key>
+    <map>
+      <key>Comment</key>
+      <string>Request debugging for a particular viewer session</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>DebugShowColor</key>
     <map>
       <key>Comment</key>
@@ -2972,6 +3005,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>DisableCrashLogger</key>
+    <map>
+      <key>Comment</key>
+      <string>Do not send crash report to Linden server</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>DisableMouseWarp</key>
     <map>
       <key>Comment</key>
@@ -5217,6 +5261,28 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>LogMetrics</key>
+    <map>
+      <key>Comment</key>
+      <string>Log viewer metrics</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string/>
+    </map>
+    <key>LogPerformance</key>
+    <map>
+      <key>Comment</key>
+      <string>Log performance analysis for a particular viewer run</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>LogTextureNetworkTraffic</key>
     <map>
       <key>Comment</key>
@@ -6394,6 +6460,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>NoQuickTime</key>
+    <map>
+      <key>Comment</key>
+      <string>Disable QuickTime for a particular viewer run</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>NoVerifySSLCert</key>
     <map>
       <key>Comment</key>
@@ -9643,6 +9720,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>ReplaySession</key>
+    <map>
+      <key>Comment</key>
+      <string>Request replay of previously-recorded pilot file</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>RotateRight</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5b301c03a1..613a23630f 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2463,7 +2463,7 @@ bool LLAppViewer::initConfiguration()
 	// Register the core crash option as soon as we can
 	// if we want gdb post-mortem on cores we need to be up and running
 	// ASAP or we might miss init issue etc.
-	if(clp.hasOption("disablecrashlogger"))
+	if(gSavedSettings.getBOOL("DisableCrashLogger"))
 	{
 		llwarns << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << llendl;
 		LLAppViewer::instance()->disableCrashlogger();
@@ -2542,59 +2542,37 @@ bool LLAppViewer::initConfiguration()
 	}
 
 	// If we have specified crash on startup, set the global so we'll trigger the crash at the right time
-	if(clp.hasOption("crashonstartup"))
-	{
-		gCrashOnStartup = TRUE;
-	}
+	gCrashOnStartup = gSavedSettings.getBOOL("CrashOnStartup");
 
-	if (clp.hasOption("logperformance"))
+	if (gSavedSettings.getBOOL("LogPerformance"))
 	{
 		LLFastTimer::sLog = TRUE;
 		LLFastTimer::sLogName = std::string("performance");		
 	}
-	
-	if (clp.hasOption("logmetrics"))
- 	{
- 		LLFastTimer::sMetricLog = TRUE ;
-		// '--logmetrics' can be specified with a named test metric argument so the data gathering is done only on that test
-		// In the absence of argument, every metric is gathered (makes for a rather slow run and hard to decipher report...)
-		std::string test_name = clp.getOption("logmetrics")[0];
+
+	std::string test_name(gSavedSettings.getString("LogMetrics"));
+	if (! test_name.empty())
+	{
+		LLFastTimer::sMetricLog = TRUE ;
+		// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
+		// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
 		llinfos << "'--logmetrics' argument : " << test_name << llendl;
-		if (test_name == "")
-		{
-			llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl;
-			LLFastTimer::sLogName = DEFAULT_METRIC_NAME;
-		}
-		else
-		{
-			LLFastTimer::sLogName = test_name;
-		}
+		LLFastTimer::sLogName = test_name;
  	}
 
 	if (clp.hasOption("graphicslevel"))
 	{
 		// User explicitly requested --graphicslevel on the command line.
 		// We expect this switch has already set RenderQualityPerformance.
+		// Check that value for validity; if valid, we'll engage it later.
 		mForceGraphicsDetail =
 			LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"));
 	}
 
-	if (clp.hasOption("analyzeperformance"))
-	{
-		LLFastTimerView::sAnalyzePerformance = TRUE;
-	}
+	LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
+	gAgentPilot.setReplaySession(gSavedSettings.getBOOL("ReplaySession"));
 
-	if (clp.hasOption("replaysession"))
-	{
-		gAgentPilot.setReplaySession(TRUE);
-	}
-
-	if (clp.hasOption("nonotifications"))
-	{
-		gSavedSettings.getControl("IgnoreAllNotifications")->setValue(true, false);
-	}
-	
-	if (clp.hasOption("debugsession"))
+	if (gSavedSettings.getBOOL("DebugSession"))
 	{
 		gDebugSession = TRUE;
 		gDebugGL = TRUE;
-- 
cgit v1.2.3


From 774c410cc7538c1fdfcbf17250aa38532012d683 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 2 Jul 2013 10:09:37 -0400
Subject: CHOP-959: add POSITION_LOCAL to LLFloaterAbout::getInfo() blob. The
 existing POSITION variable gives "global" position: that is, your region-
 local coordinates plus the (somewhat arbitrary) global coordinates of the
 region's corner within the whole world. That may be meaningful to people on
 the mainland, hard to say, but it correlates with nothing else available from
 the viewer. POSITION_LOCAL gives you region-local coordinates, which could be
 used (for instance) to construct a SLURL.

---
 indra/newview/llfloaterabout.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 83fb887d81..318a03f755 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -250,8 +250,9 @@ LLSD LLFloaterAbout::getInfo()
 	LLViewerRegion* region = gAgent.getRegion();
 	if (region)
 	{
-		const LLVector3d &pos = gAgent.getPositionGlobal();
+		LLVector3d pos = gAgent.getPositionGlobal();
 		info["POSITION"] = ll_sd_from_vector3d(pos);
+		info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
 		info["REGION"] = gAgent.getRegion()->getName();
 		info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
 		info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
-- 
cgit v1.2.3


From c71b02b743c41b00970425da14ceb437370aeaf8 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 2 Jul 2013 10:15:41 -0400
Subject: CHOP-959: Report region-local position in Help -> About box. I've
 never really understood the usefulness of displaying world-global coordinates
 in the Help -> About box. It seems to me far more useful to know where you
 are within the current region. If that proves problematic, we can display
 both sets of coordinates -- but let's try it this way first.

---
 indra/newview/skins/default/xui/da/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/de/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/en/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/es/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/fr/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/it/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/ja/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/pl/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/pt/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/ru/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/tr/floater_about.xml | 2 +-
 indra/newview/skins/default/xui/zh/floater_about.xml | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index fc8bc33096..9206690c8f 100755
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -8,7 +8,7 @@
 		Bygget med [COMPILER] version [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Du er ved [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] i regionen [REGION] lokaliseret ved &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml
index 4387a61963..5245467183 100755
--- a/indra/newview/skins/default/xui/de/floater_about.xml
+++ b/indra/newview/skins/default/xui/de/floater_about.xml
@@ -8,7 +8,7 @@
 		Kompiliert mit [COMPILER] version [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Sie befinden sich in [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] auf &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Sie befinden sich in [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] auf &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index 63eb87f27a..d9e4b5b70c 100755
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -22,7 +22,7 @@ Built with [COMPILER] version [COMPILER_VERSION]
 </floater.string>
   <floater.string
      name="AboutPosition">
-You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 
diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml
index 3696c7e12c..7ca1e3721f 100755
--- a/indra/newview/skins/default/xui/es/floater_about.xml
+++ b/indra/newview/skins/default/xui/es/floater_about.xml
@@ -8,7 +8,7 @@
 		Compilado con [COMPILER], versión [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Estás en la posición [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1], de [REGION], alojada en &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Estás en la posición [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1], de [REGION], alojada en &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml
index a659cb4245..d45bdccf3e 100755
--- a/indra/newview/skins/default/xui/fr/floater_about.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about.xml
@@ -8,7 +8,7 @@
 		Compilé avec [COMPILER] version [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Vous êtes à [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] dans [REGION], se trouvant à &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Vous êtes à [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] dans [REGION], se trouvant à &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml
index c672511fc5..b0fb585fa2 100755
--- a/indra/newview/skins/default/xui/it/floater_about.xml
+++ b/indra/newview/skins/default/xui/it/floater_about.xml
@@ -8,7 +8,7 @@
 		Generato con [COMPILER] versione [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Tu sei  [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] che si trova a &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Tu sei  [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] che si trova a &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml
index 6d5df75645..eae52c98ec 100755
--- a/indra/newview/skins/default/xui/ja/floater_about.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about.xml
@@ -8,7 +8,7 @@
 		コンパイラー [COMPILER] [COMPILER_VERSION] バージョン
 	</floater.string>
 	<floater.string name="AboutPosition">
-		あなたの現在地は、[POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] の [REGION] です。位置は &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; です。([HOSTIP])
+		あなたの現在地は、[POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] の [REGION] です。位置は &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; です。([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml
index 409429ffaa..61a72ff27d 100755
--- a/indra/newview/skins/default/xui/pl/floater_about.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about.xml
@@ -8,7 +8,7 @@
 		Buduj z [COMPILER] wersją [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Położenie [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] w [REGION] zlokalizowanym w &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml
index 299f88b22a..d089266342 100755
--- a/indra/newview/skins/default/xui/pt/floater_about.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about.xml
@@ -7,7 +7,7 @@
 		Construído com [COMPILER] versão [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Você está em [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] em [REGION] localizado em [HOSTNAME]&lt;/nolink&gt;([HOSTIP])
+		Você está em [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] em [REGION] localizado em [HOSTNAME]&lt;/nolink&gt;([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/ru/floater_about.xml b/indra/newview/skins/default/xui/ru/floater_about.xml
index bb6266ac9a..2b2b3cf453 100755
--- a/indra/newview/skins/default/xui/ru/floater_about.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about.xml
@@ -8,7 +8,7 @@
 		Использован компилятор [COMPILER], версия [COMPILER_VERSION]
 	</floater.string>
 	<floater.string name="AboutPosition">
-		Вы в точке [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] в регионе «[REGION]», расположенном на &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		Вы в точке [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] в регионе «[REGION]», расположенном на &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml
index 9cc9c7a220..4dcf6200c6 100755
--- a/indra/newview/skins/default/xui/tr/floater_about.xml
+++ b/indra/newview/skins/default/xui/tr/floater_about.xml
@@ -8,7 +8,7 @@
 		[COMPILER] [COMPILER_VERSION] sürümü ile oluşturuldu
 	</floater.string>
 	<floater.string name="AboutPosition">
-		&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] konumundasınız
+		&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] konumundasınız
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index 643881e416..1193243c7e 100755
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -8,7 +8,7 @@
 		以 [COMPILER_VERSION] 版本 [COMPILER] 建置
 	</floater.string>
 	<floater.string name="AboutPosition">
-		你的方位是 [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1],地區名:[REGION],主機:&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+		你的方位是 [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1],地區名:[REGION],主機:&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 	</floater.string>
-- 
cgit v1.2.3


From 09d8d17382c72b7741fde1334e832f39d773299f Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 2 Jul 2013 15:30:49 -0400
Subject: CHOP-959: Introduce CmdLineLoginLocation var for --url and --slurl.
 Route --url and --slurl command-line switches through a common settings
 variable. Treat them uniformly now. (Previously, passing --url would notice a
 grid-specific SLURL and preselect that grid; --slurl wouldn't. Now both do.)

---
 indra/newview/app_settings/cmd_line.xml |  6 ++++--
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llappviewer.cpp           | 27 +++++++++++----------------
 3 files changed, 26 insertions(+), 18 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 8ca33fbf54..71a052057c 100755
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -372,7 +372,8 @@
       <boolean>true</boolean>
       <key>last_option</key>
       <boolean>true</boolean>
-      <!-- Special case. Not mapped to a setting. -->
+      <key>map-to</key>
+      <string>CmdLineLoginLocation</string>
     </map>
 
     <key>url</key>
@@ -383,7 +384,8 @@
       <integer>1</integer>
       <key>last_option</key>
       <boolean>true</boolean>
-      <!-- Special case. Not mapped to a setting. -->
+      <key>map-to</key>
+      <string>CmdLineLoginLocation</string>
     </map>
 
     <key>usersessionsettings</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a39b447cca..8a50ca146b 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1795,6 +1795,17 @@
         <string />
       </array>
     </map>
+    <key>CmdLineLoginLocation</key>
+    <map>
+      <key>Comment</key>
+      <string>Startup destination requested on command line</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string/>
+    </map>
     <key>ConnectAsGod</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 613a23630f..3116dd4b00 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2597,20 +2597,16 @@ bool LLAppViewer::initConfiguration()
     // What can happen is that someone can use IE (or potentially 
     // other browsers) and do the rough equivalent of command 
     // injection and steal passwords. Phoenix. SL-55321
-    if(clp.hasOption("url"))
-    {
-		LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0]));
-		if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) 
-		{  
-			LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid());
-			
-		}  
-    }
-    else if(clp.hasOption("slurl"))
-    {
-		LLSLURL start_slurl(clp.getOption("slurl")[0]);
+	std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation"));
+	if(! CmdLineLoginLocation.empty())
+	{
+		LLSLURL start_slurl(CmdLineLoginLocation);
 		LLStartUp::setStartSLURL(start_slurl);
-    }
+		if(start_slurl.getType() == LLSLURL::LOCATION) 
+		{  
+			LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid());
+		}
+	}
 
 	const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
 	if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
@@ -2753,9 +2749,8 @@ bool LLAppViewer::initConfiguration()
 		LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
 		LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
 	}
-	else if (   (   clp.hasOption("login") || clp.hasOption("autologin"))
-			 && !clp.hasOption("url")
-			 && !clp.hasOption("slurl"))
+	else if ((clp.hasOption("login") || clp.hasOption("autologin"))
+			 && gSavedSettings.getString("CmdLineLoginLocation").empty())
 	{
 		// If automatic login from command line with --login switch
 		// init StartSLURL location.
-- 
cgit v1.2.3


From d8565b05a5ccc9df8522db1d0fb32c320fa975b9 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 2 Jul 2013 16:33:40 -0400
Subject: CHOP-959: Introduce CmdLineChannel settings var, map --channel to it.

---
 indra/newview/app_settings/cmd_line.xml |  3 ++-
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llappviewer.cpp           |  7 ++++---
 3 files changed, 17 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 71a052057c..74117dbd85 100755
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -22,7 +22,8 @@
     <map>
       <key>count</key>
       <integer>1</integer>
-      <!-- Special case. Not mapped to a setting. -->
+      <key>map-to</key>
+      <string>CmdLineChannel</string>
     </map>
 
     <key>console</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8a50ca146b..6f50a72016 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1749,6 +1749,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>CmdLineChannel</key>
+    <map>
+      <key>Comment</key>
+      <string>Command line specified channel name</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string />
+    </map>
     <key>CmdLineDisableVoice</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3116dd4b00..37f1f11451 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2536,9 +2536,10 @@ bool LLAppViewer::initConfiguration()
         }
     }
 
-    if(clp.hasOption("channel"))
-    {
-		LLVersionInfo::resetChannel(clp.getOption("channel")[0]);
+	std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel"));
+	if(! CmdLineChannel.empty())
+	{
+		LLVersionInfo::resetChannel(CmdLineChannel);
 	}
 
 	// If we have specified crash on startup, set the global so we'll trigger the crash at the right time
-- 
cgit v1.2.3


From 00cd82e3e56554175a4fe2faffd129bbe669185d Mon Sep 17 00:00:00 2001
From: Cinders <cinder.roxley@phoenixviewer.com>
Date: Mon, 8 Jul 2013 17:30:57 -0600
Subject: STORM-1952: Fix name sometimes appearing as (waiting) by generating a
 slurl instead of fetching a name

---
 indra/newview/llpanelgrouproles.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index d225a4c324..fdcd1f5ebb 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1109,8 +1109,8 @@ void LLPanelGroupMembersSubTab::handleEjectMembers()
 	if (selection_count == 1)
 	{
 		LLSD args;
-		std::string fullname;
-		gCacheName->getFullName(mMembersList->getValue(), fullname);
+		LLUUID selected_avatar = mMembersList->getValue().asUUID();
+		std::string fullname = LLSLURL("agent", selected_avatar, "inspect").getSLURLString();
 		args["AVATAR_NAME"] = fullname;
 		LLSD payload;
 		LLNotificationsUtil::add("EjectGroupMemberWarning",
-- 
cgit v1.2.3


From 34c77159f7dea117eb69fe013b09f2719b12e612 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 9 Jul 2013 08:39:22 -0700
Subject: CHOP-963: Make update service query url depend on the grid rather
 than settings

---
 indra/newview/llappviewer.cpp                | 16 ++++++++++------
 indra/newview/llviewernetwork.cpp            | 18 ++++++++++++++++++
 indra/newview/llviewernetwork.h              |  9 +++++++++
 indra/newview/tests/lllogininstance_test.cpp |  5 ++---
 indra/newview/tests/llviewernetwork_test.cpp | 10 ++++++++++
 5 files changed, 49 insertions(+), 9 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f92274dbbd..68775f2999 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3048,13 +3048,19 @@ namespace {
 void LLAppViewer::initUpdater()
 {
 	// Initialize the updater service.
-	// Generate URL to the udpater service
 	// Get Channel
 	// Get Version
-	std::string url = gSavedSettings.getString("UpdaterServiceURL");
+
+	/*****************************************************************
+	 * Previously, the url was derived from the settings 
+	 *    UpdaterServiceURL
+	 *    UpdaterServicePath
+	 * it is now obtained from the grid manager.  The settings above
+	 * are no longer used.
+	 *****************************************************************/
 	std::string channel = LLVersionInfo::getChannel();
 	std::string version = LLVersionInfo::getVersion();
-	std::string service_path = gSavedSettings.getString("UpdaterServicePath");
+
 	U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
 	bool willing_to_test;
 	LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL;
@@ -3079,9 +3085,7 @@ void LLAppViewer::initUpdater()
 	}
 
 	mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this));
-	mUpdater->initialize(url, 
-						 service_path, 
-						 channel, 
+	mUpdater->initialize(channel, 
 						 version,
 						 gPlatform,
 						 getOSInfo().getOSVersionString(),
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 97f4c3e5fe..371b00b173 100755
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -43,6 +43,8 @@ const std::string  GRID_LABEL_VALUE = "label";
 const std::string  GRID_ID_VALUE = "grid_login_id";
 /// the url for the login cgi script
 const std::string  GRID_LOGIN_URI_VALUE = "login_uri";
+/// url base for update queries
+const std::string  GRID_UPDATE_SERVICE_URL = "update_query_url_base";
 ///
 const std::string  GRID_HELPER_URI_VALUE = "helper_uri";
 /// the splash page url
@@ -63,6 +65,8 @@ const std::string DEFAULT_LOGIN_PAGE = "http://viewer-login.agni.lindenlab.com/"
 
 const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi";
 
+const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
+
 const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
 const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
 
@@ -120,12 +124,14 @@ void LLGridManager::initialize(const std::string& grid_file)
 				  MAIN_GRID_LOGIN_URI,
 				  "https://secondlife.com/helpers/",
 				  DEFAULT_LOGIN_PAGE,
+				  SL_UPDATE_QUERY_URL,
 				  "Agni");
 	addSystemGrid("Second Life Beta Test Grid (Aditi)",
 				  "util.aditi.lindenlab.com",
 				  "https://login.aditi.lindenlab.com/cgi-bin/login.cgi",
 				  "http://aditi-secondlife.webdev.lindenlab.com/helpers/",
 				  DEFAULT_LOGIN_PAGE,
+				  SL_UPDATE_QUERY_URL,
 				  "Aditi");
 
 	LLSD other_grids;
@@ -332,6 +338,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
 								  const std::string& login_uri,
 								  const std::string& helper,
 								  const std::string& login_page,
+								  const std::string& update_url_base,
 								  const std::string& login_id)
 {
 	LLSD grid = LLSD::emptyMap();
@@ -341,6 +348,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
 	grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
 	grid[GRID_LOGIN_URI_VALUE].append(login_uri);
 	grid[GRID_LOGIN_PAGE_VALUE] = login_page;
+	grid[GRID_UPDATE_SERVICE_URL] = update_url_base;
 	grid[GRID_IS_SYSTEM_GRID_VALUE] = true;
 	grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray();
 	grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT);
@@ -537,6 +545,16 @@ std::string LLGridManager::getGridLoginID()
 	return mGridList[mGrid][GRID_ID_VALUE];
 }
 
+std::string LLGridManager::getUpdateServiceURL()
+{
+	std::string update_url_base;
+	if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
+	{
+		update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString();
+	}
+	return update_url_base;
+}
+
 void LLGridManager::updateIsInProductionGrid()
 {
 	mIsInProductionGrid = false;
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 3f56103b2e..8526c0ba7f 100755
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -139,6 +139,14 @@ class LLGridManager : public LLSingleton<LLGridManager>
 	 * I am not sure which is which
 	 */
 
+	//@}
+	/* ================================================================
+	 * @name Update Related Properties
+	 * @{
+	 */
+	/// Get the update service URL base (host and path) for the selected grid
+	std::string getUpdateServiceURL();
+	
 	//@}
 
 	/* ================================================================
@@ -207,6 +215,7 @@ class LLGridManager : public LLSingleton<LLGridManager>
 					   const std::string& login, 
 					   const std::string& helper,
 					   const std::string& login_page,
+					   const std::string& update_url_base,
 					   const std::string& login_id = "");	
 	
 	
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index f038112fd0..f004e03a2d 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -135,6 +135,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
 								  const std::string& login, 
 								  const std::string& helper,
 								  const std::string& login_page,
+								  const std::string& update_url_base,
 								  const std::string& login_id)
 {
 }
@@ -208,9 +209,7 @@ std::string const & LLUpdaterService::pumpName(void)
 	return wakka;
 }
 bool LLUpdaterService::updateReadyToInstall(void) { return false; }
-void LLUpdaterService::initialize(const std::string& url, 
-								  const std::string& path,
-								  const std::string& channel,
+void LLUpdaterService::initialize(const std::string& channel,
 								  const std::string& version,
 								  const std::string& platform,
 								  const std::string& platform_version,
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index a1e97ea17e..8ebfde580b 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -127,6 +127,7 @@ const char *gSampleGridFile =
 	"      <array>"
 	"        <string>myloginuri</string>"
 	"      </array>"
+	"      <key>update_query_url_base</key><string>https://update.secondlife.com/update</string>"
 	"      <key>keyname</key><string>util.foobar.lindenlab.com</string>"
 	"    </map>"
 	"  </map>"
@@ -185,6 +186,9 @@ namespace tut
 		ensure_equals("id for agni",
 					  std::string("Agni"),
 					  LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"));
+		ensure_equals("update url base for Agni", // relies on agni being the default
+					  std::string("https://update.secondlife.com/update"),
+					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure_equals("label for agni",
 					  LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
 					  std::string("Second Life Main Grid (Agni)"));
@@ -256,6 +260,9 @@ namespace tut
 		ensure_equals("id for agni",
 					  LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"),
 					  std::string("Agni"));
+		ensure_equals("update url base for Agni", // relies on agni being the default
+					  std::string("https://update.secondlife.com/update"),
+					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure_equals("label for agni",
 					  LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
 					  std::string("Second Life Main Grid (Agni)"));
@@ -384,6 +391,9 @@ namespace tut
 		ensure_equals("getLoginPage",
 					  LLGridManager::getInstance()->getLoginPage(),
 					  std::string("http://viewer-login.agni.lindenlab.com/"));
+		ensure_equals("update url base for Agni", // relies on agni being the default
+					  std::string("https://update.secondlife.com/update"),
+					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid());
 		std::vector<std::string> uris;
 		LLGridManager::getInstance()->getLoginURIs(uris);
-- 
cgit v1.2.3


From 879dfd161ef19f73371b69e5db6b044f8b118ca1 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 11 Jul 2013 19:42:43 -0400
Subject: CHOP-959: Re-add global coordinates, plus SLURL, to About box.

---
 indra/newview/llfloaterabout.cpp                     | 5 +++++
 indra/newview/skins/default/xui/en/floater_about.xml | 2 ++
 2 files changed, 7 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 318a03f755..163f294d2a 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -33,8 +33,10 @@
 
 // Viewer includes
 #include "llagent.h"
+#include "llagentui.h"
 #include "llappviewer.h" 
 #include "llsecondlifeurls.h"
+#include "llslurl.h"
 #include "llvoiceclient.h"
 #include "lluictrlfactory.h"
 #include "llviewertexteditor.h"
@@ -257,6 +259,9 @@ LLSD LLFloaterAbout::getInfo()
 		info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
 		info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
 		info["SERVER_VERSION"] = gLastVersionChannel;
+		LLSLURL slurl;
+		LLAgentUI::buildSLURL(slurl);
+		info["SLURL"] = slurl.getSLURLString();
 	}
 
 	// CPU
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index d9e4b5b70c..703015af20 100755
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -23,6 +23,8 @@ Built with [COMPILER] version [COMPILER_VERSION]
   <floater.string
      name="AboutPosition">
 You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
+SLURL: &lt;nolink&gt;[SLURL]&lt;/nolink&gt;
+(global coordinates [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1])
 [SERVER_VERSION]
 [SERVER_RELEASE_NOTES_URL]
 
-- 
cgit v1.2.3


From d2dd3be08b3d460054366a66481bcf3110005291 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Sat, 13 Jul 2013 15:03:39 -0400
Subject: CHOP-963: Add a new --update-service command line argument for QA use

---
 indra/newview/app_settings/cmd_line.xml | 10 ++++++++++
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llviewernetwork.cpp       | 18 ++++++++++++++++--
 3 files changed, 37 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 7ab7787d77..f60fc3afb2 100755
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -108,6 +108,16 @@
       <string>CmdLineGridChoice</string>
     </map>
 
+    <key>update-service</key>
+    <map>
+      <key>desc</key>
+      <string>Override the url base for the update query.</string>
+      <key>count</key>
+      <integer>1</integer>
+      <key>map-to</key>
+      <string>CmdLineUpdateService</string>
+    </map>
+
     <key>help</key>
     <map>
       <key>desc</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 344079b640..0ec3d2545c 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1760,6 +1760,17 @@
       <key>Value</key>
       <string />
     </map>
+    <key>CmdLineUpdateService</key>
+    <map>
+      <key>Comment</key>
+      <string>Override the url base for the update query.</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string />
+    </map>
     <key>CmdLineHelperURI</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 371b00b173..e7821d4b9e 100755
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -547,11 +547,25 @@ std::string LLGridManager::getGridLoginID()
 
 std::string LLGridManager::getUpdateServiceURL()
 {
-	std::string update_url_base;
-	if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
+	std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");;
+	if ( !update_url_base.empty() )
+	{
+		LL_INFOS2("UpdaterService","GridManager")
+			<< "Update URL base overridden from command line: " << update_url_base
+			<< LL_ENDL;
+	}
+	else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
 	{
 		update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString();
 	}
+	else
+	{
+		LL_WARNS2("UpdaterService","GridManager")
+			<< "The grid property '" << GRID_UPDATE_SERVICE_URL
+			<< "' is not defined for the grid '" << mGrid << "'"
+			<< LL_ENDL;
+	}
+			
 	return update_url_base;
 }
 
-- 
cgit v1.2.3


From cfd17448be0c464c1ca64b1e8f3260aa4e98b0ca Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 16 Jul 2013 14:17:00 -0400
Subject: CHOP-960: Validate cmd_line.xml for map-to real settings.xml vars. A
 small, fixed set of cmd_line.xml switches can't reasonably be mapped to
 settings variables, mostly because they affect the settings machinery itself.
 Other than those, every new cmd_line.xml switch should map-to a settings
 variable. Validate that only the known set does not have map-to; validate
 that map-to variable actually exists.

---
 indra/newview/llcommandlineparser.cpp | 46 +++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 17d403bbe1..7adc6b8c5e 100755
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -39,13 +39,17 @@
 
 #include <boost/program_options.hpp>
 #include <boost/bind.hpp>
-#include<boost/tokenizer.hpp>
+#include <boost/tokenizer.hpp>
+#include <boost/assign/list_of.hpp>
 
 #if _MSC_VER
 #   pragma warning(pop)
 #endif
 
 #include "llsdserialize.h"
+#include "llerror.h"
+#include <string>
+#include <set>
 #include <iostream>
 #include <sstream>
 
@@ -63,6 +67,18 @@ namespace po = boost::program_options;
 // This could be good or bad, and probably won't matter for most use cases.
 namespace 
 {
+    // List of command-line switches that can't map-to settings variables.
+    // Going forward, we want every new command-line switch to map-to some
+    // settings variable. This list is used to validate that.
+    const std::set<std::string> unmapped_options = boost::assign::list_of
+        ("help")
+        ("set")
+        ("setdefault")
+        ("settings")
+        ("sessionsettings")
+        ("usersessionsettings")
+    ;
+
     po::options_description gOptionsDesc;
     po::positional_options_description gPositionalOptions;
 	po::variables_map gVariableMap;
@@ -561,9 +577,35 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
             }
 
             boost::function1<void, const token_vector_t&> callback;
-            if(option_params.has("map-to") && (NULL != controlGroup))
+            if (! option_params.has("map-to"))
+            {
+                // If this option isn't mapped to a settings variable, is it
+                // one of the ones for which that's unreasonable, or did
+                // someone carelessly add a new option? (Make all these
+                // configuration errors fatal so a maintainer will catch them
+                // right away.)
+                std::set<std::string>::const_iterator found = unmapped_options.find(long_name);
+                if (found == unmapped_options.end())
+                {
+                    llerrs << "New command-line option " << long_name
+                           << " should map-to a variable in settings.xml" << llendl;
+                }
+            }
+            else                    // option specifies map-to
             {
                 std::string controlName = option_params["map-to"].asString();
+                if (! controlGroup)
+                {
+                    llerrs << "Must pass gSavedSettings to LLControlGroupCLP::configure() for "
+                           << long_name << " (map-to " << controlName << ")" << llendl;
+                }
+
+                if (! controlGroup->getControl(controlName))
+                {
+                    llerrs << "Option " << long_name << " specifies map-to " << controlName
+                           << " which does not exist" << llendl;
+                }
+
                 callback = boost::bind(setControlValueCB, _1, 
                                        controlName, controlGroup);
             }
-- 
cgit v1.2.3


From 611c31a80173473431ba47a7c2037e710465453b Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 16 Jul 2013 17:11:31 -0400
Subject: CHOP-966: use 4 part version numbers for release notes urls

---
 indra/newview/llfloaterabout.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 83fb887d81..ab3dd9443f 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -307,12 +307,12 @@ LLSD LLFloaterAbout::getInfo()
 static std::string get_viewer_release_notes_url()
 {
 	// return a URL to the release notes for this viewer, such as:
-	// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0
+	// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456
 	std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
 	if (! LLStringUtil::endsWith(url, "/"))
 		url += "/";
 	url += LLVersionInfo::getChannel() + "/";
-	url += LLVersionInfo::getShortVersion();
+	url += LLVersionInfo::getVersion();
 	return LLWeb::escapeURL(url);
 }
 
-- 
cgit v1.2.3


From 2b3c1bd40d11b02cb097cb3dba7a661a4b528a91 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 17 Jul 2013 08:23:42 -0400
Subject: CHOP-962: Make LLControlGroup::declare* return LLControlVariable*
 LLControlGroup::declareControl(), declareString() etc. etc. all used to
 return BOOL -- which no one ever examines because it unconditionally returned
 TRUE. Make it return the (possibly new) LLControlVariable* instead.

---
 indra/newview/tests/llagentaccess_test.cpp      | 4 ++--
 indra/newview/tests/lllogininstance_test.cpp    | 4 ++--
 indra/newview/tests/llsecapi_test.cpp           | 4 ++--
 indra/newview/tests/llsechandler_basic_test.cpp | 4 ++--
 indra/newview/tests/llslurl_test.cpp            | 4 ++--
 indra/newview/tests/llviewerhelputil_test.cpp   | 4 ++--
 indra/newview/tests/llviewernetwork_test.cpp    | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 3ba25f3c10..1f379ead32 100755
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -49,10 +49,10 @@ LLControlGroup::~LLControlGroup()
 }
 
 // Implementation of just the LLControlGroup methods we requre
-BOOL LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
+LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
 {
 	test_preferred_maturity = initial_val;
-	return true;
+	return NULL;
 }
 
 void LLControlGroup::setU32(const std::string& name, U32 val)
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index f038112fd0..4768d9351e 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -175,8 +175,8 @@ F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
 U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
 void LLControlGroup::setString(const std::string& name, const std::string& val) {}
 std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
-BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
-BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
+LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return NULL; }
+LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return NULL; }
 
 #include "lluicolortable.h"
 void LLUIColorTable::saveUserSettings(void)const {}
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 703603e2db..05bac0e23b 100755
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -39,10 +39,10 @@
 LLControlGroup::LLControlGroup(const std::string& name)
 : LLInstanceTracker<LLControlGroup, std::string>(name) {}
 LLControlGroup::~LLControlGroup() {}
-BOOL LLControlGroup::declareString(const std::string& name,
+LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return TRUE;}
+                                   BOOL persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index 0235400976..3fbb45f8b4 100755
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -71,10 +71,10 @@ std::string gLastName;
 LLControlGroup::LLControlGroup(const std::string& name)
 : LLInstanceTracker<LLControlGroup, std::string>(name) {}
 LLControlGroup::~LLControlGroup() {}
-BOOL LLControlGroup::declareString(const std::string& name,
+LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return TRUE;}
+                                   BOOL persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 09343ef227..a3735388df 100755
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -37,10 +37,10 @@
 LLControlGroup::LLControlGroup(const std::string& name)
 : LLInstanceTracker<LLControlGroup, std::string>(name) {}
 LLControlGroup::~LLControlGroup() {}
-BOOL LLControlGroup::declareString(const std::string& name,
+LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return TRUE;}
+                                   BOOL persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 
 std::string gCmdLineLoginURI;
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 710881d811..8e9cc7111b 100755
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -49,10 +49,10 @@ static std::string gOS;
 LLControlGroup::LLControlGroup(const std::string& name)
 	: LLInstanceTracker<LLControlGroup, std::string>(name) {}
 LLControlGroup::~LLControlGroup() {}
-BOOL LLControlGroup::declareString(const std::string& name,
+LLControlVariable* LLControlGroup::declareString(const std::string& name,
 				   const std::string& initial_val,
 				   const std::string& comment,
-				   BOOL persist) {return TRUE;}
+				   BOOL persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index a1e97ea17e..f80c02475d 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -37,10 +37,10 @@
 LLControlGroup::LLControlGroup(const std::string& name)
 : LLInstanceTracker<LLControlGroup, std::string>(name) {}
 LLControlGroup::~LLControlGroup() {}
-BOOL LLControlGroup::declareString(const std::string& name,
+LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return TRUE;}
+                                   BOOL persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 
 std::string gCmdLineLoginURI;
-- 
cgit v1.2.3


From 9da176181abe930b7473b3b4e42930c8f2b481f8 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 23 Jul 2013 14:02:50 +0300
Subject: CHUI-986 FIXED Don't open Conversation floater for offline IMs if
 it's not from group or friend.

---
 indra/newview/llimview.cpp | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 09f47c136f..9e23755d73 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2669,6 +2669,13 @@ void LLIMMgr::addMessage(
 		fixed_session_name = session_name;
 		name_is_setted = true;
 	}
+	bool skip_message = false;
+	if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
+	{
+		// Evaluate if we need to skip this message when that setting is true (default is false)
+		skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL);	// Skip non friends...
+		skip_message &= !(other_participant_id == gAgentID);	// You are your best friend... Don't skip yourself
+	}
 
 	bool new_session = !hasSession(new_session_id);
 	if (new_session)
@@ -2680,6 +2687,12 @@ void LLIMMgr::addMessage(
 		}
 		LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, false, is_offline_msg);
 
+		LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id);
+		skip_message &= !session->isGroupSessionType();			// Do not skip group chats...
+		if(skip_message)
+		{
+			gIMMgr->leaveSession(new_session_id);
+		}
 		// When we get a new IM, and if you are a god, display a bit
 		// of information about the source. This is to help liaisons
 		// when answering questions.
@@ -2720,23 +2733,13 @@ void LLIMMgr::addMessage(
         }
 	}
 
-	bool skip_message = false;
-	if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
-	{
-		// Evaluate if we need to skip this message when that setting is true (default is false)
-		LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id);
-		skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL);	// Skip non friends...
-		skip_message &= !session->isGroupSessionType();			// Do not skip group chats...
-		skip_message &= !(other_participant_id == gAgentID);	// You are your best friend... Don't skip yourself
-	}
-
 	if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message)
 	{
 		LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg);
 	}
 
 	// Open conversation floater if offline messages are present
-	if (is_offline_msg)
+	if (is_offline_msg && !skip_message)
     {
         LLFloaterReg::showInstance("im_container");
 	    LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->
-- 
cgit v1.2.3


From 10c8fbbedbee07355f71ef206c50957a422d7ccf Mon Sep 17 00:00:00 2001
From: JJ Linden <jj@lindenlab.com>
Date: Wed, 24 Jul 2013 14:38:23 -0700
Subject: added default sourceid and check that sourceid is not blank, hoping
 to get the windows builds to recognize the value

---
 indra/newview/viewer_manifest.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 206f81cdc2..827a8f44c3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -113,12 +113,14 @@ class ViewerManifest(LLManifest):
                     # no sourceid, no settings_install.xml file
                     pass
                 else:
-                    # Single-entry subset of the LLSD content of settings.xml
-                    content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
-                                                 Persist=1,
-                                                 Type='String',
-                                                 Value=sourceid))
-                    self.put_in_file(llsd.format_pretty_xml(content), "settings_install.xml")
+                    if len(sourceid) > 0:
+                        print "Using sourceid: " + sourceid
+                        # Single-entry subset of the LLSD content of settings.xml
+                        content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
+                                                     Persist=1,
+                                                     Type='String',
+                                                     Value=sourceid))
+                        self.put_in_file(llsd.format_pretty_xml(content), "settings_install.xml")
 
                 self.end_prefix("app_settings")
 
-- 
cgit v1.2.3


From d2386652f8a44c5adcc7fbcc65741649dd90aa2b Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 25 Jul 2013 16:46:51 -0400
Subject: CHOP-962: Make LLControlVariable::setPersist() accept only enum.
 Initial change made LLControlVariable::mPersist an enum, but retained
 bool/BOOL public API. setPersist(true) set one value, setPersist(false) set
 another, forcePersist() set the third. Per code review, expose enum to
 public, make setPersist() (and LLControlVariable constructor, and
 LLControlGroup:: declareControl(), and all the
 LLControlGroup::declareMumble() methods, and all the unit-test dummy
 declareMumble() method bodies) accept that enum. Remove forcePersist(). Fix
 calls to LLControlGroup::declareMumble() accordingly. Also rename PERSIST_YES
 to PERSIST_NONDFT, also per code review.

---
 indra/newview/llagent.cpp                       |  2 +-
 indra/newview/llfloaterimnearbychat.cpp         |  2 +-
 indra/newview/tests/llagentaccess_test.cpp      | 12 ++++++------
 indra/newview/tests/lllogininstance_test.cpp    | 18 +++++++++---------
 indra/newview/tests/llsecapi_test.cpp           |  2 +-
 indra/newview/tests/llsechandler_basic_test.cpp |  2 +-
 indra/newview/tests/llslurl_test.cpp            |  2 +-
 indra/newview/tests/llviewerhelputil_test.cpp   |  2 +-
 indra/newview/tests/llviewernetwork_test.cpp    |  2 +-
 indra/newview/tests/llxmlrpclistener_test.cpp   |  4 ++--
 10 files changed, 24 insertions(+), 24 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3e94c5edf7..05f3824485 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -433,7 +433,7 @@ void LLAgent::init()
 {
 	mMoveTimer.start();
 
-	gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE);
+	gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO);
 	gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2));
 	
 	// *Note: this is where LLViewerCamera::getInstance() used to be constructed.
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 56b0c15cb9..38592b3f65 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -125,7 +125,7 @@ BOOL LLFloaterIMNearbyChat::postBuild()
 	setTitle(LLTrans::getString("NearbyChatTitle"));
 
 	// obsolete, but may be needed for backward compatibility?
-	gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", true);
+	gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", LLControlVariable::PERSIST_NONDFT);
 
 	if (gSavedPerAccountSettings.getBOOL("LogShowHistory"))
 	{
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 1f379ead32..a40b5c9a3d 100755
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -49,7 +49,7 @@ LLControlGroup::~LLControlGroup()
 }
 
 // Implementation of just the LLControlGroup methods we requre
-LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
+LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
 {
 	test_preferred_maturity = initial_val;
 	return NULL;
@@ -80,7 +80,7 @@ namespace tut
 	void agentaccess_object_t::test<1>()
 	{
 		LLControlGroup cgr("test");
-		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
 		LLAgentAccess aa(cgr);
 		
 		cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
@@ -109,7 +109,7 @@ namespace tut
 	void agentaccess_object_t::test<2>()
 	{
 		LLControlGroup cgr("test");
-		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
 		LLAgentAccess aa(cgr);
 		
 		// make sure default is PG
@@ -157,7 +157,7 @@ namespace tut
 	void agentaccess_object_t::test<3>()
 	{
 		LLControlGroup cgr("test");
-		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
 		LLAgentAccess aa(cgr);
 		
 #ifndef HACKED_GODLIKE_VIEWER
@@ -195,7 +195,7 @@ namespace tut
 	void agentaccess_object_t::test<4>()
 	{
 		LLControlGroup cgr("test");
-		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
 		LLAgentAccess aa(cgr);
 		
 #ifndef HACKED_GODLIKE_VIEWER
@@ -272,7 +272,7 @@ namespace tut
 	void agentaccess_object_t::test<5>()
 	{
 		LLControlGroup cgr("test");
-		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
 		LLAgentAccess aa(cgr);
 		
 		cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 4768d9351e..272a46aa8d 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -175,8 +175,8 @@ F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
 U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
 void LLControlGroup::setString(const std::string& name, const std::string& val) {}
 std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
-LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return NULL; }
-LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return NULL; }
+LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
+LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
 
 #include "lluicolortable.h"
 void LLUIColorTable::saveUserSettings(void)const {}
@@ -344,13 +344,13 @@ namespace tut
 			gTOSReplyPump = 0; // clear the callback.
 
 
-			gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
-			gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", FALSE);
-			gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", FALSE);
-			gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", FALSE);
-			gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", FALSE);
-			gSavedSettings.declareString("NextLoginLocation", "", "", FALSE);
-			gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE);
+			gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
+			gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
 
 			LLSD authenticator = LLSD::emptyMap();
 			LLSD identifier = LLSD::emptyMap();
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 05bac0e23b..d7e87ed52e 100755
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -42,7 +42,7 @@ LLControlGroup::~LLControlGroup() {}
 LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return NULL;}
+                                   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index 3fbb45f8b4..2a8dc15346 100755
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -74,7 +74,7 @@ LLControlGroup::~LLControlGroup() {}
 LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return NULL;}
+                                   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index a3735388df..86229ad636 100755
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -40,7 +40,7 @@ LLControlGroup::~LLControlGroup() {}
 LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return NULL;}
+                                   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 
 std::string gCmdLineLoginURI;
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 8e9cc7111b..f6456a2839 100755
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -52,7 +52,7 @@ LLControlGroup::~LLControlGroup() {}
 LLControlVariable* LLControlGroup::declareString(const std::string& name,
 				   const std::string& initial_val,
 				   const std::string& comment,
-				   BOOL persist) {return NULL;}
+				   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 std::string LLControlGroup::getString(const std::string& name)
 {
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index f80c02475d..06de1cbfa2 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -40,7 +40,7 @@ LLControlGroup::~LLControlGroup() {}
 LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
-                                   BOOL persist) {return NULL;}
+                                   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
 
 std::string gCmdLineLoginURI;
diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp
index 711c2a3d51..20f913b670 100755
--- a/indra/newview/tests/llxmlrpclistener_test.cpp
+++ b/indra/newview/tests/llxmlrpclistener_test.cpp
@@ -62,8 +62,8 @@ namespace tut
             // These variables are required by machinery used by
             // LLXMLRPCTransaction. The values reflect reality for this test
             // executable; hopefully these values are correct.
-            gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", FALSE); // don't persist
-            gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", FALSE); // don't persist
+            gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", LLControlVariable::PERSIST_NO); // don't persist
+            gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", LLControlVariable::PERSIST_NO); // don't persist
         }
 
         // LLEventPump listener signature
-- 
cgit v1.2.3


From c109361861a9f96566ae4acbc2b42e6afd5180bf Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 26 Jul 2013 08:58:47 -0400
Subject: CHOP-962: per code review, comment that other code relies on
 "Global". The comment advises grepping for "Global" rather than specifically
 pointing to llcontrol.cpp because that's NOT the only place that relies on
 the name "Global"! Besides, by the time someone does want to change the name,
 still other such dependencies could've crept in.

---
 indra/newview/llviewercontrol.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index afbb59e723..744ec4de2b 100755
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -83,7 +83,9 @@
 BOOL 				gHackGodmode = FALSE;
 #endif
 
-
+// Should you contemplate changing the name "Global", please first grep for
+// that string literal. There are at least a couple other places in the C++
+// code that assume the LLControlGroup named "Global" is gSavedSettings.
 LLControlGroup gSavedSettings("Global");	// saved at end of session
 LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
 LLControlGroup gCrashSettings("CrashSettings");	// saved at end of session
-- 
cgit v1.2.3


From a207b24d331539e16bd66ca09df3c585529c99f0 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 26 Jul 2013 10:42:13 -0400
Subject: CHOP-955: Include app_settings/settings_install.xml in file_list.
 viewer_manifest.py uses its base-class llmanifest.LLManifest.put_in_file()
 method to create several different files in the install image being
 marshalled. I based the logic to create settings_install.xml on that example.
 Unfortunately I failed to notice that after every existing call, the script
 also explicitly appended the newly-created file to self.file_list... which
 only matters on Windows. file_list is fed to the NSIS installer. Change
 put_in_file() method to implicitly append to self.file_list. Change every
 existing viewer_manifest.py call to pass new put_in_file(src=) param instead
 of explicitly appending to self.file_list.

---
 indra/newview/viewer_manifest.py | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 827a8f44c3..b9da6c9280 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -71,13 +71,13 @@ class ViewerManifest(LLManifest):
                 # include the entire shaders directory recursively
                 self.path("shaders")
                 # include the extracted list of contributors
-                contributor_names = self.extract_names("../../doc/contributions.txt")
-                self.put_in_file(contributor_names, "contributors.txt")
-                self.file_list.append(["../../doc/contributions.txt",self.dst_path_of("contributors.txt")])
+                contributions_path = "../../doc/contributions.txt"
+                contributor_names = self.extract_names(contributions_path)
+                self.put_in_file(contributor_names, "contributors.txt", src=contributions_path)
                 # include the extracted list of translators
-                translator_names = self.extract_names("../../doc/translations.txt")
-                self.put_in_file(translator_names, "translators.txt")
-                self.file_list.append(["../../doc/translations.txt",self.dst_path_of("translators.txt")])
+                translations_path = "../../doc/translations.txt"
+                translator_names = self.extract_names(translations_path)
+                self.put_in_file(translator_names, "translators.txt", src=translations_path)
                 # include the list of Lindens (if any)
                 #   see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
                 linden_names_path = os.getenv("LINDEN_CREDITS")
@@ -91,10 +91,9 @@ class ViewerManifest(LLManifest):
                     else:
                          # all names should be one line, but the join below also converts to a string
                         linden_names = ', '.join(linden_file.readlines())
-                        self.put_in_file(linden_names, "lindens.txt")
+                        self.put_in_file(linden_names, "lindens.txt", src=linden_names_path)
                         linden_file.close()
                         print "Linden names extracted from '%s'" % linden_names_path
-                        self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")])
 
                 # ... and the entire windlight directory
                 self.path("windlight")
@@ -113,14 +112,18 @@ class ViewerManifest(LLManifest):
                     # no sourceid, no settings_install.xml file
                     pass
                 else:
-                    if len(sourceid) > 0:
-                        print "Using sourceid: " + sourceid
+                    if sourceid:
                         # Single-entry subset of the LLSD content of settings.xml
                         content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
                                                      Persist=1,
                                                      Type='String',
                                                      Value=sourceid))
-                        self.put_in_file(llsd.format_pretty_xml(content), "settings_install.xml")
+                        # put_in_file(src=) need not be an actual pathname; it
+                        # only needs to be non-empty
+                        settings_install = self.put_in_file(llsd.format_pretty_xml(content),
+                                                            "settings_install.xml",
+                                                            src="environment")
+                        print "Put sourceid '%s' in %s" % (sourceid, settings_install)
 
                 self.end_prefix("app_settings")
 
-- 
cgit v1.2.3


From 32a953f65eae51850bad1b2c4c2a63d3dff12a68 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 2 Aug 2013 10:50:19 -0400
Subject: CHOP-959: Honor --graphicslevel switch even on first viewer run.
 Previous CHOP-959 logic set a flag to remember that settings variable
 RenderQualityPerformance was set (by --graphicslevel), so it could be applied
 once LLViewerWindow is constructed. But on first viewer run, LLViewerWindow
 constructor calls LLFeatureManager::applyRecommendedSettings(), which resets
 that settings variable! So don't just set a flag, actually capture the
 requested RenderQualityPerformance value for later.

---
 indra/newview/llappviewer.cpp | 26 +++++++++++++++++---------
 indra/newview/llappviewer.h   |  3 ++-
 2 files changed, 19 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 37f1f11451..6132e9b466 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -668,7 +668,6 @@ LLAppViewer::LLAppViewer() :
 	mSecondInstance(false),
 	mSavedFinalSnapshot(false),
 	mSavePerAccountSettings(false),		// don't save settings on logout unless login succeeded.
-	mForceGraphicsDetail(false),
 	mQuitRequested(false),
 	mLogoutRequestSent(false),
 	mYieldTime(-1),
@@ -2563,11 +2562,19 @@ bool LLAppViewer::initConfiguration()
 
 	if (clp.hasOption("graphicslevel"))
 	{
-		// User explicitly requested --graphicslevel on the command line.
-		// We expect this switch has already set RenderQualityPerformance.
-		// Check that value for validity; if valid, we'll engage it later.
-		mForceGraphicsDetail =
-			LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"));
+		// User explicitly requested --graphicslevel on the command line. We
+		// expect this switch has already set RenderQualityPerformance. Check
+		// that value for validity.
+		U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance");
+		if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel))
+		{
+			// graphicslevel is valid: save it and engage it later. Capture
+			// the requested value separately from the settings variable
+			// because, if this is the first run, LLViewerWindow's constructor
+			// will call LLFeatureManager::applyRecommendedSettings(), which
+			// overwrites this settings variable!
+			mForceGraphicsLevel = graphicslevel;
+		}
 	}
 
 	LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
@@ -3125,11 +3132,12 @@ bool LLAppViewer::initWindow()
 	// Initialize GL stuff
 	//
 
-	if (mForceGraphicsDetail)
+	if (mForceGraphicsLevel)
 	{
-		LLFeatureManager::getInstance()->setGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"), false);
+		LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false);
+		gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel);
 	}
-			
+
 	// Set this flag in case we crash while initializing GL
 	gSavedSettings.setBOOL("RenderInitError", TRUE);
 	gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index cd91ae8b2b..3af360b529 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -32,6 +32,7 @@
 #include "llsys.h"			// for LLOSInfo
 #include "lltimer.h"
 #include "llappcorehttp.h"
+#include <boost/optional.hpp>
 
 class LLCommandLineParser;
 class LLFrameTimer;
@@ -258,7 +259,7 @@ private:
 	bool mSavedFinalSnapshot;
 	bool mSavePerAccountSettings;		// only save per account settings if login succeeded
 
-	bool mForceGraphicsDetail;
+	boost::optional<U32> mForceGraphicsLevel;
 
     bool mQuitRequested;				// User wants to quit, may have modified documents open.
     bool mLogoutRequestSent;			// Disconnect message sent to simulator, no longer safe to send messages to the sim.
-- 
cgit v1.2.3


From 7f6e7fc0cb15d5367d48a3d8084d1a0b319575b7 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 5 Aug 2013 19:43:06 -0400
Subject: CHOP-951, IQA-1477: Validate args for numeric command-line switches.
 The logic in llcommandlineparser.cpp's setControlValueCB() callback function
 for converting command-line switch argument values from string to the actual
 type of the map-to settings variable had a couple special cases for boolean
 and LLSD array. But for S32, U32 and F32, it simply used default LLSD
 string-to-numeric conversion. LLSD's string-to-numeric conversion is a bit
 lame: for non-numeric strings, it shrugs and returns 0. Introduce onevalue()
 and badvalue() helper functions that, like certain errors during command-line
 parsing, throw LLCLPError. Use them to streamline certain redundancies in
 setControlValueCB(). Introduce convertTo<T>() helper function that uses
 boost::lexical_cast() for slightly more stringent conversions. Add cases for
 U32, S32 and F32 targets. setControlValueCB() is actually called only by
 LLControlGroupCLP::notify(), not during actual command-line parsing. Make
 LLControlGroupCLP::notify() return bool. Make it catch LLCLPError, set the
 error for getErrorMessage() and return false on that exception. Package
 LLAppViewer::initConfiguration()'s response to initParseCommandLine()
 returning false as a new handleCommandLineError() function; invoke it both
 there and when LLControlGroupCLP::notify() returns false.

---
 indra/newview/llappviewer.cpp         |  28 +++++--
 indra/newview/llcommandlineparser.cpp | 154 +++++++++++++++++++++++++++-------
 indra/newview/llcommandlineparser.h   |   2 +-
 3 files changed, 145 insertions(+), 39 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6132e9b466..b2aadf9cc0 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2306,6 +2306,20 @@ void LLAppViewer::loadColorSettings()
 	LLUIColorTable::instance().loadFromSettings();
 }
 
+namespace
+{
+    void handleCommandLineError(LLControlGroupCLP& clp)
+    {
+		llwarns << "Error parsing command line options. Command Line options ignored."  << llendl;
+
+		llinfos << "Command line usage:\n" << clp << llendl;
+
+		OSMessageBox(STRINGIZE(LLTrans::getString("MBCmdLineError") << clp.getErrorMessage()),
+					 LLStringUtil::null,
+					 OSMB_OK);
+    }
+} // anonymous namespace
+
 bool LLAppViewer::initConfiguration()
 {	
 	//Load settings files list
@@ -2404,13 +2418,7 @@ bool LLAppViewer::initConfiguration()
 
 	if(!initParseCommandLine(clp))
 	{
-		llwarns	<< "Error parsing command line options.	Command	Line options ignored."  << llendl;
-		
-		llinfos	<< "Command	line usage:\n" << clp << llendl;
-
-		std::ostringstream msg;
-		msg << LLTrans::getString("MBCmdLineError") << clp.getErrorMessage();
-		OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
+		handleCommandLineError(clp);
 		return false;
 	}
 	
@@ -2457,7 +2465,11 @@ bool LLAppViewer::initConfiguration()
 	loadSettingsFromDirectory("UserSession");
 
 	// - apply command line settings 
-	clp.notify(); 
+	if (! clp.notify())
+	{
+		handleCommandLineError(clp);
+		return false;
+	}
 
 	// Register the core crash option as soon as we can
 	// if we want gdb post-mortem on cores we need to be up and running
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 7adc6b8c5e..a6384ded12 100755
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -38,6 +38,7 @@
 #endif
 
 #include <boost/program_options.hpp>
+#include <boost/lexical_cast.hpp>
 #include <boost/bind.hpp>
 #include <boost/tokenizer.hpp>
 #include <boost/assign/list_of.hpp>
@@ -48,10 +49,12 @@
 
 #include "llsdserialize.h"
 #include "llerror.h"
+#include "stringize.h"
 #include <string>
 #include <set>
 #include <iostream>
 #include <sstream>
+#include <typeinfo>
 
 #include "llcontrol.h"
 
@@ -82,7 +85,7 @@ namespace
     po::options_description gOptionsDesc;
     po::positional_options_description gPositionalOptions;
 	po::variables_map gVariableMap;
-    
+
     const LLCommandLineParser::token_vector_t gEmptyValue;
 
     void read_file_into_string(std::string& str, const std::basic_istream < char >& file)
@@ -400,9 +403,19 @@ bool LLCommandLineParser::parseCommandLineFile(const std::basic_istream < char >
     return parseCommandLineString(args);
 }
 
-void LLCommandLineParser::notify()
+bool LLCommandLineParser::notify()
 {
-    po::notify(gVariableMap);    
+    try
+    {
+        po::notify(gVariableMap);
+        return true;
+    }
+    catch (const LLCLPError& e)
+    {
+        llwarns << "Caught Error: " << e.what() << llendl;
+        mErrorMsg = e.what();
+        return false;
+    }
 }
 
 void LLCommandLineParser::printOptions() const
@@ -444,43 +457,129 @@ const LLCommandLineParser::token_vector_t& LLCommandLineParser::getOption(const
 //----------------------------------------------------------------------------
 // LLControlGroupCLP defintions
 //----------------------------------------------------------------------------
+namespace {
+LLCommandLineParser::token_vector_t::value_type
+onevalue(const std::string& option,
+         const LLCommandLineParser::token_vector_t& value)
+{
+    if (value.empty())
+    {
+        // What does it mean when the user specifies a command-line switch
+        // that requires a value, but omits the value? Complain.
+        throw LLCLPError(STRINGIZE("No value specified for --" << option << "!"));
+    }
+    else if (value.size() > 1)
+    {
+        llwarns << "Ignoring extra tokens specified for --"
+                << option << "." << llendl; 
+    }
+    return value[0];
+}
+
+void badvalue(const std::string& option,
+              const std::string& varname,
+              const std::string& type,
+              const std::string& value)
+{
+    // If the user passes an unusable value for a command-line switch, it
+    // seems like a really bad idea to just ignore it, even with a log
+    // warning.
+    throw LLCLPError(STRINGIZE("Invalid value specified by command-line switch '" << option
+                               << "' for variable '" << varname << "' of type " << type
+                               << ": '" << value << "'"));
+}
+
+template <typename T>
+T convertTo(const std::string& option,
+            const std::string& varname,
+            const LLCommandLineParser::token_vector_t::value_type& value)
+{
+    try
+    {
+        return boost::lexical_cast<T>(value);
+    }
+    catch (const boost::bad_lexical_cast&)
+    {
+        badvalue(option, varname, typeid(T).name(), value);
+        // bogus return; compiler unaware that badvalue() won't return
+        return T();
+    }
+}
+
 void setControlValueCB(const LLCommandLineParser::token_vector_t& value, 
-                       const std::string& opt_name, 
-                       LLControlGroup* ctrlGroup)
+                       const std::string& option, 
+                       LLControlVariable* ctrl)
 {
-    // *FIX: Do sematic conversion here.
+    // *FIX: Do semantic conversion here.
     // LLSD (ImplString) Is no good for doing string to type conversion for...
     // booleans
     // compound types
     // ?...
 
-    LLControlVariable* ctrl = ctrlGroup->getControl(opt_name);
     if(NULL != ctrl)
     {
         switch(ctrl->type())
         {
         case TYPE_BOOLEAN:
-            if(value.size() > 1)
+            if (value.empty())
             {
-                llwarns << "Ignoring extra tokens." << llendl; 
+                // Boolean-valued command-line switches are unusual. If you
+                // simply specify the switch without an explicit value, we can
+                // infer you mean 'true'.
+                ctrl->setValue(LLSD(true), false);
             }
-              
-            if(value.size() > 0)
+            else
             {
+                // Only call onevalue() AFTER handling value.empty() case!
+                std::string token(onevalue(option, value));
+            
                 // There's a token. check the string for true/false/1/0 etc.
                 BOOL result = false;
-                BOOL gotSet = LLStringUtil::convertToBOOL(value[0], result);
-                if(gotSet)
+                BOOL gotSet = LLStringUtil::convertToBOOL(token, result);
+                if (gotSet)
                 {
                     ctrl->setValue(LLSD(result), false);
                 }
+                else
+                {
+                    badvalue(option, ctrl->getName(), "bool", token);
+                }
+            }
+            break;
+
+        case TYPE_U32:
+        {
+            std::string token(onevalue(option, value));
+            // To my surprise, for an unsigned target, lexical_cast() doesn't
+            // complain about an input string such as "-17". In that case, you
+            // get a very large positive result. So for U32, make sure there's
+            // no minus sign!
+            if (token.find('-') == std::string::npos)
+            {
+                ctrl->setValue(LLSD::Integer(convertTo<U32>(option, ctrl->getName(), token)),
+                               false);
             }
             else
             {
-                ctrl->setValue(LLSD(true), false);
+                badvalue(option, ctrl->getName(), "unsigned", token);
             }
             break;
+        }
+
+        case TYPE_S32:
+            ctrl->setValue(convertTo<S32>(option, ctrl->getName(),
+                                          onevalue(option, value)), false);
+            break;
+
+        case TYPE_F32:
+            ctrl->setValue(convertTo<F32>(option, ctrl->getName(),
+                                          onevalue(option, value)), false);
+            break;
 
+        // It appears that no one has yet tried to define a command-line
+        // switch mapped to a settings variable of TYPE_VEC3, TYPE_VEC3D,
+        // TYPE_RECT, TYPE_COL4, TYPE_COL3. Such types would certainly seem to
+        // call for a bit of special handling here...
         default:
             {
                 // For the default types, let llsd do the conversion.
@@ -497,16 +596,9 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
 
                     ctrl->setValue(llsdArray, false);
                 }
-                else if(value.size() > 0)
+                else
                 {
-					if(value.size() > 1)
-					{
-						llwarns << "Ignoring extra tokens mapped to the setting: " << opt_name << "." << llendl; 
-					}
-
-                    LLSD llsdValue;
-                    llsdValue.assign(LLSD::String(value[0]));
-                    ctrl->setValue(llsdValue, false);
+                    ctrl->setValue(onevalue(option, value), false);
                 }
             }
             break;
@@ -514,12 +606,14 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
     }
     else
     {
-        llwarns << "Command Line option mapping '" 
-            << opt_name 
-            << "' not found! Ignoring." 
-            << llendl;
+        // This isn't anything a user can affect -- it's a misconfiguration on
+        // the part of the coder. Rub the coder's nose in the problem right
+        // away so even preliminary testing will surface it.
+        llerrs << "Command Line option --" << option
+               << " maps to unknown setting!" << llendl;
     }
 }
+} // anonymous namespace
 
 void LLControlGroupCLP::configure(const std::string& config_filename, LLControlGroup* controlGroup)
 {
@@ -600,14 +694,14 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
                            << long_name << " (map-to " << controlName << ")" << llendl;
                 }
 
-                if (! controlGroup->getControl(controlName))
+                LLControlVariable* ctrl = controlGroup->getControl(controlName);
+                if (! ctrl)
                 {
                     llerrs << "Option " << long_name << " specifies map-to " << controlName
                            << " which does not exist" << llendl;
                 }
 
-                callback = boost::bind(setControlValueCB, _1, 
-                                       controlName, controlGroup);
+                callback = boost::bind(setControlValueCB, _1, long_name, ctrl);
             }
 
             this->addOptionDesc(
diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h
index 44f2a26843..71388b8217 100755
--- a/indra/newview/llcommandlineparser.h
+++ b/indra/newview/llcommandlineparser.h
@@ -86,7 +86,7 @@ public:
 	 * 
 	 * Use this to handle the results of parsing. 
 	 */
-	void notify();
+	bool notify();
 	
 	/** @brief Print a description of the configured options.
 	 *
-- 
cgit v1.2.3


From 6505ddb204082a0d327fb09210f2811be265e706 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Tue, 13 Aug 2013 20:25:49 +0300
Subject: MAINT-2937 FIXED [CHUI] crash in LLToastIMPanel

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

(limited to 'indra/newview')

diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 025ef3945d..09ab31df36 100755
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -63,7 +63,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif
 	style_params.font.size(font_size);
 	
 	LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(p.session_id);
-	mIsGroupMsg = (im_session->mSessionType == LLIMModel::LLIMSession::GROUP_SESSION);
+	mIsGroupMsg = (im_session && im_session->mSessionType == LLIMModel::LLIMSession::GROUP_SESSION);
 	if(mIsGroupMsg)
 	{
 		mAvatarName->setValue(im_session->mName);
-- 
cgit v1.2.3


From 22140012c2b8f40081027bdcf2f5fbcd8a4527e9 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 15 Aug 2013 12:37:24 +0300
Subject: MAINT-3012 FIXED Don't show Destination Guide by default on first
 run.

---
 indra/newview/app_settings/settings_per_account.xml | 13 +------------
 indra/newview/lltoolbarview.cpp                     | 19 -------------------
 2 files changed, 1 insertion(+), 31 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 590f41283b..636caf5ef3 100755
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -109,18 +109,7 @@
             <string>Boolean</string>
         <key>Value</key>
             <integer>0</integer>
-    </map>
-    <key>DisplayDestinationsOnInitialRun</key>
-        <map>
-        <key>Comment</key>
-          <string>Display the destinations guide when a user first launches Second Life.</string>
-        <key>Persist</key>
-          <integer>1</integer>
-        <key>Type</key>
-          <string>Boolean</string>
-        <key>Value</key>
-          <integer>1</integer>
-        </map>
+    </map>    
     <key>LastInventoryInboxActivity</key>
         <map>
         <key>Comment</key>
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 4f2c99fba8..78a555d67d 100755
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -51,8 +51,6 @@ LLToolBarView* gToolBarView = NULL;
 
 static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
 
-void handleLoginToolbarSetup();
-
 bool isToolDragged()
 {
 	return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER);
@@ -111,8 +109,6 @@ BOOL LLToolBarView::postBuild()
 		mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
 		mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1));
 	}
-
-	LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
 	
 	return TRUE;
 }
@@ -696,18 +692,3 @@ bool LLToolBarView::isModified() const
 }
 
 
-//
-// HACK to bring up destinations guide at startup
-//
-
-void handleLoginToolbarSetup()
-{
-	// Open the destinations guide by default on first login, per Rhett
-	if (gSavedPerAccountSettings.getBOOL("DisplayDestinationsOnInitialRun") || gAgent.isFirstLogin())
-	{
-		LLFloaterReg::showInstance("destinations");
-
-		gSavedPerAccountSettings.setBOOL("DisplayDestinationsOnInitialRun", FALSE);
-	}
-}
-
-- 
cgit v1.2.3


From 53eff025bc205e3127da4dc0c3df3cb406eb1153 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Thu, 15 Aug 2013 20:24:02 +0300
Subject: MAINT-2938 FIXED [CHUI] crash in
 LLFloaterConversationPreview::showHistory()

---
 indra/newview/llfloaterconversationpreview.cpp | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 1a3fa27593..b570de14aa 100755
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -152,6 +152,11 @@ void LLFloaterConversationPreview::showHistory()
 
 	for (int msg_num = 0; (iter != mMessages.end() && msg_num < mPageSize); ++iter, ++msg_num)
 	{
+		if (iter->size() == 0)
+		{
+			continue;
+		}
+
 		LLSD msg = *iter;
 
 		LLUUID from_id 		= LLUUID::null;
-- 
cgit v1.2.3


From 6e1138585bf745f73f0bb99ca62f77eeb273f1e4 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 26 Aug 2013 14:55:37 -0400
Subject: increment viewer version to 3.6.5

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

(limited to 'indra/newview')

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 0f44168a4d..d15b8b06fa 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.6.4
+3.6.5
-- 
cgit v1.2.3