merge changes for DRTVWR-285

master
Oz Linden 2013-08-19 15:15:15 -04:00
commit 82bf4e4db2
80 changed files with 1569 additions and 681 deletions

77
.hgtags
View File

@ -56,11 +56,11 @@ a82e5b1e22c7f90e3c7977d146b80588f004ed0d 2.5.0-start
54d772d8687c69b1d773f6ce14bbc7bdc9d6c05f 2.5.0-beta2
54d772d8687c69b1d773f6ce14bbc7bdc9d6c05f DRTVWR-33--2.5.0beta2
54d772d8687c69b1d773f6ce14bbc7bdc9d6c05f DRTVWR-33_2.5.0-beta2
b542f8134a2bb5dd054ff4e509a44b2ee463b1bf nat-eventapi2-base
b723921b5c711bd24dbe77dc76ef488b544dac78 2.5.0-beta3
b723921b5c711bd24dbe77dc76ef488b544dac78 2.5.0-release
b723921b5c711bd24dbe77dc76ef488b544dac78 DRTVWR-31_2.5.0-release
b723921b5c711bd24dbe77dc76ef488b544dac78 DRTVWR-34_2.5.0-beta3
b542f8134a2bb5dd054ff4e509a44b2ee463b1bf nat-eventapi2-base
63a6aedfce785a6c760377bf685b2dae616797d2 2.5.1-start
4dede9ae1ec74d41f6887719f6f1de7340d8578d 2.5.1-release
4dede9ae1ec74d41f6887719f6f1de7340d8578d DRTVWR-37_2.5.1-release
@ -248,33 +248,31 @@ bb9932a7a5fd00edf52d95f354e3b37ae6a942db DRTVWR-156
6414ecdabc5d89515b08d1f872cf923ed3a5523a DRTVWR-148
2a3965b3ad202df7ea25d2be689291bb14a1280e DRTVWR-155
24a7281bef42bd4430ceb25db8b195449c2c7de3 DRTVWR-153
a716684aa7c07c440b1de5815b8a1f3dd3fd8bfb DRTVWR-159
9a78ac13f047056f788c4734dd91aebfe30970e3 DRTVWR-157
5910f8063a7e1ddddf504c2f35ca831cc5e8f469 DRTVWR-160
f0a174c2adb4bc39b16722a61d7eeb4f2a1d4843 3.3.3-beta1
f0a174c2adb4bc39b16722a61d7eeb4f2a1d4843 DRTVWR-144
089e5c84b2dece68f2b016c842ef9b5de4786842 DRTVWR-161
600f3b3920d94de805ac6dc8bb6def9c069dd360 DRTVWR-162
c08e2ac17a99973b2a94477659220b99b8847ae2 DRTVWR-163
2d6c0634b11e6f3df11002b8510a72a0433da00a DRTVWR-164
600f3b3920d94de805ac6dc8bb6def9c069dd360 DRTVWR-162
80b5e5e9775966d3839331ffa7a16a60f9d7c930 DRTVWR-165
fdcc08a4f20ae9bb060f4693c8980d216534efdf 3.3.3-beta2
af5f3e43e6e4424b1da19d9e16f6b853a7b822ed DRTVWR-169
4b3c68199a86cabaa5d9466d7b0f7e141e901d7a 3.3.3-beta3
6428242e124b523813bfaf4c45b3d422f0298c81 3.3.3-release
a716684aa7c07c440b1de5815b8a1f3dd3fd8bfb DRTVWR-159
9a78ac13f047056f788c4734dd91aebfe30970e3 DRTVWR-157
089e5c84b2dece68f2b016c842ef9b5de4786842 DRTVWR-161
c08e2ac17a99973b2a94477659220b99b8847ae2 DRTVWR-163
b9d0170b62eb1c7c3adaa37a0b13a833e5e659f9 DRTVWR-171
050e48759337249130f684b4a21080b683f61732 DRTVWR-168
09ef7fd1b0781f33b8a3a9af6236b7bcb4831910 DRTVWR-170
f87bfbe0b62d26f451d02a47c80ebef6b9168fc2 DRTVWR-158
f91d003091a61937a044652c4c674447f7dcbb7a 3.3.4-beta1
005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
bce218b2b45b730b22cc51e4807aa8b571cadef3 DRTVWR-173
cbea6356ce9cb0c313b6777f10c5c14783264fcc DRTVWR-174
82b5330bc8b17d0d4b598832e9c5a92e90075682 3.3.4-beta2
57d221de3df94f90b55204313c2cef044a3c0ae2 DRTVWR-176
eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177
a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180
5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183
6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4
@ -285,32 +283,24 @@ ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5
7c9102fb998885621919f2474a002c35b583539b 3.3.4-release2
8c9085066c78ed5f6c9379dc054c82a6fcdb1851 DRTVWR-207
351eea5f9dc192fc5ddea3b02958de97677a0a12 3.3.4-release3
005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
47f0d08ba7ade0a3905074009067c6d3df7e16ae DRTVWR-190
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
47f0d08ba7ade0a3905074009067c6d3df7e16ae DRTVWR-190
421126293dcbde918e0da027ca0ab9deb5b4fbf2 DRTVWR-192
4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191
33a2fc7a910ae29ff8b4850316ed7fbff9f64d33 DRTVWR-195
e9732c739c8a72a590216951505ea9c76a526a84 DRTVWR-193
78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194
7602f61c804a512764e349c034c02ddabeefebc4 DRTVWR-196
ae5c83dd61d2d37c45f1d5b8bf2b036d87599f1b DRTVWR-198
507bdfbd6bf844a511c1ffeda4baa80016ed1346 DRTVWR-197
b1dbb1a83f48f93f6f878cff9e52d2cb635e145c 3.4.0-beta2
37402e2b19af970d51b0a814d79892cc5647532b DRTVWR-200
182a9bf30e81070361bb020a78003b1cf398e79c 3.4.0-beta3
248f4acd92a706c79e842bc83d80baa7369c0c2e DRTVWR-203
7649a3dff5ec22d3727377e5f02efd0f421e4cb5 DRTVWR-201
84fb70dfe3444e75a44fb4bee43e2fc8221cebdd 3.4.0-beta4
de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202
573e863be2f26d3687161def4b9fea9b7038dda8 3.4.0-beta5
34dbbe2b00afe90352d3acf8290eb10ab90d1c8b oz-build-test-tag
6ee71714935ffcd159db3d4f5800c1929aac54e1 DRTVWR-205
7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206
af7b28e75bd5a629cd9e0dc46fb3f1757626f493 DRTVWR-212
015012c2b740ccdec8a8c3d6e5f898449ecfe0b8 DRTVWR-213
62b07aa81b1957897c3846292bb9412977b0af6c 3.3.4-beta6
@ -319,7 +309,6 @@ ceed0b65a69f1eac20d523e0203320a32f9a3f3c DRTVWR-215
97977c67245f52db20eb15f1918cc0f24778cabc 3.4.0-release
5adb2b8f96c3cac88ad7c7d996d707f1b29df336 3.4.1-beta1
b3f74858a1c8720c82d0978f3877a3fc8ba459ec 3.4.1-beta1a
b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219
2b779f233ee6f38c89cb921650c773a96e63da92 DRTVWR-220
0b9d95f4bfb6867cbf56eaec51633b0da2f1262d DRTVWR-221
e6e553761829dc0270eaaa712b7cb0622535b076 3.4.1-beta3
@ -344,31 +333,36 @@ baf97f06ae17223614c5e31aa42e71d87cff07fe DRTVWR-236
b2f21e3442542283a80e7eaebae9f833e5a927b6 DRTVWR-237
3f9be82de642d468c5fc272cb9d96b46b5498402 3.4.1-beta12
e59ffd3fe0838ae6b09b242a6e9df71761b88f41 3.4.1-release
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191
78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194
248f4acd92a706c79e842bc83d80baa7369c0c2e DRTVWR-203
de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202
34dbbe2b00afe90352d3acf8290eb10ab90d1c8b oz-build-test-tag
6ee71714935ffcd159db3d4f5800c1929aac54e1 DRTVWR-205
7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206
b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219
32896d5e920ca9a29256ff3b747c2e99752aa5ae DRTVWR-217
704bbae7b182a1f2811a47a054e680522966f54a 3.4.2-beta1
d799593b53ed733862e9a13871e318e886469377 DRTVWR-208
e497dcde7a3653e384eb223a8a460030e89c294c DRTVWR-223
288539fc0408ed4b69a99665de33bbbc2c3c08fe DRTVWR-216
e664473c16df1d82ffaff382e7b3e023da202d52 3.4.2-beta2
93ab02d83f51e30a3cabad98aff89601befd9413 DRTVWR-240
0891d7a773a31397dcad48be3fa66531d567a821 DRTVWR-242
710785535362b3cb801b6a3dc4703be3373bd0cd 3.4.2-beta3
2aa72e3372a83dece4df9cf72fb1e7c34f90b5e3 DRTVWR-209
f7bedce18ad52283e6072814db23318907261487 DRTVWR-238
7b64c96fbcadf360bd2feaae19d330166b70877c DRTVWR-210
e9a5886052433d5db9e504ffaca10890f9932979 DRTVWR-243
73b84b9864dc650fe7c8fc9f52361450f0849004 3.4.2-beta4
16310aabccf315870f7cc9bf966926c0ad6954fa 3.4.2-release
d799593b53ed733862e9a13871e318e886469377 DRTVWR-208
e497dcde7a3653e384eb223a8a460030e89c294c DRTVWR-223
93ab02d83f51e30a3cabad98aff89601befd9413 DRTVWR-240
2aa72e3372a83dece4df9cf72fb1e7c34f90b5e3 DRTVWR-209
f7bedce18ad52283e6072814db23318907261487 DRTVWR-238
7b64c96fbcadf360bd2feaae19d330166b70877c DRTVWR-210
5e4e4128b256525bafc07a62e35ae8527aaa9c9d DRTVWR-241
f1d3b3fcab28ed9ea532bf50db0ba96f5c8cc8e9 DRTVWR-232
4918b150e75df6b516fb6c2616d32043fa6b4cac DRTVWR-245
94ab2b49458ab372a95d2d6949fdf574f413068d 3.4.3-beta1
4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230
b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255
965b9a35e260c0f53be1a25f0db7abc8a67eaf47 DRTVWR-252
bb10adc4f76cf0067fca7075146f00cdc0740e9d DRTVWR-251
ab0aa2f6ba22b52fed30a2337197f589156edc75 DRTVWR-253
@ -377,25 +371,31 @@ ab0aa2f6ba22b52fed30a2337197f589156edc75 DRTVWR-253
44e764a6ac9e672a4f3bce821a4b6a218590c374 DRTVWR-258
c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
452ce96d4046dc05a3ecaecc203e2cc8ddd72e76 DRTVWR-259
9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260
daca610d840625b5bebb966a57cb49581852c417 DRTVWR-265
9afbdc4e24cc04feacfb2b7a10b78a64f780901a DRTVWR-266
73280db02501f5ad041fc18b1eba68e73a81996c DRTVWR-267
870e2d79e0063fda87187f17bbc2747766733194 3.4.3-beta3
0a2ca6546b499239afeb66d17b2fadbcdbe36ab1 3.4.3-release
4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230
b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255
9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260
84fbaf2d4141bd161731430e760949dc787ca206 DRTVWR-244
083d2d36b5bb1c54fc3dd7caac0e7ac381a9cef0 3.4.4-beta1
391a8c74cec7275c5d26c85ad108d4782a3e3dd9 DRTVWR-268
b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270
cd39255bd23330fd30c04105f2811e941d8524fe 3.4.4-beta2
2c4011bbc2b15b82198fd8b51f3a9fe765a08c4d DRTVWR-271
2f8a3ef687bc55828abcb17ac1ad7cde70536d7e 3.4.4-beta3
35cfd4cf5b895fa776592f2e630e330be7f0604e DRTVWR-273
a36f1f354b02aa6e448ca13685de167d0a0a3d03 DRTVWR-272
37dba00ad820de3a808d4039396b162a9c275b3e DRTVWR-269
c374035d459af3c03dea2dd90880dfc25de64706 DRTVWR-275
05d9f1dd7a954069af2a33abedb7713fa36a04cb 3.4.4-beta4
e1bb1ae7d8b12faeb37933a737c199cc9b9f89cc 3.4.4-release
391a8c74cec7275c5d26c85ad108d4782a3e3dd9 DRTVWR-268
a36f1f354b02aa6e448ca13685de167d0a0a3d03 DRTVWR-272
37dba00ad820de3a808d4039396b162a9c275b3e DRTVWR-269
7c6dfdc1b7a2ce0d8e3a8f3ce3058547ea065c0f DRTVWR-250
b9ff9730daa53a541925300cbd02bb14575a5705 DRTVWR-277
af6b711a97073431953b55ee808aaa09900c27e5 DRTVWR-276
@ -405,8 +405,6 @@ c296133849d1f103c0e2abc41e6599daed00b67b DRTVWR-280
5df4802bec93c8d0a509946d826bb4c50c5442ec DRTVWR-281
7c1c33ba4cfd2d15ca51cc1ac440eca551331a4a DRTVWR-283
6b9c7dbebef793230d64e1b452577c8b142d4143 3.4.5-beta2
37947e4f771f001b551581bf7cd0051c3153beed DRTVWR-282
6482cceb91cda68b799f3e6cdc66d33bf123547a DRTVWR-284
ccf991e02dc2f63fb646324230d54832683f4a9b DRTVWR-286
2d849850558a5a0324b398d1c102d30bcbdfb88f DRTVWR-287
e06898df8644fe567bee94f817d03abc1c380993 3.4.5-beta3
@ -460,9 +458,8 @@ a314f1c94374ab1f6633dd2983f7090a68663eb2 3.5.2-beta4
9b1b6f33aa5394b27bb652b31b5cb81ef6060370 3.5.2-release
a277b841729f2a62ba1e34acacc964bc13c1ad6f 3.5.3-release
fb1630153bac5552046ea914af3f14deabc1def8 3.6.0-materials-beta1
69429d81ae4dd321eda2607901ef0a0fde71b54c 3.6.0-release
69429d81ae4dd321eda2607901ef0a0fde71b54c 3.6.0-release
0a56f33ad6aa112032b14a41dad759ad377bdde9 3.6.0-release
75cf8e855ae1af6895a35da475314c2b5acf1850 3.6.1-release
f6741d5fe8d632651424484df0fe0cb4a01e9fbe 3.6.2-release
fe4f7c5e9fd27e09d03deb1cc9ab3e5093f6309e 3.6.3-release
83357f31d8dbf048a8bfdc323f363bf4d588aca1 CHOP-951-a

