summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BuildParams9
-rwxr-xr-xbuild.sh4
-rw-r--r--doc/contributions.txt10
-rw-r--r--indra/llcharacter/tests/lljoint_test.cpp2
-rw-r--r--indra/llcommon/tests/bitpack_test.cpp2
-rw-r--r--indra/llcommon/tests/commonmisc_test.cpp6
-rw-r--r--indra/llcommon/tests/llbase64_test.cpp2
-rw-r--r--indra/llcommon/tests/lldate_test.cpp2
-rw-r--r--indra/llcommon/tests/lldependencies_test.cpp2
-rw-r--r--indra/llcommon/tests/llframetimer_test.cpp2
-rw-r--r--indra/llcommon/tests/llprocessor_test.cpp2
-rw-r--r--indra/llcommon/tests/llrand_test.cpp2
-rw-r--r--indra/llcommon/tests/llsdserialize_test.cpp2
-rw-r--r--indra/llcommon/tests/llstring_test.cpp2
-rw-r--r--indra/llcommon/tests/lltreeiterators_test.cpp2
-rw-r--r--indra/llcommon/tests/stringize_test.cpp2
-rw-r--r--indra/llimage/tests/llimageworker_test.cpp4
-rw-r--r--indra/llinventory/tests/inventorymisc_test.cpp2
-rw-r--r--indra/llinventory/tests/llparcel_test.cpp2
-rw-r--r--indra/llmath/tests/llmodularmath_test.cpp2
-rw-r--r--indra/llmath/tests/llquaternion_test.cpp2
-rw-r--r--indra/llmath/tests/m3math_test.cpp2
-rw-r--r--indra/llmath/tests/mathmisc_test.cpp6
-rw-r--r--indra/llmath/tests/v2math_test.cpp2
-rw-r--r--indra/llmath/tests/v3color_test.cpp2
-rw-r--r--indra/llmath/tests/v3dmath_test.cpp2
-rw-r--r--indra/llmath/tests/v3math_test.cpp2
-rw-r--r--indra/llmath/tests/v4color_test.cpp2
-rw-r--r--indra/llmath/tests/v4coloru_test.cpp2
-rw-r--r--indra/llmath/tests/v4math_test.cpp2
-rw-r--r--indra/llmath/tests/xform_test.cpp2
-rw-r--r--indra/llmessage/tests/llhost_test.cpp2
-rw-r--r--indra/llmessage/tests/llmime_test.cpp4
-rw-r--r--indra/llmessage/tests/llnamevalue_test.cpp2
-rw-r--r--indra/llmessage/tests/llpartdata_test.cpp2
-rw-r--r--indra/llmessage/tests/llregionpresenceverifier_test.cpp2
-rw-r--r--indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp2
-rw-r--r--indra/llmessage/tests/lltrustedmessageservice_test.cpp2
-rw-r--r--indra/llmessage/tests/llxfer_file_test.cpp2
-rw-r--r--indra/llplugin/tests/llplugincookiestore_test.cpp2
-rw-r--r--indra/llprimitive/tests/llmediaentry_test.cpp2
-rw-r--r--indra/llprimitive/tests/llprimitive_test.cpp2
-rw-r--r--indra/llui/llmenugl.cpp22
-rw-r--r--indra/llui/llmenugl.h6
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/llavataractions.cpp16
-rw-r--r--indra/newview/llavataractions.h12
-rw-r--r--indra/newview/llcofwearables.cpp21
-rw-r--r--indra/newview/llcofwearables.h5
-rw-r--r--indra/newview/llcurrencyuimanager.cpp2
-rw-r--r--indra/newview/llfloaterbuyland.cpp1
-rw-r--r--indra/newview/llfloatermap.cpp9
-rw-r--r--indra/newview/llfloaterperms.cpp2
-rw-r--r--indra/newview/llfloatersnapshot.cpp5
-rw-r--r--indra/newview/llhudeffectbeam.cpp5
-rw-r--r--indra/newview/llhudeffectbeam.h1
-rw-r--r--indra/newview/llhudeffecttrail.cpp5
-rw-r--r--indra/newview/llhudeffecttrail.h1
-rw-r--r--indra/newview/llhudobject.cpp21
-rw-r--r--indra/newview/llhudobject.h2
-rw-r--r--indra/newview/llnetmap.cpp260
-rw-r--r--indra/newview/llnetmap.h28
-rw-r--r--indra/newview/llpaneloutfitedit.cpp41
-rw-r--r--indra/newview/llpanelpeople.cpp20
-rw-r--r--indra/newview/llpanelpeople.h1
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp7
-rw-r--r--indra/newview/llselectmgr.cpp4
-rw-r--r--indra/newview/llsidetray.cpp321
-rw-r--r--indra/newview/llsidetray.h16
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/llvoavatarself.cpp25
-rw-r--r--indra/newview/pipeline.cpp21
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml38
-rw-r--r--indra/newview/skins/default/xui/en/floater_side_bar_tab.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_mini_map.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml14
-rw-r--r--indra/newview/tests/llagentaccess_test.cpp2
-rw-r--r--indra/newview/tests/lldateutil_test.cpp2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp2
-rw-r--r--indra/newview/tests/llmediadataclient_test.cpp2
-rw-r--r--indra/newview/tests/llsecapi_test.cpp2
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp2
-rw-r--r--indra/newview/tests/llslurl_test.cpp2
-rw-r--r--indra/newview/tests/lltextureinfo_test.cpp2
-rw-r--r--indra/newview/tests/lltextureinfodetails_test.cpp2
-rw-r--r--indra/newview/tests/lltexturestatsuploader_test.cpp2
-rw-r--r--indra/newview/tests/llviewerhelputil_test.cpp2
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
-rw-r--r--indra/newview/tests/llworldmap_test.cpp6
-rw-r--r--indra/newview/tests/llworldmipmap_test.cpp2
-rw-r--r--indra/test/test.cpp302
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp2
94 files changed, 1095 insertions, 336 deletions
diff --git a/BuildParams b/BuildParams
index 8ca056db49..6b7d15f6cc 100644
--- a/BuildParams
+++ b/BuildParams
@@ -172,4 +172,13 @@ oz_viewer-review2_coverity.build_CYGWIN_Debug = false
oz_viewer-review2_coverity.build_CYGWIN_RelWithDebInfo = false
oz_viewer-review2_coverity.build_CYGWIN_Release = false
+# ========================================
+# enus
+# ========================================
+
+viewer-tut-teamcity.email = enus@lindenlab.com
+viewer-tut-teamcity.build_server = false
+viewer-tut-teamcity.build_server_tests = false
+
+
# eof
diff --git a/build.sh b/build.sh
index 3903216246..878aa45ce3 100755
--- a/build.sh
+++ b/build.sh
@@ -222,7 +222,7 @@ do
fi
else
begin_section "Build$variant"
- build "$variant" "$build_dir" >> "$build_log" 2>&1
+ build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | grep --line-buffered "^##teamcity"
if `cat "$build_dir/build_ok"`
then
echo so far so good.
@@ -251,7 +251,7 @@ then
begin_section "Build$variant"
build_dir=`build_dir_$arch $variant`
build_dir_stubs="$build_dir/win_setup/$variant"
- cat "$build_dir/build.log" >> "$build_log"
+ tee -a $build_log < "$build_dir/build.log" | grep --line-buffered "^##teamcity"
if `cat "$build_dir/build_ok"`
then
echo so far so good.
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 6d93eca14c..4ab7284b72 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -49,6 +49,7 @@ Aimee Trescothick
VWR-12631
VWR-12696
VWR-12748
+ VWR-13221
VWR-14087
VWR-14267
VWR-14278
@@ -184,6 +185,7 @@ Carjay McGinnis
Catherine Pfeffer
VWR-1282
VWR-8624
+ VWR-10854
Celierra Darling
VWR-1274
VWR-6975
@@ -310,6 +312,7 @@ Iskar Ariantho
VWR-1223
VWR-11759
Jacek Antonelli
+ SNOW-388
VWR-165
VWR-188
VWR-427
@@ -326,6 +329,8 @@ JB Kraft
VWR-7802
Joghert LeSabre
VWR-64
+Jonathan Yap
+ VWR-17801
Kage Pixel
VWR-11
Ken March
@@ -401,6 +406,7 @@ Michelle2 Zenovka
Mm Alder
VWR-197
VWR-3777
+ VWR-4232
VWR-4794
VWR-13578
Mr Greggan
@@ -631,6 +637,8 @@ Teardrops Fall
Techwolf Lupindo
SNOW-92
SNOW-649
+ SNOW-680
+ SNOW-681
VWR-12385
tenebrous pau
VWR-247
@@ -660,6 +668,8 @@ Tue Torok
CT-74
Vadim Bigbear
VWR-2681
+Vector Hastings
+ VWR-8726
Vixen Heron
VWR-2710
CT-88
diff --git a/indra/llcharacter/tests/lljoint_test.cpp b/indra/llcharacter/tests/lljoint_test.cpp
index 1c861b390a..e92aa832d6 100644
--- a/indra/llcharacter/tests/lljoint_test.cpp
+++ b/indra/llcharacter/tests/lljoint_test.cpp
@@ -42,7 +42,7 @@ namespace tut
};
typedef test_group<lljoint_data> lljoint_test;
typedef lljoint_test::object lljoint_object;
- tut::lljoint_test lljoint_testcase("lljoint");
+ tut::lljoint_test lljoint_testcase("LLJoint");
template<> template<>
void lljoint_object::test<1>()
diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp
index a74b5ebc3a..05289881d0 100644
--- a/indra/llcommon/tests/bitpack_test.cpp
+++ b/indra/llcommon/tests/bitpack_test.cpp
@@ -40,7 +40,7 @@ namespace tut
};
typedef test_group<bit_pack> bit_pack_t;
typedef bit_pack_t::object bit_pack_object_t;
- tut::bit_pack_t tut_bit_pack("bitpack");
+ tut::bit_pack_t tut_bit_pack("LLBitPack");
// pack -> unpack
template<> template<>
diff --git a/indra/llcommon/tests/commonmisc_test.cpp b/indra/llcommon/tests/commonmisc_test.cpp
index 390e3719cf..b115c153c1 100644
--- a/indra/llcommon/tests/commonmisc_test.cpp
+++ b/indra/llcommon/tests/commonmisc_test.cpp
@@ -59,7 +59,7 @@ namespace tut
};
typedef test_group<sd_data> sd_test;
typedef sd_test::object sd_object;
- tut::sd_test sd("llsd");
+ tut::sd_test sd("LLSD");
template<> template<>
void sd_object::test<1>()
@@ -450,7 +450,7 @@ namespace tut
};
typedef test_group<mem_data> mem_test;
typedef mem_test::object mem_object;
- tut::mem_test mem_stream("memory_stream");
+ tut::mem_test mem_stream("LLMemoryStream");
template<> template<>
void mem_object::test<1>()
@@ -643,7 +643,7 @@ namespace tut
};
typedef test_group<hash_data> hash_test;
typedef hash_test::object hash_object;
- tut::hash_test hash_tester("hash_test");
+ tut::hash_test hash_tester("LLHash");
template<> template<>
void hash_object::test<1>()
diff --git a/indra/llcommon/tests/llbase64_test.cpp b/indra/llcommon/tests/llbase64_test.cpp
index 70036dc186..d0394150fa 100644
--- a/indra/llcommon/tests/llbase64_test.cpp
+++ b/indra/llcommon/tests/llbase64_test.cpp
@@ -41,7 +41,7 @@ namespace tut
};
typedef test_group<base64_data> base64_test;
typedef base64_test::object base64_object;
- tut::base64_test base64("base64");
+ tut::base64_test base64("LLBase64");
template<> template<>
void base64_object::test<1>()
diff --git a/indra/llcommon/tests/lldate_test.cpp b/indra/llcommon/tests/lldate_test.cpp
index a8bfda5424..7c95ccb91f 100644
--- a/indra/llcommon/tests/lldate_test.cpp
+++ b/indra/llcommon/tests/lldate_test.cpp
@@ -71,7 +71,7 @@ namespace tut
};
typedef test_group<date_test> date_test_t;
typedef date_test_t::object date_test_object_t;
- tut::date_test_t tut_date_test("date_test");
+ tut::date_test_t tut_date_test("LLDate");
/* format validation */
template<> template<>
diff --git a/indra/llcommon/tests/lldependencies_test.cpp b/indra/llcommon/tests/lldependencies_test.cpp
index e4e30a33ec..e40743ccf7 100644
--- a/indra/llcommon/tests/lldependencies_test.cpp
+++ b/indra/llcommon/tests/lldependencies_test.cpp
@@ -145,7 +145,7 @@ namespace tut
};
typedef test_group<deps_data> deps_group;
typedef deps_group::object deps_object;
- tut::deps_group depsgr("lldependencies");
+ tut::deps_group depsgr("LLDependencies");
template<> template<>
void deps_object::test<1>()
diff --git a/indra/llcommon/tests/llframetimer_test.cpp b/indra/llcommon/tests/llframetimer_test.cpp
index 215dde7e70..8ac1c91a3a 100644
--- a/indra/llcommon/tests/llframetimer_test.cpp
+++ b/indra/llcommon/tests/llframetimer_test.cpp
@@ -43,7 +43,7 @@ namespace tut
};
typedef test_group<frametimer_test> frametimer_group_t;
typedef frametimer_group_t::object frametimer_object_t;
- tut::frametimer_group_t frametimer_instance("frametimer");
+ tut::frametimer_group_t frametimer_instance("LLFrameTimer");
template<> template<>
void frametimer_object_t::test<1>()
diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp
index 14adcc7303..884e1b5e5b 100644
--- a/indra/llcommon/tests/llprocessor_test.cpp
+++ b/indra/llcommon/tests/llprocessor_test.cpp
@@ -38,7 +38,7 @@ namespace tut
typedef test_group<processor> processor_t;
typedef processor_t::object processor_object_t;
- tut::processor_t tut_processor("processor");
+ tut::processor_t tut_processor("LLProcessor");
template<> template<>
void processor_object_t::test<1>()
diff --git a/indra/llcommon/tests/llrand_test.cpp b/indra/llcommon/tests/llrand_test.cpp
index a21159d47e..383e6f9e0a 100644
--- a/indra/llcommon/tests/llrand_test.cpp
+++ b/indra/llcommon/tests/llrand_test.cpp
@@ -39,7 +39,7 @@ namespace tut
typedef test_group<random> random_t;
typedef random_t::object random_object_t;
- tut::random_t tut_random("random");
+ tut::random_t tut_random("LLSeedRand");
template<> template<>
void random_object_t::test<1>()
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 9eaa307141..770443da1d 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -74,7 +74,7 @@ namespace tut
typedef test_group<sd_xml_data> sd_xml_test;
typedef sd_xml_test::object sd_xml_object;
- tut::sd_xml_test sd_xml_stream("sd_xml_serialization");
+ tut::sd_xml_test sd_xml_stream("LLSDXMLFormatter");
template<> template<>
void sd_xml_object::test<1>()
diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp
index aa36aab0dc..304e91ed92 100644
--- a/indra/llcommon/tests/llstring_test.cpp
+++ b/indra/llcommon/tests/llstring_test.cpp
@@ -38,7 +38,7 @@ namespace tut
};
typedef test_group<string_index> string_index_t;
typedef string_index_t::object string_index_object_t;
- tut::string_index_t tut_string_index("string_test");
+ tut::string_index_t tut_string_index("LLString");
template<> template<>
void string_index_object_t::test<1>()
diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp
index b0b4c7e0ad..1d619867d4 100644
--- a/indra/llcommon/tests/lltreeiterators_test.cpp
+++ b/indra/llcommon/tests/lltreeiterators_test.cpp
@@ -56,7 +56,7 @@ namespace tut
};
typedef test_group<iter_data> iter_group;
typedef iter_group::object iter_object;
- tut::iter_group ig("lltreeiterators");
+ tut::iter_group ig("LLTreeIterators");
} // namespace tut
/*****************************************************************************
diff --git a/indra/llcommon/tests/stringize_test.cpp b/indra/llcommon/tests/stringize_test.cpp
index 757aa85ed7..3d34f23998 100644
--- a/indra/llcommon/tests/stringize_test.cpp
+++ b/indra/llcommon/tests/stringize_test.cpp
@@ -80,7 +80,7 @@ namespace tut
};
typedef test_group<stringize_data> stringize_group;
typedef stringize_group::object stringize_object;
- tut::stringize_group strzgrp("stringize");
+ tut::stringize_group strzgrp("stringize_h");
template<> template<>
void stringize_object::test<1>()
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index 98694aa7ee..a109276709 100644
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -144,11 +144,11 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<imagedecodethread_test> imagedecodethread_t;
typedef imagedecodethread_t::object imagedecodethread_object_t;
- tut::imagedecodethread_t tut_imagedecodethread("imagedecodethread");
+ tut::imagedecodethread_t tut_imagedecodethread("LLImageDecodeThread");
typedef test_group<imagerequest_test> imagerequest_t;
typedef imagerequest_t::object imagerequest_object_t;
- tut::imagerequest_t tut_imagerequest("imagerequest");
+ tut::imagerequest_t tut_imagerequest("LLImageRequest");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp
index 9773a3fed4..c9af7c4eac 100644
--- a/indra/llinventory/tests/inventorymisc_test.cpp
+++ b/indra/llinventory/tests/inventorymisc_test.cpp
@@ -100,7 +100,7 @@ namespace tut
};
typedef test_group<inventory_data> inventory_test;
typedef inventory_test::object inventory_object;
- tut::inventory_test inv("llinventory");
+ tut::inventory_test inv("LLInventory");
//***class LLInventoryType***//
diff --git a/indra/llinventory/tests/llparcel_test.cpp b/indra/llinventory/tests/llparcel_test.cpp
index 80d0bdae5a..f2e4b03ff7 100644
--- a/indra/llinventory/tests/llparcel_test.cpp
+++ b/indra/llinventory/tests/llparcel_test.cpp
@@ -40,7 +40,7 @@ namespace tut
};
typedef test_group<llinventoryparcel_data> llinventoryparcel_test;
typedef llinventoryparcel_test::object llinventoryparcel_object;
- tut::llinventoryparcel_test llinventoryparcel("llinventoryparcel");
+ tut::llinventoryparcel_test llinventoryparcel("LLInventoryParcel");
template<> template<>
void llinventoryparcel_object::test<1>()
diff --git a/indra/llmath/tests/llmodularmath_test.cpp b/indra/llmath/tests/llmodularmath_test.cpp
index e6525542f1..063d3ef79f 100644
--- a/indra/llmath/tests/llmodularmath_test.cpp
+++ b/indra/llmath/tests/llmodularmath_test.cpp
@@ -39,7 +39,7 @@ namespace tut
};
typedef test_group<modularmath_data> modularmath_test;
typedef modularmath_test::object modularmath_object;
- tut::modularmath_test modularmath_testcase("modularmath");
+ tut::modularmath_test modularmath_testcase("LLModularMath");
template<> template<>
void modularmath_object::test<1>()
diff --git a/indra/llmath/tests/llquaternion_test.cpp b/indra/llmath/tests/llquaternion_test.cpp
index 29e7793d49..9e79b299ff 100644
--- a/indra/llmath/tests/llquaternion_test.cpp
+++ b/indra/llmath/tests/llquaternion_test.cpp
@@ -43,7 +43,7 @@ namespace tut
};
typedef test_group<llquat_test> llquat_test_t;
typedef llquat_test_t::object llquat_test_object_t;
- tut::llquat_test_t tut_llquat_test("llquat");
+ tut::llquat_test_t tut_llquat_test("LLQuaternion");
//test case for LLQuaternion::LLQuaternion(void) fn.
template<> template<>
diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp
index 3b424f79c6..8abf61b740 100644
--- a/indra/llmath/tests/m3math_test.cpp
+++ b/indra/llmath/tests/m3math_test.cpp
@@ -44,7 +44,7 @@ namespace tut
};
typedef test_group<m3math_test> m3math_test_t;
typedef m3math_test_t::object m3math_test_object_t;
- tut::m3math_test_t tut_m3math_test("m3math_test");
+ tut::m3math_test_t tut_m3math_test("m3math_h");
//test case for setIdentity() fn.
template<> template<>
diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp
index 58b78cd491..91a2e6c009 100644
--- a/indra/llmath/tests/mathmisc_test.cpp
+++ b/indra/llmath/tests/mathmisc_test.cpp
@@ -45,7 +45,7 @@ namespace tut
};
typedef test_group<math_data> math_test;
typedef math_test::object math_object;
- tut::math_test tm("basic_linden_math");
+ tut::math_test tm("BasicLindenMath");
template<> template<>
void math_object::test<1>()
@@ -178,7 +178,7 @@ namespace tut
};
typedef test_group<uuid_data> uuid_test;
typedef uuid_test::object uuid_object;
- tut::uuid_test tu("uuid");
+ tut::uuid_test tu("LLUUID");
template<> template<>
void uuid_object::test<1>()
@@ -233,7 +233,7 @@ namespace tut
};
typedef test_group<crc_data> crc_test;
typedef crc_test::object crc_object;
- tut::crc_test tc("crc");
+ tut::crc_test tc("LLCrc");
template<> template<>
void crc_object::test<1>()
diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp
index e112892c49..9747996b25 100644
--- a/indra/llmath/tests/v2math_test.cpp
+++ b/indra/llmath/tests/v2math_test.cpp
@@ -39,7 +39,7 @@ namespace tut
};
typedef test_group<v2math_data> v2math_test;
typedef v2math_test::object v2math_object;
- tut::v2math_test v2math_testcase("v2math");
+ tut::v2math_test v2math_testcase("v2math_h");
template<> template<>
void v2math_object::test<1>()
diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp
index 4a05a84123..2c00f00ab3 100644
--- a/indra/llmath/tests/v3color_test.cpp
+++ b/indra/llmath/tests/v3color_test.cpp
@@ -39,7 +39,7 @@ namespace tut
};
typedef test_group<v3color_data> v3color_test;
typedef v3color_test::object v3color_object;
- tut::v3color_test v3color_testcase("v3color");
+ tut::v3color_test v3color_testcase("v3color_h");
template<> template<>
void v3color_object::test<1>()
diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp
index 68bcbd124f..b67346f4e5 100644
--- a/indra/llmath/tests/v3dmath_test.cpp
+++ b/indra/llmath/tests/v3dmath_test.cpp
@@ -43,7 +43,7 @@ namespace tut
};
typedef test_group<v3dmath_data> v3dmath_test;
typedef v3dmath_test::object v3dmath_object;
- tut::v3dmath_test v3dmath_testcase("v3dmath");
+ tut::v3dmath_test v3dmath_testcase("v3dmath_h");
template<> template<>
void v3dmath_object::test<1>()
diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp
index e6ef5d5012..e4732bf861 100644
--- a/indra/llmath/tests/v3math_test.cpp
+++ b/indra/llmath/tests/v3math_test.cpp
@@ -45,7 +45,7 @@ namespace tut
};
typedef test_group<v3math_data> v3math_test;
typedef v3math_test::object v3math_object;
- tut::v3math_test v3math_testcase("v3math");
+ tut::v3math_test v3math_testcase("v3math_h");
template<> template<>
void v3math_object::test<1>()
diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp
index dde5f9069b..fbd43625d1 100644
--- a/indra/llmath/tests/v4color_test.cpp
+++ b/indra/llmath/tests/v4color_test.cpp
@@ -43,7 +43,7 @@ namespace tut
};
typedef test_group<v4color_data> v4color_test;
typedef v4color_test::object v4color_object;
- tut::v4color_test v4color_testcase("v4color");
+ tut::v4color_test v4color_testcase("v4color_h");
template<> template<>
void v4color_object::test<1>()
diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp
index 1408d05b81..6d84ba41ef 100644
--- a/indra/llmath/tests/v4coloru_test.cpp
+++ b/indra/llmath/tests/v4coloru_test.cpp
@@ -42,7 +42,7 @@ namespace tut
};
typedef test_group<v4coloru_data> v4coloru_test;
typedef v4coloru_test::object v4coloru_object;
- tut::v4coloru_test v4coloru_testcase("v4coloru");
+ tut::v4coloru_test v4coloru_testcase("v4coloru_h");
template<> template<>
void v4coloru_object::test<1>()
diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp
index 24c1af5e61..b1f934e555 100644
--- a/indra/llmath/tests/v4math_test.cpp
+++ b/indra/llmath/tests/v4math_test.cpp
@@ -41,7 +41,7 @@ namespace tut
};
typedef test_group<v4math_data> v4math_test;
typedef v4math_test::object v4math_object;
- tut::v4math_test v4math_testcase("v4math");
+ tut::v4math_test v4math_testcase("v4math_h");
template<> template<>
void v4math_object::test<1>()
diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp
index 1337daa50a..49870eef3c 100644
--- a/indra/llmath/tests/xform_test.cpp
+++ b/indra/llmath/tests/xform_test.cpp
@@ -38,7 +38,7 @@ namespace tut
};
typedef test_group<xform_test> xform_test_t;
typedef xform_test_t::object xform_test_object_t;
- tut::xform_test_t tut_xform_test("xform_test");
+ tut::xform_test_t tut_xform_test("LLXForm");
//test case for init(), getParent(), getRotation(), getPositionW(), getWorldRotation() fns.
template<> template<>
diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp
index 36f819ad33..b20bceae1d 100644
--- a/indra/llmessage/tests/llhost_test.cpp
+++ b/indra/llmessage/tests/llhost_test.cpp
@@ -39,7 +39,7 @@ namespace tut
};
typedef test_group<host_data> host_test;
typedef host_test::object host_object;
- tut::host_test host_testcase("llhost");
+ tut::host_test host_testcase("LLHost");
template<> template<>
diff --git a/indra/llmessage/tests/llmime_test.cpp b/indra/llmessage/tests/llmime_test.cpp
index 0616c070c4..aed5c4589c 100644
--- a/indra/llmessage/tests/llmime_test.cpp
+++ b/indra/llmessage/tests/llmime_test.cpp
@@ -41,7 +41,7 @@ namespace tut
};
typedef test_group<mime_index> mime_index_t;
typedef mime_index_t::object mime_index_object_t;
- tut::mime_index_t tut_mime_index("mime_index");
+ tut::mime_index_t tut_mime_index("LLMime");
template<> template<>
void mime_index_object_t::test<1>()
@@ -228,7 +228,7 @@ namespace tut
};
typedef test_group<mime_parse> mime_parse_t;
typedef mime_parse_t::object mime_parse_object_t;
- tut::mime_parse_t tut_mime_parse("mime_parse");
+ tut::mime_parse_t tut_mime_parse("LLMimeParse");
template<> template<>
void mime_parse_object_t::test<1>()
diff --git a/indra/llmessage/tests/llnamevalue_test.cpp b/indra/llmessage/tests/llnamevalue_test.cpp
index da22ec80ef..8902fdd2e8 100644
--- a/indra/llmessage/tests/llnamevalue_test.cpp
+++ b/indra/llmessage/tests/llnamevalue_test.cpp
@@ -49,7 +49,7 @@ namespace tut
};
typedef test_group<namevalue_test> namevalue_t;
typedef namevalue_t::object namevalue_object_t;
- tut::namevalue_t tut_namevalue("namevalue_test");
+ tut::namevalue_t tut_namevalue("LLNameValue");
template<> template<>
diff --git a/indra/llmessage/tests/llpartdata_test.cpp b/indra/llmessage/tests/llpartdata_test.cpp
index b26e7a5849..9123bd06c7 100644
--- a/indra/llmessage/tests/llpartdata_test.cpp
+++ b/indra/llmessage/tests/llpartdata_test.cpp
@@ -44,7 +44,7 @@ namespace tut
};
typedef test_group<partdata_test> partdata_test_t;
typedef partdata_test_t::object partdata_test_object_t;
- tut::partdata_test_t tut_partdata_test("partdata_test");
+ tut::partdata_test_t tut_partdata_test("LLPartData");
template<> template<>
void partdata_test_object_t::test<1>()
diff --git a/indra/llmessage/tests/llregionpresenceverifier_test.cpp b/indra/llmessage/tests/llregionpresenceverifier_test.cpp
index 06152b4c6d..5b89f2a8c6 100644
--- a/indra/llmessage/tests/llregionpresenceverifier_test.cpp
+++ b/indra/llmessage/tests/llregionpresenceverifier_test.cpp
@@ -79,7 +79,7 @@ namespace tut
namespace
{
- tut::factory tf("LLRegionPresenceVerifier test");
+ tut::factory tf("LLRegionPresenceVerifier");
}
namespace tut
diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
index 65fd9da690..3b04530c1a 100644
--- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
+++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
@@ -98,7 +98,7 @@ namespace tut
namespace
{
- tut::factory tf("LLTemplateMessageDispatcher test");
+ tut::factory tf("LLTemplateMessageDispatcher");
}
namespace tut
diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
index 8fc5934c61..b287a29841 100644
--- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp
+++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
@@ -98,7 +98,7 @@ namespace tut
namespace
{
- tut::factory tf("LLTrustedMessageServiceData test");
+ tut::factory tf("LLTrustedMessageServiceData");
}
namespace tut
diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp
index 081f898417..a8c1adf9b4 100644
--- a/indra/llmessage/tests/llxfer_file_test.cpp
+++ b/indra/llmessage/tests/llxfer_file_test.cpp
@@ -38,7 +38,7 @@ namespace tut
};
typedef test_group<llxfer_data> llxfer_test;
typedef llxfer_test::object llxfer_object;
- tut::llxfer_test llxfer("llxfer");
+ tut::llxfer_test llxfer("LLXferFile");
template<> template<>
void llxfer_object::test<1>()
diff --git a/indra/llplugin/tests/llplugincookiestore_test.cpp b/indra/llplugin/tests/llplugincookiestore_test.cpp
index cc8663285f..aefa1ca144 100644
--- a/indra/llplugin/tests/llplugincookiestore_test.cpp
+++ b/indra/llplugin/tests/llplugincookiestore_test.cpp
@@ -112,7 +112,7 @@ namespace tut
typedef test_group<LLPluginCookieStoreFixture> factory;
typedef factory::object object;
- factory tf("LLPluginCookieStore test");
+ factory tf("LLPluginCookieStore");
// Tests
template<> template<>
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 5234ea25f9..16e5f894e2 100644
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -169,7 +169,7 @@ namespace tut
namespace
{
// this is for naming our tests to make pretty output
- tut::factory tf("MediaEntry Test");
+ tut::factory tf("LLMediaEntry");
}
namespace tut
diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp
index e181a59dd6..0d60c7cd15 100644
--- a/indra/llprimitive/tests/llprimitive_test.cpp
+++ b/indra/llprimitive/tests/llprimitive_test.cpp
@@ -96,7 +96,7 @@ namespace tut
typedef test_group<llprimitive> llprimitive_t;
typedef llprimitive_t::object llprimitive_object_t;
- tut::llprimitive_t tut_llprimitive("llprimitive");
+ tut::llprimitive_t tut_llprimitive("LLPrimitive");
template<> template<>
void llprimitive_object_t::test<1>()
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 3e652ea960..900a814238 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -71,10 +71,6 @@ S32 MENU_BAR_WIDTH = 0;
/// Local function declarations, constants, enums, and typedefs
///============================================================================
-const std::string SEPARATOR_NAME("separator");
-const std::string SEPARATOR_LABEL( "-----------" );
-const std::string VERTICAL_SEPARATOR_LABEL( "|" );
-
const S32 LABEL_BOTTOM_PAD_PIXELS = 2;
const U32 LEFT_PAD_PIXELS = 3;
@@ -93,10 +89,14 @@ const U32 SEPARATOR_HEIGHT_PIXELS = 8;
const S32 TEAROFF_SEPARATOR_HEIGHT_PIXELS = 10;
const S32 MENU_ITEM_PADDING = 4;
-const std::string BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
-const std::string BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
-const std::string ARROW_UP ("^^^^^^^");
-const std::string ARROW_DOWN("vvvvvvv");
+const std::string SEPARATOR_NAME("separator");
+const std::string SEPARATOR_LABEL( "-----------" );
+const std::string VERTICAL_SEPARATOR_LABEL( "|" );
+
+const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
+const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
+const std::string LLMenuGL::ARROW_UP ("^^^^^^^");
+const std::string LLMenuGL::ARROW_DOWN("vvvvvvv");
const F32 MAX_MOUSE_SLOPE_SUB_MENU = 0.9f;
@@ -915,7 +915,7 @@ void LLMenuItemCheckGL::setValue(const LLSD& value)
LLUICtrl::setValue(value);
if(value.asBoolean())
{
- mDrawBoolLabel = BOOLEAN_TRUE_PREFIX;
+ mDrawBoolLabel = LLMenuGL::BOOLEAN_TRUE_PREFIX;
}
else
{
@@ -948,7 +948,7 @@ void LLMenuItemCheckGL::buildDrawLabel( void )
}
if(getValue().asBoolean())
{
- mDrawBoolLabel = BOOLEAN_TRUE_PREFIX;
+ mDrawBoolLabel = LLMenuGL::BOOLEAN_TRUE_PREFIX;
}
else
{
@@ -1058,7 +1058,7 @@ void LLMenuItemBranchGL::buildDrawLabel( void )
std::string st = mDrawAccelLabel;
appendAcceleratorString( st );
mDrawAccelLabel = st;
- mDrawBranchLabel = BRANCH_SUFFIX;
+ mDrawBranchLabel = LLMenuGL::BRANCH_SUFFIX;
}
void LLMenuItemBranchGL::onCommit( void )
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index eb0d0bcb1f..19b738312e 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -391,6 +391,12 @@ public:
void initFromParams(const Params&);
+ // textual artwork which menugl-imitators may want to match
+ static const std::string BOOLEAN_TRUE_PREFIX;
+ static const std::string BRANCH_SUFFIX;
+ static const std::string ARROW_UP;
+ static const std::string ARROW_DOWN;
+
protected:
LLMenuGL(const LLMenuGL::Params& p);
friend class LLUICtrlFactory;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ad54e1b164..b3f6f0c9f8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2798,6 +2798,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>EffectScriptChatParticles</key>
+ <map>
+ <key>Comment</key>
+ <string>1 = normal behavior, 0 = disable display of swirling lights when scripts communicate</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>EnableRippleWater</key>
<map>
<key>Comment</key>
@@ -4680,6 +4691,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>MiniMapAutoCenter</key>
+ <map>
+ <key>Comment</key>
+ <string>Center the focal point of the minimap.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>Marker</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index eedadb962f..b9ae976e58 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -689,6 +689,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
LLMuteList::getInstance()->add(mute);
}
}
+
// static
bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
{
@@ -704,6 +705,21 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
return true;
}
+// static
+bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
+{
+ bool result = true;
+ for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ if(!canOfferTeleport(*it))
+ {
+ result = false;
+ break;
+ }
+ }
+ return result;
+}
+
void LLAvatarActions::inviteToGroup(const LLUUID& id)
{
LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(id));
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index cd8ac3b653..6313ae0759 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -171,12 +171,18 @@ public:
static void csr(const LLUUID& id, std::string name);
/**
- * Checks whether can offer teleport to the avatar
- * Can't offer only for offline friends
+ * Checks whether we can offer a teleport to the avatar, only offline friends
+ * cannot be offered a teleport.
+ *
+ * @return false if avatar is a friend and not visibly online
*/
static bool canOfferTeleport(const LLUUID& id);
-
+ /**
+ * @return false if any one of the specified avatars a friend and not visibly online
+ */
+ static bool canOfferTeleport(const uuid_vec_t& ids);
+
private:
static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 194d461f94..b1e11e1a2a 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -708,4 +708,25 @@ void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContex
}
}
+void LLCOFWearables::selectClothing(LLWearableType::EType clothing_type)
+{
+ std::vector<LLPanel*> clothing_items;
+
+ mClothing->getItems(clothing_items);
+
+ std::vector<LLPanel*>::iterator it;
+
+ for (it = clothing_items.begin(); it != clothing_items.end(); ++it )
+ {
+ LLPanelClothingListItem* clothing_item = dynamic_cast<LLPanelClothingListItem*>(*it);
+
+ if (clothing_item && clothing_item->getWearableType() == clothing_type)
+ { // clothing item has specified LLWearableType::EType. Select it and exit.
+
+ mClothing->selectItem(clothing_item);
+ break;
+ }
+ }
+}
+
//EOF
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index d981fa4196..1f8d6d0c94 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -86,6 +86,11 @@ public:
LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; }
+ /**
+ * Selects first clothing item with specified LLWearableType::EType from clothing list
+ */
+ void selectClothing(LLWearableType::EType clothing_type);
+
protected:
void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items);
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 654daa770e..2b92b228b3 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -164,6 +164,7 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo()
keywordArgs.appendString(
"secureSessionId",
gAgent.getSecureSessionID().asString());
+ keywordArgs.appendString("language", LLUI::getLanguage());
keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy);
keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName"));
keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor());
@@ -225,6 +226,7 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password)
keywordArgs.appendString(
"secureSessionId",
gAgent.getSecureSessionID().asString());
+ keywordArgs.appendString("language", LLUI::getLanguage());
keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy);
if (mUSDCurrencyEstimated)
{
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 69824b3843..a5c62495fe 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -758,6 +758,7 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
keywordArgs.appendString(
"secureSessionId",
gAgent.getSecureSessionID().asString());
+ keywordArgs.appendString("language", LLUI::getLanguage());
keywordArgs.appendString("levelId", newLevel);
keywordArgs.appendInt("billableArea",
mIsForGroup ? 0 : mParcelBillableArea);
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 0f8b709f29..c9d7eff02b 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -47,7 +47,10 @@
//
// Constants
//
-const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f;
+
+// The minor cardinal direction labels are hidden if their height is more
+// than this proportion of the map.
+const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f;
const S32 MAP_PADDING_LEFT = 0;
const S32 MAP_PADDING_TOP = 2;
const S32 MAP_PADDING_RIGHT = 2;
@@ -93,7 +96,7 @@ BOOL LLFloaterMap::postBuild()
mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
+
registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2));
registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2));
@@ -255,7 +258,7 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLFloaterMap::handleZoom(const LLSD& userdata)
{
std::string level = userdata.asString();
-
+
F32 scale = 0.0f;
if (level == std::string("close"))
scale = LLNetMap::MAP_SCALE_MAX;
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index bb851a349e..74dfede23e 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -115,7 +115,7 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
//static
U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
{
- U32 flags = 0;
+ U32 flags = PERM_MOVE;
if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
{
flags |= PERM_COPY;
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index f58f704ff2..278fee799a 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -35,6 +35,7 @@
#include "llagentcamera.h"
#include "llcallbacklist.h"
#include "llcriticaldamp.h"
+#include "llfloaterperms.h"
#include "llui.h"
#include "llfocusmgr.h"
#include "llbutton.h"
@@ -999,8 +1000,8 @@ void LLSnapshotLivePreview::saveTexture()
LLFolderType::FT_SNAPSHOT_CATEGORY,
LLInventoryType::IT_SNAPSHOT,
PERM_ALL, // Note: Snapshots to inventory is a special case of content upload
- PERM_NONE, // that ignores the user's premissions preferences and continues to
- PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG
+ LLFloaterPerms::getGroupPerms(), // that is more permissive than other uploads
+ LLFloaterPerms::getEveryonePerms(),
"Snapshot : " + pos_string,
callback, expected_upload_cost, userdata);
gViewerWindow->playSnapshotAnimAndSound();
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index 078ccff2d0..37b7b2e75d 100644
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -305,6 +305,11 @@ void LLHUDEffectBeam::render()
}
}
+void LLHUDEffectBeam::renderForTimer()
+{
+ render();
+}
+
void LLHUDEffectBeam::setupParticle(const S32 i)
{
LLVector3d start_pos_global;
diff --git a/indra/newview/llhudeffectbeam.h b/indra/newview/llhudeffectbeam.h
index a700e4e657..fdee5178af 100644
--- a/indra/newview/llhudeffectbeam.h
+++ b/indra/newview/llhudeffectbeam.h
@@ -52,6 +52,7 @@ protected:
~LLHUDEffectBeam();
/*virtual*/ void render();
+ /*virtual*/ void renderForTimer();
/*virtual*/ void packData(LLMessageSystem *mesgsys);
/*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
private:
diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp
index 9072707974..39b526c1b5 100644
--- a/indra/newview/llhudeffecttrail.cpp
+++ b/indra/newview/llhudeffecttrail.cpp
@@ -280,3 +280,8 @@ void LLHUDEffectSpiral::render()
return;
}
}
+
+void LLHUDEffectSpiral::renderForTimer()
+{
+ render();
+}
diff --git a/indra/newview/llhudeffecttrail.h b/indra/newview/llhudeffecttrail.h
index bade3ff997..6f5a328c63 100644
--- a/indra/newview/llhudeffecttrail.h
+++ b/indra/newview/llhudeffecttrail.h
@@ -62,6 +62,7 @@ protected:
~LLHUDEffectSpiral();
/*virtual*/ void render();
+ /*virtual*/ void renderForTimer();
/*virtual*/ void packData(LLMessageSystem *mesgsys);
/*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
private:
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 6af0ae2b6a..3e814a0773 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -305,6 +305,27 @@ void LLHUDObject::renderAllForSelect()
}
// static
+void LLHUDObject::renderAllForTimer()
+{
+ LLHUDObject *hud_objp;
+
+ hud_object_list_t::iterator object_it;
+ for (object_it = sHUDObjects.begin(); object_it != sHUDObjects.end(); )
+ {
+ hud_object_list_t::iterator cur_it = object_it++;
+ hud_objp = (*cur_it);
+ if (hud_objp->getNumRefs() == 1)
+ {
+ sHUDObjects.erase(cur_it);
+ }
+ else if (hud_objp->isVisible())
+ {
+ hud_objp->renderForTimer();
+ }
+ }
+}
+
+// static
void LLHUDObject::sortObjects()
{
sHUDObjects.sort(hud_object_further_away());
diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h
index ff70b6a52f..97145b9a84 100644
--- a/indra/newview/llhudobject.h
+++ b/indra/newview/llhudobject.h
@@ -69,6 +69,7 @@ public:
static void updateAll();
static void renderAll();
static void renderAllForSelect();
+ static void renderAllForTimer();
static void cleanupHUDObjects();
@@ -100,6 +101,7 @@ protected:
virtual void render() = 0;
virtual void renderForSelect() {};
+ virtual void renderForTimer() {};
protected:
U8 mType;
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index e4a96cca14..6db8001d57 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -55,6 +55,7 @@
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
+#include "llviewerwindow.h"
#include "llworld.h"
#include "llworldmapview.h" // shared draw code
@@ -69,6 +70,7 @@ const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll w
const F32 MIN_DOT_RADIUS = 3.5f;
const F32 DOT_SCALE = 0.75f;
const F32 MIN_PICK_SCALE = 2.f;
+const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
LLNetMap::LLNetMap (const Params & p)
: LLUICtrl (p),
@@ -77,11 +79,12 @@ LLNetMap::LLNetMap (const Params & p)
mPixelsPerMeter( MAP_SCALE_MID / REGION_WIDTH_METERS ),
mObjectMapTPM(0.f),
mObjectMapPixels(0.f),
- mTargetPanX(0.f),
- mTargetPanY(0.f),
- mCurPanX(0.f),
- mCurPanY(0.f),
- mUpdateNow(FALSE),
+ mTargetPan(0.f, 0.f),
+ mCurPan(0.f, 0.f),
+ mStartPan(0.f, 0.f),
+ mMouseDown(0, 0),
+ mPanning(false),
+ mUpdateNow(false),
mObjectImageCenterGlobal( gAgentCamera.getCameraPositionGlobal() ),
mObjectRawImagep(),
mObjectImagep(),
@@ -98,7 +101,9 @@ LLNetMap::~LLNetMap()
void LLNetMap::setScale( F32 scale )
{
- mScale = llclamp(scale, 0.1f, 16.f*1024.f); // [reasonably small , unreasonably large]
+ scale = llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX);
+ mCurPan *= scale / mScale;
+ mScale = scale;
if (mObjectImagep.notNull())
{
@@ -115,13 +120,7 @@ void LLNetMap::setScale( F32 scale )
mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS);
- mUpdateNow = TRUE;
-}
-
-void LLNetMap::translatePan( F32 delta_x, F32 delta_y )
-{
- mTargetPanX += delta_x;
- mTargetPanY += delta_y;
+ mUpdateNow = true;
}
@@ -141,9 +140,12 @@ void LLNetMap::draw()
{
createObjectImage();
}
-
- mCurPanX = lerp(mCurPanX, mTargetPanX, LLCriticalDamp::getInterpolant(0.1f));
- mCurPanY = lerp(mCurPanY, mTargetPanY, LLCriticalDamp::getInterpolant(0.1f));
+
+ static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
+ if (auto_center)
+ {
+ mCurPan = lerp(mCurPan, mTargetPan, LLCriticalDamp::getInterpolant(0.1f));
+ }
// Prepare a scissor region
F32 rotation = 0;
@@ -174,8 +176,8 @@ void LLNetMap::draw()
}
// region 0,0 is in the middle
- S32 center_sw_left = getRect().getWidth() / 2 + llfloor(mCurPanX);
- S32 center_sw_bottom = getRect().getHeight() / 2 + llfloor(mCurPanY);
+ S32 center_sw_left = getRect().getWidth() / 2 + llfloor(mCurPan.mV[VX]);
+ S32 center_sw_bottom = getRect().getHeight() / 2 + llfloor(mCurPan.mV[VY]);
gGL.pushMatrix();
@@ -256,26 +258,24 @@ void LLNetMap::draw()
}
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
-
-
- LLVector3d old_center = mObjectImageCenterGlobal;
- LLVector3d new_center = gAgentCamera.getCameraPositionGlobal();
-
- new_center.mdV[0] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[0]);
- new_center.mdV[1] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[1]);
- new_center.mdV[2] = 0.f;
+ // Redraw object layer periodically
if (mUpdateNow || (map_timer.getElapsedTimeF32() > 0.5f))
{
- mUpdateNow = FALSE;
- mObjectImageCenterGlobal = new_center;
+ mUpdateNow = false;
+
+ // Locate the centre of the object layer, accounting for panning
+ LLVector3 new_center = globalPosToView(gAgentCamera.getCameraPositionGlobal());
+ new_center.mV[VX] -= mCurPan.mV[VX];
+ new_center.mV[VY] -= mCurPan.mV[VY];
+ new_center.mV[VZ] = 0.f;
+ mObjectImageCenterGlobal = viewPosToGlobal(llfloor(new_center.mV[VX]), llfloor(new_center.mV[VY]));
- // Center moved enough.
// Create the base texture.
U8 *default_texture = mObjectRawImagep->getData();
memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() );
- // Draw buildings
+ // Draw objects
gObjectList.renderObjectsForMap(*this);
mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight());
@@ -361,7 +361,8 @@ void LLNetMap::draw()
show_as_friend ? map_avatar_friend_color : map_avatar_color,
pos_map.mV[VZ], mDotRadius);
- F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y));
+ F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
+ LLVector2(local_mouse_x,local_mouse_y));
if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
{
closest_dist = dist_to_cursor;
@@ -392,12 +393,22 @@ void LLNetMap::draw()
// Draw dot for self avatar position
pos_global = gAgent.getPositionGlobal();
pos_map = globalPosToView(pos_global);
- LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
S32 dot_width = llround(mDotRadius * 2.f);
- you->draw(llround(pos_map.mV[VX] - mDotRadius),
- llround(pos_map.mV[VY] - mDotRadius),
- dot_width,
- dot_width);
+ LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
+ if (you)
+ {
+ you->draw(llround(pos_map.mV[VX] - mDotRadius),
+ llround(pos_map.mV[VY] - mDotRadius),
+ dot_width,
+ dot_width);
+
+ F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
+ LLVector2(local_mouse_x,local_mouse_y));
+ if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
+ {
+ mClosestAgentToCursor = gAgent.getID();
+ }
+ }
// Draw frustum
F32 meters_to_pixels = mScale/ LLWorld::getInstance()->getRegionWidthInMeters();
@@ -472,8 +483,8 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
pos_local.rotVec( rot );
}
- pos_local.mV[VX] += getRect().getWidth() / 2 + mCurPanX;
- pos_local.mV[VY] += getRect().getHeight() / 2 + mCurPanY;
+ pos_local.mV[VX] += getRect().getWidth() / 2 + mCurPan.mV[VX];
+ pos_local.mV[VY] += getRect().getHeight() / 2 + mCurPan.mV[VY];
return pos_local;
}
@@ -506,8 +517,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
{
- x -= llround(getRect().getWidth() / 2 + mCurPanX);
- y -= llround(getRect().getHeight() / 2 + mCurPanY);
+ x -= llround(getRect().getWidth() / 2 + mCurPan.mV[VX]);
+ y -= llround(getRect().getHeight() / 2 + mCurPan.mV[VY]);
LLVector3 pos_local( (F32)x, (F32)y, 0 );
@@ -532,10 +543,20 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
// note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in
- F32 scale = mScale;
-
- scale *= pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
- setScale(llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX));
+ F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
+ F32 old_scale = mScale;
+
+ setScale(new_scale);
+
+ static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
+ if (!auto_center)
+ {
+ // Adjust pan to center the zoom on the mouse pointer
+ LLVector2 zoom_offset;
+ zoom_offset.mV[VX] = x - getRect().getWidth() / 2;
+ zoom_offset.mV[VY] = y - getRect().getHeight() / 2;
+ mCurPan -= zoom_offset * mScale / old_scale - zoom_offset;
+ }
return TRUE;
}
@@ -546,20 +567,32 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
{
return FALSE;
}
-
- // mToolTipMsg = "[AGENT][REGION](Double-click to open Map)"
-
- LLStringUtil::format_map_t args;
- std::string fullname;
- if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
- {
- args["[AGENT]"] = fullname + "\n";
- }
- else
+
+ std::string avatar_name;
+ if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, avatar_name))
{
- args["[AGENT]"] = "";
+ // only show tooltip if same inspector not already open
+ LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_avatar");
+ if (!existing_inspector
+ || !existing_inspector->getVisible()
+ || existing_inspector->getKey()["avatar_id"].asUUID() != mClosestAgentToCursor)
+ {
+ LLInspector::Params p;
+ p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
+ p.message(avatar_name);
+ p.image.name("Inspector_I");
+ p.click_callback(boost::bind(showAvatarInspector, mClosestAgentToCursor));
+ p.visible_time_near(6.f);
+ p.visible_time_far(3.f);
+ p.delay_time(0.35f);
+ p.wrap(false);
+
+ LLToolTipMgr::instance().show(p);
+ }
+ return TRUE;
}
-
+
+ LLStringUtil::format_map_t args;
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) );
if( region )
{
@@ -569,10 +602,10 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
{
args["[REGION]"] = "";
}
-
+
std::string msg = mToolTipMsg;
LLStringUtil::format(msg, args);
-
+
LLRect sticky_rect;
// set sticky_rect
if (region)
@@ -592,6 +625,21 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
return TRUE;
}
+// static
+void LLNetMap::showAvatarInspector(const LLUUID& avatar_id)
+{
+ LLSD params;
+ params["avatar_id"] = avatar_id;
+
+ if (LLToolTipMgr::instance().toolTipVisible())
+ {
+ LLRect rect = LLToolTipMgr::instance().getToolTipRect();
+ params["pos"]["x"] = rect.mLeft;
+ params["pos"]["y"] = rect.mTop;
+ }
+
+ LLFloaterReg::showInstance("inspect_avatar", params);
+}
void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters )
{
@@ -715,5 +763,99 @@ void LLNetMap::createObjectImage()
mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE);
}
setScale(mScale);
- mUpdateNow = TRUE;
+ mUpdateNow = true;
+}
+
+BOOL LLNetMap::handleMouseDown( S32 x, S32 y, MASK mask )
+{
+ if (!(mask & MASK_SHIFT)) return FALSE;
+
+ // Start panning
+ gFocusMgr.setMouseCapture(this);
+
+ mStartPan = mCurPan;
+ mMouseDown.mX = x;
+ mMouseDown.mY = y;
+ return TRUE;
+}
+
+BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask )
+{
+ if (hasMouseCapture())
+ {
+ if (mPanning)
+ {
+ // restore mouse cursor
+ S32 local_x, local_y;
+ local_x = mMouseDown.mX + llfloor(mCurPan.mV[VX] - mStartPan.mV[VX]);
+ local_y = mMouseDown.mY + llfloor(mCurPan.mV[VY] - mStartPan.mV[VY]);
+ LLRect clip_rect = getRect();
+ clip_rect.stretch(-8);
+ clip_rect.clipPointToRect(mMouseDown.mX, mMouseDown.mY, local_x, local_y);
+ LLUI::setMousePositionLocal(this, local_x, local_y);
+
+ // finish the pan
+ mPanning = false;
+
+ mMouseDown.set(0, 0);
+
+ // auto centre
+ mTargetPan.setZero();
+ }
+ gViewerWindow->showCursor();
+ gFocusMgr.setMouseCapture(NULL);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// static
+bool LLNetMap::outsideSlop( S32 x, S32 y, S32 start_x, S32 start_y, S32 slop )
+{
+ S32 dx = x - start_x;
+ S32 dy = y - start_y;
+
+ return (dx <= -slop || slop <= dx || dy <= -slop || slop <= dy);
+}
+
+BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
+{
+ if (hasMouseCapture())
+ {
+ if (mPanning || outsideSlop(x, y, mMouseDown.mX, mMouseDown.mY, MOUSE_DRAG_SLOP))
+ {
+ if (!mPanning)
+ {
+ // just started panning, so hide cursor
+ mPanning = true;
+ gViewerWindow->hideCursor();
+ }
+
+ LLVector2 delta(static_cast<F32>(gViewerWindow->getCurrentMouseDX()),
+ static_cast<F32>(gViewerWindow->getCurrentMouseDY()));
+
+ // Set pan to value at start of drag + offset
+ mCurPan += delta;
+ mTargetPan = mCurPan;
+
+ gViewerWindow->moveCursorToCenter();
+ }
+
+ // Doesn't really matter, cursor should be hidden
+ gViewerWindow->setCursor( UI_CURSOR_TOOLPAN );
+ }
+ else
+ {
+ if (mask & MASK_SHIFT)
+ {
+ // If shift is held, change the cursor to hint that the map can be dragged
+ gViewerWindow->setCursor( UI_CURSOR_TOOLPAN );
+ }
+ else
+ {
+ gViewerWindow->setCursor( UI_CURSOR_CROSS );
+ }
+ }
+
+ return TRUE;
}
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 6808642505..e25ada4c95 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -37,7 +37,6 @@
class LLColor4U;
class LLCoordGL;
class LLImageRaw;
-class LLTextBox;
class LLViewerTexture;
class LLNetMap : public LLUICtrl
@@ -66,17 +65,17 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
/*virtual*/ BOOL handleToolTip( S32 x, S32 y, MASK mask);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void setScale( F32 scale );
void setToolTipMsg(const std::string& msg) { mToolTipMsg = msg; }
void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
-
-private:
- void translatePan( F32 delta_x, F32 delta_y );
- void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; }
+private:
const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; }
void renderPoint(const LLVector3 &pos, const LLColor4U &color,
S32 diameter, S32 relative_height = 0);
@@ -87,10 +86,15 @@ private:
void drawTracking( const LLVector3d& pos_global,
const LLColor4& color,
BOOL draw_arrow = TRUE);
-
+ static void showAvatarInspector(const LLUUID& avatar_id);
+
void createObjectImage();
private:
+ static bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y, S32 slop);
+
+ bool mUpdateNow;
+
LLUIColor mBackgroundColor;
F32 mScale; // Size of a region in pixels
@@ -98,11 +102,13 @@ private:
F32 mObjectMapTPM; // texels per meter on map
F32 mObjectMapPixels; // Width of object map in pixels
F32 mDotRadius; // Size of avatar markers
- F32 mTargetPanX;
- F32 mTargetPanY;
- F32 mCurPanX;
- F32 mCurPanY;
- BOOL mUpdateNow;
+
+ bool mPanning; // map is being dragged
+ LLVector2 mTargetPan;
+ LLVector2 mCurPan;
+ LLVector2 mStartPan; // pan offset at start of drag
+ LLCoordGL mMouseDown; // pointer position at start of drag
+
LLVector3d mObjectImageCenterGlobal;
LLPointer<LLImageRaw> mObjectRawImagep;
LLPointer<LLViewerTexture> mObjectImagep;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index c9380bf6e6..54b0805a6c 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -911,8 +911,14 @@ LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID&
void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
{
LLUUID id_to_remove = mCOFWearables->getSelectedUUID();
-
+ LLWearableType::EType type = getWearableTypeByItemUUID(id_to_remove);
+
LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove);
+
+ if (!mCOFWearables->getSelectedItem())
+ {
+ mCOFWearables->selectClothing(type);
+ }
}
@@ -1007,6 +1013,10 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
// | filter_type = expanded accordion_type
if (nothing_selected)
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ return;
+ }
showWearablesListView();
//selected accordion tab is more priority than expanded tab
@@ -1021,7 +1031,7 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
LLUUID selected_item_id = mWearableItemsList->getSelectedUUID();
LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id);
if(item)
- {
+ {
showFilteredWearablesListView(item->getWearableType());
return;
}
@@ -1051,6 +1061,12 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
//resetting selection if more than one item is selected
if (more_than_one_selected)
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ applyFolderViewFilter(FVIT_ALL);
+ return;
+ }
+
showWearablesListView();
applyListViewFilter(LVIT_ALL);
return;
@@ -1060,6 +1076,12 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
//filter wearables by a type represented by a dummy item
if (one_selected && is_dummy_item)
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ applyFolderViewFilter(FVIT_WEARABLE);
+ return;
+ }
+
onAddWearableClicked();
return;
}
@@ -1067,6 +1089,11 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
LLViewerInventoryItem* item = gInventory.getItem(ids[0]);
if (!item && ids[0].notNull())
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ applyFolderViewFilter(FVIT_ALL);
+ return;
+ }
//Inventory misses an item with non-zero id
showWearablesListView();
applyListViewFilter(LVIT_ALL);
@@ -1077,12 +1104,22 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
{
if (item->isWearableType())
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ applyFolderViewFilter(FVIT_WEARABLE);
+ return;
+ }
//single clothing or bodypart item is selected
showFilteredWearablesListView(item->getWearableType());
return;
}
else
{
+ if (mInventoryItemsPanel->getVisible())
+ {
+ applyFolderViewFilter(FVIT_ATTACHMENT);
+ return;
+ }
//attachment is selected
showWearablesListView();
applyListViewFilter(LVIT_ATTACHMENT);
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 8627274e80..06ba08b51c 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -776,12 +776,6 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si
button->setClickedCallback(cb);
}
-bool LLPanelPeople::isFriendOnline(const LLUUID& id)
-{
- uuid_vec_t ids = mOnlineFriendList->getIDs();
- return std::find(ids.begin(), ids.end(), id) != ids.end();
-}
-
void LLPanelPeople::updateButtons()
{
std::string cur_tab = getActiveTabName();
@@ -843,11 +837,11 @@ void LLPanelPeople::updateButtons()
bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled();
- buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front()));
- buttonSetEnabled("view_profile_btn", item_selected);
- buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection
- buttonSetEnabled("call_btn", multiple_selected && enable_calls);
- buttonSetEnabled("share_btn", item_selected); // not implemented yet
+ buttonSetEnabled("view_profile_btn",item_selected);
+ buttonSetEnabled("share_btn", item_selected);
+ buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection
+ buttonSetEnabled("call_btn", multiple_selected && enable_calls);
+ buttonSetEnabled("teleport_btn", multiple_selected && LLAvatarActions::canOfferTeleport(selected_uuids));
bool none_group_selected = item_selected && selected_id.isNull();
buttonSetEnabled("group_info_btn", !none_group_selected);
@@ -1328,7 +1322,9 @@ void LLPanelPeople::onGroupCallButtonClicked()
void LLPanelPeople::onTeleportButtonClicked()
{
- LLAvatarActions::offerTeleport(getCurrentItemID());
+ uuid_vec_t selected_uuids;
+ getCurrentItemIDs(selected_uuids);
+ LLAvatarActions::offerTeleport(selected_uuids);
}
void LLPanelPeople::onShareButtonClicked()
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 3b8b736be1..d0913ee756 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -72,7 +72,6 @@ private:
void updateNearbyList();
void updateRecentList();
- bool isFriendOnline(const LLUUID& id);
bool isItemsFreeOfFriends(const uuid_vec_t& uuids);
void updateButtons();
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index efca3ae1c2..f12c4de2f7 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -81,6 +81,7 @@ LLContextMenu* NearbyMenu::createMenu()
// registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs));
+ registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
// registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented
// registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented
@@ -168,8 +169,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
}
else if(item == std::string("can_offer_teleport"))
{
- const LLUUID& id = mUUIDs.front();
- return LLAvatarActions::canOfferTeleport(id);
+ return LLAvatarActions::canOfferTeleport(mUUIDs);
}
return false;
}
@@ -191,8 +191,7 @@ void NearbyMenu::offerTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper.
- const LLUUID& id = mUUIDs.front();
- LLAvatarActions::offerTeleport(id);
+ LLAvatarActions::offerTeleport(mUUIDs);
}
} // namespace LLPanelPeopleMenus
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index c9b60bf7f5..fb60b1ece7 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -5629,6 +5629,10 @@ void LLSelectMgr::updateSelectionCenter()
LLVector3d select_center;
// keep a list of jointed objects for showing the joint HUDEffects
+ // Initialize the bounding box to the root prim, so the BBox orientation
+ // matches the root prim's (affecting the orientation of the manipulators).
+ bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() );
+
std::vector < LLViewerObject *> jointed_objects;
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 78890fae93..85b6e0dec4 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -31,6 +31,7 @@
#include "llagentcamera.h"
#include "llappviewer.h"
#include "llbottomtray.h"
+#include "llfloaterreg.h"
#include "llsidetray.h"
#include "llviewerwindow.h"
#include "llaccordionctrl.h"
@@ -64,6 +65,7 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title";
LLSideTray* LLSideTray::sInstance = 0;
+// static
LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
@@ -75,6 +77,7 @@ LLSideTray* LLSideTray::getInstance()
return sInstance;
}
+// static
bool LLSideTray::instanceCreated ()
{
return sInstance!=0;
@@ -125,7 +128,9 @@ public:
const std::string& getTabTitle() const { return mTabTitle;}
void onOpen (const LLSD& key);
-
+
+ void toggleTabDocked();
+
LLPanel *getPanel();
private:
std::string mTabTitle;
@@ -171,6 +176,8 @@ BOOL LLSideTrayTab::postBuild()
title_panel->getChild<LLTextBox>(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle);
+ getChild<LLButton>("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this));
+
return true;
}
@@ -203,6 +210,66 @@ void LLSideTrayTab::onOpen (const LLSD& key)
panel->onOpen(key);
}
+void LLSideTrayTab::toggleTabDocked()
+{
+ LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", mTabTitle));
+ if (!floater_tab) return;
+
+ LLFloaterReg::toggleInstance("side_bar_tab", LLSD().with("name", mTabTitle));
+
+ LLSideTray* side_tray = LLSideTray::getInstance();
+
+ if (LLFloater::isShown(floater_tab))
+ {
+ // Remove the tab from Side Tray's tabs list.
+ // We have to do it despite removing the tab from Side Tray's child view tree
+ // by addChild(). Otherwise the tab could be accessed by the pointer in LLSideTray::mTabs.
+ if (!side_tray->removeTab(this))
+ {
+ llwarns << "Failed to remove tab " << getName() << " from side tray" << llendl;
+ return;
+ }
+
+ setVisible(true); // *HACK: restore visibility after being hidden by LLSideTray::selectTabByName().
+ floater_tab->addChild(this);
+ floater_tab->setTitle(mTabTitle);
+
+ LLRect rect = side_tray->getLocalRect();
+ floater_tab->reshape(rect.getWidth(), rect.getHeight());
+
+ rect.mTop -= floater_tab->getHeaderHeight();
+ setRect(rect);
+ reshape(rect.getWidth(), rect.getHeight());
+
+ // Set FOLLOWS_ALL flag for the tab to follow floater dimensions upon resizing.
+ setFollowsAll();
+
+ if (!side_tray->getCollapsed())
+ {
+ side_tray->collapseSideBar();
+ }
+ }
+ else
+ {
+ if (!side_tray->addTab(this))
+ {
+ llwarns << "Failed to add tab " << getName() << " to side tray" << llendl;
+ return;
+ }
+
+ setRect(side_tray->getLocalRect());
+ reshape(getRect().getWidth(), getRect().getHeight());
+
+ // Select the re-docked tab.
+ side_tray->selectTabByName(getName());
+
+ if (side_tray->getCollapsed())
+ {
+ side_tray->expandSideBar();
+ }
+ }
+}
+
LLPanel* LLSideTrayTab::getPanel()
{
LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
@@ -219,6 +286,93 @@ LLSideTrayTab* LLSideTrayTab::createInstance ()
}
//////////////////////////////////////////////////////////////////////////////
+// LLSideTrayButton
+// Side Tray tab button with "tear off" handling.
+//////////////////////////////////////////////////////////////////////////////
+
+class LLSideTrayButton : public LLButton
+{
+public:
+ /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask)
+ {
+ // Route future Mouse messages here preemptively. (Release on mouse up.)
+ // No handler needed for focus lost since this class has no state that depends on it.
+ gFocusMgr.setMouseCapture(this);
+
+ localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY);
+
+ // Note: don't pass on to children
+ return TRUE;
+ }
+
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask)
+ {
+ // We only handle the click if the click both started and ended within us
+ if( !hasMouseCapture() ) return FALSE;
+
+ S32 screen_x;
+ S32 screen_y;
+ localPointToScreen(x, y, &screen_x, &screen_y);
+
+ S32 delta_x = screen_x - mDragLastScreenX;
+ S32 delta_y = screen_y - mDragLastScreenY;
+
+ LLSideTray* side_tray = LLSideTray::getInstance();
+
+ // Check if the tab we are dragging is docked.
+ if (!side_tray->isTabAttached(getName())) return FALSE;
+
+ // Same value is hardcoded in LLDragHandle::handleHover().
+ const S32 undock_threshold = 12;
+
+ // Detach a tab if it has been pulled further than undock_threshold.
+ if (delta_x <= -undock_threshold || delta_x >= undock_threshold ||
+ delta_y <= -undock_threshold || delta_y >= undock_threshold)
+ {
+ LLSideTrayTab* tab = side_tray->getTab(getName());
+ if (!tab) return FALSE;
+
+ tab->toggleTabDocked();
+
+ LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", LLSD().with("name", tab->getTabTitle()));
+ if (!floater_tab) return FALSE;
+
+
+ LLRect original_rect = floater_tab->getRect();
+ S32 header_snap_y = floater_tab->getHeaderHeight() / 2;
+ S32 snap_x = screen_x - original_rect.mLeft - original_rect.getWidth() / 2;
+ S32 snap_y = screen_y - original_rect.mTop + header_snap_y;
+
+ // Move the floater to appear "under" the mouse pointer.
+ floater_tab->setRect(original_rect.translate(snap_x, snap_y));
+
+ // Snap the mouse pointer to the center of the floater header
+ // and call 'mouse down' event handler to begin dragging.
+ floater_tab->handleMouseDown(original_rect.getWidth() / 2,
+ original_rect.getHeight() - header_snap_y,
+ mask);
+
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+protected:
+ LLSideTrayButton(const LLButton::Params& p)
+ : LLButton(p)
+ , mDragLastScreenX(0)
+ , mDragLastScreenY(0)
+ {}
+
+ friend class LLUICtrlFactory;
+
+private:
+ S32 mDragLastScreenX;
+ S32 mDragLastScreenY;
+};
+
+//////////////////////////////////////////////////////////////////////////////
// LLSideTray
//////////////////////////////////////////////////////////////////////////////
@@ -273,6 +427,13 @@ BOOL LLSideTray::postBuild()
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this));
+ // Remember original tabs order, so that we can restore it if user detaches and then re-attaches a tab.
+ for (child_vector_const_iter_t it = mTabs.begin(); it != mTabs.end(); ++it)
+ {
+ std::string tab_name = (*it)->getName();
+ mOriginalTabOrder.push_back(tab_name);
+ }
+
//EXT-8045
//connect all already created channels to reflect sidetray collapse/expand
std::vector<LLChannelManager::ChannelElem>& channels = LLChannelManager::getInstance()->getChannelList();
@@ -297,6 +458,17 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name)
return getChild<LLSideTrayTab>(name,false);
}
+bool LLSideTray::isTabAttached(const std::string& name)
+{
+ LLSideTrayTab* tab = getTab(name);
+ return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end();
+}
+
+bool LLSideTray::hasTabs()
+{
+ // The open/close tab doesn't count.
+ return mTabs.size() > 1;
+}
void LLSideTray::toggleTabButton(LLSideTrayTab* tab)
{
@@ -324,22 +496,27 @@ bool LLSideTray::selectTabByIndex(size_t index)
bool LLSideTray::selectTabByName (const std::string& name)
{
- LLSideTrayTab* side_bar = getTab(name);
+ LLSideTrayTab* new_tab = getTab(name);
- if(side_bar == mActiveTab)
+ // Bail out if already selected.
+ if (new_tab == mActiveTab)
return false;
+
//deselect old tab
- toggleTabButton(mActiveTab);
- if(mActiveTab)
- mActiveTab->setVisible(false);
+ if (mActiveTab)
+ {
+ toggleTabButton(mActiveTab);
+ }
//select new tab
- mActiveTab = side_bar;
- toggleTabButton(mActiveTab);
- LLSD key;//empty
- mActiveTab->onOpen(key);
+ mActiveTab = new_tab;
- mActiveTab->setVisible(true);
+ if (mActiveTab)
+ {
+ toggleTabButton(mActiveTab);
+ LLSD key;//empty
+ mActiveTab->onOpen(key);
+ }
//arrange();
@@ -348,7 +525,9 @@ bool LLSideTray::selectTabByName (const std::string& name)
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
LLSideTrayTab* sidebar_tab = *child_it;
- sidebar_tab->setVisible(sidebar_tab == mActiveTab);
+ // When the last tab gets detached, for a short moment the "Toggle Sidebar" pseudo-tab
+ // is shown. So, to avoid the flicker we make sure it never gets visible.
+ sidebar_tab->setVisible(sidebar_tab == mActiveTab && (*child_it)->getName() != "sidebar_openclose");
}
return true;
}
@@ -372,8 +551,18 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i
bparams.image_disabled(sidetray_params.tab_btn_image_normal);
bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected);
- LLButton* button = LLUICtrlFactory::create<LLButton> (bparams);
- button->setLabel(name);
+ LLButton* button;
+ if (name == "sidebar_openclose")
+ {
+ // "Open/Close" button shouldn't allow "tear off"
+ // hence it is created as LLButton instance.
+ button = LLUICtrlFactory::create<LLButton>(bparams);
+ }
+ else
+ {
+ button = LLUICtrlFactory::create<LLSideTrayButton>(bparams);
+ }
+
button->setClickedCallback(callback);
button->setToolTip(tooltip);
@@ -400,6 +589,103 @@ bool LLSideTray::addChild(LLView* view, S32 tab_group)
return LLUICtrl::addChild(view, tab_group);
}
+bool LLSideTray::removeTab(LLSideTrayTab* tab)
+{
+ if (!tab) return false;
+ std::string tab_name = tab->getName();
+
+ // Look up the tab in the list of known tabs.
+ child_vector_iter_t tab_it = std::find(mTabs.begin(), mTabs.end(), tab);
+ if (tab_it == mTabs.end())
+ {
+ llwarns << "Cannot find tab named " << tab_name << llendl;
+ return false;
+ }
+
+ // Find the button corresponding to the tab.
+ button_map_t::iterator btn_it = mTabButtons.find(tab_name);
+ if (btn_it == mTabButtons.end())
+ {
+ llwarns << "Cannot find button for tab named " << tab_name << llendl;
+ return false;
+ }
+ LLButton* btn = btn_it->second;
+
+ // Deselect the tab.
+ if (mActiveTab == tab)
+ {
+ child_vector_iter_t next_tab_it =
+ (tab_it < (mTabs.end() - 1)) ? tab_it + 1 : mTabs.begin();
+ selectTabByName((*next_tab_it)->getName());
+ }
+
+ // Remove the tab.
+ removeChild(tab);
+ mTabs.erase(tab_it);
+
+ // Remove the button from the buttons panel so that it isn't drawn anymore.
+ mButtonsPanel->removeChild(btn);
+
+ // Re-arrange remaining tabs.
+ arrange();
+
+ return true;
+}
+
+bool LLSideTray::addTab(LLSideTrayTab* tab)
+{
+ if (tab == NULL) return false;
+
+ std::string tab_name = tab->getName();
+
+ // Make sure the tab isn't already in the list.
+ if (std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end())
+ {
+ llwarns << "Attempt to re-add existing tab " << tab_name << llendl;
+ return false;
+ }
+
+ // Look up the corresponding button.
+ button_map_t::const_iterator btn_it = mTabButtons.find(tab_name);
+ if (btn_it == mTabButtons.end())
+ {
+ llwarns << "Tab " << tab_name << " has no associated button" << llendl;
+ return false;
+ }
+ LLButton* btn = btn_it->second;
+
+ // Insert the tab at its original position.
+ LLUICtrl::addChild(tab);
+ {
+ tab_order_vector_const_iter_t new_tab_orig_pos =
+ std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), tab_name);
+ llassert(new_tab_orig_pos != mOriginalTabOrder.end());
+ child_vector_iter_t insert_pos = mTabs.end();
+
+ for (child_vector_iter_t tab_it = mTabs.begin(); tab_it != mTabs.end(); ++tab_it)
+ {
+ tab_order_vector_const_iter_t cur_tab_orig_pos =
+ std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), (*tab_it)->getName());
+ llassert(cur_tab_orig_pos != mOriginalTabOrder.end());
+
+ if (new_tab_orig_pos < cur_tab_orig_pos)
+ {
+ insert_pos = tab_it;
+ break;
+ }
+ }
+
+ mTabs.insert(insert_pos, tab);
+ }
+
+ // Add the button to the buttons panel so that it's drawn again.
+ mButtonsPanel->addChildInBack(btn);
+
+ // Arrange tabs after inserting a new one.
+ arrange();
+
+ return true;
+}
void LLSideTray::createButtons ()
{
@@ -414,12 +700,12 @@ void LLSideTray::createButtons ()
// The "OpenClose" button will open/close the whole panel
if (name == "sidebar_openclose")
{
- mCollapseButton = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(),
+ mCollapseButton = createButton(name,sidebar_tab->mImage,sidebar_tab->getTabTitle(),
boost::bind(&LLSideTray::onToggleCollapse, this));
}
else
{
- LLButton* button = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(),
+ LLButton* button = createButton(name,sidebar_tab->mImage,sidebar_tab->getTabTitle(),
boost::bind(&LLSideTray::onTabButtonClick, this, name));
mTabButtons[name] = button;
}
@@ -536,6 +822,9 @@ void LLSideTray::arrange()
LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->setShape(getLocalRect());
}
+
+ // The tab buttons should be shown only if there is at least one non-detached tab.
+ mButtonsPanel->setVisible(hasTabs());
}
void LLSideTray::collapseSideBar()
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 4ff560d83b..f0cc2c1146 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -68,6 +68,8 @@ protected:
typedef child_vector_t::const_iterator child_vector_const_iter_t;
typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t;
typedef child_vector_t::const_reverse_iterator child_vector_const_reverse_iter_t;
+ typedef std::vector<std::string> tab_order_vector_t;
+ typedef tab_order_vector_t::const_iterator tab_order_vector_const_iter_t;
public:
@@ -144,6 +146,8 @@ public:
void onToggleCollapse();
bool addChild (LLView* view, S32 tab_group);
+ bool removeTab (LLSideTrayTab* tab); // Used to detach tabs temporarily
+ bool addTab (LLSideTrayTab* tab); // Used to re-attach tabs
BOOL handleMouseDown (S32 x, S32 y, MASK mask);
@@ -157,10 +161,15 @@ public:
void handleLoginComplete();
-protected:
LLSideTrayTab* getTab (const std::string& name);
+ bool isTabAttached (const std::string& name);
+
+protected:
+ bool hasTabs ();
+
void createButtons ();
+
LLButton* createButton (const std::string& name,const std::string& image,const std::string& tooltip,
LLUICtrl::commit_callback_t callback);
void arrange ();
@@ -179,10 +188,15 @@ private:
private:
+ typedef std::pair<LLButton*, LLSideTrayTab*> detached_tab_t;
+ typedef std::map<std::string, detached_tab_t> detached_tab_map_t;
+
LLPanel* mButtonsPanel;
typedef std::map<std::string,LLButton*> button_map_t;
button_map_t mTabButtons;
child_vector_t mTabs;
+ detached_tab_map_t mDetachedTabs;
+ tab_order_vector_t mOriginalTabOrder;
LLSideTrayTab* mActiveTab;
commit_signal_t mCollapseSignal;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index b572a8cff6..8728298575 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -234,6 +234,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>);
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
+ LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml",&LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 82bc084f68..781e324e25 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2964,7 +2964,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// Make swirly things only for talking objects. (not script debug messages, though)
if (chat.mSourceType == CHAT_SOURCE_OBJECT
- && chat.mChatType != CHAT_TYPE_DEBUG_MSG)
+ && chat.mChatType != CHAT_TYPE_DEBUG_MSG
+ && gSavedSettings.getBOOL("EffectScriptChatParticles") )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b6055d82e3..1a5d7289f4 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -43,6 +43,7 @@
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llinventoryfunctions.h"
+#include "llmenugl.h"
#include "llnotificationsutil.h"
#include "llselectmgr.h"
#include "lltoolgrab.h" // for needsRenderBeam
@@ -240,58 +241,58 @@ BOOL LLVOAvatarSelf::buildMenus()
gAttachBodyPartPieMenus[0] = NULL;
LLContextMenu::Params params;
- params.label(LLTrans::getString("BodyPartsRightArm") + " >");
+ params.label(LLTrans::getString("BodyPartsRightArm") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
params.visible(false);
gAttachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsHead") + " >");
+ params.label(LLTrans::getString("BodyPartsHead") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gAttachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsLeftArm") + " >");
+ params.label(LLTrans::getString("BodyPartsLeftArm") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gAttachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params);
gAttachBodyPartPieMenus[4] = NULL;
- params.label(LLTrans::getString("BodyPartsLeftLeg") + " >");
+ params.label(LLTrans::getString("BodyPartsLeftLeg") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gAttachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsTorso") + " >");
+ params.label(LLTrans::getString("BodyPartsTorso") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gAttachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsRightLeg") + " >");
+ params.label(LLTrans::getString("BodyPartsRightLeg") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gAttachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params);
gDetachBodyPartPieMenus[0] = NULL;
- params.label(LLTrans::getString("BodyPartsRightArm") + " >");
+ params.label(LLTrans::getString("BodyPartsRightArm") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsHead") + " >");
+ params.label(LLTrans::getString("BodyPartsHead") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsLeftArm") + " >");
+ params.label(LLTrans::getString("BodyPartsLeftArm") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params);
gDetachBodyPartPieMenus[4] = NULL;
- params.label(LLTrans::getString("BodyPartsLeftLeg") + " >");
+ params.label(LLTrans::getString("BodyPartsLeftLeg") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsTorso") + " >");
+ params.label(LLTrans::getString("BodyPartsTorso") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params);
- params.label(LLTrans::getString("BodyPartsRightLeg") + " >");
+ params.label(LLTrans::getString("BodyPartsRightLeg") + " " + LLMenuGL::BRANCH_SUFFIX);
params.name(params.label);
gDetachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e4c2ca9ae3..1ee3b84b5e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3211,11 +3211,24 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
LLVertexBuffer::unbind();
- if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred)
{
- // Render debugging beacons.
- gObjectList.renderObjectBeacons();
- gObjectList.resetObjectBeacons();
+ if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ {
+ // Render debugging beacons.
+ gObjectList.renderObjectBeacons();
+ gObjectList.resetObjectBeacons();
+ }
+ else
+ {
+ // Make sure particle effects disappear
+ LLHUDObject::renderAllForTimer();
+ }
+ }
+ else
+ {
+ // Make sure particle effects disappear
+ LLHUDObject::renderAllForTimer();
}
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd");
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index efd96624ab..6370ff9243 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -7,8 +7,8 @@
follows="top|right"
height="174"
layout="topleft"
- min_height="174"
- min_width="174"
+ min_height="128"
+ min_width="128"
name="Map"
title=""
help_topic="map"
@@ -19,40 +19,8 @@
top="0"
width="200">
<floater.string
- name="mini_map_north">
- N
- </floater.string>
- <floater.string
- name="mini_map_east">
- E
- </floater.string>
- <floater.string
- name="mini_map_west">
- W
- </floater.string>
- <floater.string
- name="mini_map_south">
- S
- </floater.string>
- <floater.string
- name="mini_map_southeast">
- SE
- </floater.string>
- <floater.string
- name="mini_map_northeast">
- NE
- </floater.string>
- <floater.string
- name="mini_map_southwest">
- SW
- </floater.string>
- <floater.string
- name="mini_map_northwest">
- NW
- </floater.string>
- <floater.string
name="ToolTipMsg">
- [AGENT][REGION](Double-click to open Map)
+ [REGION](Double-click to open Map, shift-drag to pan)
</floater.string>
<floater.string name="mini_map_caption">
MINIMAP
diff --git a/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml
new file mode 100644
index 0000000000..1466c2d2a5
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<floater
+ can_close="false"
+ can_resize="true">
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml
index f5ea3e735b..8fe89d3934 100644
--- a/indra/newview/skins/default/xui/en/menu_mini_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml
@@ -29,6 +29,7 @@
function="Minimap.Zoom"
parameter="far" />
</menu_item_call>
+ <menu_item_separator />
<menu_item_check
label="Rotate Map"
name="Rotate Map">
@@ -38,6 +39,15 @@
function="ToggleControl"
parameter="MiniMapRotate" />
</menu_item_check>
+ <menu_item_check
+ label="Auto Center"
+ name="Auto Center">
+ <menu_item_check.on_check
+ control="MiniMapAutoCenter" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="MiniMapAutoCenter" />
+ </menu_item_check>
<menu_item_separator />
<menu_item_call
label="Stop Tracking"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index 588342595e..5d58a9d289 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -57,4 +57,13 @@
<on_click
function="Avatar.Pay" />
</menu_item_call>
+ <menu_item_call
+ label="Offer Teleport"
+ name="teleport">
+ <menu_item_call.on_click
+ function="Avatar.OfferTeleport"/>
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_offer_teleport"/>
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
index 0a9c70303e..60c2e0830c 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
@@ -20,7 +20,19 @@
value="Side Panel"
width="255" />
<button
- follows="left|right|top"
+ follows="right|top"
+ height="16"
+ image_selected="Icon_Dock_Press"
+ image_unselected="Icon_Dock_Foreground"
+ image_disabled="Icon_Dock_Press"
+ layout="topleft"
+ name="dock"
+ top="10"
+ right="-28"
+ width="16"
+ tool_tip="Dock/Undock tab" />
+ <button
+ follows="right|top"
height="16"
image_selected="Icon_Help_Press"
image_unselected="Icon_Help_Foreground"
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index a0a9659475..c970d79975 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -74,7 +74,7 @@ namespace tut
typedef test_group<agentaccess> agentaccess_t;
typedef agentaccess_t::object agentaccess_object_t;
- tut::agentaccess_t tut_agentaccess("agentaccess");
+ tut::agentaccess_t tut_agentaccess("LLAgentAccess");
template<> template<>
void agentaccess_object_t::test<1>()
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp
index 530171b87e..99b346cff8 100644
--- a/indra/newview/tests/lldateutil_test.cpp
+++ b/indra/newview/tests/lldateutil_test.cpp
@@ -103,7 +103,7 @@ namespace tut
typedef test_group<dateutil> dateutil_t;
typedef dateutil_t::object dateutil_object_t;
- tut::dateutil_t tut_dateutil("dateutil");
+ tut::dateutil_t tut_dateutil("LLDateUtil");
template<> template<>
void dateutil_object_t::test<1>()
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index a0697af6c3..55823fc386 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -314,7 +314,7 @@ namespace tut
typedef test_group<lllogininstance_data> lllogininstance_group;
typedef lllogininstance_group::object lllogininstance_object;
- lllogininstance_group llsdmgr("lllogininstance");
+ lllogininstance_group llsdmgr("LLLoginInstance");
template<> template<>
void lllogininstance_object::test<1>()
diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp
index 5f3dc5b162..0254c5881f 100644
--- a/indra/newview/tests/llmediadataclient_test.cpp
+++ b/indra/newview/tests/llmediadataclient_test.cpp
@@ -236,7 +236,7 @@ namespace tut
typedef test_group<mediadataclient> mediadataclient_t;
typedef mediadataclient_t::object mediadataclient_object_t;
- tut::mediadataclient_t tut_mediadataclient("mediadataclient");
+ tut::mediadataclient_t tut_mediadataclient("LLMediaDataClient");
void ensure(const std::string &msg, int value, int expected)
{
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 90cacfe3c9..703603e2db 100644
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -87,7 +87,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<secapiTest> secapiTestFactory;
typedef secapiTestFactory::object secapiTestObject;
- tut::secapiTestFactory tut_test("llsecapi");
+ tut::secapiTestFactory tut_test("LLSecAPI");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index c48498ebcd..daa10819fc 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -311,7 +311,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<sechandler_basic_test> sechandler_basic_test_factory;
typedef sechandler_basic_test_factory::object sechandler_basic_test_object;
- tut::sechandler_basic_test_factory tut_test("llsechandler_basic");
+ tut::sechandler_basic_test_factory tut_test("LLSecHandler");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 40425a5caf..f96f79006a 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -101,7 +101,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<slurlTest> slurlTestFactory;
typedef slurlTestFactory::object slurlTestObject;
- tut::slurlTestFactory tut_test("llslurl");
+ tut::slurlTestFactory tut_test("LLSlurl");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/newview/tests/lltextureinfo_test.cpp b/indra/newview/tests/lltextureinfo_test.cpp
index 7fa8602adc..73ace1de37 100644
--- a/indra/newview/tests/lltextureinfo_test.cpp
+++ b/indra/newview/tests/lltextureinfo_test.cpp
@@ -68,7 +68,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<textureinfo_test> textureinfo_t;
typedef textureinfo_t::object textureinfo_object_t;
- tut::textureinfo_t tut_textureinfo("textureinfo");
+ tut::textureinfo_t tut_textureinfo("LLTectureInfo");
// ---------------------------------------------------------------------------------------
diff --git a/indra/newview/tests/lltextureinfodetails_test.cpp b/indra/newview/tests/lltextureinfodetails_test.cpp
index 3cd4c10da2..31ec5f9d4e 100644
--- a/indra/newview/tests/lltextureinfodetails_test.cpp
+++ b/indra/newview/tests/lltextureinfodetails_test.cpp
@@ -67,7 +67,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<textureinfodetails_test> textureinfodetails_t;
typedef textureinfodetails_t::object textureinfodetails_object_t;
- tut::textureinfodetails_t tut_textureinfodetails("textureinfodetails");
+ tut::textureinfodetails_t tut_textureinfodetails("LLTextureInfoDetails");
// ---------------------------------------------------------------------------------------
diff --git a/indra/newview/tests/lltexturestatsuploader_test.cpp b/indra/newview/tests/lltexturestatsuploader_test.cpp
index caeabd08b3..cfb2c267cc 100644
--- a/indra/newview/tests/lltexturestatsuploader_test.cpp
+++ b/indra/newview/tests/lltexturestatsuploader_test.cpp
@@ -90,7 +90,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<texturestatsuploader_test> texturestatsuploader_t;
typedef texturestatsuploader_t::object texturestatsuploader_object_t;
- tut::texturestatsuploader_t tut_texturestatsuploader("texturestatsuploader");
+ tut::texturestatsuploader_t tut_texturestatsuploader("LLTextureStatsUploader");
// ---------------------------------------------------------------------------------------
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 4c71f15db1..a0f1d1c3c3 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -109,7 +109,7 @@ namespace tut
typedef test_group<viewerhelputil> viewerhelputil_t;
typedef viewerhelputil_t::object viewerhelputil_object_t;
- tut::viewerhelputil_t tut_viewerhelputil("viewerhelputil");
+ tut::viewerhelputil_t tut_viewerhelputil("LLViewerHelpUtil");
template<> template<>
void viewerhelputil_object_t::test<1>()
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index d5d6ca671d..dd7761475e 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -127,7 +127,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<viewerNetworkTest> viewerNetworkTestFactory;
typedef viewerNetworkTestFactory::object viewerNetworkTestObject;
- tut::viewerNetworkTestFactory tut_test("llviewernetwork");
+ tut::viewerNetworkTestFactory tut_test("LLViewerNetwork");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp
index 443279c062..b976ac5ea9 100644
--- a/indra/newview/tests/llworldmap_test.cpp
+++ b/indra/newview/tests/llworldmap_test.cpp
@@ -144,15 +144,15 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<iteminfo_test> iteminfo_t;
typedef iteminfo_t::object iteminfo_object_t;
- tut::iteminfo_t tut_iteminfo("iteminfo");
+ tut::iteminfo_t tut_iteminfo("LLItemInfo");
typedef test_group<siminfo_test> siminfo_t;
typedef siminfo_t::object siminfo_object_t;
- tut::siminfo_t tut_siminfo("siminfo");
+ tut::siminfo_t tut_siminfo("LLSimInfo");
typedef test_group<worldmap_test> worldmap_t;
typedef worldmap_t::object worldmap_object_t;
- tut::worldmap_t tut_worldmap("worldmap");
+ tut::worldmap_t tut_worldmap("LLWorldMap");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp
index 272e59061d..54887ae219 100644
--- a/indra/newview/tests/llworldmipmap_test.cpp
+++ b/indra/newview/tests/llworldmipmap_test.cpp
@@ -89,7 +89,7 @@ namespace tut
// Tut templating thingamagic: test group, object and test instance
typedef test_group<worldmipmap_test> worldmipmap_t;
typedef worldmipmap_t::object worldmipmap_object_t;
- tut::worldmipmap_t tut_worldmipmap("worldmipmap");
+ tut::worldmipmap_t tut_worldmipmap("LLWorldMipmap");
// ---------------------------------------------------------------------------------------
// Test functions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 57797f9d9f..ffdb0cb976 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -56,7 +56,7 @@
namespace tut
{
std::string sSourceDir;
-
+
test_runner_singleton runner;
}
@@ -64,54 +64,66 @@ class LLTestCallback : public tut::callback
{
public:
LLTestCallback(bool verbose_mode, std::ostream *stream) :
- mVerboseMode(verbose_mode),
- mTotalTests(0),
- mPassedTests(0),
- mFailedTests(0),
- mSkippedTests(0),
- mStream(stream)
+ mVerboseMode(verbose_mode),
+ mTotalTests(0),
+ mPassedTests(0),
+ mFailedTests(0),
+ mSkippedTests(0),
+ mStream(stream)
{
}
- void run_started()
+ ~LLTestCallback()
+ {
+ }
+
+ virtual void run_started()
{
//std::cout << "run_started" << std::endl;
}
- void test_completed(const tut::test_result& tr)
+ virtual void group_started(const std::string& name) {
+ std::cout << "Unit test group_started name=" << name << std::endl;
+ }
+
+ virtual void group_completed(const std::string& name) {
+ std::cout << "Unit test group_completed name=" << name << std::endl;
+ }
+
+ virtual void test_completed(const tut::test_result& tr)
{
++mTotalTests;
std::ostringstream out;
out << "[" << tr.group << ", " << tr.test << "] ";
switch(tr.result)
{
- case tut::test_result::ok:
- ++mPassedTests;
- out << "ok";
- break;
- case tut::test_result::fail:
- ++mFailedTests;
- out << "fail";
- break;
- case tut::test_result::ex:
- ++mFailedTests;
- out << "exception";
- break;
- case tut::test_result::warn:
- ++mFailedTests;
- out << "test destructor throw";
- break;
- case tut::test_result::term:
- ++mFailedTests;
- out << "abnormal termination";
- break;
- case tut::test_result::skip:
- ++mSkippedTests;
- out << "skipped known failure";
- break;
- default:
- ++mFailedTests;
- out << "unknown";
+ case tut::test_result::ok:
+ ++mPassedTests;
+ out << "ok";
+ break;
+ case tut::test_result::fail:
+ ++mFailedTests;
+ out << "fail";
+ break;
+ case tut::test_result::ex:
+ ++mFailedTests;
+ out << "exception";
+ break;
+ case tut::test_result::warn:
+ ++mFailedTests;
+ out << "test destructor throw";
+ break;
+ case tut::test_result::term:
+ ++mFailedTests;
+ out << "abnormal termination";
+ break;
+ case tut::test_result::skip:
+ ++mSkippedTests;
+ out << "skipped known failure";
+ break;
+ default:
+ ++mFailedTests;
+ out << "unknown";
}
if(mVerboseMode || (tr.result != tut::test_result::ok))
{
@@ -128,7 +140,7 @@ public:
}
}
- void run_completed()
+ virtual void run_completed()
{
if (mStream)
{
@@ -137,10 +149,9 @@ public:
run_completed_(std::cout);
}
- int getFailedTests() const { return mFailedTests; }
-
-private:
- void run_completed_(std::ostream &stream)
+ virtual int getFailedTests() const { return mFailedTests; }
+
+ virtual void run_completed_(std::ostream &stream)
{
stream << "\tTotal Tests:\t" << mTotalTests << std::endl;
stream << "\tPassed Tests:\t" << mPassedTests;
@@ -153,7 +164,7 @@ private:
if (mSkippedTests > 0)
{
stream << "\tSkipped known failures:\t" << mSkippedTests
- << std::endl;
+ << std::endl;
}
if(mFailedTests > 0)
@@ -174,6 +185,94 @@ protected:
std::ostream *mStream;
};
+// TeamCity specific class which emits service messages
+// http://confluence.jetbrains.net/display/TCD3/Build+Script+Interaction+with+TeamCity;#BuildScriptInteractionwithTeamCity-testReporting
+
+class LLTCTestCallback : public LLTestCallback
+{
+public:
+ LLTCTestCallback(bool verbose_mode, std::ostream *stream) :
+ LLTestCallback(verbose_mode, stream),
+ mTCStream()
+ {
+ }
+
+ ~LLTCTestCallback()
+ {
+ }
+
+ virtual void group_started(const std::string& name) {
+ LLTestCallback::group_started(name);
+ mTCStream << "\n##teamcity[testSuiteStarted name='" << name << "']" << std::endl;
+ }
+
+ virtual void group_completed(const std::string& name) {
+ LLTestCallback::group_completed(name);
+ mTCStream << "##teamcity[testSuiteFinished name='" << name << "']" << std::endl;
+ }
+
+ virtual void test_completed(const tut::test_result& tr)
+ {
+ LLTestCallback::test_completed(tr);
+
+ switch(tr.result)
+ {
+ case tut::test_result::ok:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::fail:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::ex:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::warn:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::term:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFailed name='" << tr.group << "." << tr.test << "' message='" << tr.message << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ case tut::test_result::skip:
+ mTCStream << "##teamcity[testStarted name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testIgnored name='" << tr.group << "." << tr.test << "']" << std::endl;
+ mTCStream << "##teamcity[testFinished name='" << tr.group << "." << tr.test << "']" << std::endl;
+ break;
+ default:
+ break;
+ }
+
+ }
+
+ virtual void run_completed()
+ {
+ LLTestCallback::run_completed();
+
+ // dump the TC reporting results to cout
+ tc_run_completed_(std::cout);
+ }
+
+ virtual void tc_run_completed_(std::ostream &stream)
+ {
+
+ // dump the TC reporting results to cout
+ stream << mTCStream.str() << std::endl;
+ }
+
+protected:
+ std::ostringstream mTCStream;
+
+};
+
+
static const apr_getopt_option_t TEST_CL_OPTIONS[] =
{
{"help", 'h', 0, "Print the help message."},
@@ -185,13 +284,14 @@ static const apr_getopt_option_t TEST_CL_OPTIONS[] =
{"touch", 't', 1, "Touch the given file if all tests succeed"},
{"wait", 'w', 0, "Wait for input before exit."},
{"debug", 'd', 0, "Emit full debug logs."},
+ {"suitename", 'x', 1, "Run tests using this suitename"},
{0, 0, 0, 0}
};
void stream_usage(std::ostream& s, const char* app)
{
s << "Usage: " << app << " [OPTIONS]" << std::endl
- << std::endl;
+ << std::endl;
s << "This application runs the unit tests." << std::endl << std::endl;
@@ -201,7 +301,7 @@ void stream_usage(std::ostream& s, const char* app)
{
s << " ";
s << " -" << (char)option->optch << ", --" << option->name
- << std::endl;
+ << std::endl;
s << "\t" << option->description << std::endl << std::endl;
++option;
}
@@ -242,9 +342,9 @@ int main(int argc, char **argv)
LLError::initForApplication(".");
LLError::setFatalFunction(wouldHaveCrashed);
LLError::setDefaultLevel(LLError::LEVEL_ERROR);
- //< *TODO: should come from error config file. Note that we
- // have a command line option that sets this to debug.
-
+ //< *TODO: should come from error config file. Note that we
+ // have a command line option that sets this to debug.
+
#ifdef CTYPE_WORKAROUND
ctype_workaround();
#endif
@@ -267,6 +367,7 @@ int main(int argc, char **argv)
bool verbose_mode = false;
bool wait_at_exit = false;
std::string test_group;
+ std::string suite_name;
// values use for options parsing
apr_status_t apr_err;
@@ -274,7 +375,7 @@ int main(int argc, char **argv)
int opt_id = 0;
std::ofstream *output = NULL;
const char *touch = NULL;
-
+
while(true)
{
apr_err = apr_getopt_long(os, TEST_CL_OPTIONS, &opt_id, &opt_arg);
@@ -283,55 +384,68 @@ int main(int argc, char **argv)
{
char buf[255]; /* Flawfinder: ignore */
std::cerr << "Error parsing options: "
- << apr_strerror(apr_err, buf, 255) << std::endl;
+ << apr_strerror(apr_err, buf, 255) << std::endl;
return 1;
}
switch (opt_id)
{
- case 'g':
- test_group.assign(opt_arg);
- break;
- case 'h':
- stream_usage(std::cout, argv[0]);
- return 0;
- break;
- case 'l':
- stream_groups(std::cout, argv[0]);
- return 0;
- case 'v':
- verbose_mode = true;
- break;
- case 'o':
- output = new std::ofstream;
- output->open(opt_arg);
- break;
- case 's': // --sourcedir
- tut::sSourceDir = opt_arg;
- // For convenience, so you can use tut::sSourceDir + "myfile"
- tut::sSourceDir += '/';
- break;
- case 't':
- touch = opt_arg;
- break;
- case 'w':
- wait_at_exit = true;
- break;
- case 'd':
- // *TODO: should come from error config file. We set it to
- // ERROR by default, so this allows full debug levels.
- LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
- break;
- default:
- stream_usage(std::cerr, argv[0]);
- return 1;
- break;
+ case 'g':
+ test_group.assign(opt_arg);
+ break;
+ case 'h':
+ stream_usage(std::cout, argv[0]);
+ return 0;
+ break;
+ case 'l':
+ stream_groups(std::cout, argv[0]);
+ return 0;
+ case 'v':
+ verbose_mode = true;
+ break;
+ case 'o':
+ output = new std::ofstream;
+ output->open(opt_arg);
+ break;
+ case 's': // --sourcedir
+ tut::sSourceDir = opt_arg;
+ // For convenience, so you can use tut::sSourceDir + "myfile"
+ tut::sSourceDir += '/';
+ break;
+ case 't':
+ touch = opt_arg;
+ break;
+ case 'w':
+ wait_at_exit = true;
+ break;
+ case 'd':
+ // *TODO: should come from error config file. We set it to
+ // ERROR by default, so this allows full debug levels.
+ LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
+ break;
+ case 'x':
+ suite_name.assign(opt_arg);
+ break;
+ default:
+ stream_usage(std::cerr, argv[0]);
+ return 1;
+ break;
}
}
// run the tests
- LLTestCallback callback(verbose_mode, output);
- tut::runner.get().set_callback(&callback);
-
+
+ LLTestCallback* mycallback;
+ if (getenv("TEAMCITY_PROJECT_NAME"))
+ {
+ mycallback = new LLTCTestCallback(verbose_mode, output);
+ }
+ else
+ {
+ mycallback = new LLTestCallback(verbose_mode, output);
+ }
+
+ tut::runner.get().set_callback(mycallback);
+
if(test_group.empty())
{
tut::runner.get().run_tests();
@@ -341,14 +455,14 @@ int main(int argc, char **argv)
tut::runner.get().run_tests(test_group);
}
- bool success = (callback.getFailedTests() == 0);
+ bool success = (mycallback->getFailedTests() == 0);
if (wait_at_exit)
{
std::cerr << "Press return to exit..." << std::endl;
std::cin.get();
}
-
+
if (output)
{
output->close();
@@ -362,9 +476,11 @@ int main(int argc, char **argv)
s << "ok" << std::endl;
s.close();
}
-
+
apr_terminate();
-
+
int retval = (success ? 0 : 1);
return retval;
+
+ //delete mycallback;
}
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 577f5dac89..95d0421273 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -226,7 +226,7 @@ namespace tut
typedef test_group<llviewerlogin_data> llviewerlogin_group;
typedef llviewerlogin_group::object llviewerlogin_object;
- llviewerlogin_group llviewerlogingrp("llviewerlogin");
+ llviewerlogin_group llviewerlogingrp("LLViewerLogin");
template<> template<>
void llviewerlogin_object::test<1>()