View File

@ -26,6 +26,9 @@ codeticket_since = 3.3.0-release
Linux.gcc_version = /usr/bin/gcc-4.6
Linux.cxx_version = /usr/bin/g++-4.6
# Setup default sourceid so Windows can pick up the TeamCity override
sourceid = ""
################################################################
#### Examples of how to set the viewer_channel ####
#

View File

@ -176,6 +176,7 @@ Ansariel Hiller
STORM-1713
STORM-1899
MAINT-2368
STORM-1931
Aralara Rajal
Arare Chantilly
CHUIBUG-191
@ -304,6 +305,8 @@ Ciaran Laval
Cinder Roxley
BUG-2326
STORM-1703
STORM-1948
STORM-1952
Clara Young
Coaldust Numbers
VWR-1095
@ -315,6 +318,7 @@ Cron Stardust
VWR-10579
VWR-25120
STORM-1075
STORM-1919
Cypren Christenson
STORM-417
Dante Tucker
@ -407,6 +411,7 @@ Ganymedes Costagravas
Geenz Spad
STORM-1823
STORM-1900
STORM-1905
NORSPEC-229
Gene Frostbite
GeneJ Composer
@ -503,6 +508,8 @@ Ima Mechanique
STORM-959
STORM-1175
STORM-1708
STORM-1855
VWR-20553
Imnotgoing Sideways
Inma Rau
Innula Zenovka
@ -646,12 +653,16 @@ Jonathan Yap
STORM-1793
STORM-1810
STORM-1877
STORM-1892
STORM-1894
STORM-1860
STORM-1852
STORM-1870
STORM-1872
STORM-1858
STORM-1862
STORM-1918
STORM-1953
OPEN-161
Kadah Coba
STORM-1060
@ -690,6 +701,7 @@ Kitty Barnett
STORM-800
STORM-1001
STORM-1175
STORM-1905
VWR-24217
STORM-1804
Kolor Fall
@ -699,6 +711,7 @@ Kunnis Basiat
VWR-82
VWR-102
Lance Corrimal
STORM-1910
VWR-25269
Latif Khalifa
VWR-5370
@ -753,9 +766,11 @@ Marianne McCann
Marine Kelley
CHUIBUG-134
STORM-281
STORM-1910
MartinRJ Fayray
STORM-1844
STORM-1845
STORM-1911
STORM-1934
Matthew Anthony
Matthew Dowd
@ -1051,6 +1066,7 @@ Satanello Miami
Satomi Ahn
STORM-501
STORM-229
VWR-20553
VWR-24502
Scrim Pinion
Scrippy Scofield
@ -1220,6 +1236,8 @@ Tofu Buzzard
STORM-1684
STORM-1819
Tony Kembia
Tonya Souther
STORM-1905
Torben Trautman
TouchaHoney Perhaps
TraductoresAnonimos Alter

View File

@ -18,7 +18,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
find_program(MERCURIAL hg)
if (DEFINED MERCURIAL)
execute_process(
COMMAND ${MERCURIAL} log -r tip --template "{p1rev}"
COMMAND ${MERCURIAL} log -r tip --template "{rev}"
OUTPUT_VARIABLE VIEWER_VERSION_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)

View File

@ -392,11 +392,21 @@ class LLManifest(object):
raise ManifestError, "Should be something at path " + path
self.created_paths.append(path)
def put_in_file(self, contents, dst):
def put_in_file(self, contents, dst, src=None):
# write contents as dst
f = open(self.dst_path_of(dst), "wb")
f.write(contents)
f.close()
dst_path = self.dst_path_of(dst)
f = open(dst_path, "wb")
try:
f.write(contents)
finally:
f.close()
# Why would we create a file in the destination tree if not to include
# it in the installer? The default src=None (plus the fact that the
# src param is last) is to preserve backwards compatibility.
if src:
self.file_list.append([src, dst_path])
return dst_path
def replace_in(self, src, dst=None, searchdict={}):
if dst == None:

View File

@ -608,9 +608,6 @@ namespace tut
void object::test<5>()
{
set_test_name("exit(2)");
#if LL_WINDOWS
skip("MAINT-2302: This frequently (though not always) fails on Windows.");
#endif
PythonProcessLauncher py(get_test_name(),
"import sys\n"
"sys.exit(2)\n");
@ -622,10 +619,7 @@ namespace tut
template<> template<>
void object::test<6>()
{
set_test_name("syntax_error:");
#if LL_WINDOWS
skip("MAINT-2302: This frequently (though not always) fails on Windows.");
#endif
set_test_name("syntax_error");
PythonProcessLauncher py(get_test_name(),
"syntax_error:\n");
py.mParams.files.add(LLProcess::FileParam()); // inherit stdin
@ -647,9 +641,6 @@ namespace tut
void object::test<7>()
{
set_test_name("explicit kill()");
#if LL_WINDOWS
skip("MAINT-2302: This frequently (though not always) fails on Windows.");
#endif
PythonProcessLauncher py(get_test_name(),
"from __future__ import with_statement\n"
"import sys, time\n"
@ -694,9 +685,6 @@ namespace tut
void object::test<8>()
{
set_test_name("implicit kill()");
#if LL_WINDOWS
skip("MAINT-2302: This frequently (though not always) fails on Windows.");
#endif
NamedTempFile out("out", "not started");
LLProcess::handle phandle(0);
{

View File

@ -356,8 +356,8 @@ std::string LLFloaterReg::declareRectControl(const std::string& name)
{
std::string controlname = getRectControlName(name);
LLFloater::getControlGroup()->declareRect(controlname, LLRect(),
llformat("Window Size for %s", name.c_str()),
TRUE);
llformat("Window Size for %s", name.c_str()),
LLControlVariable::PERSIST_NONDFT);
return controlname;
}
@ -367,7 +367,7 @@ std::string LLFloaterReg::declarePosXControl(const std::string& name)
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window X Position for %s", name.c_str()),
TRUE);
LLControlVariable::PERSIST_NONDFT);
return controlname;
}
@ -377,7 +377,7 @@ std::string LLFloaterReg::declarePosYControl(const std::string& name)
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window Y Position for %s", name.c_str()),
TRUE);
LLControlVariable::PERSIST_NONDFT);
return controlname;
}
@ -404,7 +404,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
std::string controlname = getVisibilityControlName(name);
LLFloater::getControlGroup()->declareBOOL(controlname, FALSE,
llformat("Window Visibility for %s", name.c_str()),
TRUE);
LLControlVariable::PERSIST_NONDFT);
return controlname;
}
@ -414,7 +414,7 @@ std::string LLFloaterReg::declareDockStateControl(const std::string& name)
std::string controlname = getDockStateControlName(name);
LLFloater::getControlGroup()->declareBOOL(controlname, TRUE,
llformat("Window Docking state for %s", name.c_str()),
TRUE);
LLControlVariable::PERSIST_NONDFT);
return controlname;
}

View File

@ -214,7 +214,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
}
else
{
LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", TRUE);
LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", LLControlVariable::PERSIST_NONDFT);
mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name);
}
}

View File

@ -1125,7 +1125,8 @@ void LLTextEditor::addChar(llwchar wc)
}
}
void LLTextEditor::addLineBreakChar()
void LLTextEditor::addLineBreakChar(BOOL group_together)
{
if( !getEnabled() )
{
@ -1143,7 +1144,7 @@ void LLTextEditor::addLineBreakChar()
LLStyleConstSP sp(new LLStyle(LLStyle::Params()));
LLTextSegmentPtr segment = new LLLineBreakTextSegment(sp, mCursorPos);
S32 pos = execute(new TextCmdAddChar(mCursorPos, FALSE, '\n', segment));
S32 pos = execute(new TextCmdAddChar(mCursorPos, group_together, '\n', segment));
setCursorPos(mCursorPos + pos);
}
@ -1484,21 +1485,28 @@ void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string)
std::basic_string<llwchar>::size_type start = 0;
std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
while(pos!=-1)
while((pos != -1) && (pos != clean_string.length() -1))
{
if(pos!=start)
{
std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,pos-start);
setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
setCursorPos(mCursorPos + insert(mCursorPos, str, TRUE, LLTextSegmentPtr()));
}
addLineBreakChar();
addLineBreakChar(TRUE); // Add a line break and group with the next addition.
start = pos+1;
pos = clean_string.find('\n',start);
}
std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
if (pos != start)
{
std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
}
else
{
addLineBreakChar(FALSE); // Add a line break and end the grouping.
}
}
// copy selection to primary

View File

@ -248,7 +248,7 @@ protected:
// Undoable operations
void addChar(llwchar c); // at mCursorPos
S32 addChar(S32 pos, llwchar wc);
void addLineBreakChar();
void addLineBreakChar(BOOL group_together = FALSE);
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);

View File

@ -32,7 +32,7 @@
#define MAX_PATH MAXPATHLEN
#endif
// these numbers *may* get serialized (really??), so we need to be explicit
// these numbers are read from settings_files.xml, so we need to be explicit
typedef enum ELLPath
{
LL_PATH_NONE = 0,

View File

@ -132,14 +132,14 @@ bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
LLControlVariable::LLControlVariable(const std::string& name, eControlType type,
LLSD initial, const std::string& comment,
bool persist, bool hidefromsettingseditor)
ePersist persist, bool hidefromsettingseditor)
: mName(name),
mComment(comment),
mType(type),
mPersist(persist),
mHideFromSettingsEditor(hidefromsettingseditor)
{
if (mPersist && mComment.empty())
if ((persist != PERSIST_NO) && mComment.empty())
{
llerrs << "Must supply a comment for control " << mName << llendl;
}
@ -260,7 +260,7 @@ void LLControlVariable::setDefaultValue(const LLSD& value)
}
}
void LLControlVariable::setPersist(bool state)
void LLControlVariable::setPersist(ePersist state)
{
mPersist = state;
}
@ -292,10 +292,29 @@ void LLControlVariable::resetToDefault(bool fire_signal)
}
}
bool LLControlVariable::isSaveValueDefault()
{
return (mValues.size() == 1)
|| ((mValues.size() > 1) && llsd_compare(mValues[1], mValues[0]));
bool LLControlVariable::shouldSave(bool nondefault_only)
{
// This method is used to decide whether we should save a given
// variable. Two of the three values of mPersist are easy.
if (mPersist == PERSIST_NO)
return false;
if (mPersist == PERSIST_ALWAYS)
return true;
// PERSIST_NONDFT
// If caller doesn't need us to filter, just save.
if (! nondefault_only)
return true;
// PERSIST_NONDFT: caller only wants us to save this variable if its value
// differs from default.
if (isDefault()) // never been altered
return false;
// We've set at least one other value: compare it to default. Save only if
// they differ.
return ! llsd_compare(getSaveValue(), getDefault());
}
LLSD LLControlVariable::getSaveValue() const
@ -355,12 +374,12 @@ std::string LLControlGroup::typeEnumToString(eControlType typeenum)
return mTypeString[typeenum];
}
BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor)
LLControlVariable* LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, LLControlVariable::ePersist persist, BOOL hidefromsettingseditor)
{
LLControlVariable* existing_control = getControl(name);
if (existing_control)
{
if (persist && existing_control->isType(type))
if ((persist != LLControlVariable::PERSIST_NO) && existing_control->isType(type))
{
if (!existing_control->llsd_compare(existing_control->getDefault(), initial_val))
{
@ -374,66 +393,66 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type,
{
llwarns << "Control named " << name << " already exists, ignoring new declaration." << llendl;
}
return TRUE;
return existing_control;
}
// if not, create the control and add it to the name table
LLControlVariable* control = new LLControlVariable(name, type, initial_val, comment, persist, hidefromsettingseditor);
mNameTable[name] = control;
return TRUE;
return control;
}
BOOL LLControlGroup::declareU32(const std::string& name, const U32 initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareU32(const std::string& name, const U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_U32, (LLSD::Integer) initial_val, comment, persist);
}
BOOL LLControlGroup::declareS32(const std::string& name, const S32 initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareS32(const std::string& name, const S32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_S32, initial_val, comment, persist);
}
BOOL LLControlGroup::declareF32(const std::string& name, const F32 initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareF32(const std::string& name, const F32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_F32, initial_val, comment, persist);
}
BOOL LLControlGroup::declareBOOL(const std::string& name, const BOOL initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, const BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_BOOLEAN, initial_val, comment, persist);
}
BOOL LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_STRING, initial_val, comment, persist);
}
BOOL LLControlGroup::declareVec3(const std::string& name, const LLVector3 &initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareVec3(const std::string& name, const LLVector3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_VEC3, initial_val.getValue(), comment, persist);
}
BOOL LLControlGroup::declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_VEC3D, initial_val.getValue(), comment, persist);
}
BOOL LLControlGroup::declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
return declareControl(name, TYPE_RECT, initial_val.getValue(), comment, persist);
}
BOOL LLControlGroup::declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist )
LLControlVariable* LLControlGroup::declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
{
return declareControl(name, TYPE_COL4, initial_val.getValue(), comment, persist);
}
BOOL LLControlGroup::declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist )
LLControlVariable* LLControlGroup::declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
{
return declareControl(name, TYPE_COL3, initial_val.getValue(), comment, persist);
}
BOOL LLControlGroup::declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist )
LLControlVariable* LLControlGroup::declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
{
return declareControl(name, TYPE_LLSD, initial_val, comment, persist);
}
@ -664,11 +683,11 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require
switch(declare_as)
{
case TYPE_COL4:
declareColor4(name, LLColor4::white, LLStringUtil::null, NO_PERSIST);
declareColor4(name, LLColor4::white, LLStringUtil::null, LLControlVariable::PERSIST_NO);
break;
case TYPE_STRING:
default:
declareString(name, LLStringUtil::null, LLStringUtil::null, NO_PERSIST);
declareString(name, LLStringUtil::null, LLStringUtil::null, LLControlVariable::PERSIST_NO);
break;
}
}
@ -805,21 +824,12 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only
{
llwarns << "Tried to save invalid control: " << iter->first << llendl;
}
if( control && control->isPersisted() )
else if( control->shouldSave(nondefault_only) )
{
if (!(nondefault_only && (control->isSaveValueDefault())))
{
settings[iter->first]["Type"] = typeEnumToString(control->type());
settings[iter->first]["Comment"] = control->getComment();
settings[iter->first]["Value"] = control->getSaveValue();
++num_saved;
}
else
{
// Debug spam
// llinfos << "Skipping " << control->getName() << llendl;
}
settings[iter->first]["Type"] = typeEnumToString(control->type());
settings[iter->first]["Comment"] = control->getComment();
settings[iter->first]["Value"] = control->getSaveValue();
++num_saved;
}
}
llofstream file;
@ -862,13 +872,14 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr)
{
bool persist = true;
LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT;
std::string const & name = itr->first;
LLSD const & control_map = itr->second;
if(control_map.has("Persist"))
{
persist = control_map["Persist"].asInteger();
persist = control_map["Persist"].asInteger()?
LLControlVariable::PERSIST_NONDFT : LLControlVariable::PERSIST_NO;
}
// Sometimes we want to use the settings system to provide cheap persistence, but we
@ -887,6 +898,8 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
LLControlVariable* existing_control = getControl(name);
if(existing_control)
{
// set_default_values is true when we're loading the initial,
// immutable files from app_settings, e.g. settings.xml.
if(set_default_values)
{
// Override all previously set properties of this control.
@ -908,6 +921,9 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
}
else if(existing_control->isPersisted())
{
// save_values is specifically false for (e.g.)
// SessionSettingsFile and UserSessionSettingsFile -- in other
// words, for a file that's supposed to be transient.
existing_control->setValue(control_map["Value"], save_values);
}
// *NOTE: If not persisted and not setting defaults,
@ -915,6 +931,39 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
}
else
{
// We've never seen this control before. Either we're loading up
// the initial set of default settings files (set_default_values)
// -- or we're loading user settings last saved by a viewer that
// supports a superset of the variables we know.
// CHOP-962: if we're loading an unrecognized user setting, make
// sure we save it later. If you try an experimental viewer, tweak
// a new setting, briefly revert to an old viewer, then return to
// the new one, we don't want the old viewer to discard the
// setting you changed.
if (! set_default_values)
{
// Using PERSIST_ALWAYS insists that saveToFile() (which calls
// LLControlVariable::shouldSave()) must save this control
// variable regardless of its value. We can safely set this
// LLControlVariable persistent because the 'persistent' flag
// is not itself persisted!
persist = LLControlVariable::PERSIST_ALWAYS;
// We want to mention unrecognized user settings variables
// (e.g. from a newer version of the viewer) in the log. But
// we also arrive here for Boolean variables generated by
// the notifications subsystem when the user checks "Don't
// show me this again." These aren't declared in settings.xml;
// they're actually named for the notification they suppress.
// We don't want to mention those. Apologies, this is a bit of
// a hack: we happen to know that user settings go into an
// LLControlGroup whose name is "Global".
if (getKey() == "Global")
{
LL_INFOS("LLControlGroup") << "preserving unrecognized " << getKey()
<< " settings variable " << name << LL_ENDL;
}
}
declareControl(name,
typeStringToEnum(control_map["Type"].asString()),
control_map["Value"],
@ -923,7 +972,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
hidefromsettingseditor
);
}
++validitems;
}

View File

@ -72,8 +72,6 @@ class LLVector3d;
class LLColor4;
class LLColor3;
const BOOL NO_PERSIST = FALSE;
typedef enum e_control_type
{
TYPE_U32 = 0,
@ -100,21 +98,28 @@ public:
typedef boost::signals2::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t;
typedef boost::signals2::signal<void(LLControlVariable* control, const LLSD&, const LLSD&)> commit_signal_t;
enum ePersist
{
PERSIST_NO, // don't save this var
PERSIST_NONDFT, // save this var if differs from default
PERSIST_ALWAYS // save this var even if has default value
};
private:
std::string mName;
std::string mComment;
eControlType mType;
bool mPersist;
ePersist mPersist;
bool mHideFromSettingsEditor;
std::vector<LLSD> mValues;
commit_signal_t mCommitSignal;
validate_signal_t mValidateSignal;
public:
LLControlVariable(const std::string& name, eControlType type,
LLSD initial, const std::string& comment,
bool persist = true, bool hidefromsettingseditor = false);
ePersist persist = PERSIST_NONDFT, bool hidefromsettingseditor = false);
virtual ~LLControlVariable();
@ -131,8 +136,8 @@ public:
validate_signal_t* getValidateSignal() { return &mValidateSignal; }
bool isDefault() { return (mValues.size() == 1); }
bool isSaveValueDefault();
bool isPersisted() { return mPersist; }
bool shouldSave(bool nondefault_only);
bool isPersisted() { return mPersist != PERSIST_NO; }
bool isHiddenFromSettingsEditor() { return mHideFromSettingsEditor; }
LLSD get() const { return getValue(); }
LLSD getValue() const { return mValues.back(); }
@ -142,7 +147,7 @@ public:
void set(const LLSD& val) { setValue(val); }
void setValue(const LLSD& value, bool saved_value = TRUE);
void setDefaultValue(const LLSD& value);
void setPersist(bool state);
void setPersist(ePersist);
void setHiddenFromSettingsEditor(bool hide);
void setComment(const std::string& comment);
@ -207,19 +212,19 @@ public:
virtual void apply(const std::string& name, LLControlVariable* control) = 0;
};
void applyToAll(ApplyFunctor* func);
BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE);
BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, BOOL persist = TRUE);
BOOL declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist = TRUE);
BOOL declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist = TRUE);
LLControlVariable* declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, LLControlVariable::ePersist persist, BOOL hidefromsettingseditor = FALSE);
LLControlVariable* declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareS32(const std::string& name, S32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareF32(const std::string& name, F32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
LLControlVariable* declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
std::string getString(const std::string& name);
std::string getText(const std::string& name);
@ -368,7 +373,7 @@ private:
init_value = convert_to_llsd(default_value);
if(type < TYPE_COUNT)
{
group.declareControl(name, type, init_value, comment, FALSE);
group.declareControl(name, type, init_value, comment, LLControlVariable::PERSIST_NO);
return true;
}
return false;

View File

@ -128,7 +128,11 @@ namespace tut
template<> template<>
void control_group_t::test<3>()
{
int results = mCG->loadFromFile(mTestConfigFile.c_str());
// Pass default_values = true. This tells loadFromFile() we're loading
// a default settings file that declares variables, rather than a user
// settings file. When loadFromFile() encounters an unrecognized user
// settings variable, it forcibly preserves it (CHOP-962).
int results = mCG->loadFromFile(mTestConfigFile.c_str(), true);
LLControlVariable* control = mCG->getControl("TestSetting");
LLSD new_value = 13;
control->setValue(new_value, FALSE);

View File

@ -229,6 +229,7 @@ set(viewer_SOURCE_FILES
llfloaterfonttest.cpp
llfloatergesture.cpp
llfloatergodtools.cpp
llfloatergotoline.cpp
llfloatergroupinvite.cpp
llfloatergroups.cpp
llfloaterhandler.cpp
@ -812,6 +813,7 @@ set(viewer_HEADER_FILES
llfloaterfonttest.h
llfloatergesture.h
llfloatergodtools.h
llfloatergotoline.h
llfloatergroupinvite.h
llfloatergroups.h
llfloaterhandler.h

View File

@ -22,7 +22,8 @@
<map>
<key>count</key>
<integer>1</integer>
<!-- Special case. Not mapped to a setting. -->
<key>map-to</key>
<string>CmdLineChannel</string>
</map>
<key>console</key>
@ -96,6 +97,8 @@
0 - low, 1 - medium, 2 - high, 3 - ultra</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
<string>RenderQualityPerformance</string>
</map>
<key>grid</key>
@ -108,6 +111,16 @@
<string>CmdLineGridChoice</string>
</map>
<key>update-service</key>
<map>
<key>desc</key>
<string>Override the url base for the update query.</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
<string>CmdLineUpdateService</string>
</map>
<key>help</key>
<map>
<key>desc</key>
@ -370,7 +383,8 @@
<boolean>true</boolean>
<key>last_option</key>
<boolean>true</boolean>
<!-- Special case. Not mapped to a setting. -->
<key>map-to</key>
<string>CmdLineLoginLocation</string>
</map>
<key>url</key>
@ -381,7 +395,8 @@
<integer>1</integer>
<key>last_option</key>
<boolean>true</boolean>
<!-- Special case. Not mapped to a setting. -->
<key>map-to</key>
<string>CmdLineLoginLocation</string>
</map>
<key>usersessionsettings</key>

View File

@ -126,6 +126,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>AnalyzePerformance</key>
<map>
<key>Comment</key>
<string>Request performance analysis for a particular viewer run</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AnimateTextures</key>
<map>
<key>Comment</key>
@ -1738,6 +1749,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>CmdLineChannel</key>
<map>
<key>Comment</key>
<string>Command line specified channel name</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string />
</map>
<key>CmdLineDisableVoice</key>
<map>
<key>Comment</key>
@ -1760,6 +1782,17 @@
<key>Value</key>
<string />
</map>
<key>CmdLineUpdateService</key>
<map>
<key>Comment</key>
<string>Override the url base for the update query.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string />
</map>
<key>CmdLineHelperURI</key>
<map>
<key>Comment</key>
@ -1784,6 +1817,17 @@
<string />
</array>
</map>
<key>CmdLineLoginLocation</key>
<map>
<key>Comment</key>
<string>Startup destination requested on command line</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string/>
</map>
<key>ConnectAsGod</key>
<map>
<key>Comment</key>
@ -1916,6 +1960,17 @@
<key>Value</key>
<integer>262144</integer>
</map>
<key>CrashOnStartup</key>
<map>
<key>Comment</key>
<string>User-requested crash on viewer startup</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>CreateToolCopyCenters</key>
<map>
<key>Comment</key>
@ -2158,6 +2213,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>DebugSession</key>
<map>
<key>Comment</key>
<string>Request debugging for a particular viewer session</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DebugShowColor</key>
<map>
<key>Comment</key>
@ -2972,6 +3038,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableCrashLogger</key>
<map>
<key>Comment</key>
<string>Do not send crash report to Linden server</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableMouseWarp</key>
<map>
<key>Comment</key>
@ -5228,6 +5305,28 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LogMetrics</key>
<map>
<key>Comment</key>
<string>Log viewer metrics</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string/>
</map>
<key>LogPerformance</key>
<map>
<key>Comment</key>
<string>Log performance analysis for a particular viewer run</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LogTextureNetworkTraffic</key>
<map>
<key>Comment</key>
@ -6405,6 +6504,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>NoQuickTime</key>
<map>
<key>Comment</key>
<string>Disable QuickTime for a particular viewer run</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>NoVerifySSLCert</key>
<map>
<key>Comment</key>
@ -7027,6 +7137,17 @@
<key>Value</key>
<real>90.0</real>
</map>
<key>PlayChatAnim</key>
<map>
<key>Comment</key>
<string>Your avatar plays the chat animation whenever you say, shout or whisper something in nearby chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>PlayTypingAnim</key>
<map>
<key>Comment</key>
@ -9760,6 +9881,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>ReplaySession</key>
<map>
<key>Comment</key>
<string>Request replay of previously-recorded pilot file</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RotateRight</key>
<map>
<key>Comment</key>
@ -12976,12 +13108,13 @@
<key>UserLoginInfo</key>
<map>
<key>Comment</key>
<string>Users loging data.</string>
<string>User login data.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>LLSD</string>
<key>Value</key>
<string/>
</map>
<key>VFSOldSize</key>
<map>

View File

@ -4,6 +4,9 @@
<file name="Global"
file_name="settings.xml"
required="true"/>
<file name="Global"
file_name="settings_install.xml"
required="false"/>
<file name="PerAccount"
file_name="settings_per_account.xml"
required="true"/>

View File

@ -1 +1,4 @@
<llsd/>
<?xml version="1.0"?>
<llsd>
<undef/>
</llsd>

View File

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

View File

@ -435,7 +435,7 @@ void LLAgent::init()
{
mMoveTimer.start();
gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE);
gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO);
gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2));
// *Note: this is where LLViewerCamera::getInstance() used to be constructed.

View File

@ -668,7 +668,6 @@ LLAppViewer::LLAppViewer() :
mSecondInstance(false),
mSavedFinalSnapshot(false),
mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded.
mForceGraphicsDetail(false),
mQuitRequested(false),
mLogoutRequestSent(false),
mYieldTime(-1),
@ -2307,17 +2306,24 @@ void LLAppViewer::loadColorSettings()
LLUIColorTable::instance().loadFromSettings();
}
namespace
{
void handleCommandLineError(LLControlGroupCLP& clp)
{
llwarns << "Error parsing command line options. Command Line options ignored." << llendl;
llinfos << "Command line usage:\n" << clp << llendl;
OSMessageBox(STRINGIZE(LLTrans::getString("MBCmdLineError") << clp.getErrorMessage()),
LLStringUtil::null,
OSMB_OK);
}
} // anonymous namespace
bool LLAppViewer::initConfiguration()
{
//Load settings files list
std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml");
//LLControlGroup settings_control("SettingsFiles");
//llinfos << "Loading settings file list " << settings_file_list << llendl;
//if (0 == settings_control.loadFromFile(settings_file_list))
//{
// llerrs << "Cannot load default configuration file " << settings_file_list << llendl;
//}
LLXMLNodePtr root;
BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL);
if (!success)
@ -2376,9 +2382,7 @@ bool LLAppViewer::initConfiguration()
{
c->setValue(true, false);
}
#endif
#ifndef LL_RELEASE_FOR_DOWNLOAD
gSavedSettings.setBOOL("QAMode", TRUE );
gSavedSettings.setS32("WatchdogEnabled", 0);
#endif
@ -2414,13 +2418,7 @@ bool LLAppViewer::initConfiguration()
if(!initParseCommandLine(clp))
{
llwarns << "Error parsing command line options. Command Line options ignored." << llendl;
llinfos << "Command line usage:\n" << clp << llendl;
std::ostringstream msg;
msg << LLTrans::getString("MBCmdLineError") << clp.getErrorMessage();
OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
handleCommandLineError(clp);
return false;
}
@ -2467,12 +2465,16 @@ bool LLAppViewer::initConfiguration()
loadSettingsFromDirectory("UserSession");
// - apply command line settings
clp.notify();
if (! clp.notify())
{
handleCommandLineError(clp);
return false;
}
// Register the core crash option as soon as we can
// if we want gdb post-mortem on cores we need to be up and running
// ASAP or we might miss init issue etc.
if(clp.hasOption("disablecrashlogger"))
if(gSavedSettings.getBOOL("DisableCrashLogger"))
{
llwarns << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << llendl;
LLAppViewer::instance()->disableCrashlogger();
@ -2545,91 +2547,52 @@ bool LLAppViewer::initConfiguration()
}
}
if(clp.hasOption("channel"))
{
LLVersionInfo::resetChannel(clp.getOption("channel")[0]);
std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel"));
if(! CmdLineChannel.empty())
{
LLVersionInfo::resetChannel(CmdLineChannel);
}
// If we have specified crash on startup, set the global so we'll trigger the crash at the right time
if(clp.hasOption("crashonstartup"))
{
gCrashOnStartup = TRUE;
}
gCrashOnStartup = gSavedSettings.getBOOL("CrashOnStartup");
if (clp.hasOption("logperformance"))
if (gSavedSettings.getBOOL("LogPerformance"))
{
LLFastTimer::sLog = TRUE;
LLFastTimer::sLogName = std::string("performance");
}
if (clp.hasOption("logmetrics"))
{
LLFastTimer::sMetricLog = TRUE ;
// '--logmetrics' can be specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric is gathered (makes for a rather slow run and hard to decipher report...)
std::string test_name = clp.getOption("logmetrics")[0];
std::string test_name(gSavedSettings.getString("LogMetrics"));
if (! test_name.empty())
{
LLFastTimer::sMetricLog = TRUE ;
// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
llinfos << "'--logmetrics' argument : " << test_name << llendl;
if (test_name == "")
{
llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl;
LLFastTimer::sLogName = DEFAULT_METRIC_NAME;
}
else
{
LLFastTimer::sLogName = test_name;
}
LLFastTimer::sLogName = test_name;
}
if (clp.hasOption("graphicslevel"))
{
const LLCommandLineParser::token_vector_t& value = clp.getOption("graphicslevel");
if(value.size() != 1)
{
llwarns << "Usage: -graphicslevel <0-3>" << llendl;
}
else
{
std::string detail = value.front();
mForceGraphicsDetail = TRUE;
switch (detail.c_str()[0])
{
case '0':
gSavedSettings.setU32("RenderQualityPerformance", 0);
break;
case '1':
gSavedSettings.setU32("RenderQualityPerformance", 1);
break;
case '2':
gSavedSettings.setU32("RenderQualityPerformance", 2);
break;
case '3':
gSavedSettings.setU32("RenderQualityPerformance", 3);
break;
default:
mForceGraphicsDetail = FALSE;
llwarns << "Usage: -graphicslevel <0-3>" << llendl;
break;
}
}
// User explicitly requested --graphicslevel on the command line. We
// expect this switch has already set RenderQualityPerformance. Check
// that value for validity.
U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance");
if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel))
{
// graphicslevel is valid: save it and engage it later. Capture
// the requested value separately from the settings variable
// because, if this is the first run, LLViewerWindow's constructor
// will call LLFeatureManager::applyRecommendedSettings(), which
// overwrites this settings variable!
mForceGraphicsLevel = graphicslevel;
}
}
if (clp.hasOption("analyzeperformance"))
{
LLFastTimerView::sAnalyzePerformance = TRUE;
}
LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
gAgentPilot.setReplaySession(gSavedSettings.getBOOL("ReplaySession"));
if (clp.hasOption("replaysession"))
{
gAgentPilot.setReplaySession(TRUE);
}
if (clp.hasOption("nonotifications"))
{
gSavedSettings.getControl("IgnoreAllNotifications")->setValue(true, false);
}
if (clp.hasOption("debugsession"))
if (gSavedSettings.getBOOL("DebugSession"))
{
gDebugSession = TRUE;
gDebugGL = TRUE;
@ -2654,20 +2617,16 @@ bool LLAppViewer::initConfiguration()
// What can happen is that someone can use IE (or potentially
// other browsers) and do the rough equivalent of command
// injection and steal passwords. Phoenix. SL-55321
if(clp.hasOption("url"))
{
LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0]));
if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION)
{
LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid());
}
}
else if(clp.hasOption("slurl"))
{
LLSLURL start_slurl(clp.getOption("slurl")[0]);
std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation"));
if(! CmdLineLoginLocation.empty())
{
LLSLURL start_slurl(CmdLineLoginLocation);
LLStartUp::setStartSLURL(start_slurl);
}
if(start_slurl.getType() == LLSLURL::LOCATION)
{
LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid());
}
}
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
@ -2810,9 +2769,8 @@ bool LLAppViewer::initConfiguration()
LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
}
else if ( ( clp.hasOption("login") || clp.hasOption("autologin"))
&& !clp.hasOption("url")
&& !clp.hasOption("slurl"))
else if ((clp.hasOption("login") || clp.hasOption("autologin"))
&& gSavedSettings.getString("CmdLineLoginLocation").empty())
{
// If automatic login from command line with --login switch
// init StartSLURL location.
@ -3048,13 +3006,19 @@ namespace {
void LLAppViewer::initUpdater()
{
// Initialize the updater service.
// Generate URL to the udpater service
// Get Channel
// Get Version
std::string url = gSavedSettings.getString("UpdaterServiceURL");
/*****************************************************************
* Previously, the url was derived from the settings
* UpdaterServiceURL
* UpdaterServicePath
* it is now obtained from the grid manager. The settings above
* are no longer used.
*****************************************************************/
std::string channel = LLVersionInfo::getChannel();
std::string version = LLVersionInfo::getVersion();
std::string service_path = gSavedSettings.getString("UpdaterServicePath");
U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
bool willing_to_test;
LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL;
@ -3079,9 +3043,7 @@ void LLAppViewer::initUpdater()
}
mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this));
mUpdater->initialize(url,
service_path,
channel,
mUpdater->initialize(channel,
version,
gPlatform,
getOSInfo().getOSVersionString(),
@ -3186,11 +3148,12 @@ bool LLAppViewer::initWindow()
// Initialize GL stuff
//
if (mForceGraphicsDetail)
if (mForceGraphicsLevel)
{
LLFeatureManager::getInstance()->setGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"), false);
LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false);
gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel);
}
// Set this flag in case we crash while initializing GL
gSavedSettings.setBOOL("RenderInitError", TRUE);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );

View File

@ -32,6 +32,7 @@
#include "llsys.h" // for LLOSInfo
#include "lltimer.h"
#include "llappcorehttp.h"
#include <boost/optional.hpp>
class LLCommandLineParser;
class LLFrameTimer;
@ -258,7 +259,7 @@ private:
bool mSavedFinalSnapshot;
bool mSavePerAccountSettings; // only save per account settings if login succeeded
bool mForceGraphicsDetail;
boost::optional<U32> mForceGraphicsLevel;
bool mQuitRequested; // User wants to quit, may have modified documents open.
bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim.

View File

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

View File

@ -381,7 +381,7 @@ void LLChatBar::sendChat( EChatType type )
if (!utf8_revised_text.empty())
{
// Chat with animation
sendChatFromViewer(utf8_revised_text, type, TRUE);
sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
}
}
}

View File

@ -38,16 +38,23 @@
#endif
#include <boost/program_options.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include<boost/tokenizer.hpp>
#include <boost/tokenizer.hpp>
#include <boost/assign/list_of.hpp>
#if _MSC_VER
# pragma warning(pop)
#endif
#include "llsdserialize.h"
#include "llerror.h"
#include "stringize.h"
#include <string>
#include <set>
#include <iostream>
#include <sstream>
#include <typeinfo>
#include "llcontrol.h"
@ -63,10 +70,22 @@ namespace po = boost::program_options;
// This could be good or bad, and probably won't matter for most use cases.
namespace
{
// List of command-line switches that can't map-to settings variables.
// Going forward, we want every new command-line switch to map-to some
// settings variable. This list is used to validate that.
const std::set<std::string> unmapped_options = boost::assign::list_of
("help")
("set")
("setdefault")
("settings")
("sessionsettings")
("usersessionsettings")
;
po::options_description gOptionsDesc;
po::positional_options_description gPositionalOptions;
po::variables_map gVariableMap;
const LLCommandLineParser::token_vector_t gEmptyValue;
void read_file_into_string(std::string& str, const std::basic_istream < char >& file)
@ -384,9 +403,19 @@ bool LLCommandLineParser::parseCommandLineFile(const std::basic_istream < char >
return parseCommandLineString(args);
}
void LLCommandLineParser::notify()
bool LLCommandLineParser::notify()
{
po::notify(gVariableMap);
try
{
po::notify(gVariableMap);
return true;
}
catch (const LLCLPError& e)
{
llwarns << "Caught Error: " << e.what() << llendl;
mErrorMsg = e.what();
return false;
}
}
void LLCommandLineParser::printOptions() const
@ -428,43 +457,129 @@ const LLCommandLineParser::token_vector_t& LLCommandLineParser::getOption(const
//----------------------------------------------------------------------------
// LLControlGroupCLP defintions
//----------------------------------------------------------------------------
void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
const std::string& opt_name,
LLControlGroup* ctrlGroup)
namespace {
LLCommandLineParser::token_vector_t::value_type
onevalue(const std::string& option,
const LLCommandLineParser::token_vector_t& value)
{
// *FIX: Do sematic conversion here.
if (value.empty())
{
// What does it mean when the user specifies a command-line switch
// that requires a value, but omits the value? Complain.
throw LLCLPError(STRINGIZE("No value specified for --" << option << "!"));
}
else if (value.size() > 1)
{
llwarns << "Ignoring extra tokens specified for --"
<< option << "." << llendl;
}
return value[0];
}
void badvalue(const std::string& option,
const std::string& varname,
const std::string& type,
const std::string& value)
{
// If the user passes an unusable value for a command-line switch, it
// seems like a really bad idea to just ignore it, even with a log
// warning.
throw LLCLPError(STRINGIZE("Invalid value specified by command-line switch '" << option
<< "' for variable '" << varname << "' of type " << type
<< ": '" << value << "'"));
}
template <typename T>
T convertTo(const std::string& option,
const std::string& varname,
const LLCommandLineParser::token_vector_t::value_type& value)
{
try
{
return boost::lexical_cast<T>(value);
}
catch (const boost::bad_lexical_cast&)
{
badvalue(option, varname, typeid(T).name(), value);
// bogus return; compiler unaware that badvalue() won't return
return T();
}
}
void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
const std::string& option,
LLControlVariable* ctrl)
{
// *FIX: Do semantic conversion here.
// LLSD (ImplString) Is no good for doing string to type conversion for...
// booleans
// compound types
// ?...
LLControlVariable* ctrl = ctrlGroup->getControl(opt_name);
if(NULL != ctrl)
{
switch(ctrl->type())
{
case TYPE_BOOLEAN:
if(value.size() > 1)
if (value.empty())
{
llwarns << "Ignoring extra tokens." << llendl;
}
if(value.size() > 0)
{
// There's a token. check the string for true/false/1/0 etc.
BOOL result = false;
BOOL gotSet = LLStringUtil::convertToBOOL(value[0], result);
if(gotSet)
{
ctrl->setValue(LLSD(result), false);
}
// Boolean-valued command-line switches are unusual. If you
// simply specify the switch without an explicit value, we can
// infer you mean 'true'.
ctrl->setValue(LLSD(true), false);
}
else
{
ctrl->setValue(LLSD(true), false);
// Only call onevalue() AFTER handling value.empty() case!
std::string token(onevalue(option, value));
// There's a token. check the string for true/false/1/0 etc.
BOOL result = false;
BOOL gotSet = LLStringUtil::convertToBOOL(token, result);
if (gotSet)
{
ctrl->setValue(LLSD(result), false);
}
else
{
badvalue(option, ctrl->getName(), "bool", token);
}
}
break;
case TYPE_U32:
{
std::string token(onevalue(option, value));
// To my surprise, for an unsigned target, lexical_cast() doesn't
// complain about an input string such as "-17". In that case, you
// get a very large positive result. So for U32, make sure there's
// no minus sign!
if (token.find('-') == std::string::npos)
{
ctrl->setValue(LLSD::Integer(convertTo<U32>(option, ctrl->getName(), token)),
false);
}
else
{
badvalue(option, ctrl->getName(), "unsigned", token);
}
break;
}
case TYPE_S32:
ctrl->setValue(convertTo<S32>(option, ctrl->getName(),
onevalue(option, value)), false);
break;
case TYPE_F32:
ctrl->setValue(convertTo<F32>(option, ctrl->getName(),
onevalue(option, value)), false);
break;
// It appears that no one has yet tried to define a command-line
// switch mapped to a settings variable of TYPE_VEC3, TYPE_VEC3D,
// TYPE_RECT, TYPE_COL4, TYPE_COL3. Such types would certainly seem to
// call for a bit of special handling here...
default:
{
// For the default types, let llsd do the conversion.
@ -481,16 +596,9 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
ctrl->setValue(llsdArray, false);
}
else if(value.size() > 0)
else
{
if(value.size() > 1)
{
llwarns << "Ignoring extra tokens mapped to the setting: " << opt_name << "." << llendl;
}
LLSD llsdValue;
llsdValue.assign(LLSD::String(value[0]));
ctrl->setValue(llsdValue, false);
ctrl->setValue(onevalue(option, value), false);
}
}
break;
@ -498,12 +606,14 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value,
}
else
{
llwarns << "Command Line option mapping '"
<< opt_name
<< "' not found! Ignoring."
<< llendl;
// This isn't anything a user can affect -- it's a misconfiguration on
// the part of the coder. Rub the coder's nose in the problem right
// away so even preliminary testing will surface it.
llerrs << "Command Line option --" << option
<< " maps to unknown setting!" << llendl;
}
}
} // anonymous namespace
void LLControlGroupCLP::configure(const std::string& config_filename, LLControlGroup* controlGroup)
{
@ -561,11 +671,37 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
}
boost::function1<void, const token_vector_t&> callback;
if(option_params.has("map-to") && (NULL != controlGroup))
if (! option_params.has("map-to"))
{
// If this option isn't mapped to a settings variable, is it
// one of the ones for which that's unreasonable, or did
// someone carelessly add a new option? (Make all these
// configuration errors fatal so a maintainer will catch them
// right away.)
std::set<std::string>::const_iterator found = unmapped_options.find(long_name);
if (found == unmapped_options.end())
{
llerrs << "New command-line option " << long_name
<< " should map-to a variable in settings.xml" << llendl;
}
}
else // option specifies map-to
{
std::string controlName = option_params["map-to"].asString();
callback = boost::bind(setControlValueCB, _1,
controlName, controlGroup);
if (! controlGroup)
{
llerrs << "Must pass gSavedSettings to LLControlGroupCLP::configure() for "
<< long_name << " (map-to " << controlName << ")" << llendl;
}
LLControlVariable* ctrl = controlGroup->getControl(controlName);
if (! ctrl)
{
llerrs << "Option " << long_name << " specifies map-to " << controlName
<< " which does not exist" << llendl;
}
callback = boost::bind(setControlValueCB, _1, long_name, ctrl);
}
this->addOptionDesc(

View File

@ -86,7 +86,7 @@ public:
*
* Use this to handle the results of parsing.
*/
void notify();
bool notify();
/** @brief Print a description of the configured options.
*

View File

@ -30,6 +30,7 @@
#include <fstream>
#include <boost/regex.hpp>
#include <boost/assign/list_of.hpp>
#include "llfeaturemanager.h"
#include "lldir.h"
@ -52,6 +53,8 @@
#include "llboost.h"
#include "llweb.h"
#include "llviewershadermgr.h"
#include "llstring.h"
#include "stringize.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@ -187,6 +190,55 @@ void LLFeatureList::dump()
LL_DEBUGS("RenderInit") << LL_ENDL;
}
static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of
("Low")
("LowMid")
("Mid")
("MidHigh")
("High")
("HighUltra")
("Ultra")
;
U32 LLFeatureManager::getMaxGraphicsLevel() const
{
return sGraphicsLevelNames.size() - 1;
}
bool LLFeatureManager::isValidGraphicsLevel(U32 level) const
{
return (level <= getMaxGraphicsLevel());
}
std::string LLFeatureManager::getNameForGraphicsLevel(U32 level) const
{
if (isValidGraphicsLevel(level))
{
return sGraphicsLevelNames[level];
}
return STRINGIZE("Invalid graphics level " << level << ", valid are 0 .. "
<< getMaxGraphicsLevel());
}
S32 LLFeatureManager::getGraphicsLevelForName(const std::string& name) const
{
const std::string FixedFunction("FixedFunction");
std::string rname(name);
if (LLStringUtil::endsWith(rname, FixedFunction))
{
// chop off any "FixedFunction" suffix
rname = rname.substr(0, rname.length() - FixedFunction.length());
}
for (S32 i(0), iend(getMaxGraphicsLevel()); i <= iend; ++i)
{
if (sGraphicsLevelNames[i] == rname)
{
return i;
}
}
return -1;
}
LLFeatureList *LLFeatureManager::findMask(const std::string& name)
{
if (mMaskList.count(name))
@ -620,7 +672,7 @@ void LLFeatureManager::applyRecommendedSettings()
{
// apply saved settings
// cap the level at 2 (high)
S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
llinfos << "Applying Recommended Features" << llendl;
@ -696,62 +748,33 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
}
}
void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures)
{
LLViewerShaderMgr::sSkipReload = true;
applyBaseMasks();
switch (level)
// if we're passed an invalid level, default to "Low"
std::string features(isValidGraphicsLevel(level)? getNameForGraphicsLevel(level) : "Low");
if (features == "Low")
{
case 0:
#if LL_DARWIN
// This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac
// systems which support them instead of falling back to fixed-function unnecessarily
// MAINT-2157
//
if (gGLManager.mGLVersion < 2.1f)
{
maskFeatures("LowFixedFunction");
}
else
{ //same as low, but with "Basic Shaders" enabled
maskFeatures("Low");
}
// This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac
// systems which support them instead of falling back to fixed-function unnecessarily
// MAINT-2157
if (gGLManager.mGLVersion < 2.1f)
#else
if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
{ //only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
maskFeatures("LowFixedFunction");
}
else
{ //same as low, but with "Basic Shaders" enabled
maskFeatures("Low");
}
// only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
#endif
break;
case 1:
maskFeatures("LowMid");
break;
case 2:
maskFeatures("Mid");
break;
case 3:
maskFeatures("MidHigh");
break;
case 4:
maskFeatures("High");
break;
case 5:
maskFeatures("HighUltra");
break;
case 6:
maskFeatures("Ultra");
break;
default:
maskFeatures("Low");
break;
{
// same as Low, but with "Basic Shaders" disabled
features = "LowFixedFunction";
}
}
maskFeatures(features);
applyFeatures(skipFeatures);
LLViewerShaderMgr::sSkipReload = false;

View File

@ -134,8 +134,18 @@ public:
// skipFeatures forces skipping of mostly hardware settings
// that we don't want to change when we change graphics
// settings
void setGraphicsLevel(S32 level, bool skipFeatures);
void setGraphicsLevel(U32 level, bool skipFeatures);
// What 'level' values are valid to pass to setGraphicsLevel()?
// 0 is the low end...
U32 getMaxGraphicsLevel() const;
bool isValidGraphicsLevel(U32 level) const;
// setGraphicsLevel() levels have names.
std::string getNameForGraphicsLevel(U32 level) const;
// returns -1 for unrecognized name (hence S32 rather than U32)
S32 getGraphicsLevelForName(const std::string& name) const;
void applyBaseMasks();
void applyRecommendedSettings();

View File

@ -33,8 +33,10 @@
// Viewer includes
#include "llagent.h"
#include "llagentui.h"
#include "llappviewer.h"
#include "llsecondlifeurls.h"
#include "llslurl.h"
#include "llvoiceclient.h"
#include "lluictrlfactory.h"
#include "llviewertexteditor.h"
@ -250,12 +252,16 @@ LLSD LLFloaterAbout::getInfo()
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
const LLVector3d &pos = gAgent.getPositionGlobal();
LLVector3d pos = gAgent.getPositionGlobal();
info["POSITION"] = ll_sd_from_vector3d(pos);
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
info["REGION"] = gAgent.getRegion()->getName();
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
info["SERVER_VERSION"] = gLastVersionChannel;
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
info["SLURL"] = slurl.getSLURLString();
}
// CPU
@ -307,12 +313,12 @@ LLSD LLFloaterAbout::getInfo()
static std::string get_viewer_release_notes_url()
{
// return a URL to the release notes for this viewer, such as:
// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0
// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456
std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
if (! LLStringUtil::endsWith(url, "/"))
url += "/";
url += LLVersionInfo::getChannel() + "/";
url += LLVersionInfo::getShortVersion();
url += LLVersionInfo::getVersion();
return LLWeb::escapeURL(url);
}

View File

@ -57,6 +57,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
mDone(FALSE)
{
mID.generate();
mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
@ -66,6 +67,21 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
BOOL LLFloaterBulkPermission::postBuild()
{
mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations");
mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts");
mBulkChangeIncludeClothing = gSavedSettings.getBOOL("BulkChangeIncludeClothing");
mBulkChangeIncludeGestures = gSavedSettings.getBOOL("BulkChangeIncludeGestures");
mBulkChangeIncludeNotecards = gSavedSettings.getBOOL("BulkChangeIncludeNotecards");
mBulkChangeIncludeObjects = gSavedSettings.getBOOL("BulkChangeIncludeObjects");
mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts");
mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds");
mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures");
mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup");
mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy");
mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify");
mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer");
return TRUE;
}
@ -144,6 +160,12 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
}
}
void LLFloaterBulkPermission::onOkBtn()
{
doApply();
closeFloater();
}
void LLFloaterBulkPermission::onApplyBtn()
{
doApply();
@ -151,6 +173,20 @@ void LLFloaterBulkPermission::onApplyBtn()
void LLFloaterBulkPermission::onCloseBtn()
{
gSavedSettings.setBOOL("BulkChangeIncludeAnimations", mBulkChangeIncludeAnimations);
gSavedSettings.setBOOL("BulkChangeIncludeBodyParts", mBulkChangeIncludeBodyParts);
gSavedSettings.setBOOL("BulkChangeIncludeClothing", mBulkChangeIncludeClothing);
gSavedSettings.setBOOL("BulkChangeIncludeGestures", mBulkChangeIncludeGestures);
gSavedSettings.setBOOL("BulkChangeIncludeNotecards", mBulkChangeIncludeNotecards);
gSavedSettings.setBOOL("BulkChangeIncludeObjects", mBulkChangeIncludeObjects);
gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts);
gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds);
gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures);
gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup);
gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy);
gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify);
gSavedSettings.setBOOL("BulkChangeNextOwnerCopy", mBulkChangeNextOwnerCopy);
gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", mBulkChangeNextOwnerTransfer);
closeFloater();
}

View File

@ -72,6 +72,7 @@ private:
bool is_new);
void onCloseBtn();
void onOkBtn();
void onApplyBtn();
void onCommitCopy();
void onCheckAll() { doCheckUncheckAll(TRUE); }
@ -94,6 +95,21 @@ private:
LLUUID mCurrentObjectID;
BOOL mDone;
bool mBulkChangeIncludeAnimations;
bool mBulkChangeIncludeBodyParts;
bool mBulkChangeIncludeClothing;
bool mBulkChangeIncludeGestures;
bool mBulkChangeIncludeNotecards;
bool mBulkChangeIncludeObjects;
bool mBulkChangeIncludeScripts;
bool mBulkChangeIncludeSounds;
bool mBulkChangeIncludeTextures;
bool mBulkChangeShareWithGroup;
bool mBulkChangeEveryoneCopy;
bool mBulkChangeNextOwnerModify;
bool mBulkChangeNextOwnerCopy;
bool mBulkChangeNextOwnerTransfer;
LLUUID mID;
const char* mStartString;

View File

@ -0,0 +1,160 @@
/**
* @file llfloatergotoline.h
* @author MartinRJ
* @brief LLFloaterGotoLine class implementation
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2012, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llfloatergotoline.h"
#include "llpreviewscript.h"
#include "llfloaterreg.h"
#include "lllineeditor.h"
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
LLFloaterGotoLine* LLFloaterGotoLine::sInstance = NULL;
LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core)
: LLFloater(LLSD()),
mGotoBox(NULL),
mEditorCore(editor_core)
{
buildFromFile("floater_goto_line.xml");
sInstance = this;
// find floater in which script panel is embedded
LLView* viewp = (LLView*)editor_core;
while(viewp)
{
LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
if (floaterp)
{
floaterp->addDependentFloater(this);
break;
}
viewp = viewp->getParent();
}
}
BOOL LLFloaterGotoLine::postBuild()
{
mGotoBox = getChild<LLLineEditor>("goto_line");
mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this));
mGotoBox->setCommitOnFocusLost(FALSE);
getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
childSetAction("goto_btn", onBtnGoto,this);
setDefaultBtn("goto_btn");
return TRUE;
}
//static
void LLFloaterGotoLine::show(LLScriptEdCore* editor_core)
{
if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
{
sInstance->closeFloater();
delete sInstance;
}
if (!sInstance)
{
// sInstance will be assigned in the constructor.
new LLFloaterGotoLine(editor_core);
}
sInstance->openFloater();
}
LLFloaterGotoLine::~LLFloaterGotoLine()
{
sInstance = NULL;
}
// static
void LLFloaterGotoLine::onBtnGoto(void *userdata)
{
LLFloaterGotoLine* self = (LLFloaterGotoLine*)userdata;
self->handleBtnGoto();
}
void LLFloaterGotoLine::handleBtnGoto()
{
S32 row = 0;
S32 column = 0;
row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
if (row >= 0)
{
if (mEditorCore && mEditorCore->mEditor)
{
mEditorCore->mEditor->deselect();
mEditorCore->mEditor->setCursor(row, column);
mEditorCore->mEditor->setFocus(TRUE);
}
}
}
bool LLFloaterGotoLine::hasAccelerators() const
{
if (mEditorCore)
{
return mEditorCore->hasAccelerators();
}
return FALSE;
}
BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask)
{
if (mEditorCore)
{
return mEditorCore->handleKeyHere(key, mask);
}
return FALSE;
}
void LLFloaterGotoLine::onGotoBoxCommit()
{
S32 row = 0;
S32 column = 0;
row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
if (row >= 0)
{
if (mEditorCore && mEditorCore->mEditor)
{
mEditorCore->mEditor->setCursor(row, column);
S32 rownew = 0;
S32 columnnew = 0;
mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap
if (rownew == row && columnnew == column)
{
mEditorCore->mEditor->deselect();
mEditorCore->mEditor->setFocus(TRUE);
sInstance->closeFloater();
} //else do nothing (if the cursor-position didn't change)
}
}
}

View File

@ -0,0 +1,66 @@
/**
* @file llfloatergotoline.h
* @author MartinRJ
* @brief LLFloaterGotoLine class definition
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2012, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLFLOATERGOTOLINE_H
#define LL_LLFLOATERGOTOLINE_H
#include "llfloater.h"
#include "lllineeditor.h"
#include "llpreviewscript.h"
class LLScriptEdCore;
class LLFloaterGotoLine : public LLFloater
{
public:
LLFloaterGotoLine(LLScriptEdCore* editor_core);
~LLFloaterGotoLine();
/*virtual*/ BOOL postBuild();
static void show(LLScriptEdCore* editor_core);
static void onBtnGoto(void* userdata);
void handleBtnGoto();
LLScriptEdCore* getEditorCore() { return mEditorCore; }
static LLFloaterGotoLine* getInstance() { return sInstance; }
virtual bool hasAccelerators() const;
virtual BOOL handleKeyHere(KEY key, MASK mask);
private:
LLScriptEdCore* mEditorCore;
static LLFloaterGotoLine* sInstance;
protected:
LLLineEditor* mGotoBox;
void onGotoBoxCommit();
};
#endif // LL_LLFLOATERGOTOLINE_H

View File

@ -125,7 +125,7 @@ BOOL LLFloaterIMNearbyChat::postBuild()
setTitle(LLTrans::getString("NearbyChatTitle"));
// obsolete, but may be needed for backward compatibility?
gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", true);
gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", LLControlVariable::PERSIST_NONDFT);
if (gSavedPerAccountSettings.getBOOL("LogShowHistory"))
{
@ -593,7 +593,7 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
if (!utf8_revised_text.empty())
{
// Chat with animation
sendChatFromViewer(utf8_revised_text, type, TRUE);
sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
}
}

View File

@ -33,7 +33,7 @@
#include "llagent.h"
#include "llchat.h"
#include "llviewercontrol.h"
LLFloaterIMNearbyChatListener::LLFloaterIMNearbyChatListener(LLFloaterIMNearbyChat & chatbar)
@ -95,6 +95,6 @@ void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const
}
// Send it as if it was typed in
mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, (BOOL)(channel == 0));
mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim"));
}

View File

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

View File

@ -1101,27 +1101,61 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
}
void LLPanelGroupMembersSubTab::handleEjectMembers()
{
//send down an eject message
uuid_vec_t selected_members;
{
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
if (selection.empty()) return;
std::vector<LLScrollListItem*>::iterator itor;
for (itor = selection.begin() ;
itor != selection.end(); ++itor)
S32 selection_count = selection.size();
if (selection_count == 1)
{
LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
LLSD args;
LLUUID selected_avatar = mMembersList->getValue().asUUID();
std::string fullname = LLSLURL("agent", selected_avatar, "inspect").getSLURLString();
args["AVATAR_NAME"] = fullname;
LLSD payload;
LLNotificationsUtil::add("EjectGroupMemberWarning",
args,
payload,
boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
}
else
{
LLSD args;
args["COUNT"] = llformat("%d", selection_count);
LLSD payload;
LLNotificationsUtil::add("EjectGroupMembersWarning",
args,
payload,
boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
}
}
mMembersList->deleteSelectedItems();
sendEjectNotifications(mGroupID, selected_members);
LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID,
selected_members);
bool LLPanelGroupMembersSubTab::handleEjectCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option) // Eject button
{
//send down an eject message
uuid_vec_t selected_members;
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
if (selection.empty()) return false;
std::vector<LLScrollListItem*>::iterator itor;
for (itor = selection.begin() ;
itor != selection.end(); ++itor)
{
LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
}
mMembersList->deleteSelectedItems();
sendEjectNotifications(mGroupID, selected_members);
LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID, selected_members);
}
return false;
}
void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members)

View File

@ -167,6 +167,7 @@ public:
static void onEjectMembers(void*);
void handleEjectMembers();
void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members);
bool handleEjectCallback(const LLSD& notification, const LLSD& response);
static void onRoleCheck(LLUICtrl* check, void* user_data);
void handleRoleCheck(const LLUUID& role_id,

View File

@ -76,6 +76,8 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
extern S32 gMaxAgentGroups;
/** Comparator for comparing avatar items by last interaction date */
class LLAvatarItemRecentComparator : public LLAvatarItemComparator
{
@ -808,6 +810,8 @@ void LLPanelPeople::updateButtons()
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
}
else
{

View File

@ -86,6 +86,7 @@
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llappviewer.h"
#include "llfloatergotoline.h"
const std::string HELLO_LSL =
"default\n"
@ -193,12 +194,17 @@ private:
LLScriptEdCore* mEditorCore;
static LLFloaterScriptSearch* sInstance;
protected:
LLLineEditor* mSearchBox;
void onSearchBoxCommit();
};
LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
: LLFloater(LLSD()),
mSearchBox(NULL),
mEditorCore(editor_core)
{
buildFromFile("floater_script_search.xml");
@ -221,6 +227,9 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
BOOL LLFloaterScriptSearch::postBuild()
{
mSearchBox = getChild<LLLineEditor>("search_text");
mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this));
mSearchBox->setCommitOnFocusLost(FALSE);
childSetAction("search_btn", onBtnSearch,this);
childSetAction("replace_btn", onBtnReplace,this);
childSetAction("replace_all_btn", onBtnReplaceAll,this);
@ -315,6 +324,15 @@ BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
void LLFloaterScriptSearch::onSearchBoxCommit()
{
if (mEditorCore && mEditorCore->mEditor)
{
LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
mEditorCore->mEditor->selectNext(getChild<LLUICtrl>("search_text")->getValue().asString(), caseChk->get());
}
}
/// ---------------------------------------------------------------------------
/// LLScriptEdCore
/// ---------------------------------------------------------------------------
@ -503,6 +521,9 @@ void LLScriptEdCore::initMenu()
menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
menuItem->setClickCallback(boost::bind(&LLFloaterScriptSearch::show, this));
menuItem = getChild<LLMenuItemCallGL>("Go to line...");
menuItem->setClickCallback(boost::bind(&LLFloaterGotoLine::show, this));
menuItem = getChild<LLMenuItemCallGL>("Help...");
menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnHelp, this));

View File

@ -34,6 +34,7 @@
#include "llcombobox.h"
#include "lliconctrl.h"
#include "llframetimer.h"
#include "llfloatergotoline.h"
class LLLiveLSLFile;
class LLMessageSystem;
@ -49,6 +50,7 @@ class LLKeywordToken;
class LLVFS;
class LLViewerInventoryItem;
class LLScriptEdContainer;
class LLFloaterGotoLine;
// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
class LLScriptEdCore : public LLPanel
@ -58,6 +60,7 @@ class LLScriptEdCore : public LLPanel
friend class LLLiveLSLEditor;
friend class LLFloaterScriptSearch;
friend class LLScriptEdContainer;
friend class LLFloaterGotoLine;
protected:
// Supposed to be invoked only by the container.

View File

@ -83,7 +83,9 @@
BOOL gHackGodmode = FALSE;
#endif
// Should you contemplate changing the name "Global", please first grep for
// that string literal. There are at least a couple other places in the C++
// code that assume the LLControlGroup named "Global" is gSavedSettings.
LLControlGroup gSavedSettings("Global"); // saved at end of session
LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
LLControlGroup gCrashSettings("CrashSettings"); // saved at end of session

View File

@ -5936,6 +5936,15 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
return true;
}
}
// HACK -- handle callbacks for specific alerts.
if( notificationID == "HomePositionSet" )
{
// save the home location image to disk
std::string snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_HOME_FILENAME;
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
}
LLNotificationsUtil::add(notificationID, llsdBlock);
return true;
@ -6011,14 +6020,6 @@ void process_alert_core(const std::string& message, BOOL modal)
{
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
}
else if( message == "Home position set." )
{
// save the home location image to disk
std::string snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_HOME_FILENAME;
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
}
const std::string ALERT_PREFIX("ALERT: ");
const std::string NOTIFY_PREFIX("NOTIFY: ");

View File

@ -43,6 +43,8 @@ const std::string GRID_LABEL_VALUE = "label";
const std::string GRID_ID_VALUE = "grid_login_id";
/// the url for the login cgi script
const std::string GRID_LOGIN_URI_VALUE = "login_uri";
/// url base for update queries
const std::string GRID_UPDATE_SERVICE_URL = "update_query_url_base";
///
const std::string GRID_HELPER_URI_VALUE = "helper_uri";
/// the splash page url
@ -63,6 +65,8 @@ const std::string DEFAULT_LOGIN_PAGE = "http://viewer-login.agni.lindenlab.com/"
const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi";
const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
@ -120,12 +124,14 @@ void LLGridManager::initialize(const std::string& grid_file)
MAIN_GRID_LOGIN_URI,
"https://secondlife.com/helpers/",
DEFAULT_LOGIN_PAGE,
SL_UPDATE_QUERY_URL,
"Agni");
addSystemGrid("Second Life Beta Test Grid (Aditi)",
"util.aditi.lindenlab.com",
"https://login.aditi.lindenlab.com/cgi-bin/login.cgi",
"http://aditi-secondlife.webdev.lindenlab.com/helpers/",
DEFAULT_LOGIN_PAGE,
SL_UPDATE_QUERY_URL,
"Aditi");
LLSD other_grids;
@ -332,6 +338,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
const std::string& login_uri,
const std::string& helper,
const std::string& login_page,
const std::string& update_url_base,
const std::string& login_id)
{
LLSD grid = LLSD::emptyMap();
@ -341,6 +348,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
grid[GRID_LOGIN_URI_VALUE].append(login_uri);
grid[GRID_LOGIN_PAGE_VALUE] = login_page;
grid[GRID_UPDATE_SERVICE_URL] = update_url_base;
grid[GRID_IS_SYSTEM_GRID_VALUE] = true;
grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray();
grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT);
@ -537,6 +545,30 @@ std::string LLGridManager::getGridLoginID()
return mGridList[mGrid][GRID_ID_VALUE];
}
std::string LLGridManager::getUpdateServiceURL()
{
std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");;
if ( !update_url_base.empty() )
{
LL_INFOS2("UpdaterService","GridManager")
<< "Update URL base overridden from command line: " << update_url_base
<< LL_ENDL;
}
else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
{
update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString();
}
else
{
LL_WARNS2("UpdaterService","GridManager")
<< "The grid property '" << GRID_UPDATE_SERVICE_URL
<< "' is not defined for the grid '" << mGrid << "'"
<< LL_ENDL;
}
return update_url_base;
}
void LLGridManager::updateIsInProductionGrid()
{
mIsInProductionGrid = false;

View File

@ -139,6 +139,14 @@ class LLGridManager : public LLSingleton<LLGridManager>
* I am not sure which is which
*/
//@}
/* ================================================================
* @name Update Related Properties
* @{
*/
/// Get the update service URL base (host and path) for the selected grid
std::string getUpdateServiceURL();
//@}
/* ================================================================
@ -207,6 +215,7 @@ class LLGridManager : public LLSingleton<LLGridManager>
const std::string& login,
const std::string& helper,
const std::string& login_page,
const std::string& update_url_base,
const std::string& login_id = "");

View File

@ -8,7 +8,7 @@
Bygget med [COMPILER] version [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Du er ved [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] i regionen [REGION] lokaliseret ved &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
Kompiliert mit [COMPILER] version [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Sie befinden sich in [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] auf &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Sie befinden sich in [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] auf &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -22,7 +22,9 @@ Built with [COMPILER] version [COMPILER_VERSION]
</floater.string>
<floater.string
name="AboutPosition">
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
SLURL: &lt;nolink&gt;[SLURL]&lt;/nolink&gt;
(global coordinates [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]

View File

@ -6,7 +6,7 @@
layout="topleft"
name="floaterbulkperms"
help_topic="floaterbulkperms"
title="EDIT CONTENT PERMISSIONS"
title="ADJUST CONTENT PERMISSIONS"
width="410">
<floater.string
name="nothing_to_modify_text">
@ -192,7 +192,7 @@
name="newperms"
top="90"
width="250">
New Content Permissions
Adjust Content Permissions To
</text>
<text
type="string"
@ -292,9 +292,20 @@
height="23"
label="OK"
layout="topleft"
left="205"
name="apply"
left="110"
name="ok"
top_pad="10"
width="90">
<button.commit_callback
function="BulkPermission.Ok"/>
</button>
<button
follows="left|top"
height="23"
label="Apply"
layout="topleft"
left_pad="5"
name="apply"
width="90">
<button.commit_callback
function="BulkPermission.Apply"/>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
default_tab_group="1"
height="90"
layout="topleft"
name="script goto"
help_topic="script_goto"
title="GO TO LINE"
width="200">
<button
height="24"
label="OK"
label_selected="OK"
layout="topleft"
left="55"
name="goto_btn"
top="53"
width="90" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
left="10"
name="txt"
top="21"
width="65">
Go to line
</text>
<line_editor
border_style="line"
border_thickness="1"
follows="left|top"
height="16"
layout="topleft"
left="75"
max_length_bytes="9"
name="goto_line"
tab_group="1"
top="21"
width="85" />
</floater>

View File

@ -506,6 +506,33 @@ Add this Ability to &apos;[ROLE_NAME]&apos;?
notext="No"
yestext="Yes"/>
</notification>
<notification
icon="alertmodal.tga"
name="EjectGroupMemberWarning"
type="alertmodal">
You are about to eject [AVATAR_NAME] from the group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm ejecting a participant from group"
name="okcancelignore"
notext="Cancel"
yestext="Eject"/>
</notification>
<notification
icon="alertmodal.tga"
name="EjectGroupMembersWarning"
type="alertmodal">
You are about to eject [COUNT] members from the group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm ejecting multiple members from group"
name="okcancelignore"
notext="Cancel"
yestext="Eject"/>
</notification>
<notification
icon="alertmodal.tga"
@ -2682,7 +2709,7 @@ Please enter a higher price.
icon="alertmodal.tga"
name="ConfirmItemDeleteHasLinks"
type="alertmodal">
At least one of the items you has link items that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first.
At least one of the items has links that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first.
Are you sure you want to delete these items?
<tag>confirm</tag>
@ -2724,7 +2751,7 @@ Are you sure you want to delete these items?
icon="alertmodal.tga"
name="ConfirmObjectDeleteNoOwn"
type="alertmodal">
You do not own least one of the items you have selected.
You do not own at least one of the items you have selected.
Are you sure you want to delete these items?
<tag>confirm</tag>
@ -2754,7 +2781,7 @@ Are you sure you want to delete these items?
name="ConfirmObjectDeleteLockNoOwn"
type="alertmodal">
At least one object is locked.
You do not own least one object.
You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
@ -2769,7 +2796,7 @@ Are you sure you want to delete these items?
name="ConfirmObjectDeleteNoCopyNoOwn"
type="alertmodal">
At least one object is not copyable.
You do not own least one object.
You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
@ -2785,13 +2812,13 @@ Are you sure you want to delete these items?
type="alertmodal">
At least one object is locked.
At least one object is not copyable.
You do not own least one object.
You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
notext="cancel"
notext="Cancel"
yestext="OK"/>
</notification>

View File

@ -202,14 +202,14 @@ Maximum 200 per group daily
Drag and drop item here to attach it:
</text>
<icon
height="72"
height="48"
image_name="DropTarget"
layout="topleft"
left_pad="10"
mouse_opaque="true"
name="drop_icon"
top_delta="-10"
width="72" />
width="110" />
<button
follows="left|top"
layout="topleft"

View File

@ -480,10 +480,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
function="People.Group.Minus" />
</dnd_button>
</panel>
<text
type="string"
length="1"
follows="all"
height="14"
layout="topleft"
right="-10"
top_pad="4"
left="3"
name="groupcount">
You belong to [COUNT] groups, and can join [REMAINING] more.
</text>
<group_list
allow_select="true"
follows="all"
height="406"
height="388"
layout="topleft"
left="3"
name="group_list"

View File

@ -138,7 +138,7 @@
initial_value="1"
layout="topleft"
left_pad="0"
max_val="1.4"
max_val="1.5"
min_val="0.75"
name="ui_scale_slider"
top_pad="-14"

View File

@ -125,6 +125,10 @@
label="Search / Replace..."
layout="topleft"
name="Search / Replace..." />
<menu_item_call
label="Go to line..."
layout="topleft"
name="Go to line..." />
</menu>
<menu
top="0"

View File

@ -8,7 +8,7 @@
Compilado con [COMPILER], versión [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Estás en la posición [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1], de [REGION], alojada en &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Estás en la posición [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1], de [REGION], alojada en &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
Compilé avec [COMPILER] version [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Vous êtes à [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] dans [REGION], se trouvant à &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Vous êtes à [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] dans [REGION], se trouvant à &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
Generato con [COMPILER] versione [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Tu sei [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] che si trova a &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Tu sei [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] che si trova a &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
コンパイラー [COMPILER] [COMPILER_VERSION] バージョン
</floater.string>
<floater.string name="AboutPosition">
あなたの現在地は、[POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] の [REGION] です。位置は &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; です。([HOSTIP]
あなたの現在地は、[POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] の [REGION] です。位置は &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; です。([HOSTIP]
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
Buduj z [COMPILER] wersją [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Położenie [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] w [REGION] zlokalizowanym w &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -7,7 +7,7 @@
Construído com [COMPILER] versão [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Você está em [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] em [REGION] localizado em [HOSTNAME]&lt;/nolink&gt;([HOSTIP])
Você está em [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] em [REGION] localizado em [HOSTNAME]&lt;/nolink&gt;([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
Использован компилятор [COMPILER], версия [COMPILER_VERSION]
</floater.string>
<floater.string name="AboutPosition">
Вы в точке [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] в регионе «[REGION]», расположенном на &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
Вы в точке [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] в регионе «[REGION]», расположенном на &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
[COMPILER] [COMPILER_VERSION] sürümü ile oluşturuldu
</floater.string>
<floater.string name="AboutPosition">
&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] konumundasınız
&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] konumundasınız
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -8,7 +8,7 @@
以 [COMPILER_VERSION] 版本 [COMPILER] 建置
</floater.string>
<floater.string name="AboutPosition">
你的方位是 [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1],地區名:[REGION],主機:&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
你的方位是 [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1],地區名:[REGION],主機:&lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[SERVER_RELEASE_NOTES_URL]
</floater.string>

View File

@ -49,10 +49,10 @@ LLControlGroup::~LLControlGroup()
}
// Implementation of just the LLControlGroup methods we requre
BOOL LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
{
test_preferred_maturity = initial_val;
return true;
return NULL;
}
void LLControlGroup::setU32(const std::string& name, U32 val)
@ -80,7 +80,7 @@ namespace tut
void agentaccess_object_t::test<1>()
{
LLControlGroup cgr("test");
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
LLAgentAccess aa(cgr);
cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
@ -109,7 +109,7 @@ namespace tut
void agentaccess_object_t::test<2>()
{
LLControlGroup cgr("test");
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
LLAgentAccess aa(cgr);
// make sure default is PG
@ -157,7 +157,7 @@ namespace tut
void agentaccess_object_t::test<3>()
{
LLControlGroup cgr("test");
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
LLAgentAccess aa(cgr);
#ifndef HACKED_GODLIKE_VIEWER
@ -195,7 +195,7 @@ namespace tut
void agentaccess_object_t::test<4>()
{
LLControlGroup cgr("test");
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
LLAgentAccess aa(cgr);
#ifndef HACKED_GODLIKE_VIEWER
@ -272,7 +272,7 @@ namespace tut
void agentaccess_object_t::test<5>()
{
LLControlGroup cgr("test");
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
LLAgentAccess aa(cgr);
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);

View File

@ -135,6 +135,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
const std::string& login,
const std::string& helper,
const std::string& login_page,
const std::string& update_url_base,
const std::string& login_id)
{
}
@ -175,8 +176,8 @@ F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
void LLControlGroup::setString(const std::string& name, const std::string& val) {}
std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
#include "lluicolortable.h"
void LLUIColorTable::saveUserSettings(void)const {}
@ -208,9 +209,7 @@ std::string const & LLUpdaterService::pumpName(void)
return wakka;
}
bool LLUpdaterService::updateReadyToInstall(void) { return false; }
void LLUpdaterService::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
void LLUpdaterService::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@ -344,13 +343,13 @@ namespace tut
gTOSReplyPump = 0; // clear the callback.
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", FALSE);
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", FALSE);
gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", FALSE);
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", FALSE);
gSavedSettings.declareString("NextLoginLocation", "", "", FALSE);
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE);
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
LLSD authenticator = LLSD::emptyMap();
LLSD identifier = LLSD::emptyMap();

View File

@ -39,10 +39,10 @@
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
BOOL persist) {return TRUE;}
LLControlVariable::ePersist persist) {return NULL;}
void LLControlGroup::setString(const std::string& name, const std::string& val){}
std::string LLControlGroup::getString(const std::string& name)
{

View File

@ -71,10 +71,10 @@ std::string gLastName;
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
BOOL persist) {return TRUE;}
LLControlVariable::ePersist persist) {return NULL;}
void LLControlGroup::setString(const std::string& name, const std::string& val){}
std::string LLControlGroup::getString(const std::string& name)
{

View File

@ -37,10 +37,10 @@
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
BOOL persist) {return TRUE;}
LLControlVariable::ePersist persist) {return NULL;}
void LLControlGroup::setString(const std::string& name, const std::string& val){}
std::string gCmdLineLoginURI;

View File

@ -49,10 +49,10 @@ static std::string gOS;
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
BOOL persist) {return TRUE;}
LLControlVariable::ePersist persist) {return NULL;}
void LLControlGroup::setString(const std::string& name, const std::string& val){}
std::string LLControlGroup::getString(const std::string& name)
{

View File

@ -37,10 +37,10 @@
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
LLControlVariable* LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
const std::string& comment,
BOOL persist) {return TRUE;}
LLControlVariable::ePersist persist) {return NULL;}
void LLControlGroup::setString(const std::string& name, const std::string& val){}
std::string gCmdLineLoginURI;
@ -127,6 +127,7 @@ const char *gSampleGridFile =
" <array>"
" <string>myloginuri</string>"
" </array>"
" <key>update_query_url_base</key><string>https://update.secondlife.com/update</string>"
" <key>keyname</key><string>util.foobar.lindenlab.com</string>"
" </map>"
" </map>"
@ -185,6 +186,9 @@ namespace tut
ensure_equals("id for agni",
std::string("Agni"),
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"));
ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"),
LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
std::string("Second Life Main Grid (Agni)"));
@ -256,6 +260,9 @@ namespace tut
ensure_equals("id for agni",
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"),
std::string("Agni"));
ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"),
LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
std::string("Second Life Main Grid (Agni)"));
@ -384,6 +391,9 @@ namespace tut
ensure_equals("getLoginPage",
LLGridManager::getInstance()->getLoginPage(),
std::string("http://viewer-login.agni.lindenlab.com/"));
ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"),
LLGridManager::getInstance()->getUpdateServiceURL());
ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid());
std::vector<std::string> uris;
LLGridManager::getInstance()->getLoginURIs(uris);

View File

@ -62,8 +62,8 @@ namespace tut
// These variables are required by machinery used by
// LLXMLRPCTransaction. The values reflect reality for this test
// executable; hopefully these values are correct.
gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", FALSE); // don't persist
gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", FALSE); // don't persist
gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", LLControlVariable::PERSIST_NO); // don't persist
gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", LLControlVariable::PERSIST_NO); // don't persist
}
// LLEventPump listener signature

View File

@ -34,9 +34,15 @@ import tarfile
import time
import random
viewer_dir = os.path.dirname(__file__)
# add llmanifest library to our path so we don't have to muck with PYTHONPATH
sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
# Add indra/lib/python to our path so we don't have to muck with PYTHONPATH.
# Put it FIRST because some of our build hosts have an ancient install of
# indra.util.llmanifest under their system Python!
sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
try:
from llbase import llsd
except ImportError:
from indra.base import llsd
class ViewerManifest(LLManifest):
def is_packaging_viewer(self):
@ -65,13 +71,13 @@ class ViewerManifest(LLManifest):
# include the entire shaders directory recursively
self.path("shaders")
# include the extracted list of contributors
contributor_names = self.extract_names("../../doc/contributions.txt")
self.put_in_file(contributor_names, "contributors.txt")
self.file_list.append(["../../doc/contributions.txt",self.dst_path_of("contributors.txt")])
contributions_path = "../../doc/contributions.txt"
contributor_names = self.extract_names(contributions_path)
self.put_in_file(contributor_names, "contributors.txt", src=contributions_path)
# include the extracted list of translators
translator_names = self.extract_names("../../doc/translations.txt")
self.put_in_file(translator_names, "translators.txt")
self.file_list.append(["../../doc/translations.txt",self.dst_path_of("translators.txt")])
translations_path = "../../doc/translations.txt"
translator_names = self.extract_names(translations_path)
self.put_in_file(translator_names, "translators.txt", src=translations_path)
# include the list of Lindens (if any)
# see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
linden_names_path = os.getenv("LINDEN_CREDITS")
@ -85,10 +91,9 @@ class ViewerManifest(LLManifest):
else:
# all names should be one line, but the join below also converts to a string
linden_names = ', '.join(linden_file.readlines())
self.put_in_file(linden_names, "lindens.txt")
self.put_in_file(linden_names, "lindens.txt", src=linden_names_path)
linden_file.close()
print "Linden names extracted from '%s'" % linden_names_path
self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")])
# ... and the entire windlight directory
self.path("windlight")
@ -99,6 +104,27 @@ class ViewerManifest(LLManifest):
self.path("dictionaries")
self.end_prefix(pkgdir)
# CHOP-955: If we have "sourceid" in the build process
# environment, generate it into settings_install.xml.
try:
sourceid = os.environ["sourceid"]
except KeyError:
# no sourceid, no settings_install.xml file
pass
else:
if sourceid:
# Single-entry subset of the LLSD content of settings.xml
content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
Persist=1,
Type='String',
Value=sourceid))
# put_in_file(src=) need not be an actual pathname; it
# only needs to be non-empty
settings_install = self.put_in_file(llsd.format_pretty_xml(content),
"settings_install.xml",
src="environment")
print "Put sourceid '%s' in %s" % (sourceid, settings_install)
self.end_prefix("app_settings")
if self.prefix(src="character"):
@ -196,24 +222,26 @@ class ViewerManifest(LLManifest):
""" Convenience function that returns the command-line flags
for the grid"""
# Set command line flags relating to the target grid
grid_flags = ''
if not self.default_grid():
grid_flags = "--grid %(grid)s "\
"--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
{'grid':self.grid()}
# The original role of this method seems to have been to build a
# grid-specific viewer: one that would, on launch, preselect a
# particular grid. (Apparently that dates back to when the protocol
# between viewer and simulator required them to be updated in
# lockstep, so that "the beta grid" required "a beta viewer.") But
# those viewer command-line switches no longer work without tweaking
# user_settings/grids.xml. In fact, going forward, it's unclear what
# use case that would address.
# Deal with settings
setting_flags = ''
if not self.default_channel() or not self.default_grid():
if self.default_grid():
setting_flags = '--settings settings_%s.xml'\
% self.channel_lowerword()
else:
setting_flags = '--settings settings_%s_%s.xml'\
% (self.grid(), self.channel_lowerword())
return " ".join((grid_flags, setting_flags)).strip()
# This method also set a channel-specific (or grid-and-channel-
# specific) user_settings/settings_something.xml file. It has become
# clear that saving user settings in a channel-specific file causes
# more problems (confusion) than it solves, so we've discontinued that.
# In fact we now avoid forcing viewer command-line switches at all,
# instead introducing a settings_install.xml file. Command-line
# switches don't aggregate well; for instance the generated --channel
# switch actually prevented the user specifying --channel on the
# command line. Settings files have well-defined override semantics.
return None
def extract_names(self,src):
try:
@ -530,8 +558,7 @@ class WindowsManifest(ViewerManifest):
'final_exe' : self.final_exe(),
'grid':self.args['grid'],
'grid_caps':self.args['grid'].upper(),
# escape quotes becase NSIS doesn't handle them well
'flags':self.flags_list().replace('"', '$\\"'),
'flags':'',
'channel':self.channel(),
'channel_oneword':self.channel_oneword(),
'channel_unique':self.channel_unique(),
@ -759,9 +786,6 @@ class DarwinManifest(ViewerManifest):
self.end_prefix("llplugin")
# command line arguments for connecting to the proper grid
self.put_in_file(self.flags_list(), 'arguments.txt')
self.end_prefix("Resources")
self.end_prefix("Contents")
@ -807,10 +831,6 @@ class DarwinManifest(ViewerManifest):
'bundle': self.get_dst_prefix()
})
channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own
if not self.default_channel():
channel_standin = self.channel()
imagename="SecondLife_" + '_'.join(self.args['version'])
# MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
@ -928,9 +948,6 @@ class LinuxManifest(ViewerManifest):
self.path("install.sh")
self.end_prefix("linux_tools")
# Create an appropriate gridargs.dat for this package, denoting required grid.
self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
if self.prefix(src="", dst="bin"):
self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")

View File

@ -62,8 +62,7 @@ LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client):
}
void LLUpdateChecker::checkVersion(std::string const & hostUrl,
std::string const & servicePath,
void LLUpdateChecker::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -71,7 +70,7 @@ void LLUpdateChecker::checkVersion(std::string const & hostUrl,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
mImplementation->checkVersion(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
mImplementation->checkVersion(urlBase, channel, version, platform, platform_version, uniqueid, willing_to_test);
}
@ -99,8 +98,7 @@ LLUpdateChecker::Implementation::~Implementation()
}
void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
std::string const & servicePath,
void LLUpdateChecker::Implementation::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -112,8 +110,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
{
mInProgress = true;
mHostUrl = hostUrl;
mServicePath = servicePath;
mUrlBase = urlBase;
mChannel = channel;
mVersion = version;
mPlatform = platform;
@ -123,7 +120,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
mProtocol = sProtocolVersion;
std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
std::string checkUrl = buildUrl(urlBase, channel, version, platform, platform_version, uniqueid, willing_to_test);
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
mHttpClient.get(checkUrl, this);
@ -158,7 +155,7 @@ void LLUpdateChecker::Implementation::completed(U32 status,
if (mProtocol == sProtocolVersion)
{
mProtocol = sLegacyProtocolVersion;
std::string retryUrl = buildUrl(mHostUrl, mServicePath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
std::string retryUrl = buildUrl(mUrlBase, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
LL_WARNS("UpdaterService")
<< "update response using " << sProtocolVersion
@ -203,8 +200,7 @@ void LLUpdateChecker::Implementation::error(U32 status, const std::string & reas
}
std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUrl,
std::string const & servicePath,
std::string LLUpdateChecker::Implementation::buildUrl(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -213,7 +209,6 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUr
bool willing_to_test)
{
LLSD path;
path.append(servicePath);
path.append(mProtocol);
path.append(channel);
path.append(version);
@ -224,5 +219,5 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUr
path.append(willing_to_test ? "testok" : "testno");
path.append((char*)uniqueid);
}
return LLURI::buildHTTP(hostUrl, path).asString();
return LLURI::buildHTTP(urlBase, path).asString();
}

View File

@ -43,8 +43,7 @@ public:
public:
Implementation(Client & client);
~Implementation();
void checkVersion(std::string const & hostUrl,
std::string const & servicePath,
void checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -68,16 +67,14 @@ public:
LLHTTPClient mHttpClient;
bool mInProgress;
std::string mVersion;
std::string mHostUrl;
std::string mServicePath;
std::string mUrlBase;
std::string mChannel;
std::string mPlatform;
std::string mPlatformVersion;
unsigned char mUniqueId[MD5HEX_STR_SIZE];
bool mWillingToTest;
std::string buildUrl(std::string const & hostUrl,
std::string const & servicePath,
std::string buildUrl(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -95,8 +92,7 @@ public:
LLUpdateChecker(Client & client);
// Check status of current app on the given host for the channel and version provided.
void checkVersion(std::string const & hostUrl,
std::string const & servicePath,
void checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,

View File

@ -38,6 +38,7 @@
#include "lldir.h"
#include "llsdserialize.h"
#include "llfile.h"
#include "llviewernetwork.h"
#if LL_WINDOWS
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
@ -93,8 +94,6 @@ class LLUpdaterServiceImpl :
static const std::string sListenerName;
std::string mProtocolVersion;
std::string mUrl;
std::string mPath;
std::string mChannel;
std::string mVersion;
std::string mPlatform;
@ -120,9 +119,7 @@ public:
LLUpdaterServiceImpl();
virtual ~LLUpdaterServiceImpl();
void initialize(const std::string& url,
const std::string& path,
const std::string& channel,
void initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@ -183,9 +180,7 @@ LLUpdaterServiceImpl::~LLUpdaterServiceImpl()
LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName);
}
void LLUpdaterServiceImpl::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
void LLUpdaterServiceImpl::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@ -198,8 +193,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url,
"while updater is running.");
}
mUrl = url;
mPath = path;
mChannel = channel;
mVersion = version;
mPlatform = platform;
@ -207,8 +200,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url,
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
LL_DEBUGS("UpdaterService")
<< "\n url: " << mUrl
<< "\n path: " << mPath
<< "\n channel: " << mChannel
<< "\n version: " << mVersion
<< "\n uniqueid: " << mUniqueId
@ -228,7 +219,7 @@ void LLUpdaterServiceImpl::setBandwidthLimit(U64 bytesPerSecond)
void LLUpdaterServiceImpl::startChecking(bool install_if_ready)
{
if(mUrl.empty() || mChannel.empty() || mVersion.empty())
if(mChannel.empty() || mVersion.empty())
{
throw LLUpdaterService::UsageError("Set params before call to "
"LLUpdaterService::startCheck().");
@ -415,7 +406,7 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
setState(LLUpdaterService::UP_TO_DATE);
}
else
else if ( content.isMap() && content.has("url") )
{
// there is an update available...
stopTimer();
@ -439,6 +430,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
<< LL_ENDL;
mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required);
}
else
{
LL_WARNS("UpdaterService") << "Invalid update query response ignored; retry in "
<< mCheckPeriod << " seconds" << LL_ENDL;
restartTimer(mCheckPeriod);
}
}
void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
@ -565,8 +562,26 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
}
else
{
mUpdateChecker.checkVersion(mUrl, mPath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
setState(LLUpdaterService::CHECKING_FOR_UPDATE);
std::string query_url = LLGridManager::getInstance()->getUpdateServiceURL();
if ( !query_url.empty() )
{
mUpdateChecker.checkVersion(query_url, mChannel, mVersion,
mPlatform, mPlatformVersion, mUniqueId,
mWillingToTest);
setState(LLUpdaterService::CHECKING_FOR_UPDATE);
}
else
{
LL_WARNS("UpdaterService")
<< "No updater service defined for grid '" << LLGridManager::getInstance()->getGrid()
<< "' will check again in " << mCheckPeriod << " seconds"
<< LL_ENDL;
// Because the grid can be changed after the viewer is started (when the first check takes place)
// but before the user logs in, the next check may be on a different grid, so set the retry timer
// even though this check did not happen. The default time is once an hour, and if we're not
// doing the check anyway the performance impact is completely insignificant.
restartTimer(mCheckPeriod);
}
}
}
else
@ -610,9 +625,7 @@ LLUpdaterService::~LLUpdaterService()
{
}
void LLUpdaterService::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
void LLUpdaterService::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@ -620,7 +633,7 @@ void LLUpdaterService::initialize(const std::string& url,
const bool& willing_to_test
)
{
mImpl->initialize(url, path, channel, version, platform, platform_version, uniqueid, willing_to_test);
mImpl->initialize(channel, version, platform, platform_version, uniqueid, willing_to_test);
}
void LLUpdaterService::setCheckPeriod(unsigned int seconds)

View File

@ -71,9 +71,7 @@ public:
LLUpdaterService();
~LLUpdaterService();
void initialize(const std::string& url,
const std::string& path,
const std::string& channel,
void initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,

View File

@ -69,8 +69,11 @@ then # zenity on PATH and is executable
# clear any previous message
clear_message
# put up a new zenity box and capture its pid
"$zenpath" --info --title "Second Life Viewer Updater" \
--width=320 --height=120 --text="$*" &
## "$zenpath" --info --title "Second Life Viewer Updater" \
## --width=320 --height=120 --text="$*" &
# MAINT-2333: use bouncing progress bar
"$zenpath" --progress --pulsate --no-cancel --title "Second Life Viewer Updater" \
--width=320 --height=120 --text "$*" </dev/null &
statuspid=$!
}

View File

@ -44,8 +44,7 @@
*****************************************************************************/
LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client)
{}
void LLUpdateChecker::checkVersion(std::string const & hostUrl,
std::string const & servicePath,
void LLUpdateChecker::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@ -91,6 +90,21 @@ bool LLDir::setCacheDir(const std::string &path){ return true; }
void LLDir::dumpCurrentDirectories() {}
void LLDir::updatePerAccountChatLogsDir() {}
#include "llviewernetwork.h"
LLGridManager::LLGridManager() :
mGrid("test.grid.lindenlab.com"),
mIsInProductionGrid(false)
{
}
std::string LLGridManager::getUpdateServiceURL()
{
return "https://update.secondlife.com/update";
}
LLGridManager::~LLGridManager()
{
}
std::string LLDir::getExpandedFilename(ELLPath location,
const std::string &filename) const
{
@ -179,10 +193,10 @@ namespace tut
try
{
unsigned char id1[MD5HEX_STR_SIZE] = "11111111111111111111111111111111";
updater.initialize(test_url, "update" ,test_channel, test_version, "win", "1.2.3", id1, true);
updater.initialize(test_channel, test_version, "win", "1.2.3", id1, true);
updater.startChecking();
unsigned char id2[MD5HEX_STR_SIZE] = "22222222222222222222222222222222";
updater.initialize("other_url", "update", test_channel, test_version, "win", "4.5.6", id2, true);
updater.initialize(test_channel, test_version, "win", "4.5.6", id2, true);
}
catch(LLUpdaterService::UsageError)
{
@ -197,7 +211,7 @@ namespace tut
DEBUG;
LLUpdaterService updater;
unsigned char id[MD5HEX_STR_SIZE] = "33333333333333333333333333333333";
updater.initialize(test_url, "update", test_channel, test_version, "win", "7.8.9", id, true);
updater.initialize(test_channel, test_version, "win", "7.8.9", id, true);
updater.startChecking();
ensure(updater.isChecking());
updater.stopChecking();