aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/doc/contributions.txt1
-rw-r--r--linden/etc/message.xml36
-rw-r--r--linden/indra/lib/python/indra/base/llsd.py209
-rw-r--r--linden/indra/lib/python/indra/ipc/llsdhttp.py2
-rw-r--r--linden/indra/lib/python/indra/ipc/mysql_pool.py23
-rw-r--r--linden/indra/lib/python/indra/ipc/servicebuilder.py29
-rw-r--r--linden/indra/lib/python/indra/ipc/siesta.py4
-rw-r--r--linden/indra/lib/python/indra/util/fastest_elementtree.py31
-rw-r--r--linden/indra/lib/python/indra/util/llmanifest.py3
-rw-r--r--linden/indra/lib/python/indra/util/llversion.py5
-rw-r--r--linden/indra/lib/python/indra/util/named_query.py37
-rw-r--r--linden/indra/llcommon/indra_constants.h12
-rw-r--r--linden/indra/llcommon/llkeythrottle.h2
-rw-r--r--linden/indra/llcommon/llstat.cpp562
-rw-r--r--linden/indra/llcommon/llstat.h142
-rw-r--r--linden/indra/llcommon/llversionviewer.h2
-rw-r--r--linden/indra/llinventory/llinventory.cpp43
-rw-r--r--linden/indra/llinventory/llsaleinfo.cpp11
-rw-r--r--linden/indra/llmath/CMakeLists.txt4
-rw-r--r--linden/indra/llmath/llcalc.cpp155
-rw-r--r--linden/indra/llmath/llcalc.h85
-rw-r--r--linden/indra/llmath/llcalcparser.cpp45
-rw-r--r--linden/indra/llmath/llcalcparser.h155
-rw-r--r--linden/indra/llmath/llmodularmath.h57
-rw-r--r--linden/indra/llmessage/llcircuit.cpp11
-rw-r--r--linden/indra/llmessage/llcircuit.h8
-rw-r--r--linden/indra/llmessage/llcurl.cpp6
-rw-r--r--linden/indra/llmessage/llhttpassetstorage.cpp4
-rw-r--r--linden/indra/llmessage/llhttpclient.cpp112
-rw-r--r--linden/indra/llmessage/llhttpclient.h50
-rw-r--r--linden/indra/llmessage/lliohttpserver.cpp7
-rw-r--r--linden/indra/llmessage/lliosocket.cpp3
-rw-r--r--linden/indra/llmessage/llmail.cpp34
-rw-r--r--linden/indra/llmessage/llmail.h61
-rw-r--r--linden/indra/llmessage/llmessagetemplate.cpp22
-rw-r--r--linden/indra/llmessage/llmessagetemplate.h12
-rw-r--r--linden/indra/llmessage/llmessagethrottle.cpp4
-rw-r--r--linden/indra/llmessage/llnamevalue.cpp4
-rw-r--r--linden/indra/llmessage/llnamevalue.h4
-rw-r--r--linden/indra/llmessage/llpumpio.cpp24
-rw-r--r--linden/indra/llmessage/llpumpio.h9
-rw-r--r--linden/indra/llmessage/llregionflags.h6
-rw-r--r--linden/indra/llmessage/llurlrequest.cpp23
-rw-r--r--linden/indra/llmessage/message.cpp32
-rw-r--r--linden/indra/llmessage/message.h16
-rw-r--r--linden/indra/llui/llkeywords.cpp66
-rw-r--r--linden/indra/llui/llkeywords.h16
-rw-r--r--linden/indra/llui/lllineeditor.cpp33
-rw-r--r--linden/indra/llui/lllineeditor.h4
-rw-r--r--linden/indra/llui/llspinctrl.cpp17
-rw-r--r--linden/indra/lscript/lscript_compile/indra.l27
-rw-r--r--linden/indra/newview/app_settings/keywords.ini9
-rw-r--r--linden/indra/newview/app_settings/settings.xml24
-rw-r--r--linden/indra/newview/llappviewer.cpp5
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp47
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp2
-rw-r--r--linden/indra/newview/llinventorybridge.cpp47
-rw-r--r--linden/indra/newview/llinventorybridge.h3
-rw-r--r--linden/indra/newview/llinventorymodel.cpp533
-rw-r--r--linden/indra/newview/llinventorymodel.h38
-rw-r--r--linden/indra/newview/llmaniptranslate.h2
-rw-r--r--linden/indra/newview/llnetmap.cpp19
-rw-r--r--linden/indra/newview/llpanelface.cpp31
-rw-r--r--linden/indra/newview/llpanelface.h1
-rw-r--r--linden/indra/newview/llpanelgeneral.cpp10
-rw-r--r--linden/indra/newview/llpanelgeneral.h2
-rw-r--r--linden/indra/newview/llpanelobject.cpp61
-rw-r--r--linden/indra/newview/llpanelobject.h1
-rw-r--r--linden/indra/newview/llstartup.cpp3
-rw-r--r--linden/indra/newview/llviewerinventory.cpp41
-rw-r--r--linden/indra/newview/llviewermenu.cpp205
-rw-r--r--linden/indra/newview/llviewerregion.cpp6
-rw-r--r--linden/indra/newview/llviewerwindow.cpp4
-rw-r--r--linden/indra/newview/llwindebug.cpp4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/alerts.xml67
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml48
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml54
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml6
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml92
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml138
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml88
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml11
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/strings.xml363
-rw-r--r--linden/indra/newview/skins/default/xui/fr/floater_about_land.xml1016
-rw-r--r--linden/indra/newview/skins/silver/colors_base.xml14
-rw-r--r--linden/install.xml7
-rw-r--r--linden/scripts/messages/message_template.msg52
93 files changed, 3677 insertions, 1674 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index 48c1429..ac24d99 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -209,6 +209,7 @@ Matthew Dowd
209McCabe Maxsted 209McCabe Maxsted
210 VWR-1318 210 VWR-1318
211 VWR-7893 211 VWR-7893
212 VWR-8689
212Michelle2 Zenovka 213Michelle2 Zenovka
213 VWR-2652 214 VWR-2652
214 VWR-2834 215 VWR-2834
diff --git a/linden/etc/message.xml b/linden/etc/message.xml
index 80dc560..d833074 100644
--- a/linden/etc/message.xml
+++ b/linden/etc/message.xml
@@ -441,6 +441,30 @@
441 <boolean>true</boolean> 441 <boolean>true</boolean>
442 </map> 442 </map>
443 443
444 <key>EnableSimulator</key>
445 <map>
446 <key>flavor</key>
447 <string>llsd</string>
448 <key>trusted-sender</key>
449 <boolean>true</boolean>
450 </map>
451
452 <key>TeleportFinish</key>
453 <map>
454 <key>flavor</key>
455 <string>llsd</string>
456 <key>trusted-sender</key>
457 <boolean>true</boolean>
458 </map>
459
460 <key>CrossedRegion</key>
461 <map>
462 <key>flavor</key>
463 <string>llsd</string>
464 <key>trusted-sender</key>
465 <boolean>true</boolean>
466 </map>
467
444 <!-- UDPDeprecated Messages --> 468 <!-- UDPDeprecated Messages -->
445 <key>ScriptRunningReply</key> 469 <key>ScriptRunningReply</key>
446 <map> 470 <map>
@@ -564,6 +588,18 @@
564 <boolean>true</boolean> 588 <boolean>true</boolean>
565 589
566 <key>FetchInventoryDescendents</key> 590 <key>FetchInventoryDescendents</key>
591 <boolean>false</boolean>
592
593 <key>WebFetchInventoryDescendents</key>
594 <boolean>true</boolean>
595
596 <key>FetchInventory</key>
597 <boolean>true</boolean>
598
599 <key>FetchLibDescendents</key>
600 <boolean>true</boolean>
601
602 <key>FetchLib</key>
567 <boolean>true</boolean> 603 <boolean>true</boolean>
568 </map> 604 </map>
569 605
diff --git a/linden/indra/lib/python/indra/base/llsd.py b/linden/indra/lib/python/indra/base/llsd.py
index 995ace7..e6141b6 100644
--- a/linden/indra/lib/python/indra/base/llsd.py
+++ b/linden/indra/lib/python/indra/base/llsd.py
@@ -33,19 +33,29 @@ import time
33import types 33import types
34import re 34import re
35 35
36from indra.util.fastest_elementtree import fromstring 36from indra.util.fastest_elementtree import ElementTreeError, fromstring
37from indra.base import lluuid 37from indra.base import lluuid
38 38
39int_regex = re.compile("[-+]?\d+") 39# cllsd.c in server/server-1.25 has memory leaks,
40real_regex = re.compile("[-+]?(\d+(\.\d*)?|\d*\.\d+)([eE][-+]?\d+)?") 40# so disabling cllsd for now
41alpha_regex = re.compile("[a-zA-Z]+") 41#try:
42date_regex = re.compile("(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})T(?P<hour>\d{2}):(?P<minute>\d{2}):(?P<second>\d{2})(?P<second_float>\.\d{2})?Z") 42# import cllsd
43#date: d"YYYY-MM-DDTHH:MM:SS.FFZ" 43#except ImportError:
44# cllsd = None
45cllsd = None
46
47int_regex = re.compile(r"[-+]?\d+")
48real_regex = re.compile(r"[-+]?(\d+(\.\d*)?|\d*\.\d+)([eE][-+]?\d+)?")
49alpha_regex = re.compile(r"[a-zA-Z]+")
50date_regex = re.compile(r"(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})T"
51 r"(?P<hour>\d{2}):(?P<minute>\d{2}):(?P<second>\d{2})"
52 r"(?P<second_float>(\.\d+)?)Z")
53#date: d"YYYY-MM-DDTHH:MM:SS.FFFFFFZ"
44 54
45class LLSDParseError(Exception): 55class LLSDParseError(Exception):
46 pass 56 pass
47 57
48class LLSDSerializationError(Exception): 58class LLSDSerializationError(TypeError):
49 pass 59 pass
50 60
51 61
@@ -62,14 +72,7 @@ BOOL_FALSE = ('0', '0.0', 'false', '')
62 72
63def format_datestr(v): 73def format_datestr(v):
64 """ Formats a datetime object into the string format shared by xml and notation serializations.""" 74 """ Formats a datetime object into the string format shared by xml and notation serializations."""
65 second_str = "" 75 return v.isoformat() + 'Z'
66 if v.microsecond > 0:
67 seconds = v.second + float(v.microsecond) / 1000000
68 second_str = "%05.2f" % seconds
69 else:
70 second_str = "%d" % v.second
71 return '%s%sZ' % (v.strftime('%Y-%m-%dT%H:%M:'), second_str)
72
73 76
74def parse_datestr(datestr): 77def parse_datestr(datestr):
75 """Parses a datetime object from the string format shared by xml and notation serializations.""" 78 """Parses a datetime object from the string format shared by xml and notation serializations."""
@@ -89,7 +92,7 @@ def parse_datestr(datestr):
89 seconds_float = match.group('second_float') 92 seconds_float = match.group('second_float')
90 microsecond = 0 93 microsecond = 0
91 if seconds_float: 94 if seconds_float:
92 microsecond = int(seconds_float[1:]) * 10000 95 microsecond = int(float('0' + seconds_float) * 1e6)
93 return datetime.datetime(year, month, day, hour, minute, second, microsecond) 96 return datetime.datetime(year, month, day, hour, minute, second, microsecond)
94 97
95 98
@@ -116,7 +119,7 @@ def uuid_to_python(node):
116 return lluuid.UUID(node.text) 119 return lluuid.UUID(node.text)
117 120
118def str_to_python(node): 121def str_to_python(node):
119 return unicode(node.text or '').encode('utf8', 'replace') 122 return node.text or ''
120 123
121def bin_to_python(node): 124def bin_to_python(node):
122 return binary(base64.decodestring(node.text or '')) 125 return binary(base64.decodestring(node.text or ''))
@@ -126,6 +129,7 @@ def date_to_python(node):
126 if not val: 129 if not val:
127 val = "1970-01-01T00:00:00Z" 130 val = "1970-01-01T00:00:00Z"
128 return parse_datestr(val) 131 return parse_datestr(val)
132
129 133
130def uri_to_python(node): 134def uri_to_python(node):
131 val = node.text or '' 135 val = node.text or ''
@@ -189,9 +193,13 @@ class LLSDXMLFormatter(object):
189 if(contents is None or contents is ''): 193 if(contents is None or contents is ''):
190 return "<%s />" % (name,) 194 return "<%s />" % (name,)
191 else: 195 else:
196 if type(contents) is unicode:
197 contents = contents.encode('utf-8')
192 return "<%s>%s</%s>" % (name, contents, name) 198 return "<%s>%s</%s>" % (name, contents, name)
193 199
194 def xml_esc(self, v): 200 def xml_esc(self, v):
201 if type(v) is unicode:
202 v = v.encode('utf-8')
195 return v.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;') 203 return v.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
196 204
197 def LLSD(self, v): 205 def LLSD(self, v):
@@ -237,9 +245,14 @@ class LLSDXMLFormatter(object):
237 raise LLSDSerializationError("Cannot serialize unknown type: %s (%s)" % ( 245 raise LLSDSerializationError("Cannot serialize unknown type: %s (%s)" % (
238 t, something)) 246 t, something))
239 247
240 def format(self, something): 248 def _format(self, something):
241 return '<?xml version="1.0" ?>' + self.elt("llsd", self.generate(something)) 249 return '<?xml version="1.0" ?>' + self.elt("llsd", self.generate(something))
242 250
251 def format(self, something):
252 if cllsd:
253 return cllsd.llsd_to_xml(something)
254 return self._format(something)
255
243_g_xml_formatter = None 256_g_xml_formatter = None
244def format_xml(something): 257def format_xml(something):
245 global _g_xml_formatter 258 global _g_xml_formatter
@@ -356,8 +369,10 @@ class LLSDNotationFormatter(object):
356 def UUID(self, v): 369 def UUID(self, v):
357 return "u%s" % v 370 return "u%s" % v
358 def BINARY(self, v): 371 def BINARY(self, v):
359 raise LLSDSerializationError("binary notation not yet supported") 372 return 'b64"' + base64.encodestring(v) + '"'
360 def STRING(self, v): 373 def STRING(self, v):
374 if isinstance(v, unicode):
375 v = v.encode('utf-8')
361 return "'%s'" % v.replace("\\", "\\\\").replace("'", "\\'") 376 return "'%s'" % v.replace("\\", "\\\\").replace("'", "\\'")
362 def URI(self, v): 377 def URI(self, v):
363 return 'l"%s"' % str(v).replace("\\", "\\\\").replace('"', '\\"') 378 return 'l"%s"' % str(v).replace("\\", "\\\\").replace('"', '\\"')
@@ -366,16 +381,24 @@ class LLSDNotationFormatter(object):
366 def ARRAY(self, v): 381 def ARRAY(self, v):
367 return "[%s]" % ','.join([self.generate(item) for item in v]) 382 return "[%s]" % ','.join([self.generate(item) for item in v])
368 def MAP(self, v): 383 def MAP(self, v):
369 return "{%s}" % ','.join(["'%s':%s" % (key.replace("\\", "\\\\").replace("'", "\\'"), self.generate(value)) 384 def fix(key):
385 if isinstance(key, unicode):
386 return key.encode('utf-8')
387 return key
388 return "{%s}" % ','.join(["'%s':%s" % (fix(key).replace("\\", "\\\\").replace("'", "\\'"), self.generate(value))
370 for key, value in v.items()]) 389 for key, value in v.items()])
371 390
372 def generate(self, something): 391 def generate(self, something):
373 t = type(something) 392 t = type(something)
374 if self.type_map.has_key(t): 393 handler = self.type_map.get(t)
375 return self.type_map[t](something) 394 if handler:
395 return handler(something)
376 else: 396 else:
377 raise LLSDSerializationError("Cannot serialize unknown type: %s (%s)" % ( 397 try:
378 t, something)) 398 return self.ARRAY(iter(something))
399 except TypeError:
400 raise LLSDSerializationError(
401 "Cannot serialize unknown type: %s (%s)" % (t, something))
379 402
380 def format(self, something): 403 def format(self, something):
381 return self.generate(something) 404 return self.generate(something)
@@ -479,7 +502,6 @@ class LLSDBinaryParser(object):
479 raise LLSDParseError("invalid map key at byte %d." % ( 502 raise LLSDParseError("invalid map key at byte %d." % (
480 self._index - 1,)) 503 self._index - 1,))
481 value = self._parse() 504 value = self._parse()
482 #print "kv:",key,value
483 rv[key] = value 505 rv[key] = value
484 count += 1 506 count += 1
485 cc = self._buffer[self._index] 507 cc = self._buffer[self._index]
@@ -636,11 +658,23 @@ class LLSDNotationParser(object):
636 # 'd' = date in seconds since epoch 658 # 'd' = date in seconds since epoch
637 return self._parse_date() 659 return self._parse_date()
638 elif cc == 'b': 660 elif cc == 'b':
639 raise LLSDParseError("binary notation not yet supported") 661 return self._parse_binary()
640 else: 662 else:
641 raise LLSDParseError("invalid token at index %d: %d" % ( 663 raise LLSDParseError("invalid token at index %d: %d" % (
642 self._index - 1, ord(cc))) 664 self._index - 1, ord(cc)))
643 665
666 def _parse_binary(self):
667 i = self._index
668 if self._buffer[i:i+2] == '64':
669 q = self._buffer[i+2]
670 e = self._buffer.find(q, i+3)
671 try:
672 return base64.decodestring(self._buffer[i+3:e])
673 finally:
674 self._index = e + 1
675 else:
676 raise LLSDParseError('random horrible binary format not supported')
677
644 def _parse_map(self): 678 def _parse_map(self):
645 """ map: { string:object, string:object } """ 679 """ map: { string:object, string:object } """
646 rv = {} 680 rv = {}
@@ -653,30 +687,23 @@ class LLSDNotationParser(object):
653 if cc in ("'", '"', 's'): 687 if cc in ("'", '"', 's'):
654 key = self._parse_string(cc) 688 key = self._parse_string(cc)
655 found_key = True 689 found_key = True
656 #print "key:",key
657 elif cc.isspace() or cc == ',': 690 elif cc.isspace() or cc == ',':
658 cc = self._buffer[self._index] 691 cc = self._buffer[self._index]
659 self._index += 1 692 self._index += 1
660 else: 693 else:
661 raise LLSDParseError("invalid map key at byte %d." % ( 694 raise LLSDParseError("invalid map key at byte %d." % (
662 self._index - 1,)) 695 self._index - 1,))
696 elif cc.isspace() or cc == ':':
697 cc = self._buffer[self._index]
698 self._index += 1
699 continue
663 else: 700 else:
664 if cc.isspace() or cc == ':':
665 #print "skipping whitespace '%s'" % cc
666 cc = self._buffer[self._index]
667 self._index += 1
668 continue
669 self._index += 1 701 self._index += 1
670 value = self._parse() 702 value = self._parse()
671 #print "kv:",key,value
672 rv[key] = value 703 rv[key] = value
673 found_key = False 704 found_key = False
674 cc = self._buffer[self._index] 705 cc = self._buffer[self._index]
675 self._index += 1 706 self._index += 1
676 #if cc == '}':
677 # break
678 #cc = self._buffer[self._index]
679 #self._index += 1
680 707
681 return rv 708 return rv
682 709
@@ -840,6 +867,14 @@ def format_binary(something):
840 return '<?llsd/binary?>\n' + _format_binary_recurse(something) 867 return '<?llsd/binary?>\n' + _format_binary_recurse(something)
841 868
842def _format_binary_recurse(something): 869def _format_binary_recurse(something):
870 def _format_list(something):
871 array_builder = []
872 array_builder.append('[' + struct.pack('!i', len(something)))
873 for item in something:
874 array_builder.append(_format_binary_recurse(item))
875 array_builder.append(']')
876 return ''.join(array_builder)
877
843 if something is None: 878 if something is None:
844 return '!' 879 return '!'
845 elif isinstance(something, LLSD): 880 elif isinstance(something, LLSD):
@@ -857,7 +892,10 @@ def _format_binary_recurse(something):
857 return 'u' + something._bits 892 return 'u' + something._bits
858 elif isinstance(something, binary): 893 elif isinstance(something, binary):
859 return 'b' + struct.pack('!i', len(something)) + something 894 return 'b' + struct.pack('!i', len(something)) + something
860 elif isinstance(something, (str, unicode)): 895 elif isinstance(something, str):
896 return 's' + struct.pack('!i', len(something)) + something
897 elif isinstance(something, unicode):
898 something = something.encode('utf-8')
861 return 's' + struct.pack('!i', len(something)) + something 899 return 's' + struct.pack('!i', len(something)) + something
862 elif isinstance(something, uri): 900 elif isinstance(something, uri):
863 return 'l' + struct.pack('!i', len(something)) + something 901 return 'l' + struct.pack('!i', len(something)) + something
@@ -865,35 +903,50 @@ def _format_binary_recurse(something):
865 seconds_since_epoch = time.mktime(something.timetuple()) 903 seconds_since_epoch = time.mktime(something.timetuple())
866 return 'd' + struct.pack('!d', seconds_since_epoch) 904 return 'd' + struct.pack('!d', seconds_since_epoch)
867 elif isinstance(something, (list, tuple)): 905 elif isinstance(something, (list, tuple)):
868 array_builder = [] 906 return _format_list(something)
869 array_builder.append('[' + struct.pack('!i', len(something)))
870 for item in something:
871 array_builder.append(_format_binary_recurse(item))
872 array_builder.append(']')
873 return ''.join(array_builder)
874 elif isinstance(something, dict): 907 elif isinstance(something, dict):
875 map_builder = [] 908 map_builder = []
876 map_builder.append('{' + struct.pack('!i', len(something))) 909 map_builder.append('{' + struct.pack('!i', len(something)))
877 for key, value in something.items(): 910 for key, value in something.items():
911 if isinstance(key, unicode):
912 key = key.encode('utf-8')
878 map_builder.append('k' + struct.pack('!i', len(key)) + key) 913 map_builder.append('k' + struct.pack('!i', len(key)) + key)
879 map_builder.append(_format_binary_recurse(value)) 914 map_builder.append(_format_binary_recurse(value))
880 map_builder.append('}') 915 map_builder.append('}')
881 return ''.join(map_builder) 916 return ''.join(map_builder)
882 else: 917 else:
883 raise LLSDSerializationError("Cannot serialize unknown type: %s (%s)" % ( 918 try:
884 type(something), something)) 919 return _format_list(list(something))
920 except TypeError:
921 raise LLSDSerializationError(
922 "Cannot serialize unknown type: %s (%s)" %
923 (type(something), something))
924
925
926def parse_binary(something):
927 header = '<?llsd/binary?>\n'
928 if not something.startswith(header):
929 raise LLSDParseError('LLSD binary encoding header not found')
930 return LLSDBinaryParser().parse(something[len(header):])
931
932def parse_xml(something):
933 try:
934 return to_python(fromstring(something)[0])
935 except ElementTreeError, err:
936 raise LLSDParseError(*err.args)
885 937
938def parse_notation(something):
939 return LLSDNotationParser().parse(something)
886 940
887def parse(something): 941def parse(something):
888 try: 942 try:
889 if something.startswith('<?llsd/binary?>'): 943 if something.startswith('<?llsd/binary?>'):
890 just_binary = something.split('\n', 1)[1] 944 return parse_binary(something)
891 return LLSDBinaryParser().parse(just_binary)
892 # This should be better. 945 # This should be better.
893 elif something.startswith('<'): 946 elif something.startswith('<'):
894 return to_python(fromstring(something)[0]) 947 return parse_xml(something)
895 else: 948 else:
896 return LLSDNotationParser().parse(something) 949 return parse_notation(something)
897 except KeyError, e: 950 except KeyError, e:
898 raise Exception('LLSD could not be parsed: %s' % (e,)) 951 raise Exception('LLSD could not be parsed: %s' % (e,))
899 952
@@ -913,6 +966,9 @@ class LLSD(object):
913 966
914undef = LLSD(None) 967undef = LLSD(None)
915 968
969XML_MIME_TYPE = 'application/llsd+xml'
970BINARY_MIME_TYPE = 'application/llsd+binary'
971
916# register converters for llsd in mulib, if it is available 972# register converters for llsd in mulib, if it is available
917try: 973try:
918 from mulib import stacked, mu 974 from mulib import stacked, mu
@@ -922,7 +978,7 @@ except:
922 # mulib not available, don't print an error message since this is normal 978 # mulib not available, don't print an error message since this is normal
923 pass 979 pass
924else: 980else:
925 mu.add_parser(parse, 'application/llsd+xml') 981 mu.add_parser(parse, XML_MIME_TYPE)
926 mu.add_parser(parse, 'application/llsd+binary') 982 mu.add_parser(parse, 'application/llsd+binary')
927 983
928 def llsd_convert_xml(llsd_stuff, request): 984 def llsd_convert_xml(llsd_stuff, request):
@@ -931,11 +987,58 @@ else:
931 def llsd_convert_binary(llsd_stuff, request): 987 def llsd_convert_binary(llsd_stuff, request):
932 request.write(format_binary(llsd_stuff)) 988 request.write(format_binary(llsd_stuff))
933 989
934 for typ in [LLSD, dict, list, tuple, str, int, float, bool, unicode, type(None)]: 990 for typ in [LLSD, dict, list, tuple, str, int, long, float, bool, unicode, type(None)]:
935 stacked.add_producer(typ, llsd_convert_xml, 'application/llsd+xml') 991 stacked.add_producer(typ, llsd_convert_xml, XML_MIME_TYPE)
936 stacked.add_producer(typ, llsd_convert_xml, 'application/xml') 992 stacked.add_producer(typ, llsd_convert_xml, 'application/xml')
937 stacked.add_producer(typ, llsd_convert_xml, 'text/xml') 993 stacked.add_producer(typ, llsd_convert_xml, 'text/xml')
938 994
939 stacked.add_producer(typ, llsd_convert_binary, 'application/llsd+binary') 995 stacked.add_producer(typ, llsd_convert_binary, 'application/llsd+binary')
940 996
941 stacked.add_producer(LLSD, llsd_convert_xml, '*/*') 997 stacked.add_producer(LLSD, llsd_convert_xml, '*/*')
998
999 # in case someone is using the legacy mu.xml wrapper, we need to
1000 # tell mu to produce application/xml or application/llsd+xml
1001 # (based on the accept header) from raw xml. Phoenix 2008-07-21
1002 stacked.add_producer(mu.xml, mu.produce_raw, XML_MIME_TYPE)
1003 stacked.add_producer(mu.xml, mu.produce_raw, 'application/xml')
1004
1005
1006
1007# mulib wsgi stuff
1008# try:
1009# from mulib import mu, adapters
1010#
1011# # try some known attributes from mulib to be ultra-sure we've imported it
1012# mu.get_current
1013# adapters.handlers
1014# except:
1015# # mulib not available, don't print an error message since this is normal
1016# pass
1017# else:
1018# def llsd_xml_handler(content_type):
1019# def handle_llsd_xml(env, start_response):
1020# llsd_stuff, _ = mu.get_current(env)
1021# result = format_xml(llsd_stuff)
1022# start_response("200 OK", [('Content-Type', content_type)])
1023# env['mu.negotiated_type'] = content_type
1024# yield result
1025# return handle_llsd_xml
1026#
1027# def llsd_binary_handler(content_type):
1028# def handle_llsd_binary(env, start_response):
1029# llsd_stuff, _ = mu.get_current(env)
1030# result = format_binary(llsd_stuff)
1031# start_response("200 OK", [('Content-Type', content_type)])
1032# env['mu.negotiated_type'] = content_type
1033# yield result
1034# return handle_llsd_binary
1035#
1036# adapters.DEFAULT_PARSERS[XML_MIME_TYPE] = parse
1037
1038# for typ in [LLSD, dict, list, tuple, str, int, float, bool, unicode, type(None)]:
1039# for content_type in (XML_MIME_TYPE, 'application/xml'):
1040# adapters.handlers.set_handler(typ, llsd_xml_handler(content_type), content_type)
1041#
1042# adapters.handlers.set_handler(typ, llsd_binary_handler(BINARY_MIME_TYPE), BINARY_MIME_TYPE)
1043#
1044# adapters.handlers.set_handler(LLSD, llsd_xml_handler(XML_MIME_TYPE), '*/*')
diff --git a/linden/indra/lib/python/indra/ipc/llsdhttp.py b/linden/indra/lib/python/indra/ipc/llsdhttp.py
index 1cf1146..ed64899 100644
--- a/linden/indra/lib/python/indra/ipc/llsdhttp.py
+++ b/linden/indra/lib/python/indra/ipc/llsdhttp.py
@@ -51,6 +51,8 @@ request_ = suite.request_
51# import every httpc error exception into our namespace for convenience 51# import every httpc error exception into our namespace for convenience
52for x in httpc.status_to_error_map.itervalues(): 52for x in httpc.status_to_error_map.itervalues():
53 globals()[x.__name__] = x 53 globals()[x.__name__] = x
54ConnectionError = httpc.ConnectionError
55Retriable = httpc.Retriable
54 56
55for x in (httpc.ConnectionError,): 57for x in (httpc.ConnectionError,):
56 globals()[x.__name__] = x 58 globals()[x.__name__] = x
diff --git a/linden/indra/lib/python/indra/ipc/mysql_pool.py b/linden/indra/lib/python/indra/ipc/mysql_pool.py
index 507b185..25a66cf 100644
--- a/linden/indra/lib/python/indra/ipc/mysql_pool.py
+++ b/linden/indra/lib/python/indra/ipc/mysql_pool.py
@@ -30,8 +30,10 @@ import MySQLdb
30from eventlet import db_pool 30from eventlet import db_pool
31 31
32class DatabaseConnector(db_pool.DatabaseConnector): 32class DatabaseConnector(db_pool.DatabaseConnector):
33 def __init__(self, credentials, min_size = 0, max_size = 4, *args, **kwargs): 33 def __init__(self, credentials, *args, **kwargs):
34 super(DatabaseConnector, self).__init__(MySQLdb, credentials, min_size, max_size, conn_pool=db_pool.ConnectionPool, *args, **kwargs) 34 super(DatabaseConnector, self).__init__(MySQLdb, credentials,
35 conn_pool=db_pool.ConnectionPool,
36 *args, **kwargs)
35 37
36 # get is extended relative to eventlet.db_pool to accept a port argument 38 # get is extended relative to eventlet.db_pool to accept a port argument
37 def get(self, host, dbname, port=3306): 39 def get(self, host, dbname, port=3306):
@@ -42,7 +44,7 @@ class DatabaseConnector(db_pool.DatabaseConnector):
42 new_kwargs['host'] = host 44 new_kwargs['host'] = host
43 new_kwargs['port'] = port 45 new_kwargs['port'] = port
44 new_kwargs.update(self.credentials_for(host)) 46 new_kwargs.update(self.credentials_for(host))
45 dbpool = ConnectionPool(self._min_size, self._max_size, *self._args, **new_kwargs) 47 dbpool = ConnectionPool(*self._args, **new_kwargs)
46 self._databases[key] = dbpool 48 self._databases[key] = dbpool
47 49
48 return self._databases[key] 50 return self._databases[key]
@@ -51,8 +53,8 @@ class ConnectionPool(db_pool.TpooledConnectionPool):
51 """A pool which gives out saranwrapped MySQLdb connections from a pool 53 """A pool which gives out saranwrapped MySQLdb connections from a pool
52 """ 54 """
53 55
54 def __init__(self, min_size = 0, max_size = 4, *args, **kwargs): 56 def __init__(self, *args, **kwargs):
55 super(ConnectionPool, self).__init__(MySQLdb, min_size, max_size, *args, **kwargs) 57 super(ConnectionPool, self).__init__(MySQLdb, *args, **kwargs)
56 58
57 def get(self): 59 def get(self):
58 conn = super(ConnectionPool, self).get() 60 conn = super(ConnectionPool, self).get()
@@ -77,14 +79,3 @@ class ConnectionPool(db_pool.TpooledConnectionPool):
77 conn.connection_parameters = converted_kwargs 79 conn.connection_parameters = converted_kwargs
78 return conn 80 return conn
79 81
80 def clear(self):
81 """ Close all connections that this pool still holds a reference to, leaving it empty."""
82 for conn in self.free_items:
83 try:
84 conn.close()
85 except:
86 pass # even if stuff happens here, we still want to at least try to close all the other connections
87 self.free_items.clear()
88
89 def __del__(self):
90 self.clear()
diff --git a/linden/indra/lib/python/indra/ipc/servicebuilder.py b/linden/indra/lib/python/indra/ipc/servicebuilder.py
index 89cdfad..01f2c6f 100644
--- a/linden/indra/lib/python/indra/ipc/servicebuilder.py
+++ b/linden/indra/lib/python/indra/ipc/servicebuilder.py
@@ -51,12 +51,10 @@ def build(name, context={}, **kwargs):
51 > servicebuilder.build('version-manager-version', context, version='1.18.1.2') 51 > servicebuilder.build('version-manager-version', context, version='1.18.1.2')
52 'http://int.util.vaak.lindenlab.com/channel/Second%20Life%20Release/1.18.1.2' 52 'http://int.util.vaak.lindenlab.com/channel/Second%20Life%20Release/1.18.1.2'
53 """ 53 """
54 context = context.copy() # shouldn't modify the caller's dictionary
55 context.update(kwargs)
56 global _g_builder 54 global _g_builder
57 if _g_builder is None: 55 if _g_builder is None:
58 _g_builder = ServiceBuilder() 56 _g_builder = ServiceBuilder()
59 return _g_builder.buildServiceURL(name, context) 57 return _g_builder.buildServiceURL(name, context, **kwargs)
60 58
61class ServiceBuilder(object): 59class ServiceBuilder(object):
62 def __init__(self, services_definition = services_config): 60 def __init__(self, services_definition = services_config):
@@ -81,13 +79,36 @@ class ServiceBuilder(object):
81 else: 79 else:
82 self.builders[service['name']] = service_builder 80 self.builders[service['name']] = service_builder
83 81
84 def buildServiceURL(self, name, context): 82 def buildServiceURL(self, name, context={}, **kwargs):
85 """\ 83 """\
86 @brief given the environment on construction, return a service URL. 84 @brief given the environment on construction, return a service URL.
87 @param name The name of the service. 85 @param name The name of the service.
88 @param context A dict of name value lookups for the service. 86 @param context A dict of name value lookups for the service.
87 @param kwargs Any keyword arguments are treated as members of the
88 context, this allows you to be all 31337 by writing shit like:
89 servicebuilder.build('name', param=value)
89 @returns Returns the 90 @returns Returns the
90 """ 91 """
92 context = context.copy() # shouldn't modify the caller's dictionary
93 context.update(kwargs)
91 base_url = config.get('services-base-url') 94 base_url = config.get('services-base-url')
92 svc_path = russ.format(self.builders[name], context) 95 svc_path = russ.format(self.builders[name], context)
93 return base_url + svc_path 96 return base_url + svc_path
97
98
99def on_in(query_name, host_key, schema_key):
100 """\
101 @brief Constructs an on/in snippet (for running named queries)
102 from a schema name and two keys referencing values stored in
103 indra.xml.
104
105 @param query_name Name of the query.
106 @param host_key Logical name of destination host. Will be
107 looked up in indra.xml.
108 @param schema_key Logical name of destination schema. Will
109 be looked up in indra.xml.
110 """
111 host_name = config.get(host_key)
112 schema_name = config.get(schema_key)
113 return '/'.join( ('on', host_name, 'in', schema_name, query_name.lstrip('/')) )
114
diff --git a/linden/indra/lib/python/indra/ipc/siesta.py b/linden/indra/lib/python/indra/ipc/siesta.py
index 5fbea29..b206f18 100644
--- a/linden/indra/lib/python/indra/ipc/siesta.py
+++ b/linden/indra/lib/python/indra/ipc/siesta.py
@@ -24,9 +24,9 @@ except ImportError:
24 24
25llsd_parsers = { 25llsd_parsers = {
26 'application/json': json_decode, 26 'application/json': json_decode,
27 'application/llsd+binary': llsd.parse_binary, 27 llsd.BINARY_MIME_TYPE: llsd.parse_binary,
28 'application/llsd+notation': llsd.parse_notation, 28 'application/llsd+notation': llsd.parse_notation,
29 'application/llsd+xml': llsd.parse_xml, 29 llsd.XML_MIME_TYPE: llsd.parse_xml,
30 'application/xml': llsd.parse_xml, 30 'application/xml': llsd.parse_xml,
31 } 31 }
32 32
diff --git a/linden/indra/lib/python/indra/util/fastest_elementtree.py b/linden/indra/lib/python/indra/util/fastest_elementtree.py
index 64aed09..2470143 100644
--- a/linden/indra/lib/python/indra/util/fastest_elementtree.py
+++ b/linden/indra/lib/python/indra/util/fastest_elementtree.py
@@ -2,9 +2,9 @@
2@file fastest_elementtree.py 2@file fastest_elementtree.py
3@brief Concealing some gnarly import logic in here. This should export the interface of elementtree. 3@brief Concealing some gnarly import logic in here. This should export the interface of elementtree.
4 4
5$LicenseInfo:firstyear=2006&license=mit$ 5$LicenseInfo:firstyear=2008&license=mit$
6 6
7Copyright (c) 2006-2008, Linden Research, Inc. 7Copyright (c) 2008, Linden Research, Inc.
8 8
9Permission is hereby granted, free of charge, to any person obtaining a copy 9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal 10of this software and associated documentation files (the "Software"), to deal
@@ -26,27 +26,40 @@ THE SOFTWARE.
26$/LicenseInfo$ 26$/LicenseInfo$
27""" 27"""
28 28
29# Using celementree might cause some unforeseen problems so here's a 29# The parsing exception raised by the underlying library depends
30# on the ElementTree implementation we're using, so we provide an
31# alias here.
32#
33# Use ElementTreeError as the exception type for catching parsing
34# errors.
35
36
37# Using cElementTree might cause some unforeseen problems, so here's a
30# convenient off switch. 38# convenient off switch.
31 39
32# *NOTE: turned off cause of problems. :-( *TODO: debug 40use_celementree = True
33use_celementree = False
34 41
35try: 42try:
36 if not use_celementree: 43 if not use_celementree:
37 raise ImportError() 44 raise ImportError()
38 from cElementTree import * ## This does not work under Windows 45 # Python 2.3 and 2.4.
46 from cElementTree import *
47 ElementTreeError = SyntaxError
39except ImportError: 48except ImportError:
40 try: 49 try:
41 if not use_celementree: 50 if not use_celementree:
42 raise ImportError() 51 raise ImportError()
43 ## This is the name of cElementTree under python 2.5 52 # Python 2.5 and above.
44 from xml.etree.cElementTree import * 53 from xml.etree.cElementTree import *
54 ElementTreeError = SyntaxError
45 except ImportError: 55 except ImportError:
56 # Pure Python code.
46 try: 57 try:
47 ## This is the old name of elementtree, for use with 2.3 58 # Python 2.3 and 2.4.
48 from elementtree.ElementTree import * 59 from elementtree.ElementTree import *
49 except ImportError: 60 except ImportError:
50 ## This is the name of elementtree under python 2.5 61 # Python 2.5 and above.
51 from xml.etree.ElementTree import * 62 from xml.etree.ElementTree import *
52 63
64 # The pure Python ElementTree module uses Expat for parsing.
65 from xml.parsers.expat import ExpatError as ElementTreeError
diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py
index 4675177..a00d242 100644
--- a/linden/indra/lib/python/indra/util/llmanifest.py
+++ b/linden/indra/lib/python/indra/util/llmanifest.py
@@ -584,7 +584,7 @@ class LLManifest(object):
584 584
585 def wildcard_regex(self, src_glob, dst_glob): 585 def wildcard_regex(self, src_glob, dst_glob):
586 src_re = re.escape(src_glob) 586 src_re = re.escape(src_glob)
587 src_re = src_re.replace('\*', '([-a-zA-Z0-9._ ]+)') 587 src_re = src_re.replace('\*', '([-a-zA-Z0-9._ ]*)')
588 dst_temp = dst_glob 588 dst_temp = dst_glob
589 i = 1 589 i = 1
590 while dst_temp.count("*") > 0: 590 while dst_temp.count("*") > 0:
@@ -621,6 +621,7 @@ class LLManifest(object):
621 count = 0 621 count = 0
622 if self.wildcard_pattern.search(src): 622 if self.wildcard_pattern.search(src):
623 for s,d in self.expand_globs(src, dst): 623 for s,d in self.expand_globs(src, dst):
624 assert(s != d)
624 count += self.process_file(s, d) 625 count += self.process_file(s, d)
625 else: 626 else:
626 # if we're specifying a single path (not a glob), 627 # if we're specifying a single path (not a glob),
diff --git a/linden/indra/lib/python/indra/util/llversion.py b/linden/indra/lib/python/indra/util/llversion.py
index 666cce4..fe9448f 100644
--- a/linden/indra/lib/python/indra/util/llversion.py
+++ b/linden/indra/lib/python/indra/util/llversion.py
@@ -50,7 +50,10 @@ def get_version(version_type):
50 m = re.search('const S32 IMP_VERSION_MINOR = (\d+);', file_str) 50 m = re.search('const S32 IMP_VERSION_MINOR = (\d+);', file_str)
51 VER_MINOR = m.group(1) 51 VER_MINOR = m.group(1)
52 m = re.search('const S32 IMP_VERSION_PATCH = (\d+);', file_str) 52 m = re.search('const S32 IMP_VERSION_PATCH = (\d+);', file_str)
53 version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s" % locals() 53 VER_PATCH = m.group(1)
54 m = re.search('const S32 IMP_VERSION_TEST = (\d+);', file_str)
55 VER_BUILD = m.group(1)
56 version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_TEST)s" % locals()
54 return version 57 return version
55 58
56def get_channel(version_type): 59def get_channel(version_type):
diff --git a/linden/indra/lib/python/indra/util/named_query.py b/linden/indra/lib/python/indra/util/named_query.py
index 20f2ec7..788fb0e 100644
--- a/linden/indra/lib/python/indra/util/named_query.py
+++ b/linden/indra/lib/python/indra/util/named_query.py
@@ -47,6 +47,8 @@ except NameError:
47from indra.base import llsd 47from indra.base import llsd
48from indra.base import config 48from indra.base import config
49 49
50DEBUG = False
51
50NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '.nq') 52NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '.nq')
51NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX) 53NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX)
52 54
@@ -63,7 +65,9 @@ def _init_g_named_manager(sql_dir = None):
63 65
64 # extra fallback directory in case config doesn't return what we want 66 # extra fallback directory in case config doesn't return what we want
65 if sql_dir is None: 67 if sql_dir is None:
66 sql_dir = os.path.dirname(__file__) + "../../../../web/dataservice/sql" 68 sql_dir = os.path.abspath(
69 os.path.join(
70 os.path.realpath(os.path.dirname(__file__)), "..", "..", "..", "..", "web", "dataservice", "sql"))
67 71
68 global _g_named_manager 72 global _g_named_manager
69 _g_named_manager = NamedQueryManager( 73 _g_named_manager = NamedQueryManager(
@@ -103,11 +107,12 @@ class NamedQuery(object):
103 def __init__(self, name, filename): 107 def __init__(self, name, filename):
104 """ Construct a NamedQuery object. The name argument is an 108 """ Construct a NamedQuery object. The name argument is an
105 arbitrary name as a handle for the query, and the filename is 109 arbitrary name as a handle for the query, and the filename is
106 a path to a file containing an llsd named query document.""" 110 a path to a file or a file-like object containing an llsd named
111 query document."""
107 self._stat_interval_seconds = 5 # 5 seconds 112 self._stat_interval_seconds = 5 # 5 seconds
108 self._name = name 113 self._name = name
109 if (filename is not None) \ 114 if (filename is not None and isinstance(filename, (str, unicode))
110 and (NQ_FILE_SUFFIX != filename[-NQ_FILE_SUFFIX_LEN:]): 115 and NQ_FILE_SUFFIX != filename[-NQ_FILE_SUFFIX_LEN:]):
111 filename = filename + NQ_FILE_SUFFIX 116 filename = filename + NQ_FILE_SUFFIX
112 self._location = filename 117 self._location = filename
113 self._alternative = dict() 118 self._alternative = dict()
@@ -122,8 +127,8 @@ class NamedQuery(object):
122 127
123 def get_modtime(self): 128 def get_modtime(self):
124 """ Returns the mtime (last modified time) of the named query 129 """ Returns the mtime (last modified time) of the named query
125 file, if such exists.""" 130 filename. For file-like objects, expect a modtime of 0"""
126 if self._location: 131 if self._location and isinstance(self._location, (str, unicode)):
127 return os.path.getmtime(self._location) 132 return os.path.getmtime(self._location)
128 return 0 133 return 0
129 134
@@ -131,7 +136,12 @@ class NamedQuery(object):
131 """ Loads and parses the named query file into self. Does 136 """ Loads and parses the named query file into self. Does
132 nothing if self.location is nonexistant.""" 137 nothing if self.location is nonexistant."""
133 if self._location: 138 if self._location:
134 self._reference_contents(llsd.parse(open(self._location).read())) 139 if isinstance(self._location, (str, unicode)):
140 contents = llsd.parse(open(self._location).read())
141 else:
142 # we probably have a file-like object. Godspeed!
143 contents = llsd.parse(self._location.read())
144 self._reference_contents(contents)
135 # Check for alternative implementations 145 # Check for alternative implementations
136 try: 146 try:
137 for name, alt in self._contents['alternative'].items(): 147 for name, alt in self._contents['alternative'].items():
@@ -182,6 +192,16 @@ class NamedQuery(object):
182 ready them for use in LIKE statements""" 192 ready them for use in LIKE statements"""
183 if sql: 193 if sql:
184 #print >>sys.stderr, "sql:",sql 194 #print >>sys.stderr, "sql:",sql
195
196 # This first sub is to properly escape any % signs that
197 # are meant to be literally passed through to mysql in the
198 # query. It leaves any %'s that are used for
199 # like-expressions.
200 expr = re.compile("(?<=[^a-zA-Z0-9_-])%(?=[^:])")
201 sql = expr.sub('%%', sql)
202
203 # This should tackle the rest of the %'s in the query, by
204 # converting them to LIKE clauses.
185 expr = re.compile("(%?):([a-zA-Z][a-zA-Z0-9_-]*)%") 205 expr = re.compile("(%?):([a-zA-Z][a-zA-Z0-9_-]*)%")
186 sql = expr.sub(self._prepare_like, sql) 206 sql = expr.sub(self._prepare_like, sql)
187 expr = re.compile("#:([a-zA-Z][a-zA-Z0-9_-]*)") 207 expr = re.compile("#:([a-zA-Z][a-zA-Z0-9_-]*)")
@@ -333,7 +353,8 @@ class NamedQuery(object):
333 cursor = connection.cursor() 353 cursor = connection.cursor()
334 354
335 statement = self.sql(connection, params) 355 statement = self.sql(connection, params)
336 #print "SQL:", statement 356 if DEBUG:
357 print "SQL:", statement
337 rows = cursor.execute(statement) 358 rows = cursor.execute(statement)
338 359
339 # *NOTE: the expect_rows argument is a very cheesy way to get some 360 # *NOTE: the expect_rows argument is a very cheesy way to get some
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
index 1c48a5c..023676a 100644
--- a/linden/indra/llcommon/indra_constants.h
+++ b/linden/indra/llcommon/indra_constants.h
@@ -77,6 +77,14 @@ enum LAND_STAT_REPORT_TYPE
77 77
78const U32 STAT_FILTER_MASK = 0x1FFFFFFF; 78const U32 STAT_FILTER_MASK = 0x1FFFFFFF;
79 79
80// Region absolute limits
81static const S32 REGION_AGENT_COUNT_MIN = 1;
82static const S32 REGION_AGENT_COUNT_MAX = 200; // Must fit in U8 for the moment (RegionInfo msg)
83static const S32 REGION_PRIM_COUNT_MIN = 0;
84static const S32 REGION_PRIM_COUNT_MAX = 40000;
85static const F32 REGION_PRIM_BONUS_MIN = 1.0;
86static const F32 REGION_PRIM_BONUS_MAX = 10.0;
87
80// Default maximum number of tasks/prims per region. 88// Default maximum number of tasks/prims per region.
81const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000; 89const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
82 90
@@ -229,10 +237,11 @@ const S32 KEY_COUNT = 256;
229const F32 DEFAULT_WATER_HEIGHT = 20.0f; 237const F32 DEFAULT_WATER_HEIGHT = 20.0f;
230 238
231// Maturity ratings for simulators 239// Maturity ratings for simulators
232const U8 SIM_ACCESS_MIN = 0; 240const U8 SIM_ACCESS_MIN = 0; // Treated as 'unknown', usually ends up being SIM_ACCESS_PG
233const U8 SIM_ACCESS_TRIAL = 7; 241const U8 SIM_ACCESS_TRIAL = 7;
234const U8 SIM_ACCESS_PG = 13; 242const U8 SIM_ACCESS_PG = 13;
235const U8 SIM_ACCESS_MATURE = 21; 243const U8 SIM_ACCESS_MATURE = 21;
244const U8 SIM_ACCESS_ADULT = 42; // Seriously Adult Only
236const U8 SIM_ACCESS_DOWN = 254; 245const U8 SIM_ACCESS_DOWN = 254;
237const U8 SIM_ACCESS_MAX = SIM_ACCESS_MATURE; 246const U8 SIM_ACCESS_MAX = SIM_ACCESS_MATURE;
238 247
@@ -251,6 +260,7 @@ const U8 GOD_NOT = 0;
251const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb"); 260const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
252 261
253// Governor Linden's agent id. 262// Governor Linden's agent id.
263const LLUUID ALEXANDRIA_LINDEN_ID("ba2a564a-f0f1-4b82-9c61-b7520bfcd09f");
254const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); 264const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
255const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); 265const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
256// Maintenance's group id. 266// Maintenance's group id.
diff --git a/linden/indra/llcommon/llkeythrottle.h b/linden/indra/llcommon/llkeythrottle.h
index eb1519a..25d0fe0 100644
--- a/linden/indra/llcommon/llkeythrottle.h
+++ b/linden/indra/llcommon/llkeythrottle.h
@@ -243,7 +243,7 @@ public:
243 } 243 }
244 244
245 // Set the throttling behavior 245 // Set the throttling behavior
246 void setParameters( U32 limit, F32 interval, BOOL realtime ) 246 void setParameters( U32 limit, F32 interval, BOOL realtime = TRUE )
247 { 247 {
248 // limit is the maximum number of keys 248 // limit is the maximum number of keys
249 // allowed per interval (in seconds or frames) 249 // allowed per interval (in seconds or frames)
diff --git a/linden/indra/llcommon/llstat.cpp b/linden/indra/llcommon/llstat.cpp
index 4b79fcb..706acdb 100644
--- a/linden/indra/llcommon/llstat.cpp
+++ b/linden/indra/llcommon/llstat.cpp
@@ -31,55 +31,288 @@
31#include "linden_common.h" 31#include "linden_common.h"
32 32
33#include "llstat.h" 33#include "llstat.h"
34#include "lllivefile.h"
35#include "llerrorcontrol.h"
34#include "llframetimer.h" 36#include "llframetimer.h"
35#include "timing.h" 37#include "timing.h"
38#include "llsd.h"
39#include "llsdserialize.h"
40#include "llstl.h"
41#include "u64.h"
36 42
37class LLStatAccum::impl 43
44// statics
45BOOL LLPerfBlock::sStatsEnabled = FALSE; // Flag for detailed information
46LLPerfBlock::stat_map_t LLPerfBlock::sStatMap; // Map full path string to LLStatTime objects, tracks all active objects
47std::string LLPerfBlock::sCurrentStatPath = ""; // Something like "/total_time/physics/physics step"
48
49//------------------------------------------------------------------------
50// Live config file to trigger stats logging
51static const char STATS_CONFIG_FILE_NAME[] = "/dev/shm/simperf/simperf_proc_config.llsd";
52static const F32 STATS_CONFIG_REFRESH_RATE = 5.0; // seconds
53
54class LLStatsConfigFile : public LLLiveFile
38{ 55{
39public: 56public:
40 static const TimeScale IMPL_NUM_SCALES = (TimeScale)(SCALE_TWO_MINUTE + 1); 57 LLStatsConfigFile()
41 static U64 sScaleTimes[IMPL_NUM_SCALES]; 58 : LLLiveFile(filename(), STATS_CONFIG_REFRESH_RATE),
59 mChanged(false), mStatsp(NULL) { }
42 60
43 BOOL mUseFrameTimer; 61 static std::string filename();
62
63protected:
64 /* virtual */ void loadFile();
44 65
45 BOOL mRunning; 66public:
46 U64 mLastTime; 67 void init(LLPerfStats* statsp);
47 68 static LLStatsConfigFile& instance();
48 struct Bucket 69 // return the singleton stats config file
49 {
50 F64 accum;
51 U64 endTime;
52 70
53 BOOL lastValid; 71 bool mChanged;
54 F64 lastAccum;
55 };
56 72
57 Bucket mBuckets[IMPL_NUM_SCALES]; 73protected:
74 LLPerfStats* mStatsp;
75};
58 76
59 BOOL mLastSampleValid; 77std::string LLStatsConfigFile::filename()
60 F64 mLastSampleValue; 78{
79 return STATS_CONFIG_FILE_NAME;
80}
61 81
82void LLStatsConfigFile::init(LLPerfStats* statsp)
83{
84 mStatsp = statsp;
85}
62 86
63 impl(bool useFrameTimer); 87LLStatsConfigFile& LLStatsConfigFile::instance()
88{
89 static LLStatsConfigFile the_file;
90 return the_file;
91}
64 92
65 void reset(U64 when);
66 93
67 void sum(F64 value); 94/* virtual */
68 void sum(F64 value, U64 when); 95// Load and parse the stats configuration file
96void LLStatsConfigFile::loadFile()
97{
98 if (!mStatsp)
99 {
100 llwarns << "Tries to load performance configure file without initializing LPerfStats" << llendl;
101 return;
102 }
103 mChanged = true;
104
105 LLSD stats_config;
106 {
107 llifstream file(filename().c_str());
108 if (file.is_open())
109 {
110 LLSDSerialize::fromXML(stats_config, file);
111 if (stats_config.isUndefined())
112 {
113 llinfos << "Performance statistics configuration file ill-formed, not recording statistics" << llendl;
114 mStatsp->setReportPerformanceDuration( 0.f );
115 return;
116 }
117 }
118 else
119 { // File went away, turn off stats if it was on
120 if ( mStatsp->frameStatsIsRunning() )
121 {
122 llinfos << "Performance statistics configuration file deleted, not recording statistics" << llendl;
123 mStatsp->setReportPerformanceDuration( 0.f );
124 }
125 return;
126 }
127 }
128
129 F32 duration = 0.f;
130 F32 interval = 0.f;
131
132 const char * w = "duration";
133 if (stats_config.has(w))
134 {
135 duration = (F32)stats_config[w].asReal();
136 }
137 w = "interval";
138 if (stats_config.has(w))
139 {
140 interval = (F32)stats_config[w].asReal();
141 }
142
143 mStatsp->setReportPerformanceDuration( duration );
144 mStatsp->setReportPerformanceInterval( interval );
145
146 if ( duration > 0 )
147 {
148 if ( interval == 0.f )
149 {
150 llinfos << "Recording performance stats every frame for " << duration << " sec" << llendl;
151 }
152 else
153 {
154 llinfos << "Recording performance stats every " << interval << " seconds for " << duration << " seconds" << llendl;
155 }
156 }
157 else
158 {
159 llinfos << "Performance stats recording turned off" << llendl;
160 }
161}
69 162
70 F32 meanValue(TimeScale scale) const;
71 163
72 U64 getCurrentUsecs() const; 164//------------------------------------------------------------------------
73 // Get current microseconds based on timer type
74};
75 165
166LLPerfStats::LLPerfStats(const std::string& process_name, S32 process_pid) :
167 mFrameStatsFileFailure(FALSE),
168 mSkipFirstFrameStats(FALSE),
169 mProcessName(process_name),
170 mProcessPID(process_pid),
171 mReportPerformanceStatInterval(1.f),
172 mReportPerformanceStatEnd(0.0)
173{ }
76 174
77U64 LLStatAccum::impl::sScaleTimes[IMPL_NUM_SCALES] = 175LLPerfStats::~LLPerfStats()
176{
177 LLPerfBlock::clearDynamicStats();
178 mFrameStatsFile.close();
179}
180
181void LLPerfStats::init()
182{
183 // Initialize the stats config file instance.
184 (void) LLStatsConfigFile::instance().init(this);
185 (void) LLStatsConfigFile::instance().checkAndReload();
186}
187
188// Open file for statistics
189void LLPerfStats::openPerfStatsFile()
190{
191 if ( !mFrameStatsFile
192 && !mFrameStatsFileFailure )
193 {
194 std::string stats_file = llformat("/dev/shm/simperf/%s_proc.%d.llsd", mProcessName.c_str(), mProcessPID);
195 mFrameStatsFile.close();
196 mFrameStatsFile.clear();
197 mFrameStatsFile.open(stats_file, llofstream::out);
198 if ( mFrameStatsFile.fail() )
199 {
200 llinfos << "Error opening statistics log file " << stats_file << llendl;
201 mFrameStatsFileFailure = TRUE;
202 }
203 else
204 {
205 LLSD process_info = LLSD::emptyMap();
206 process_info["name"] = mProcessName;
207 process_info["pid"] = (LLSD::Integer) mProcessPID;
208 process_info["stat_rate"] = (LLSD::Integer) mReportPerformanceStatInterval;
209 // Add process-specific info.
210 addProcessHeaderInfo(process_info);
211
212 mFrameStatsFile << LLSDNotationStreamer(process_info) << std::endl;
213 }
214 }
215}
216
217// Dump out performance metrics over some time interval
218void LLPerfStats::dumpIntervalPerformanceStats()
219{
220 // Ensure output file is OK
221 openPerfStatsFile();
222
223 if ( mFrameStatsFile )
224 {
225 LLSD stats = LLSD::emptyMap();
226
227 LLStatAccum::TimeScale scale;
228 if ( getReportPerformanceInterval() == 0.f )
229 {
230 scale = LLStatAccum::SCALE_PER_FRAME;
231 }
232 else if ( getReportPerformanceInterval() < 0.5f )
233 {
234 scale = LLStatAccum::SCALE_100MS;
235 }
236 else
237 {
238 scale = LLStatAccum::SCALE_SECOND;
239 }
240
241 // Write LLSD into log
242 stats["utc_time"] = (LLSD::String) LLError::utcTime();
243 stats["timestamp"] = U64_to_str((totalTime() / 1000) + (gUTCOffset * 1000)); // milliseconds since epoch
244 stats["frame_number"] = (LLSD::Integer) LLFrameTimer::getFrameCount();
245
246 // Add process-specific frame info.
247 addProcessFrameInfo(stats, scale);
248 LLPerfBlock::addStatsToLLSDandReset( stats, scale );
249
250 mFrameStatsFile << LLSDNotationStreamer(stats) << std::endl;
251 }
252}
253
254// Set length of performance stat recording
255void LLPerfStats::setReportPerformanceDuration( F32 seconds )
256{
257 if ( seconds <= 0.f )
258 {
259 mReportPerformanceStatEnd = 0.0;
260 LLPerfBlock::setStatsEnabled( FALSE );
261 mFrameStatsFile.close();
262 LLPerfBlock::clearDynamicStats();
263 }
264 else
265 {
266 mReportPerformanceStatEnd = LLFrameTimer::getElapsedSeconds() + ((F64) seconds);
267 // Clear failure flag to try and create the log file once
268 mFrameStatsFileFailure = FALSE;
269 LLPerfBlock::setStatsEnabled( TRUE );
270 mSkipFirstFrameStats = TRUE; // Skip the first report (at the end of this frame)
271 }
272}
273
274void LLPerfStats::updatePerFrameStats()
275{
276 (void) LLStatsConfigFile::instance().checkAndReload();
277 static LLFrameTimer performance_stats_timer;
278 if ( frameStatsIsRunning() )
279 {
280 if ( mReportPerformanceStatInterval == 0 )
281 { // Record info every frame
282 if ( mSkipFirstFrameStats )
283 { // Skip the first time - was started this frame
284 mSkipFirstFrameStats = FALSE;
285 }
286 else
287 {
288 dumpIntervalPerformanceStats();
289 }
290 }
291 else
292 {
293 performance_stats_timer.setTimerExpirySec( getReportPerformanceInterval() );
294 if (performance_stats_timer.checkExpirationAndReset( mReportPerformanceStatInterval ))
295 {
296 dumpIntervalPerformanceStats();
297 }
298 }
299
300 if ( LLFrameTimer::getElapsedSeconds() > mReportPerformanceStatEnd )
301 { // Reached end of time, clear it to stop reporting
302 setReportPerformanceDuration(0.f); // Don't set mReportPerformanceStatEnd directly
303 llinfos << "Recording performance stats completed" << llendl;
304 }
305 }
306}
307
308
309//------------------------------------------------------------------------
310
311U64 LLStatAccum::sScaleTimes[NUM_SCALES] =
78{ 312{
79 USEC_PER_SEC / 10, // 100 millisec 313 USEC_PER_SEC / 10, // 100 millisec
80 USEC_PER_SEC * 1, // seconds 314 USEC_PER_SEC * 1, // seconds
81 USEC_PER_SEC * 60, // minutes 315 USEC_PER_SEC * 60, // minutes
82 USEC_PER_SEC * 60 * 2 // two minutes
83#if ENABLE_LONG_TIME_STATS 316#if ENABLE_LONG_TIME_STATS
84 // enable these when more time scales are desired 317 // enable these when more time scales are desired
85 USEC_PER_SEC * 60*60, // hours 318 USEC_PER_SEC * 60*60, // hours
@@ -89,19 +322,27 @@ U64 LLStatAccum::impl::sScaleTimes[IMPL_NUM_SCALES] =
89}; 322};
90 323
91 324
92LLStatAccum::impl::impl(bool useFrameTimer) 325
326LLStatAccum::LLStatAccum(bool useFrameTimer)
327 : mUseFrameTimer(useFrameTimer),
328 mRunning(FALSE),
329 mLastSampleValue(0.0),
330 mLastSampleValid(FALSE)
331{
332}
333
334LLStatAccum::~LLStatAccum()
93{ 335{
94 mUseFrameTimer = useFrameTimer;
95 mRunning = FALSE;
96 mLastSampleValid = FALSE;
97} 336}
98 337
99void LLStatAccum::impl::reset(U64 when) 338
339
340void LLStatAccum::reset(U64 when)
100{ 341{
101 mRunning = TRUE; 342 mRunning = TRUE;
102 mLastTime = when; 343 mLastTime = when;
103 344
104 for (int i = 0; i < IMPL_NUM_SCALES; ++i) 345 for (int i = 0; i < NUM_SCALES; ++i)
105 { 346 {
106 mBuckets[i].accum = 0.0; 347 mBuckets[i].accum = 0.0;
107 mBuckets[i].endTime = when + sScaleTimes[i]; 348 mBuckets[i].endTime = when + sScaleTimes[i];
@@ -109,12 +350,12 @@ void LLStatAccum::impl::reset(U64 when)
109 } 350 }
110} 351}
111 352
112void LLStatAccum::impl::sum(F64 value) 353void LLStatAccum::sum(F64 value)
113{ 354{
114 sum(value, getCurrentUsecs()); 355 sum(value, getCurrentUsecs());
115} 356}
116 357
117void LLStatAccum::impl::sum(F64 value, U64 when) 358void LLStatAccum::sum(F64 value, U64 when)
118{ 359{
119 if (!mRunning) 360 if (!mRunning)
120 { 361 {
@@ -131,7 +372,10 @@ void LLStatAccum::impl::sum(F64 value, U64 when)
131 return; 372 return;
132 } 373 }
133 374
134 for (int i = 0; i < IMPL_NUM_SCALES; ++i) 375 // how long is this value for
376 U64 timeSpan = when - mLastTime;
377
378 for (int i = 0; i < NUM_SCALES; ++i)
135 { 379 {
136 Bucket& bucket = mBuckets[i]; 380 Bucket& bucket = mBuckets[i];
137 381
@@ -143,8 +387,6 @@ void LLStatAccum::impl::sum(F64 value, U64 when)
143 { 387 {
144 U64 timeScale = sScaleTimes[i]; 388 U64 timeScale = sScaleTimes[i];
145 389
146 U64 timeSpan = when - mLastTime;
147 // how long is this value for
148 U64 timeLeft = when - bucket.endTime; 390 U64 timeLeft = when - bucket.endTime;
149 // how much time is left after filling this bucket 391 // how much time is left after filling this bucket
150 392
@@ -173,13 +415,18 @@ void LLStatAccum::impl::sum(F64 value, U64 when)
173} 415}
174 416
175 417
176F32 LLStatAccum::impl::meanValue(TimeScale scale) const 418F32 LLStatAccum::meanValue(TimeScale scale) const
177{ 419{
178 if (!mRunning) 420 if (!mRunning)
179 { 421 {
180 return 0.0; 422 return 0.0;
181 } 423 }
182 if (scale < 0 || scale >= IMPL_NUM_SCALES) 424 if ( scale == SCALE_PER_FRAME )
425 { // Per-frame not supported here
426 scale = SCALE_100MS;
427 }
428
429 if (scale < 0 || scale >= NUM_SCALES)
183 { 430 {
184 llwarns << "llStatAccum::meanValue called for unsupported scale: " 431 llwarns << "llStatAccum::meanValue called for unsupported scale: "
185 << scale << llendl; 432 << scale << llendl;
@@ -209,7 +456,7 @@ F32 LLStatAccum::impl::meanValue(TimeScale scale) const
209} 456}
210 457
211 458
212U64 LLStatAccum::impl::getCurrentUsecs() const 459U64 LLStatAccum::getCurrentUsecs() const
213{ 460{
214 if (mUseFrameTimer) 461 if (mUseFrameTimer)
215 { 462 {
@@ -222,25 +469,44 @@ U64 LLStatAccum::impl::getCurrentUsecs() const
222} 469}
223 470
224 471
472// ------------------------------------------------------------------------
225 473
226 474LLStatRate::LLStatRate(bool use_frame_timer)
227 475 : LLStatAccum(use_frame_timer)
228LLStatAccum::LLStatAccum(bool useFrameTimer)
229 : m(* new impl(useFrameTimer))
230{ 476{
231} 477}
232 478
233LLStatAccum::~LLStatAccum() 479void LLStatRate::count(U32 value)
234{ 480{
235 delete &m; 481 sum((F64)value * sScaleTimes[SCALE_SECOND]);
236} 482}
237 483
238F32 LLStatAccum::meanValue(TimeScale scale) const 484
239{ 485void LLStatRate::mark()
240 return m.meanValue(scale); 486 {
241} 487 // Effectively the same as count(1), but sets mLastSampleValue
488 U64 when = getCurrentUsecs();
489
490 if ( mRunning
491 && (when > mLastTime) )
492 { // Set mLastSampleValue to the time from the last mark()
493 F64 duration = ((F64)(when - mLastTime)) / sScaleTimes[SCALE_SECOND];
494 if ( duration > 0.0 )
495 {
496 mLastSampleValue = 1.0 / duration;
497 }
498 else
499 {
500 mLastSampleValue = 0.0;
501 }
502 }
503
504 sum( (F64) sScaleTimes[SCALE_SECOND], when);
505 }
242 506
243 507
508// ------------------------------------------------------------------------
509
244 510
245LLStatMeasure::LLStatMeasure(bool use_frame_timer) 511LLStatMeasure::LLStatMeasure(bool use_frame_timer)
246 : LLStatAccum(use_frame_timer) 512 : LLStatAccum(use_frame_timer)
@@ -249,53 +515,209 @@ LLStatMeasure::LLStatMeasure(bool use_frame_timer)
249 515
250void LLStatMeasure::sample(F64 value) 516void LLStatMeasure::sample(F64 value)
251{ 517{
252 U64 when = m.getCurrentUsecs(); 518 U64 when = getCurrentUsecs();
253 519
254 if (m.mLastSampleValid) 520 if (mLastSampleValid)
255 { 521 {
256 F64 avgValue = (value + m.mLastSampleValue) / 2.0; 522 F64 avgValue = (value + mLastSampleValue) / 2.0;
257 F64 interval = (F64)(when - m.mLastTime); 523 F64 interval = (F64)(when - mLastTime);
258 524
259 m.sum(avgValue * interval, when); 525 sum(avgValue * interval, when);
260 } 526 }
261 else 527 else
262 { 528 {
263 m.reset(when); 529 reset(when);
264 } 530 }
265 531
266 m.mLastSampleValid = TRUE; 532 mLastSampleValid = TRUE;
267 m.mLastSampleValue = value; 533 mLastSampleValue = value;
268} 534}
269 535
270 536
271LLStatRate::LLStatRate(bool use_frame_timer) 537// ------------------------------------------------------------------------
272 : LLStatAccum(use_frame_timer) 538
539LLStatTime::LLStatTime(const std::string & key)
540 : LLStatAccum(false),
541 mFrameNumber(LLFrameTimer::getFrameCount()),
542 mTotalTimeInFrame(0),
543 mKey(key)
544#if LL_DEBUG
545 , mRunning(FALSE)
546#endif
273{ 547{
274} 548}
275 549
276void LLStatRate::count(U32 value) 550void LLStatTime::start()
551{
552 // Reset frame accumluation if the frame number has changed
553 U32 frame_number = LLFrameTimer::getFrameCount();
554 if ( frame_number != mFrameNumber )
555 {
556 mFrameNumber = frame_number;
557 mTotalTimeInFrame = 0;
558 }
559
560 sum(0.0);
561
562#if LL_DEBUG
563 // Shouldn't be running already
564 llassert( !mRunning );
565 mRunning = TRUE;
566#endif
567}
568
569void LLStatTime::stop()
570{
571 U64 end_time = getCurrentUsecs();
572 U64 duration = end_time - mLastTime;
573 sum(F64(duration), end_time);
574 //llinfos << "mTotalTimeInFrame incremented from " << mTotalTimeInFrame << " to " << (mTotalTimeInFrame + duration) << llendl;
575 mTotalTimeInFrame += duration;
576
577#if LL_DEBUG
578 mRunning = FALSE;
579#endif
580}
581
582/* virtual */ F32 LLStatTime::meanValue(TimeScale scale) const
277{ 583{
278 m.sum((F64)value * impl::sScaleTimes[SCALE_SECOND]); 584 if ( LLStatAccum::SCALE_PER_FRAME == scale )
585 {
586 return mTotalTimeInFrame;
587 }
588 else
589 {
590 return LLStatAccum::meanValue(scale);
591 }
279} 592}
280 593
281 594
282LLStatTime::LLStatTime(bool use_frame_timer) 595// ------------------------------------------------------------------------
283 : LLStatAccum(use_frame_timer) 596
597
598// Use this constructor for pre-defined LLStatTime objects
599LLPerfBlock::LLPerfBlock(LLStatTime* stat ) : mPredefinedStat(stat), mDynamicStat(NULL)
284{ 600{
601 if (mPredefinedStat)
602 {
603 // If dynamic stats are turned on, this will create a separate entry in the stat map.
604 initDynamicStat(mPredefinedStat->mKey);
605
606 // Start predefined stats. These stats are not part of the stat map.
607 mPredefinedStat->start();
608 }
285} 609}
286 610
287void LLStatTime::start() 611// Use this constructor for dynamically created LLStatTime objects (not pre-defined) with a multi-part key.
612// These are also turned on or off via the switch passed in
613LLPerfBlock::LLPerfBlock( const char* key1, const char* key2 ) : mPredefinedStat(NULL), mDynamicStat(NULL)
288{ 614{
289 m.sum(0.0); 615 if (!sStatsEnabled) return;
616
617 if (NULL == key2 || strlen(key2) == 0)
618 {
619 initDynamicStat(key1);
620 }
621 else
622 {
623 std::ostringstream key;
624 key << key1 << "_" << key2;
625 initDynamicStat(key.str());
626 }
290} 627}
291 628
292void LLStatTime::stop() 629void LLPerfBlock::initDynamicStat(const std::string& key)
630{
631 // Early exit if dynamic stats aren't enabled.
632 if (!sStatsEnabled) return;
633
634 mLastPath = sCurrentStatPath; // Save and restore current path
635 sCurrentStatPath += "/" + key; // Add key to current path
636
637 // See if the LLStatTime object already exists
638 stat_map_t::iterator iter = sStatMap.find(sCurrentStatPath);
639 if ( iter == sStatMap.end() )
640 {
641 // StatEntry object doesn't exist, so create it
642 mDynamicStat = new StatEntry( key );
643 sStatMap[ sCurrentStatPath ] = mDynamicStat; // Set the entry for this path
644 }
645 else
646 {
647 // Found this path in the map, use the object there
648 mDynamicStat = (*iter).second; // Get StatEntry for the current path
649 }
650
651 if (mDynamicStat)
652 {
653 mDynamicStat->mStat.start();
654 mDynamicStat->mCount++;
655 }
656 else
657 {
658 llwarns << "Initialized NULL dynamic stat at '" << sCurrentStatPath << "'" << llendl;
659 sCurrentStatPath = mLastPath;
660 }
661}
662
663
664// Destructor does the time accounting
665LLPerfBlock::~LLPerfBlock()
666{
667 if (mPredefinedStat) mPredefinedStat->stop();
668 if (mDynamicStat)
669 {
670 mDynamicStat->mStat.stop();
671 sCurrentStatPath = mLastPath; // Restore the path in case sStatsEnabled changed during this block
672 }
673}
674
675
676// Clear the map of any dynamic stats. Static routine
677void LLPerfBlock::clearDynamicStats()
678{
679 std::for_each(sStatMap.begin(), sStatMap.end(), DeletePairedPointer());
680 sStatMap.clear();
681}
682
683// static - Extract the stat info into LLSD
684void LLPerfBlock::addStatsToLLSDandReset( LLSD & stats,
685 LLStatAccum::TimeScale scale )
293{ 686{
294 U64 endTime = m.getCurrentUsecs(); 687 // If we aren't in per-frame scale, we need to go from second to microsecond.
295 m.sum((F64)(endTime - m.mLastTime), endTime); 688 U32 scale_adjustment = 1;
689 if (LLStatAccum::SCALE_PER_FRAME != scale)
690 {
691 scale_adjustment = USEC_PER_SEC;
692 }
693 stat_map_t::iterator iter = sStatMap.begin();
694 for ( ; iter != sStatMap.end(); ++iter )
695 { // Put the entry into LLSD "/full/path/to/stat/" = microsecond total time
696 const std::string & stats_full_path = (*iter).first;
697
698 StatEntry * stat = (*iter).second;
699 if (stat)
700 {
701 if (stat->mCount > 0)
702 {
703 stats[stats_full_path] = LLSD::emptyMap();
704 stats[stats_full_path]["us"] = (LLSD::Integer) (scale_adjustment * stat->mStat.meanValue(scale));
705 if (stat->mCount > 1)
706 {
707 stats[stats_full_path]["count"] = (LLSD::Integer) stat->mCount;
708 }
709 stat->mCount = 0;
710 }
711 }
712 else
713 { // WTF? Shouldn't have a NULL pointer in the map.
714 llwarns << "Unexpected NULL dynamic stat at '" << stats_full_path << "'" << llendl;
715 }
716 }
296} 717}
297 718
298 719
720// ------------------------------------------------------------------------
299 721
300LLTimer LLStat::sTimer; 722LLTimer LLStat::sTimer;
301LLFrameTimer LLStat::sFrameTimer; 723LLFrameTimer LLStat::sFrameTimer;
diff --git a/linden/indra/llcommon/llstat.h b/linden/indra/llcommon/llstat.h
index 0a7e014..63813e2 100644
--- a/linden/indra/llcommon/llstat.h
+++ b/linden/indra/llcommon/llstat.h
@@ -33,9 +33,13 @@
33#define LL_LLSTAT_H 33#define LL_LLSTAT_H
34 34
35#include <deque> 35#include <deque>
36#include <map>
36 37
37#include "lltimer.h" 38#include "lltimer.h"
38#include "llframetimer.h" 39#include "llframetimer.h"
40#include "llfile.h"
41
42class LLSD;
39 43
40// Set this if longer stats are needed 44// Set this if longer stats are needed
41#define ENABLE_LONG_TIME_STATS 0 45#define ENABLE_LONG_TIME_STATS 0
@@ -58,25 +62,50 @@ public:
58 SCALE_100MS, 62 SCALE_100MS,
59 SCALE_SECOND, 63 SCALE_SECOND,
60 SCALE_MINUTE, 64 SCALE_MINUTE,
61 SCALE_TWO_MINUTE,
62#if ENABLE_LONG_TIME_STATS 65#if ENABLE_LONG_TIME_STATS
63 SCALE_HOUR, 66 SCALE_HOUR,
64 SCALE_DAY, 67 SCALE_DAY,
65 SCALE_WEEK, 68 SCALE_WEEK,
66#endif 69#endif
67 NUM_SCALES 70 NUM_SCALES, // Use to size storage arrays
71 SCALE_PER_FRAME // For latest frame information - should be after NUM_SCALES since this doesn't go into the time buckets
68 }; 72 };
69 73
70 F32 meanValue(TimeScale scale) const; 74 static U64 sScaleTimes[NUM_SCALES];
75
76 virtual F32 meanValue(TimeScale scale) const;
71 // see the subclasses for the specific meaning of value 77 // see the subclasses for the specific meaning of value
72 78
73 F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); } 79 F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); }
74 F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); } 80 F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); }
75 F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); } 81 F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); }
76 82
77protected: 83 void reset(U64 when);
78 class impl; 84
79 impl& m; 85 void sum(F64 value);
86 void sum(F64 value, U64 when);
87
88 U64 getCurrentUsecs() const;
89 // Get current microseconds based on timer type
90
91 BOOL mUseFrameTimer;
92 BOOL mRunning;
93
94 U64 mLastTime;
95
96 struct Bucket
97 {
98 F64 accum;
99 U64 endTime;
100
101 BOOL lastValid;
102 F64 lastAccum;
103 };
104
105 Bucket mBuckets[NUM_SCALES];
106
107 BOOL mLastSampleValid;
108 F64 mLastSampleValue;
80}; 109};
81 110
82class LLStatMeasure : public LLStatAccum 111class LLStatMeasure : public LLStatAccum
@@ -105,39 +134,120 @@ public:
105 void count(U32); 134 void count(U32);
106 // used to note that n items have occured 135 // used to note that n items have occured
107 136
108 void mark() { count(1); } 137 void mark();
109 // used for counting the rate thorugh a point in the code 138 // used for counting the rate thorugh a point in the code
110}; 139};
111 140
112 141
113class LLTimeBlock;
114
115class LLStatTime : public LLStatAccum 142class LLStatTime : public LLStatAccum
116 // gathers statistics about time spent in a block of code 143 // gathers statistics about time spent in a block of code
117 // measure average duration per second in the block 144 // measure average duration per second in the block
118{ 145{
119public: 146public:
120 LLStatTime(bool use_frame_timer = false); 147 LLStatTime( const std::string & key = "undefined" );
148
149 U32 mFrameNumber; // Current frame number
150 U64 mTotalTimeInFrame; // Total time (microseconds) accumulated during the last frame
151
152 void setKey( const std::string & key ) { mKey = key; };
153
154 virtual F32 meanValue(TimeScale scale) const;
121 155
122private: 156private:
123 void start(); 157 void start(); // Start and stop measuring time block
124 void stop(); 158 void stop();
125 friend class LLTimeBlock; 159
160 std::string mKey; // Tag representing this time block
161
162#if LL_DEBUG
163 BOOL mRunning; // TRUE if start() has been called
164#endif
165
166 friend class LLPerfBlock;
126}; 167};
127 168
128class LLTimeBlock 169// ----------------------------------------------------------------------------
170
171
172// Use this class on the stack to record statistics about an area of code
173class LLPerfBlock
129{ 174{
130public: 175public:
131 LLTimeBlock(LLStatTime& stat) : mStat(stat) { mStat.start(); } 176 struct StatEntry
132 ~LLTimeBlock() { mStat.stop(); } 177 {
178 StatEntry(const std::string& key) : mStat(LLStatTime(key)), mCount(0) {}
179 LLStatTime mStat;
180 U32 mCount;
181 };
182 typedef std::map<std::string, StatEntry*> stat_map_t;
183
184 // Use this constructor for pre-defined LLStatTime objects
185 LLPerfBlock(LLStatTime* stat);
186
187 // Use this constructor for dynamically created LLStatTime objects (not pre-defined) with a multi-part key
188 LLPerfBlock( const char* key1, const char* key2 = NULL);
189
190
191 ~LLPerfBlock();
192
193 static void setStatsEnabled( BOOL enable ) { sStatsEnabled = enable; };
194 static S32 getStatsEnabled() { return sStatsEnabled; };
195
196 static void clearDynamicStats(); // Reset maps to clear out dynamic objects
197 static void addStatsToLLSDandReset( LLSD & stats, // Get current information and clear time bin
198 LLStatAccum::TimeScale scale );
199
133private: 200private:
134 LLStatTime& mStat; 201 // Initialize dynamically created LLStatTime objects
202 void initDynamicStat(const std::string& key);
203
204 std::string mLastPath; // Save sCurrentStatPath when this is called
205 LLStatTime * mPredefinedStat; // LLStatTime object to get data
206 StatEntry * mDynamicStat; // StatEntryobject to get data
207
208 static BOOL sStatsEnabled; // Normally FALSE
209 static stat_map_t sStatMap; // Map full path string to LLStatTime objects
210 static std::string sCurrentStatPath; // Something like "frame/physics/physics step"
135}; 211};
136 212
213// ----------------------------------------------------------------------------
137 214
215class LLPerfStats
216{
217public:
218 LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0);
219 virtual ~LLPerfStats();
220
221 virtual void init(); // Reset and start all stat timers
222 virtual void updatePerFrameStats();
223 // Override these function to add process-specific information to the performance log header and per-frame logging.
224 virtual void addProcessHeaderInfo(LLSD& info) { /* not implemented */ }
225 virtual void addProcessFrameInfo(LLSD& info, LLStatAccum::TimeScale scale) { /* not implemented */ }
226
227 // High-resolution frame stats
228 BOOL frameStatsIsRunning() { return (mReportPerformanceStatEnd > 0.); };
229 F32 getReportPerformanceInterval() const { return mReportPerformanceStatInterval; };
230 void setReportPerformanceInterval( F32 interval ) { mReportPerformanceStatInterval = interval; };
231 void setReportPerformanceDuration( F32 seconds );
232 void setProcessName(const std::string& process_name) { mProcessName = process_name; }
233 void setProcessPID(S32 process_pid) { mProcessPID = process_pid; }
138 234
235protected:
236 void openPerfStatsFile(); // Open file for high resolution metrics logging
237 void dumpIntervalPerformanceStats();
238
239 llofstream mFrameStatsFile; // File for per-frame stats
240 BOOL mFrameStatsFileFailure; // Flag to prevent repeat opening attempts
241 BOOL mSkipFirstFrameStats; // Flag to skip one (partial) frame report
242 std::string mProcessName;
243 S32 mProcessPID;
139 244
245private:
246 F32 mReportPerformanceStatInterval; // Seconds between performance stats
247 F64 mReportPerformanceStatEnd; // End time (seconds) for performance stats
248};
140 249
250// ----------------------------------------------------------------------------
141class LLStat 251class LLStat
142{ 252{
143public: 253public:
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index 4032c5b..4b99b71 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -45,6 +45,6 @@ const char * const IMP_VIEWER_NAME = "Imprudence";
45const S32 IMP_VERSION_MAJOR = 1; 45const S32 IMP_VERSION_MAJOR = 1;
46const S32 IMP_VERSION_MINOR = 1; 46const S32 IMP_VERSION_MINOR = 1;
47const S32 IMP_VERSION_PATCH = 0; 47const S32 IMP_VERSION_PATCH = 0;
48const char * const IMP_VERSION_TEST = "alpha"; 48const char * const IMP_VERSION_TEST = "RC1";
49 49
50#endif 50#endif
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp
index 4b2e810..4507d94 100644
--- a/linden/indra/llinventory/llinventory.cpp
+++ b/linden/indra/llinventory/llinventory.cpp
@@ -60,6 +60,9 @@ static const std::string INV_SALE_INFO_LABEL("sale_info");
60static const std::string INV_FLAGS_LABEL("flags"); 60static const std::string INV_FLAGS_LABEL("flags");
61static const std::string INV_CREATION_DATE_LABEL("created_at"); 61static const std::string INV_CREATION_DATE_LABEL("created_at");
62 62
63// key used by agent-inventory-service
64static const std::string INV_ASSET_TYPE_LABEL_WS("type_default");
65static const std::string INV_FOLDER_ID_LABEL_WS("category_id");
63///---------------------------------------------------------------------------- 66///----------------------------------------------------------------------------
64/// Local function declarations, constants, enums, and typedefs 67/// Local function declarations, constants, enums, and typedefs
65///---------------------------------------------------------------------------- 68///----------------------------------------------------------------------------
@@ -1092,11 +1095,13 @@ LLSD LLInventoryItem::asLLSD() const
1092 sd[INV_SHADOW_ID_LABEL] = shadow_id; 1095 sd[INV_SHADOW_ID_LABEL] = shadow_id;
1093 } 1096 }
1094 sd[INV_ASSET_TYPE_LABEL] = LLAssetType::lookup(mType); 1097 sd[INV_ASSET_TYPE_LABEL] = LLAssetType::lookup(mType);
1098 sd[INV_INVENTORY_TYPE_LABEL] = mInventoryType;
1095 const char* inv_type_str = LLInventoryType::lookup(mInventoryType); 1099 const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
1096 if(inv_type_str) 1100 if(inv_type_str)
1097 { 1101 {
1098 sd[INV_INVENTORY_TYPE_LABEL] = inv_type_str; 1102 sd[INV_INVENTORY_TYPE_LABEL] = inv_type_str;
1099 } 1103 }
1104 //sd[INV_FLAGS_LABEL] = (S32)mFlags;
1100 sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags); 1105 sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags);
1101 sd[INV_SALE_INFO_LABEL] = mSaleInfo; 1106 sd[INV_SALE_INFO_LABEL] = mSaleInfo;
1102 sd[INV_NAME_LABEL] = mName; 1107 sd[INV_NAME_LABEL] = mName;
@@ -1169,17 +1174,40 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
1169 w = INV_ASSET_TYPE_LABEL; 1174 w = INV_ASSET_TYPE_LABEL;
1170 if (sd.has(w)) 1175 if (sd.has(w))
1171 { 1176 {
1172 mType = LLAssetType::lookup(sd[w].asString()); 1177 if (sd[w].isString())
1178 {
1179 mType = LLAssetType::lookup(sd[w].asString().c_str());
1180 }
1181 else if (sd[w].isInteger())
1182 {
1183 S8 type = (U8)sd[w].asInteger();
1184 mType = static_cast<LLAssetType::EType>(type);
1185 }
1173 } 1186 }
1174 w = INV_INVENTORY_TYPE_LABEL; 1187 w = INV_INVENTORY_TYPE_LABEL;
1175 if (sd.has(w)) 1188 if (sd.has(w))
1176 { 1189 {
1177 mInventoryType = LLInventoryType::lookup(sd[w].asString()); 1190 if (sd[w].isString())
1191 {
1192 mInventoryType = LLInventoryType::lookup(sd[w].asString().c_str());
1193 }
1194 else if (sd[w].isInteger())
1195 {
1196 S8 type = (U8)sd[w].asInteger();
1197 mInventoryType = static_cast<LLInventoryType::EType>(type);
1198 }
1178 } 1199 }
1179 w = INV_FLAGS_LABEL; 1200 w = INV_FLAGS_LABEL;
1180 if (sd.has(w)) 1201 if (sd.has(w))
1181 { 1202 {
1182 mFlags = ll_U32_from_sd(sd[w]); 1203 if (sd[w].isBinary())
1204 {
1205 mFlags = ll_U32_from_sd(sd[w]);
1206 }
1207 else if(sd[w].isInteger())
1208 {
1209 mFlags = sd[w].asInteger();
1210 }
1183 } 1211 }
1184 w = INV_NAME_LABEL; 1212 w = INV_NAME_LABEL;
1185 if (sd.has(w)) 1213 if (sd.has(w))
@@ -1537,7 +1565,7 @@ bool LLInventoryCategory::fromLLSD(LLSD& sd)
1537{ 1565{
1538 std::string w; 1566 std::string w;
1539 1567
1540 w = INV_ITEM_ID_LABEL; 1568 w = INV_FOLDER_ID_LABEL_WS;
1541 if (sd.has(w)) 1569 if (sd.has(w))
1542 { 1570 {
1543 mUUID = sd[w]; 1571 mUUID = sd[w];
@@ -1553,6 +1581,13 @@ bool LLInventoryCategory::fromLLSD(LLSD& sd)
1553 S8 type = (U8)sd[w].asInteger(); 1581 S8 type = (U8)sd[w].asInteger();
1554 mPreferredType = static_cast<LLAssetType::EType>(type); 1582 mPreferredType = static_cast<LLAssetType::EType>(type);
1555 } 1583 }
1584 w = INV_ASSET_TYPE_LABEL_WS;
1585 if (sd.has(w))
1586 {
1587 S8 type = (U8)sd[w].asInteger();
1588 mPreferredType = static_cast<LLAssetType::EType>(type);
1589 }
1590
1556 w = INV_NAME_LABEL; 1591 w = INV_NAME_LABEL;
1557 if (sd.has(w)) 1592 if (sd.has(w))
1558 { 1593 {
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp
index 4895378..fef6b05 100644
--- a/linden/indra/llinventory/llsaleinfo.cpp
+++ b/linden/indra/llinventory/llsaleinfo.cpp
@@ -114,7 +114,16 @@ bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
114{ 114{
115 const char *w; 115 const char *w;
116 116
117 mSaleType = lookup(sd["sale_type"].asString().c_str()); 117 if (sd["sale_type"].isString())
118 {
119 mSaleType = lookup(sd["sale_type"].asString().c_str());
120 }
121 else if(sd["sale_type"].isInteger())
122 {
123 S8 type = (U8)sd["sale_type"].asInteger();
124 mSaleType = static_cast<LLSaleInfo::EForSale>(type);
125 }
126
118 mSalePrice = llclamp(sd["sale_price"].asInteger(), 0, S32_MAX); 127 mSalePrice = llclamp(sd["sale_price"].asInteger(), 0, S32_MAX);
119 w = "perm_mask"; 128 w = "perm_mask";
120 if (sd.has(w)) 129 if (sd.has(w))
diff --git a/linden/indra/llmath/CMakeLists.txt b/linden/indra/llmath/CMakeLists.txt
index 6a329fa..e5ec3e1 100644
--- a/linden/indra/llmath/CMakeLists.txt
+++ b/linden/indra/llmath/CMakeLists.txt
@@ -11,6 +11,8 @@ include_directories(
11 11
12set(llmath_SOURCE_FILES 12set(llmath_SOURCE_FILES
13 llbboxlocal.cpp 13 llbboxlocal.cpp
14 llcalc.cpp
15 llcalcparser.cpp
14 llcamera.cpp 16 llcamera.cpp
15 llcoordframe.cpp 17 llcoordframe.cpp
16 llline.cpp 18 llline.cpp
@@ -40,6 +42,8 @@ set(llmath_HEADER_FILES
40 camera.h 42 camera.h
41 coordframe.h 43 coordframe.h
42 llbboxlocal.h 44 llbboxlocal.h
45 llcalc.h
46 llcalcparser.h
43 llcamera.h 47 llcamera.h
44 llcoord.h 48 llcoord.h
45 llcoordframe.h 49 llcoordframe.h
diff --git a/linden/indra/llmath/llcalc.cpp b/linden/indra/llmath/llcalc.cpp
new file mode 100644
index 0000000..ff3f91f
--- /dev/null
+++ b/linden/indra/llmath/llcalc.cpp
@@ -0,0 +1,155 @@
1/*
2 * LLCalc.cpp
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#include "linden_common.h"
11
12#include "llcalc.h"
13
14#include <boost/spirit/core.hpp>
15#include <boost/spirit/error_handling.hpp>
16
17#include "llcalcparser.h"
18#include "llmath.h"
19
20
21// Variable names for use in the build floater
22const char* LLCalc::X_POS = "XP";
23const char* LLCalc::Y_POS = "YP";
24const char* LLCalc::Z_POS = "ZP";
25const char* LLCalc::X_SCALE = "XS";
26const char* LLCalc::Y_SCALE = "YS";
27const char* LLCalc::Z_SCALE = "ZS";
28const char* LLCalc::X_ROT = "XR";
29const char* LLCalc::Y_ROT = "YR";
30const char* LLCalc::Z_ROT = "ZR";
31const char* LLCalc::HOLLOW = "HLW";
32const char* LLCalc::CUT_BEGIN = "CB";
33const char* LLCalc::CUT_END = "CE";
34const char* LLCalc::PATH_BEGIN = "PB";
35const char* LLCalc::PATH_END = "PE";
36const char* LLCalc::TWIST_BEGIN = "TB";
37const char* LLCalc::TWIST_END = "TE";
38const char* LLCalc::X_SHEAR = "XSH";
39const char* LLCalc::Y_SHEAR = "YSH";
40const char* LLCalc::X_TAPER = "XTP";
41const char* LLCalc::Y_TAPER = "YTP";
42const char* LLCalc::RADIUS_OFFSET = "ROF";
43const char* LLCalc::REVOLUTIONS = "REV";
44const char* LLCalc::SKEW = "SKW";
45const char* LLCalc::X_HOLE = "XHL";
46const char* LLCalc::Y_HOLE = "YHL";
47const char* LLCalc::TEX_U_SCALE = "TSU";
48const char* LLCalc::TEX_V_SCALE = "TSV";
49const char* LLCalc::TEX_U_OFFSET = "TOU";
50const char* LLCalc::TEX_V_OFFSET = "TOV";
51const char* LLCalc::TEX_ROTATION = "TROT";
52const char* LLCalc::TEX_TRANSPARENCY = "TRNS";
53const char* LLCalc::TEX_GLOW = "GLOW";
54
55
56LLCalc* LLCalc::sInstance = NULL;
57
58LLCalc::LLCalc() : mLastErrorPos(0)
59{
60// mUserVariables = new calc_map_t;
61 mVariables = new calc_map_t;
62 mConstants = new calc_map_t;
63
64 // Init table of constants
65 (*mConstants)["PI"] = F_PI;
66 (*mConstants)["TWO_PI"] = F_TWO_PI;
67 (*mConstants)["PI_BY_TWO"] = F_PI_BY_TWO;
68 (*mConstants)["SQRT2"] = F_SQRT2;
69 (*mConstants)["DEG_TO_RAD"] = DEG_TO_RAD;
70 (*mConstants)["RAD_TO_DEG"] = RAD_TO_DEG;
71 (*mConstants)["GRAVITY"] = GRAVITY;
72}
73
74LLCalc::~LLCalc()
75{
76 delete mConstants;
77 delete mVariables;
78// delete mUserVariables;
79}
80
81//static
82void LLCalc::cleanUp()
83{
84 delete sInstance;
85 sInstance = NULL;
86}
87
88//static
89LLCalc* LLCalc::getInstance()
90{
91 if (!sInstance) sInstance = new LLCalc();
92 return sInstance;
93}
94
95void LLCalc::setVar(const std::string& name, const F32& value)
96{
97 (*mVariables)[name] = value;
98}
99
100void LLCalc::clearVar(const std::string& name)
101{
102 mVariables->erase(name);
103}
104
105void LLCalc::clearAllVariables()
106{
107 mVariables->clear();
108}
109
110/*
111void LLCalc::updateVariables(LLSD& vars)
112{
113 LLSD::map_iterator cIt = vars.beginMap();
114 for(; cIt != vars.endMap(); cIt++)
115 {
116 setVar(cIt->first, (F32)(LLSD::Real)cIt->second);
117 }
118}
119*/
120
121bool LLCalc::evalString(const std::string& expression, F32& result)
122{
123 using namespace boost::spirit;
124
125 std::string expr_upper = expression;
126 LLStringUtil::toUpper(expr_upper);
127
128 LLCalcParser calc(result, mConstants, mVariables);
129
130 mLastErrorPos = 0;
131 std::string::iterator start = expr_upper.begin();
132 parse_info<std::string::iterator> info;
133
134 try
135 {
136 info = parse(start, expr_upper.end(), calc, space_p);
137 lldebugs << "Math expression: " << expression << " = " << result << llendl;
138 }
139 catch(parser_error<std::string, std::string::iterator> &e)
140 {
141 mLastErrorPos = e.where - expr_upper.begin();
142
143 llinfos << "Calc parser exception: " << e.descriptor << " at " << mLastErrorPos << " in expression: " << expression << llendl;
144 return false;
145 }
146
147 if (!info.full)
148 {
149 mLastErrorPos = info.stop - expr_upper.begin();
150 llinfos << "Unhandled syntax error at " << mLastErrorPos << " in expression: " << expression << llendl;
151 return false;
152 }
153
154 return true;
155}
diff --git a/linden/indra/llmath/llcalc.h b/linden/indra/llmath/llcalc.h
new file mode 100644
index 0000000..a376895
--- /dev/null
+++ b/linden/indra/llmath/llcalc.h
@@ -0,0 +1,85 @@
1/*
2 * LLCalc.h
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#ifndef LL_CALC_H
11#define LL_CALC_H
12
13#include <map>
14#include <string>
15
16//#include "llsd.h"
17
18class LLCalc
19{
20public:
21 LLCalc();
22 ~LLCalc();
23
24 // Variable name constants
25 static const char* X_POS;
26 static const char* Y_POS;
27 static const char* Z_POS;
28 static const char* X_SCALE;
29 static const char* Y_SCALE;
30 static const char* Z_SCALE;
31 static const char* X_ROT;
32 static const char* Y_ROT;
33 static const char* Z_ROT;
34 static const char* HOLLOW;
35 static const char* CUT_BEGIN;
36 static const char* CUT_END;
37 static const char* PATH_BEGIN;
38 static const char* PATH_END;
39 static const char* TWIST_BEGIN;
40 static const char* TWIST_END;
41 static const char* X_SHEAR;
42 static const char* Y_SHEAR;
43 static const char* X_TAPER;
44 static const char* Y_TAPER;
45 static const char* RADIUS_OFFSET;
46 static const char* REVOLUTIONS;
47 static const char* SKEW;
48 static const char* X_HOLE;
49 static const char* Y_HOLE;
50 static const char* TEX_U_SCALE;
51 static const char* TEX_V_SCALE;
52 static const char* TEX_U_OFFSET;
53 static const char* TEX_V_OFFSET;
54 static const char* TEX_ROTATION;
55 static const char* TEX_TRANSPARENCY;
56 static const char* TEX_GLOW;
57
58 void setVar(const std::string& name, const F32& value);
59 void clearVar(const std::string& name);
60 void clearAllVariables();
61// void updateVariables(LLSD& vars);
62
63 bool evalString(const std::string& expression, F32& result);
64 std::string::size_type getLastErrorPos() { return mLastErrorPos; }
65
66 static LLCalc* getInstance();
67 static void cleanUp();
68
69 typedef std::map<std::string, F32> calc_map_t;
70
71private:
72 std::string::size_type mLastErrorPos;
73
74 calc_map_t* mConstants;
75 calc_map_t* mVariables;
76
77 // *TODO: Add support for storing user defined variables, and stored functions.
78 // Will need UI work, and a means to save them between sessions.
79// calc_map_t* mUserVariables;
80
81 // "There shall be only one"
82 static LLCalc* sInstance;
83};
84
85#endif // LL_CALC_H
diff --git a/linden/indra/llmath/llcalcparser.cpp b/linden/indra/llmath/llcalcparser.cpp
new file mode 100644
index 0000000..1546c09
--- /dev/null
+++ b/linden/indra/llmath/llcalcparser.cpp
@@ -0,0 +1,45 @@
1/*
2 * LLCalcParser.cpp
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#include "linden_common.h"
11
12#include "llcalcparser.h"
13
14F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const
15{
16 LLCalc::calc_map_t::iterator iter;
17
18 std::string name(start, end);
19
20 if (mConstants)
21 {
22 iter = mConstants->find(name);
23 if (iter != mConstants->end())
24 {
25 return (*iter).second;
26 }
27 }
28 else
29 {
30 // This should never happen!
31 boost::spirit::throw_(end, std::string("Missing constants table"));
32 }
33
34 if (mVariables)
35 {
36 iter = mVariables->find(name);
37 if (iter != mVariables->end())
38 {
39 return (*iter).second;
40 }
41 }
42
43 boost::spirit::throw_(end, std::string("Unknown symbol " + name));
44 return 0.f;
45}
diff --git a/linden/indra/llmath/llcalcparser.h b/linden/indra/llmath/llcalcparser.h
new file mode 100644
index 0000000..c405b62
--- /dev/null
+++ b/linden/indra/llmath/llcalcparser.h
@@ -0,0 +1,155 @@
1/*
2 * LLCalcParser.h
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#ifndef LL_CALCPARSER_H
11#define LL_CALCPARSER_H
12
13#include <boost/spirit/attribute.hpp>
14#include <boost/spirit/core.hpp>
15#include <boost/spirit/error_handling.hpp>
16#include <boost/spirit/iterator/position_iterator.hpp>
17#include <boost/spirit/phoenix/binders.hpp>
18//#include <boost/spirit/symbols/symbols.hpp>
19#include <map>
20#include <string>
21
22#include "llcalc.h"
23#include "llmath.h"
24
25struct LLCalcParser : boost::spirit::grammar<LLCalcParser>
26{
27 LLCalcParser(F32& result, LLCalc::calc_map_t* constants, LLCalc::calc_map_t* vars) :
28 mResult(result), mConstants(constants), mVariables(vars) {};
29
30 struct value_closure : boost::spirit::closure<value_closure, F32>
31 {
32 member1 value;
33 };
34
35 template <typename ScannerT>
36 struct definition
37 {
38 // Rule declarations
39 boost::spirit::rule<ScannerT> statement, identifier;
40 boost::spirit::rule<ScannerT, value_closure::context_t> expression, term,
41 power,
42 unary_expr,
43 factor,
44 /*unary_func,
45 /binary_func,*/
46 group;
47
48 // start() should return the starting symbol
49 boost::spirit::rule<ScannerT> const& start() const { return statement; }
50
51 definition(LLCalcParser const& self)
52 {
53 using namespace boost::spirit;
54 using namespace phoenix;
55
56 assertion<std::string> assert_domain("Domain error");
57// assertion<std::string> assert_symbol("Unknown symbol");
58 assertion<std::string> assert_syntax("Syntax error");
59
60 identifier =
61 lexeme_d[(alpha_p | '_') >> *(alnum_p | '_')]
62 ;
63
64 group =
65 '(' >> expression[group.value = arg1] >> assert_syntax(ch_p(')'))
66 ;
67
68 /*unary_func =
69 ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&sin)(DEG_TO_RAD * arg1)]) |
70 (str_p("COS") >> '(' >> expression[unary_func.value = bind(&cos)(DEG_TO_RAD * arg1)]) |
71 (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&tan)(DEG_TO_RAD * arg1)]) |
72 (str_p("ASIN") >> '(' >> expression[unary_func.value = (bind(&asin)(arg1)) * RAD_TO_DEG]) |
73 (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&acos)(arg1) * RAD_TO_DEG]) |
74 (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&atan)(arg1) * RAD_TO_DEG]) |
75 (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&sqrt)(arg1)]) |
76 (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&log)(arg1)]) |
77 (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&exp)(arg1)]) |
78 (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&fabs)(arg1)])
79 ) >> assert_syntax(ch_p(')'))
80 ;
81
82 binary_func =
83 ((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
84 expression[binary_func.value = bind(&atan2)(binary_func.value, arg1) * RAD_TO_DEG]) |
85 (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
86 expression[binary_func.value = bind(&LLCalcParser::min)(self, binary_func.value, arg1)]) |
87 (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
88 expression[binary_func.value = bind(&LLCalcParser::max)(self, binary_func.value, arg1)])
89 ) >> assert_syntax(ch_p(')'))
90 ;*/
91
92 // *TODO: Localisation of the decimal point?
93 // Problem, LLLineEditor::postvalidateFloat accepts a comma when appropriate
94 // for the current locale. However to do that here could clash with using
95 // the comma as a separator when passing arguments to functions.
96 factor =
97 (ureal_p[factor.value = arg1] |
98 group[factor.value = arg1] |
99 /*unary_func[factor.value = arg1] |
100 binary_func[factor.value = arg1] |*/
101 // Lookup throws an Unknown Symbol error if it is unknown, while this works fine,
102 // would be "neater" to handle symbol lookup from here with an assertive parser.
103// constants_p[factor.value = arg1]|
104 identifier[factor.value = bind(&LLCalcParser::lookup)(self, arg1, arg2)]
105 ) >>
106 // Detect and throw math errors.
107 assert_domain(eps_p(bind(&LLCalcParser::checkNaN)(self, factor.value)))
108 ;
109
110 unary_expr =
111 !ch_p('+') >> factor[unary_expr.value = arg1] |
112 '-' >> factor[unary_expr.value = -arg1]
113 ;
114
115 power =
116 unary_expr[power.value = arg1] >>
117 *('^' >> assert_syntax(unary_expr[power.value = bind(&powf)(power.value, arg1)]))
118 ;
119
120 term =
121 power[term.value = arg1] >>
122 *(('*' >> assert_syntax(power[term.value *= arg1])) |
123 ('/' >> assert_syntax(power[term.value /= arg1]))
124 )
125 ;
126
127 expression =
128 assert_syntax(term[expression.value = arg1]) >>
129 *(('+' >> assert_syntax(term[expression.value += arg1])) |
130 ('-' >> assert_syntax(term[expression.value -= arg1]))
131 )
132 ;
133
134 statement =
135 !ch_p('=') >> ( expression )[var(self.mResult) = arg1] >> (end_p)
136 ;
137 }
138 };
139
140private:
141 // Member functions for semantic actions
142 F32 lookup(const std::string::iterator&, const std::string::iterator&) const;
143 F32 min(const F32& a, const F32& b) const { return llmin(a, b); }
144 F32 max(const F32& a, const F32& b) const { return llmax(a, b); }
145
146 bool checkNaN(const F32& a) const { return !llisnan(a); }
147
148 LLCalc::calc_map_t* mConstants;
149 LLCalc::calc_map_t* mVariables;
150// LLCalc::calc_map_t* mUserVariables;
151
152 F32& mResult;
153};
154
155#endif // LL_CALCPARSER_H
diff --git a/linden/indra/llmath/llmodularmath.h b/linden/indra/llmath/llmodularmath.h
new file mode 100644
index 0000000..67083ea
--- /dev/null
+++ b/linden/indra/llmath/llmodularmath.h
@@ -0,0 +1,57 @@
1/**
2 * @file llmodularmath.h
3 * @brief Useful modular math functions.
4 *
5 * $LicenseInfo:firstyear=2008&license=viewergpl$
6 *
7 * Copyright (c) 2008-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#ifndef LLMODULARMATH_H
33#define LLMODULARMATH_H
34
35namespace LLModularMath
36{
37 // Return difference between lhs and rhs
38 // treating the U32 operands and result
39 // as unsigned values of given width.
40 template<int width>
41 inline U32 subtract(U32 lhs, U32 rhs)
42 {
43 // Generate a bit mask which will truncate
44 // unsigned values to given width at compile time.
45 const U32 mask = (1 << width) - 1;
46
47 // Operands are unsigned, so modular
48 // arithmetic applies. If lhs < rhs,
49 // difference will wrap in to lower
50 // bits of result, which is then masked
51 // to give a value that can be represented
52 // by an unsigned value of width bits.
53 return mask & (lhs - rhs);
54 }
55}
56
57#endif
diff --git a/linden/indra/llmessage/llcircuit.cpp b/linden/indra/llmessage/llcircuit.cpp
index 12a1520..7b2f241 100644
--- a/linden/indra/llmessage/llcircuit.cpp
+++ b/linden/indra/llmessage/llcircuit.cpp
@@ -60,6 +60,7 @@
60#include "llrand.h" 60#include "llrand.h"
61#include "llstl.h" 61#include "llstl.h"
62#include "lltransfermanager.h" 62#include "lltransfermanager.h"
63#include "llmodularmath.h"
63 64
64const F32 PING_INTERVAL = 5.f; // seconds 65const F32 PING_INTERVAL = 5.f; // seconds
65const S32 PING_START_BLOCK = 3; // How many pings behind we have to be to consider ourself blocked. 66const S32 PING_START_BLOCK = 3; // How many pings behind we have to be to consider ourself blocked.
@@ -676,6 +677,8 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
676 mPacketsIn++; 677 mPacketsIn++;
677 setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID); 678 setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID);
678 679
680 mLastPacketGap = 0;
681 mOutOfOrderRate.count(0);
679 return; 682 return;
680 } 683 }
681 684
@@ -683,6 +686,7 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
683 686
684 687
685 // now, check to see if we've got a gap 688 // now, check to see if we've got a gap
689 U32 gap = 0;
686 if ((mPacketsInID == id)) 690 if ((mPacketsInID == id))
687 { 691 {
688 // nope! bump and wrap the counter, then return 692 // nope! bump and wrap the counter, then return
@@ -704,6 +708,11 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
704 // otherwise, walk from mCurrentCircuit->mPacketsInID to id with wrapping, adding the values to the map 708 // otherwise, walk from mCurrentCircuit->mPacketsInID to id with wrapping, adding the values to the map
705 // and setting mPacketsInID to id + 1 % LL_MAX_OUT_PACKET_ID 709 // and setting mPacketsInID to id + 1 % LL_MAX_OUT_PACKET_ID
706 710
711 // babbage: all operands in expression are unsigned, so modular
712 // arithmetic will always find correct gap, regardless of wrap arounds.
713 const U8 width = 24;
714 gap = LLModularMath::subtract<width>(mPacketsInID, id);
715
707 if (mPotentialLostPackets.find(id) != mPotentialLostPackets.end()) 716 if (mPotentialLostPackets.find(id) != mPotentialLostPackets.end())
708 { 717 {
709 if(gMessageSystem->mVerboseLog) 718 if(gMessageSystem->mVerboseLog)
@@ -765,6 +774,8 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
765 774
766 } 775 }
767 } 776 }
777 mOutOfOrderRate.count(gap);
778 mLastPacketGap = gap;
768} 779}
769 780
770 781
diff --git a/linden/indra/llmessage/llcircuit.h b/linden/indra/llmessage/llcircuit.h
index 552b50f..b53c955 100644
--- a/linden/indra/llmessage/llcircuit.h
+++ b/linden/indra/llmessage/llcircuit.h
@@ -45,6 +45,7 @@
45#include "llpacketack.h" 45#include "llpacketack.h"
46#include "lluuid.h" 46#include "lluuid.h"
47#include "llthrottle.h" 47#include "llthrottle.h"
48#include "llstat.h"
48 49
49// 50//
50// Constants 51// Constants
@@ -133,6 +134,10 @@ public:
133 S32 getUnackedPacketCount() const { return mUnackedPacketCount; } 134 S32 getUnackedPacketCount() const { return mUnackedPacketCount; }
134 S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } 135 S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; }
135 F64 getNextPingSendTime() const { return mNextPingSendTime; } 136 F64 getNextPingSendTime() const { return mNextPingSendTime; }
137 F32 getOutOfOrderRate(LLStatAccum::TimeScale scale = LLStatAccum::SCALE_MINUTE)
138 { return mOutOfOrderRate.meanValue(scale); }
139 U32 getLastPacketGap() const { return mLastPacketGap; }
140 LLHost getHost() const { return mHost; }
136 141
137 LLThrottleGroup &getThrottleGroup() { return mThrottles; } 142 LLThrottleGroup &getThrottleGroup() { return mThrottles; }
138 143
@@ -276,6 +281,9 @@ protected:
276 LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers 281 LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers
277 282
278 S32 mCurrentResendCount; // Number of resent packets since last spam 283 S32 mCurrentResendCount; // Number of resent packets since last spam
284 LLStatRate mOutOfOrderRate; // Rate of out of order packets coming in.
285 U32 mLastPacketGap; // Gap in sequence number of last packet.
286
279}; 287};
280 288
281 289
diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp
index 834ec4b..167e237 100644
--- a/linden/indra/llmessage/llcurl.cpp
+++ b/linden/indra/llmessage/llcurl.cpp
@@ -265,6 +265,10 @@ LLCurl::Easy* LLCurl::Easy::getEasy()
265 delete easy; 265 delete easy;
266 return NULL; 266 return NULL;
267 } 267 }
268
269 // set no DMS caching as default for all easy handles. This prevents them adopting a
270 // multi handles cache if they are added to one.
271 curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
268 ++gCurlEasyCount; 272 ++gCurlEasyCount;
269 return easy; 273 return easy;
270} 274}
@@ -747,7 +751,7 @@ bool LLCurlRequest::post(const std::string& url, const LLSD& data, LLCurl::Respo
747 easy->setopt(CURLOPT_POSTFIELDS, (void*)NULL); 751 easy->setopt(CURLOPT_POSTFIELDS, (void*)NULL);
748 easy->setopt(CURLOPT_POSTFIELDSIZE, bytes); 752 easy->setopt(CURLOPT_POSTFIELDSIZE, bytes);
749 753
750 easy->slist_append("Content-Type: application/xml"); 754 easy->slist_append("Content-Type: application/llsd+xml");
751 easy->setHeaders(); 755 easy->setHeaders();
752 756
753 lldebugs << "POSTING: " << bytes << " bytes." << llendl; 757 lldebugs << "POSTING: " << bytes << " bytes." << llendl;
diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp
index fdd521f..6d5a716 100644
--- a/linden/indra/llmessage/llhttpassetstorage.cpp
+++ b/linden/indra/llmessage/llhttpassetstorage.cpp
@@ -256,6 +256,10 @@ void LLHTTPAssetRequest::setupCurlHandle()
256 // disable use of proxy, which can't handle chunked transfers 256 // disable use of proxy, which can't handle chunked transfers
257 } 257 }
258 mHTTPHeaders = curl_slist_append(mHTTPHeaders, "Pragma:"); 258 mHTTPHeaders = curl_slist_append(mHTTPHeaders, "Pragma:");
259
260 // bug in curl causes DNS to be cached for too long a time, 0 sets it to never cache DNS results internally (to curl)
261 curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
262
259 // resist the temptation to explicitly add the Transfer-Encoding: chunked 263 // resist the temptation to explicitly add the Transfer-Encoding: chunked
260 // header here - invokes a libCURL bug 264 // header here - invokes a libCURL bug
261 curl_easy_setopt(mCurlHandle, CURLOPT_HTTPHEADER, mHTTPHeaders); 265 curl_easy_setopt(mCurlHandle, CURLOPT_HTTPHEADER, mHTTPHeaders);
diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp
index ef163fa..a07f379 100644
--- a/linden/indra/llmessage/llhttpclient.cpp
+++ b/linden/indra/llmessage/llhttpclient.cpp
@@ -106,7 +106,7 @@ namespace
106 LLSDInjector(const LLSD& sd) : mSD(sd) {} 106 LLSDInjector(const LLSD& sd) : mSD(sd) {}
107 virtual ~LLSDInjector() {} 107 virtual ~LLSDInjector() {}
108 108
109 const char* contentType() { return "application/xml"; } 109 const char* contentType() { return "application/llsd+xml"; }
110 110
111 virtual EStatus process_impl(const LLChannelDescriptors& channels, 111 virtual EStatus process_impl(const LLChannelDescriptors& channels,
112 buffer_ptr_t& buffer, bool& eos, LLSD& context, LLPumpIO* pump) 112 buffer_ptr_t& buffer, bool& eos, LLSD& context, LLPumpIO* pump)
@@ -160,9 +160,10 @@ namespace
160 fstream.seekg(0, std::ios::end); 160 fstream.seekg(0, std::ios::end);
161 U32 fileSize = fstream.tellg(); 161 U32 fileSize = fstream.tellg();
162 fstream.seekg(0, std::ios::beg); 162 fstream.seekg(0, std::ios::beg);
163 std::vector<char> fileBuffer(fileSize); 163 char* fileBuffer;
164 fstream.read(&fileBuffer[0], fileSize); 164 fileBuffer = new char [fileSize];
165 ostream.write(&fileBuffer[0], fileSize); 165 fstream.read(fileBuffer, fileSize);
166 ostream.write(fileBuffer, fileSize);
166 fstream.close(); 167 fstream.close();
167 eos = true; 168 eos = true;
168 return STATUS_DONE; 169 return STATUS_DONE;
@@ -189,9 +190,10 @@ namespace
189 190
190 LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ); 191 LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ);
191 S32 fileSize = vfile.getSize(); 192 S32 fileSize = vfile.getSize();
192 std::vector<U8> fileBuffer(fileSize); 193 U8* fileBuffer;
193 vfile.read(&fileBuffer[0], fileSize); 194 fileBuffer = new U8 [fileSize];
194 ostream.write((char*)&fileBuffer[0], fileSize); 195 vfile.read(fileBuffer, fileSize);
196 ostream.write((char*)fileBuffer, fileSize);
195 eos = true; 197 eos = true;
196 return STATUS_DONE; 198 return STATUS_DONE;
197 } 199 }
@@ -236,7 +238,8 @@ static void request(
236 //the Pragma header it so gratuitously inserts 238 //the Pragma header it so gratuitously inserts
237 //Before inserting the header, force libcurl 239 //Before inserting the header, force libcurl
238 //to not use the proxy (read: llurlrequest.cpp) 240 //to not use the proxy (read: llurlrequest.cpp)
239 if ((iter->first == "Pragma") && (iter->second.asString() == "")) 241 static const std::string PRAGMA("Pragma");
242 if ((iter->first == PRAGMA) && (iter->second.asString().empty()))
240 { 243 {
241 req->useProxy(false); 244 req->useProxy(false);
242 } 245 }
@@ -245,6 +248,19 @@ static void request(
245 req->addHeader(header.str().c_str()); 248 req->addHeader(header.str().c_str());
246 } 249 }
247 } 250 }
251
252 // Check to see if we have already set Accept or not. If no one
253 // set it, set it to application/llsd+xml since that's what we
254 // almost always want.
255 if( method != LLURLRequest::HTTP_PUT && method != LLURLRequest::HTTP_POST )
256 {
257 static const std::string ACCEPT("Accept");
258 if(!headers.has(ACCEPT))
259 {
260 req->addHeader("Accept: application/llsd+xml");
261 }
262 }
263
248 req->setCallback(new LLHTTPClientURLAdaptor(responder)); 264 req->setCallback(new LLHTTPClientURLAdaptor(responder));
249 265
250 if (method == LLURLRequest::HTTP_POST && gMessageSystem) 266 if (method == LLURLRequest::HTTP_POST && gMessageSystem)
@@ -252,12 +268,22 @@ static void request(
252 req->addHeader(llformat("X-SecondLife-UDP-Listen-Port: %d", 268 req->addHeader(llformat("X-SecondLife-UDP-Listen-Port: %d",
253 gMessageSystem->mPort).c_str()); 269 gMessageSystem->mPort).c_str());
254 } 270 }
255 271
256 if (method == LLURLRequest::HTTP_PUT || method == LLURLRequest::HTTP_POST) 272 if (method == LLURLRequest::HTTP_PUT || method == LLURLRequest::HTTP_POST)
257 { 273 {
258 req->addHeader(llformat("Content-Type: %s", 274 static const std::string CONTENT_TYPE("Content-Type");
259 body_injector->contentType()).c_str()); 275 if(!headers.has(CONTENT_TYPE))
260 276 {
277 // If the Content-Type header was passed in, it has
278 // already been added as a header through req->addHeader
279 // in the loop above. We defer to the caller's wisdom, but
280 // if they did not specify a Content-Type, then ask the
281 // injector.
282 req->addHeader(
283 llformat(
284 "Content-Type: %s",
285 body_injector->contentType()).c_str());
286 }
261 chain.push_back(LLIOPipe::ptr_t(body_injector)); 287 chain.push_back(LLIOPipe::ptr_t(body_injector));
262 } 288 }
263 289
@@ -284,9 +310,13 @@ void LLHTTPClient::getByteRange(
284 request(url,LLURLRequest::HTTP_GET, NULL, responder, timeout, headers); 310 request(url,LLURLRequest::HTTP_GET, NULL, responder, timeout, headers);
285} 311}
286 312
287void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F32 timeout) 313void LLHTTPClient::head(
314 const std::string& url,
315 ResponderPtr responder,
316 const LLSD& headers,
317 const F32 timeout)
288{ 318{
289 request(url, LLURLRequest::HTTP_HEAD, NULL, responder, timeout); 319 request(url, LLURLRequest::HTTP_HEAD, NULL, responder, timeout, headers);
290} 320}
291 321
292void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout) 322void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout)
@@ -397,39 +427,66 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
397 return response; 427 return response;
398} 428}
399 429
400void LLHTTPClient::put(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout) 430void LLHTTPClient::put(
431 const std::string& url,
432 const LLSD& body,
433 ResponderPtr responder,
434 const LLSD& headers,
435 const F32 timeout)
401{ 436{
402 request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, timeout); 437 request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, timeout, headers);
403} 438}
404 439
405void LLHTTPClient::post(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout) 440void LLHTTPClient::post(
441 const std::string& url,
442 const LLSD& body,
443 ResponderPtr responder,
444 const LLSD& headers,
445 const F32 timeout)
406{ 446{
407 request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, timeout); 447 request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, timeout, headers);
408} 448}
409 449
410void LLHTTPClient::postRaw(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout) 450void LLHTTPClient::postRaw(
451 const std::string& url,
452 const U8* data,
453 S32 size,
454 ResponderPtr responder,
455 const LLSD& headers,
456 const F32 timeout)
411{ 457{
412 request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout); 458 request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout, headers);
413} 459}
414 460
415void LLHTTPClient::postFile(const std::string& url, const std::string& filename, ResponderPtr responder, const F32 timeout) 461void LLHTTPClient::postFile(
462 const std::string& url,
463 const std::string& filename,
464 ResponderPtr responder,
465 const LLSD& headers,
466 const F32 timeout)
416{ 467{
417 request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout); 468 request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout, headers);
418} 469}
419 470
420void LLHTTPClient::postFile(const std::string& url, const LLUUID& uuid, 471void LLHTTPClient::postFile(
421 LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout) 472 const std::string& url,
473 const LLUUID& uuid,
474 LLAssetType::EType asset_type,
475 ResponderPtr responder,
476 const LLSD& headers,
477 const F32 timeout)
422{ 478{
423 request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout); 479 request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout, headers);
424} 480}
425 481
426// static 482// static
427void LLHTTPClient::del( 483void LLHTTPClient::del(
428 const std::string& url, 484 const std::string& url,
429 ResponderPtr responder, 485 ResponderPtr responder,
486 const LLSD& headers,
430 const F32 timeout) 487 const F32 timeout)
431{ 488{
432 request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout); 489 request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout, headers);
433} 490}
434 491
435// static 492// static
@@ -437,9 +494,10 @@ void LLHTTPClient::move(
437 const std::string& url, 494 const std::string& url,
438 const std::string& destination, 495 const std::string& destination,
439 ResponderPtr responder, 496 ResponderPtr responder,
497 const LLSD& hdrs,
440 const F32 timeout) 498 const F32 timeout)
441{ 499{
442 LLSD headers; 500 LLSD headers = hdrs;
443 headers["Destination"] = destination; 501 headers["Destination"] = destination;
444 request(url, LLURLRequest::HTTP_MOVE, NULL, responder, timeout, headers); 502 request(url, LLURLRequest::HTTP_MOVE, NULL, responder, timeout, headers);
445} 503}
diff --git a/linden/indra/llmessage/llhttpclient.h b/linden/indra/llmessage/llhttpclient.h
index 50c6f7a..367098f 100644
--- a/linden/indra/llmessage/llhttpclient.h
+++ b/linden/indra/llmessage/llhttpclient.h
@@ -62,28 +62,56 @@ public:
62 62
63 /** @name non-blocking API */ 63 /** @name non-blocking API */
64 //@{ 64 //@{
65 static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 65 static void head(
66 const std::string& url,
67 ResponderPtr,
68 const LLSD& headers = LLSD(),
69 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
66 static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 70 static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
67 static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 71 static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
68 static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 72 static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
69 73
70 static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 74 static void put(
75 const std::string& url,
76 const LLSD& body,
77 ResponderPtr,
78 const LLSD& headers = LLSD(),
79 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
71 static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 80 static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
72 static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 81 static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
73 82
74 static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 83 static void post(
75 84 const std::string& url,
85 const LLSD& body,
86 ResponderPtr,
87 const LLSD& headers = LLSD(),
88 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
76 /** Takes ownership of data and deletes it when sent */ 89 /** Takes ownership of data and deletes it when sent */
77 static void postRaw(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 90 static void postRaw(
78 91 const std::string& url,
79 static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 92 const U8* data,
80 # 93 S32 size,
81 static void postFile(const std::string& url, const LLUUID& uuid, 94 ResponderPtr responder,
82 LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 95 const LLSD& headers = LLSD(),
96 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
97 static void postFile(
98 const std::string& url,
99 const std::string& filename,
100 ResponderPtr,
101 const LLSD& headers = LLSD(),
102 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
103 static void postFile(
104 const std::string& url,
105 const LLUUID& uuid,
106 LLAssetType::EType asset_type,
107 ResponderPtr responder,
108 const LLSD& headers = LLSD(),
109 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
83 110
84 static void del( 111 static void del(
85 const std::string& url, 112 const std::string& url,
86 ResponderPtr responder, 113 ResponderPtr responder,
114 const LLSD& headers = LLSD(),
87 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 115 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
88 ///< sends a DELETE method, but we can't call it delete in c++ 116 ///< sends a DELETE method, but we can't call it delete in c++
89 117
@@ -93,12 +121,14 @@ public:
93 * @param url The complete serialized (and escaped) url to get. 121 * @param url The complete serialized (and escaped) url to get.
94 * @param destination The complete serialized destination url. 122 * @param destination The complete serialized destination url.
95 * @param responder The responder that will handle the result. 123 * @param responder The responder that will handle the result.
124 * @param headers A map of key:value headers to pass to the request
96 * @param timeout The number of seconds to give the server to respond. 125 * @param timeout The number of seconds to give the server to respond.
97 */ 126 */
98 static void move( 127 static void move(
99 const std::string& url, 128 const std::string& url,
100 const std::string& destination, 129 const std::string& destination,
101 ResponderPtr responder, 130 ResponderPtr responder,
131 const LLSD& headers = LLSD(),
102 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); 132 const F32 timeout=HTTP_REQUEST_EXPIRY_SECS);
103 133
104 //@} 134 //@}
diff --git a/linden/indra/llmessage/lliohttpserver.cpp b/linden/indra/llmessage/lliohttpserver.cpp
index d4155f6..64222ff 100644
--- a/linden/indra/llmessage/lliohttpserver.cpp
+++ b/linden/indra/llmessage/lliohttpserver.cpp
@@ -47,6 +47,7 @@
47#include "llpumpio.h" 47#include "llpumpio.h"
48#include "llsd.h" 48#include "llsd.h"
49#include "llsdserialize_xml.h" 49#include "llsdserialize_xml.h"
50#include "llstat.h"
50#include "llstl.h" 51#include "llstl.h"
51#include "lltimer.h" 52#include "lltimer.h"
52 53
@@ -171,22 +172,26 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
171 std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB]; 172 std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB];
172 if(verb == HTTP_VERB_GET) 173 if(verb == HTTP_VERB_GET)
173 { 174 {
175 LLPerfBlock getblock("http_get");
174 mNode.get(LLHTTPNode::ResponsePtr(mResponse), context); 176 mNode.get(LLHTTPNode::ResponsePtr(mResponse), context);
175 } 177 }
176 else if(verb == HTTP_VERB_PUT) 178 else if(verb == HTTP_VERB_PUT)
177 { 179 {
180 LLPerfBlock putblock("http_put");
178 LLSD input; 181 LLSD input;
179 LLSDSerialize::fromXML(input, istr); 182 LLSDSerialize::fromXML(input, istr);
180 mNode.put(LLHTTPNode::ResponsePtr(mResponse), context, input); 183 mNode.put(LLHTTPNode::ResponsePtr(mResponse), context, input);
181 } 184 }
182 else if(verb == HTTP_VERB_POST) 185 else if(verb == HTTP_VERB_POST)
183 { 186 {
187 LLPerfBlock postblock("http_post");
184 LLSD input; 188 LLSD input;
185 LLSDSerialize::fromXML(input, istr); 189 LLSDSerialize::fromXML(input, istr);
186 mNode.post(LLHTTPNode::ResponsePtr(mResponse), context, input); 190 mNode.post(LLHTTPNode::ResponsePtr(mResponse), context, input);
187 } 191 }
188 else if(verb == HTTP_VERB_DELETE) 192 else if(verb == HTTP_VERB_DELETE)
189 { 193 {
194 LLPerfBlock delblock("http_delete");
190 mNode.del(LLHTTPNode::ResponsePtr(mResponse), context); 195 mNode.del(LLHTTPNode::ResponsePtr(mResponse), context);
191 } 196 }
192 else if(verb == HTTP_VERB_OPTIONS) 197 else if(verb == HTTP_VERB_OPTIONS)
@@ -240,7 +245,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
240 case STATE_GOOD_RESULT: 245 case STATE_GOOD_RESULT:
241 { 246 {
242 LLSD headers = mHeaders; 247 LLSD headers = mHeaders;
243 headers["Content-Type"] = "application/xml"; 248 headers["Content-Type"] = "application/llsd+xml";
244 context[CONTEXT_RESPONSE][CONTEXT_HEADERS] = headers; 249 context[CONTEXT_RESPONSE][CONTEXT_HEADERS] = headers;
245 LLBufferStream ostr(channels, buffer.get()); 250 LLBufferStream ostr(channels, buffer.get());
246 LLSDSerialize::toXML(mGoodResult, ostr); 251 LLSDSerialize::toXML(mGoodResult, ostr);
diff --git a/linden/indra/llmessage/lliosocket.cpp b/linden/indra/llmessage/lliosocket.cpp
index dec83b0..28fee37 100644
--- a/linden/indra/llmessage/lliosocket.cpp
+++ b/linden/indra/llmessage/lliosocket.cpp
@@ -355,8 +355,11 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
355 } 355 }
356 else if(APR_STATUS_IS_EAGAIN(status)) 356 else if(APR_STATUS_IS_EAGAIN(status))
357 { 357 {
358/*Commented out by Aura 9-9-8 for DEV-19961.
358 // everything is fine, but we can terminate this process pump. 359 // everything is fine, but we can terminate this process pump.
360
359 rv = STATUS_BREAK; 361 rv = STATUS_BREAK;
362*/
360 } 363 }
361 else 364 else
362 { 365 {
diff --git a/linden/indra/llmessage/llmail.cpp b/linden/indra/llmessage/llmail.cpp
index 8ae7206..0504080 100644
--- a/linden/indra/llmessage/llmail.cpp
+++ b/linden/indra/llmessage/llmail.cpp
@@ -51,6 +51,7 @@
51#include "llblowfishcipher.h" 51#include "llblowfishcipher.h"
52#include "llerror.h" 52#include "llerror.h"
53#include "llhost.h" 53#include "llhost.h"
54#include "llsd.h"
54#include "llstring.h" 55#include "llstring.h"
55#include "lluuid.h" 56#include "lluuid.h"
56#include "net.h" 57#include "net.h"
@@ -111,16 +112,22 @@ void disconnect_smtp()
111// Returns TRUE on success. 112// Returns TRUE on success.
112// message should NOT be SMTP escaped. 113// message should NOT be SMTP escaped.
113// static 114// static
114BOOL LLMail::send(const char* from_name, const char* from_address, 115BOOL LLMail::send(
115 const char* to_name, const char* to_address, 116 const char* from_name,
116 const char* subject, const char* message) 117 const char* from_address,
118 const char* to_name,
119 const char* to_address,
120 const char* subject,
121 const char* message,
122 const LLSD& headers)
117{ 123{
118 std::string header = buildSMTPTransaction( 124 std::string header = buildSMTPTransaction(
119 from_name, 125 from_name,
120 from_address, 126 from_address,
121 to_name, 127 to_name,
122 to_address, 128 to_address,
123 subject); 129 subject,
130 headers);
124 if(header.empty()) 131 if(header.empty())
125 { 132 {
126 return FALSE; 133 return FALSE;
@@ -192,7 +199,8 @@ std::string LLMail::buildSMTPTransaction(
192 const char* from_address, 199 const char* from_address,
193 const char* to_name, 200 const char* to_name,
194 const char* to_address, 201 const char* to_address,
195 const char* subject) 202 const char* subject,
203 const LLSD& headers)
196{ 204{
197 if(!from_address || !to_address) 205 if(!from_address || !to_address)
198 { 206 {
@@ -236,8 +244,20 @@ std::string LLMail::buildSMTPTransaction(
236 << "DATA\r\n" 244 << "DATA\r\n"
237 << "From: " << from_fmt.str() << "\r\n" 245 << "From: " << from_fmt.str() << "\r\n"
238 << "To: " << to_fmt.str() << "\r\n" 246 << "To: " << to_fmt.str() << "\r\n"
239 << "Subject: " << subject << "\r\n" 247 << "Subject: " << subject << "\r\n";
240 << "\r\n"; 248
249 if(headers.isMap())
250 {
251 LLSD::map_const_iterator iter = headers.beginMap();
252 LLSD::map_const_iterator end = headers.endMap();
253 for(; iter != end; ++iter)
254 {
255 header << (*iter).first << ": " << ((*iter).second).asString()
256 << "\r\n";
257 }
258 }
259
260 header << "\r\n";
241 return header.str(); 261 return header.str();
242} 262}
243 263
diff --git a/linden/indra/llmessage/llmail.h b/linden/indra/llmessage/llmail.h
index 86b7793..018e180 100644
--- a/linden/indra/llmessage/llmail.h
+++ b/linden/indra/llmessage/llmail.h
@@ -34,7 +34,7 @@
34 34
35typedef struct apr_pool_t apr_pool_t; 35typedef struct apr_pool_t apr_pool_t;
36 36
37class LLUUID; 37#include "llsd.h"
38 38
39class LLMail 39class LLMail
40{ 40{
@@ -45,34 +45,51 @@ public:
45 // Allow all email transmission to be disabled/enabled. 45 // Allow all email transmission to be disabled/enabled.
46 static void enable(bool mail_enabled); 46 static void enable(bool mail_enabled);
47 47
48 // returns TRUE if the call succeeds, FALSE otherwise. 48 /**
49 // 49 * @brief send an email
50 // Results in: 50 * @param from_name The name of the email sender
51 // From: "from_name" <from_address> 51 * @param from_address The email address for the sender
52 // To: "to_name" <to_address> 52 * @param to_name The name of the email recipient
53 // Subject: subject 53 * @param to_address The email recipient address
54 // message 54 * @param subject The subject of the email
55 static BOOL send(const char* from_name, const char* from_address, 55 * @param headers optional X-Foo headers in an llsd map.
56 const char* to_name, const char* to_address, 56 * @return Returns TRUE if the call succeeds, FALSE otherwise.
57 const char* subject, const char* message); 57 *
58 * Results in:
59 * From: "from_name" <from_address>
60 * To: "to_name" <to_address>
61 * Subject: subject
62 *
63 * message
64 */
65 static BOOL send(
66 const char* from_name,
67 const char* from_address,
68 const char* to_name,
69 const char* to_address,
70 const char* subject,
71 const char* message,
72 const LLSD& headers = LLSD());
58 73
59 /** 74 /**
60 * @brief build the complete smtp transaction & header for use in an 75 * @brief build the complete smtp transaction & header for use in an
61 * mail. 76 * mail.
62 * 77 *
63 * @param from_name The name of the email sender 78 * @param from_name The name of the email sender
64 * @param from_address The email address for the sender 79 * @param from_address The email address for the sender
65 * @param to_name The name of the email recipient 80 * @param to_name The name of the email recipient
66 * @param to_name The email recipient address 81 * @param to_address The email recipient address
67 * @param subject The subject of the email 82 * @param subject The subject of the email
68 * @return Returns the complete SMTP transaction mail header. 83 * @param headers optional X-Foo headers in an llsd map.
69 */ 84 * @return Returns the complete SMTP transaction mail header.
85 */
70 static std::string buildSMTPTransaction( 86 static std::string buildSMTPTransaction(
71 const char* from_name, 87 const char* from_name,
72 const char* from_address, 88 const char* from_address,
73 const char* to_name, 89 const char* to_name,
74 const char* to_address, 90 const char* to_address,
75 const char* subject); 91 const char* subject,
92 const LLSD& headers = LLSD());
76 93
77 /** 94 /**
78 * @brief send an email with header and body. 95 * @brief send an email with header and body.
diff --git a/linden/indra/llmessage/llmessagetemplate.cpp b/linden/indra/llmessage/llmessagetemplate.cpp
index 4a560ca..ff44d45 100644
--- a/linden/indra/llmessage/llmessagetemplate.cpp
+++ b/linden/indra/llmessage/llmessagetemplate.cpp
@@ -50,7 +50,7 @@ void LLMsgVarData::addData(const void *data, S32 size, EMsgVariableType type, S3
50 } 50 }
51 if(size) 51 if(size)
52 { 52 {
53 delete mData; // Delete it if it already exists 53 delete[] mData; // Delete it if it already exists
54 mData = new U8[size]; 54 mData = new U8[size];
55 htonmemcpy(mData, data, mType, size); 55 htonmemcpy(mData, data, mType, size);
56 } 56 }
@@ -175,3 +175,23 @@ std::ostream& operator<<(std::ostream& s, LLMessageTemplate &msg)
175 175
176 return s; 176 return s;
177} 177}
178
179void LLMessageTemplate::banUdp()
180{
181 static const char* deprecation[] = {
182 "NotDeprecated",
183 "Deprecated",
184 "UDPDeprecated",
185 "UDPBlackListed"
186 };
187 if (mDeprecation != MD_DEPRECATED)
188 {
189 llinfos << "Setting " << mName << " to UDPBlackListed was " << deprecation[mDeprecation] << llendl;
190 mDeprecation = MD_UDPBLACKLISTED;
191 }
192 else
193 {
194 llinfos << mName << " is already more deprecated than UDPBlackListed" << llendl;
195 }
196}
197
diff --git a/linden/indra/llmessage/llmessagetemplate.h b/linden/indra/llmessage/llmessagetemplate.h
index 716c618..445d1a8 100644
--- a/linden/indra/llmessage/llmessagetemplate.h
+++ b/linden/indra/llmessage/llmessagetemplate.h
@@ -34,6 +34,7 @@
34 34
35#include "lldarray.h" 35#include "lldarray.h"
36#include "message.h" // TODO: babbage: Remove... 36#include "message.h" // TODO: babbage: Remove...
37#include "llstat.h"
37#include "llstl.h" 38#include "llstl.h"
38 39
39class LLMsgVarData 40class LLMsgVarData
@@ -370,20 +371,23 @@ public:
370 { 371 {
371 if (mHandlerFunc) 372 if (mHandlerFunc)
372 { 373 {
374 LLPerfBlock msg_cb_time("msg_cb", mName);
373 mHandlerFunc(msgsystem, mUserData); 375 mHandlerFunc(msgsystem, mUserData);
374 return TRUE; 376 return TRUE;
375 } 377 }
376 return FALSE; 378 return FALSE;
377 } 379 }
378 380
379 bool isBanned(bool trustedSource) const 381 bool isUdpBanned() const
380 { 382 {
381 return trustedSource ? mBanFromTrusted : mBanFromUntrusted; 383 return mDeprecation == MD_UDPBLACKLISTED;
382 } 384 }
383 385
384 bool isUdpBanned() const 386 void banUdp();
387
388 bool isBanned(bool trustedSource) const
385 { 389 {
386 return mDeprecation == MD_UDPBLACKLISTED; 390 return trustedSource ? mBanFromTrusted : mBanFromUntrusted;
387 } 391 }
388 392
389 friend std::ostream& operator<<(std::ostream& s, LLMessageTemplate &msg); 393 friend std::ostream& operator<<(std::ostream& s, LLMessageTemplate &msg);
diff --git a/linden/indra/llmessage/llmessagethrottle.cpp b/linden/indra/llmessage/llmessagethrottle.cpp
index ad9df26..47e1bd6 100644
--- a/linden/indra/llmessage/llmessagethrottle.cpp
+++ b/linden/indra/llmessage/llmessagethrottle.cpp
@@ -119,7 +119,7 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg
119 full_mesg << to << mesg; 119 full_mesg << to << mesg;
120 120
121 // Create an entry for this message. 121 // Create an entry for this message.
122 size_t hash = llhash<const char*> (full_mesg.str().c_str()); 122 size_t hash = llhash(full_mesg.str().c_str());
123 LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); 123 LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
124 124
125 // Check if this message is already in the list. 125 // Check if this message is already in the list.
@@ -153,7 +153,7 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c
153 full_mesg << agent << task << mesg; 153 full_mesg << agent << task << mesg;
154 154
155 // Create an entry for this message. 155 // Create an entry for this message.
156 size_t hash = llhash<const char*> (full_mesg.str().c_str()); 156 size_t hash = llhash(full_mesg.str().c_str());
157 LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); 157 LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
158 158
159 // Check if this message is already in the list. 159 // Check if this message is already in the list.
diff --git a/linden/indra/llmessage/llnamevalue.cpp b/linden/indra/llmessage/llnamevalue.cpp
index c44f6ce..f661261 100644
--- a/linden/indra/llmessage/llnamevalue.cpp
+++ b/linden/indra/llmessage/llnamevalue.cpp
@@ -896,7 +896,7 @@ void LLNameValue::setVec3(const LLVector3 &a)
896} 896}
897 897
898 898
899std::string LLNameValue::printNameValue() 899std::string LLNameValue::printNameValue() const
900{ 900{
901 std::string buffer; 901 std::string buffer;
902 buffer = llformat("%s %s %s %s ", mName, mStringType, mStringClass, mStringSendto); 902 buffer = llformat("%s %s %s %s ", mName, mStringType, mStringClass, mStringSendto);
@@ -905,7 +905,7 @@ std::string LLNameValue::printNameValue()
905 return buffer; 905 return buffer;
906} 906}
907 907
908std::string LLNameValue::printData() 908std::string LLNameValue::printData() const
909{ 909{
910 std::string buffer; 910 std::string buffer;
911 switch(mType) 911 switch(mType)
diff --git a/linden/indra/llmessage/llnamevalue.h b/linden/indra/llmessage/llnamevalue.h
index 52beb07..f6c5040 100644
--- a/linden/indra/llmessage/llnamevalue.h
+++ b/linden/indra/llmessage/llnamevalue.h
@@ -148,8 +148,8 @@ public:
148 BOOL sendToViewer() const; 148 BOOL sendToViewer() const;
149 149
150 void callCallback(); 150 void callCallback();
151 std::string printNameValue(); 151 std::string printNameValue() const;
152 std::string printData(); 152 std::string printData() const;
153 153
154 ENameValueType getTypeEnum() const { return mType; } 154 ENameValueType getTypeEnum() const { return mType; }
155 ENameValueClass getClassEnum() const { return mClass; } 155 ENameValueClass getClassEnum() const { return mClass; }
diff --git a/linden/indra/llmessage/llpumpio.cpp b/linden/indra/llmessage/llpumpio.cpp
index c92612f..9ce0bab 100644
--- a/linden/indra/llmessage/llpumpio.cpp
+++ b/linden/indra/llmessage/llpumpio.cpp
@@ -41,6 +41,7 @@
41#include "llapr.h" 41#include "llapr.h"
42#include "llmemtype.h" 42#include "llmemtype.h"
43#include "llstl.h" 43#include "llstl.h"
44#include "llstat.h"
44 45
45// These should not be enabled in production, but they can be 46// These should not be enabled in production, but they can be
46// intensely useful during development for finding certain kinds of 47// intensely useful during development for finding certain kinds of
@@ -269,6 +270,13 @@ bool LLPumpIO::setTimeoutSeconds(F32 timeout)
269 return true; 270 return true;
270} 271}
271 272
273void LLPumpIO::adjustTimeoutSeconds(F32 delta)
274{
275 // If no chain is running, bail
276 if(current_chain_t() == mCurrentChain) return;
277 (*mCurrentChain).adjustTimeoutSeconds(delta);
278}
279
272static std::string events_2_string(apr_int16_t events) 280static std::string events_2_string(apr_int16_t events)
273{ 281{
274 std::ostringstream ostr; 282 std::ostringstream ostr;
@@ -514,7 +522,10 @@ void LLPumpIO::pump(const S32& poll_timeout)
514 //llinfos << "polling" << llendl; 522 //llinfos << "polling" << llendl;
515 S32 count = 0; 523 S32 count = 0;
516 S32 client_id = 0; 524 S32 client_id = 0;
517 apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); 525 {
526 LLPerfBlock polltime("pump_poll");
527 apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd);
528 }
518 PUMP_DEBUG; 529 PUMP_DEBUG;
519 for(S32 ii = 0; ii < count; ++ii) 530 for(S32 ii = 0; ii < count; ++ii)
520 { 531 {
@@ -1161,3 +1172,14 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
1161 mTimer.stop(); 1172 mTimer.stop();
1162 } 1173 }
1163} 1174}
1175
1176void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
1177{
1178 LLMemType m1(LLMemType::MTYPE_IO_PUMP);
1179 if(mTimer.getStarted())
1180 {
1181 F64 expiry = mTimer.expiresAt();
1182 expiry += delta;
1183 mTimer.setExpiryAt(expiry);
1184 }
1185}
diff --git a/linden/indra/llmessage/llpumpio.h b/linden/indra/llmessage/llpumpio.h
index d2392a3..daff723 100644
--- a/linden/indra/llmessage/llpumpio.h
+++ b/linden/indra/llmessage/llpumpio.h
@@ -166,6 +166,14 @@ public:
166 bool setTimeoutSeconds(F32 timeout); 166 bool setTimeoutSeconds(F32 timeout);
167 167
168 /** 168 /**
169 * @brief Adjust the timeout of the running chain.
170 *
171 * This method has no effect if there is no timeout on the chain.
172 * @param delta The number of seconds to add to/remove from the timeout.
173 */
174 void adjustTimeoutSeconds(F32 delta);
175
176 /**
169 * @brief Set up file descriptors for for the running chain. 177 * @brief Set up file descriptors for for the running chain.
170 * @see rebuildPollset() 178 * @see rebuildPollset()
171 * 179 *
@@ -349,6 +357,7 @@ protected:
349 // methods 357 // methods
350 LLChainInfo(); 358 LLChainInfo();
351 void setTimeoutSeconds(F32 timeout); 359 void setTimeoutSeconds(F32 timeout);
360 void adjustTimeoutSeconds(F32 delta);
352 361
353 // basic member data 362 // basic member data
354 bool mInit; 363 bool mInit;
diff --git a/linden/indra/llmessage/llregionflags.h b/linden/indra/llmessage/llregionflags.h
index af010ae..46624c1 100644
--- a/linden/indra/llmessage/llregionflags.h
+++ b/linden/indra/llmessage/llregionflags.h
@@ -60,8 +60,10 @@ const U32 REGION_FLAGS_BLOCK_LAND_RESELL = (1 << 7);
60// All content wiped once per night 60// All content wiped once per night
61const U32 REGION_FLAGS_SANDBOX = (1 << 8); 61const U32 REGION_FLAGS_SANDBOX = (1 << 8);
62const U32 REGION_FLAGS_NULL_LAYER = (1 << 9); 62const U32 REGION_FLAGS_NULL_LAYER = (1 << 9);
63const U32 REGION_FLAGS_SKIP_AGENT_ACTION = (1 << 10); 63// const U32 REGION_FLAGS_SKIP_AGENT_ACTION = (1 << 10);
64const U32 REGION_FLAGS_SKIP_UPDATE_INTEREST_LIST= (1 << 11); 64const U32 REGION_FLAGS_HARD_ALLOW_LAND_TRANSFER = (1 << 10); // Region allows land reselling
65// const U32 REGION_FLAGS_SKIP_UPDATE_INTEREST_LIST= (1 << 11);
66const U32 REGION_FLAGS_HARD_ALLOW_POST_CLASSIFIED = (1 << 11); // Region allows posting of classified ads
65const U32 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies 67const U32 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies
66const U32 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13); 68const U32 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13);
67const U32 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics 69const U32 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics
diff --git a/linden/indra/llmessage/llurlrequest.cpp b/linden/indra/llmessage/llurlrequest.cpp
index ee62798..e561597 100644
--- a/linden/indra/llmessage/llurlrequest.cpp
+++ b/linden/indra/llmessage/llurlrequest.cpp
@@ -68,6 +68,7 @@ public:
68 LLChannelDescriptors mChannels; 68 LLChannelDescriptors mChannels;
69 U8* mLastRead; 69 U8* mLastRead;
70 U32 mBodyLimit; 70 U32 mBodyLimit;
71 S32 mByteAccumulator;
71 bool mIsBodyLimitSet; 72 bool mIsBodyLimitSet;
72}; 73};
73 74
@@ -76,8 +77,8 @@ LLURLRequestDetail::LLURLRequestDetail() :
76 mResponseBuffer(NULL), 77 mResponseBuffer(NULL),
77 mLastRead(NULL), 78 mLastRead(NULL),
78 mBodyLimit(0), 79 mBodyLimit(0),
80 mByteAccumulator(0),
79 mIsBodyLimitSet(false) 81 mIsBodyLimitSet(false)
80
81{ 82{
82 LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); 83 LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
83 mCurlRequest = new LLCurlEasyRequest(); 84 mCurlRequest = new LLCurlEasyRequest();
@@ -264,8 +265,25 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
264 { 265 {
265 CURLcode result; 266 CURLcode result;
266 bool newmsg = mDetail->mCurlRequest->getResult(&result); 267 bool newmsg = mDetail->mCurlRequest->getResult(&result);
267 if (!newmsg) 268 if(!newmsg)
268 { 269 {
270 // we're still waiting or prcessing, check how many
271 // bytes we have accumulated.
272 const S32 MIN_ACCUMULATION = 100000;
273 if(pump && (mDetail->mByteAccumulator > MIN_ACCUMULATION))
274 {
275 // This is a pretty sloppy calculation, but this
276 // tries to make the gross assumption that if data
277 // is coming in at 56kb/s, then this transfer will
278 // probably succeed. So, if we're accumlated
279 // 100,000 bytes (MIN_ACCUMULATION) then let's
280 // give this client another 2s to complete.
281 const F32 TIMEOUT_ADJUSTMENT = 2.0f;
282 mDetail->mByteAccumulator = 0;
283 pump->adjustTimeoutSeconds(TIMEOUT_ADJUSTMENT);
284 }
285
286 // keep processing
269 break; 287 break;
270 } 288 }
271 289
@@ -434,6 +452,7 @@ size_t LLURLRequest::downCallback(
434 req->mDetail->mChannels.out(), 452 req->mDetail->mChannels.out(),
435 (U8*)data, 453 (U8*)data,
436 bytes); 454 bytes);
455 req->mDetail->mByteAccumulator += bytes;
437 return bytes; 456 return bytes;
438} 457}
439 458
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp
index b20731a..3ee3c03 100644
--- a/linden/indra/llmessage/message.cpp
+++ b/linden/indra/llmessage/message.cpp
@@ -3956,22 +3956,27 @@ void LLMessageSystem::getString(const char *block, const char *var,
3956 blocknum); 3956 blocknum);
3957} 3957}
3958 3958
3959S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname) 3959BOOL LLMessageSystem::has(const char *blockname) const
3960{
3961 return getNumberOfBlocks(blockname) > 0;
3962}
3963
3964S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname) const
3960{ 3965{
3961 return mMessageReader->getNumberOfBlocks(blockname); 3966 return mMessageReader->getNumberOfBlocks(blockname);
3962} 3967}
3963 3968
3964S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) 3969S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) const
3965{ 3970{
3966 return getNumberOfBlocksFast(LLMessageStringTable::getInstance()->getString(blockname)); 3971 return getNumberOfBlocksFast(LLMessageStringTable::getInstance()->getString(blockname));
3967} 3972}
3968 3973
3969S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) 3974S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) const
3970{ 3975{
3971 return mMessageReader->getSize(blockname, varname); 3976 return mMessageReader->getSize(blockname, varname);
3972} 3977}
3973 3978
3974S32 LLMessageSystem::getSize(const char *blockname, const char *varname) 3979S32 LLMessageSystem::getSize(const char *blockname, const char *varname) const
3975{ 3980{
3976 return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), 3981 return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname),
3977 LLMessageStringTable::getInstance()->getString(varname)); 3982 LLMessageStringTable::getInstance()->getString(varname));
@@ -3979,13 +3984,13 @@ S32 LLMessageSystem::getSize(const char *blockname, const char *varname)
3979 3984
3980// size in bytes of variable length data 3985// size in bytes of variable length data
3981S32 LLMessageSystem::getSizeFast(const char *blockname, S32 blocknum, 3986S32 LLMessageSystem::getSizeFast(const char *blockname, S32 blocknum,
3982 const char *varname) 3987 const char *varname) const
3983{ 3988{
3984 return mMessageReader->getSize(blockname, blocknum, varname); 3989 return mMessageReader->getSize(blockname, blocknum, varname);
3985} 3990}
3986 3991
3987S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum, 3992S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum,
3988 const char *varname) 3993 const char *varname) const
3989{ 3994{
3990 return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), blocknum, 3995 return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), blocknum,
3991 LLMessageStringTable::getInstance()->getString(varname)); 3996 LLMessageStringTable::getInstance()->getString(varname));
@@ -4021,3 +4026,18 @@ bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
4021 http_pump->callback(); 4026 http_pump->callback();
4022 return (mPacketsIn - packetsIn) > 0; 4027 return (mPacketsIn - packetsIn) > 0;
4023} 4028}
4029
4030void LLMessageSystem::banUdpMessage(const std::string& name)
4031{
4032 message_template_name_map_t::iterator itt = mMessageTemplates.find(
4033 LLMessageStringTable::getInstance()->getString(name.c_str())
4034 );
4035 if(itt != mMessageTemplates.end())
4036 {
4037 itt->second->banUdp();
4038 }
4039 else
4040 {
4041 llwarns << "Attempted to ban an unknown message: " << name << "." << llendl;
4042 }
4043}
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h
index 8807521..b72aa9a 100644
--- a/linden/indra/llmessage/message.h
+++ b/linden/indra/llmessage/message.h
@@ -562,6 +562,9 @@ public:
562 /** Return false true if name is unknown or trusted */ 562 /** Return false true if name is unknown or trusted */
563 bool isUntrustedMessage(const std::string& name) const; 563 bool isUntrustedMessage(const std::string& name) const;
564 564
565 // Change this message to be UDP black listed.
566 void banUdpMessage(const std::string& name);
567
565private: 568private:
566 // A list of the circuits that need to be sent DenyTrustedCircuit messages. 569 // A list of the circuits that need to be sent DenyTrustedCircuit messages.
567 typedef std::set<LLHost> host_set_t; 570 typedef std::set<LLHost> host_set_t;
@@ -591,13 +594,14 @@ public:
591 LLHost findHost(const U32 circuit_code); 594 LLHost findHost(const U32 circuit_code);
592 void sanityCheck(); 595 void sanityCheck();
593 596
594 S32 getNumberOfBlocksFast(const char *blockname); 597 BOOL has(const char *blockname) const;
595 S32 getNumberOfBlocks(const char *blockname); 598 S32 getNumberOfBlocksFast(const char *blockname) const;
596 S32 getSizeFast(const char *blockname, const char *varname); 599 S32 getNumberOfBlocks(const char *blockname) const;
597 S32 getSize(const char *blockname, const char *varname); 600 S32 getSizeFast(const char *blockname, const char *varname) const;
601 S32 getSize(const char *blockname, const char *varname) const;
598 S32 getSizeFast(const char *blockname, S32 blocknum, 602 S32 getSizeFast(const char *blockname, S32 blocknum,
599 const char *varname); // size in bytes of data 603 const char *varname) const; // size in bytes of data
600 S32 getSize(const char *blockname, S32 blocknum, const char *varname); 604 S32 getSize(const char *blockname, S32 blocknum, const char *varname) const;
601 605
602 void resetReceiveCounts(); // resets receive counts for all message types to 0 606 void resetReceiveCounts(); // resets receive counts for all message types to 0
603 void dumpReceiveCounts(); // dumps receive count for each message type to llinfos 607 void dumpReceiveCounts(); // dumps receive count for each message type to llinfos
diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp
index 35f032a..8cd33a2 100644
--- a/linden/indra/llui/llkeywords.cpp
+++ b/linden/indra/llui/llkeywords.cpp
@@ -58,6 +58,22 @@ inline BOOL LLKeywordToken::isHead(const llwchar* s) const
58 return res; 58 return res;
59} 59}
60 60
61inline BOOL LLKeywordToken::isTail(const llwchar* s) const
62{
63 BOOL res = TRUE;
64 const llwchar* t = mDelimiter.c_str();
65 S32 len = mDelimiter.size();
66 for (S32 i=0; i<len; i++)
67 {
68 if (s[i] != t[i])
69 {
70 res = FALSE;
71 break;
72 }
73 }
74 return res;
75}
76
61LLKeywords::LLKeywords() : mLoaded(FALSE) 77LLKeywords::LLKeywords() : mLoaded(FALSE)
62{ 78{
63} 79}
@@ -111,6 +127,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
111 std::string SOL_LINE("[line "); 127 std::string SOL_LINE("[line ");
112 std::string SOL_ONE_SIDED_DELIMITER("[one_sided_delimiter "); 128 std::string SOL_ONE_SIDED_DELIMITER("[one_sided_delimiter ");
113 std::string SOL_TWO_SIDED_DELIMITER("[two_sided_delimiter "); 129 std::string SOL_TWO_SIDED_DELIMITER("[two_sided_delimiter ");
130 std::string SOL_TWO_SIDED_DELIMITER_ESC("[two_sided_delimiter_esc ");
114 131
115 LLColor3 cur_color( 1, 0, 0 ); 132 LLColor3 cur_color( 1, 0, 0 );
116 LLKeywordToken::TOKEN_TYPE cur_type = LLKeywordToken::WORD; 133 LLKeywordToken::TOKEN_TYPE cur_type = LLKeywordToken::WORD;
@@ -142,6 +159,12 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
142 cur_type = LLKeywordToken::TWO_SIDED_DELIMITER; 159 cur_type = LLKeywordToken::TWO_SIDED_DELIMITER;
143 continue; 160 continue;
144 } 161 }
162 else if( line.find(SOL_TWO_SIDED_DELIMITER_ESC) == 0 )
163 {
164 cur_color = readColor( line.substr(SOL_TWO_SIDED_DELIMITER_ESC.size()) );
165 cur_type = LLKeywordToken::TWO_SIDED_DELIMITER_ESC;
166 continue;
167 }
145 else if( line.find(SOL_ONE_SIDED_DELIMITER) == 0 ) 168 else if( line.find(SOL_ONE_SIDED_DELIMITER) == 0 )
146 { 169 {
147 cur_color = readColor( line.substr(SOL_ONE_SIDED_DELIMITER.size()) ); 170 cur_color = readColor( line.substr(SOL_ONE_SIDED_DELIMITER.size()) );
@@ -163,6 +186,19 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
163 std::string keyword = (*token_word_iter); 186 std::string keyword = (*token_word_iter);
164 LLStringUtil::trim(keyword); 187 LLStringUtil::trim(keyword);
165 188
189 // second word may be right delimiter
190 std::string delimiter = "";
191
192 if (cur_type == LLKeywordToken::TWO_SIDED_DELIMITER ||
193 cur_type == LLKeywordToken::TWO_SIDED_DELIMITER_ESC)
194 {
195 while (delimiter.length() == 0 && ++token_word_iter != word_tokens.end())
196 {
197 delimiter = *token_word_iter;
198 LLStringUtil::trim(delimiter);
199 }
200 }
201
166 // following words are tooltip 202 // following words are tooltip
167 std::string tool_tip; 203 std::string tool_tip;
168 while (++token_word_iter != word_tokens.end()) 204 while (++token_word_iter != word_tokens.end())
@@ -175,11 +211,11 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
175 { 211 {
176 // Replace : with \n for multi-line tool tips. 212 // Replace : with \n for multi-line tool tips.
177 LLStringUtil::replaceChar( tool_tip, ':', '\n' ); 213 LLStringUtil::replaceChar( tool_tip, ':', '\n' );
178 addToken(cur_type, keyword, cur_color, tool_tip ); 214 addToken(cur_type, keyword, cur_color, tool_tip, delimiter );
179 } 215 }
180 else 216 else
181 { 217 {
182 addToken(cur_type, keyword, cur_color, LLStringUtil::null ); 218 addToken(cur_type, keyword, cur_color, LLStringUtil::null, delimiter );
183 } 219 }
184 } 220 }
185 } 221 }
@@ -194,24 +230,27 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
194void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, 230void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type,
195 const std::string& key_in, 231 const std::string& key_in,
196 const LLColor3& color, 232 const LLColor3& color,
197 const std::string& tool_tip_in ) 233 const std::string& tool_tip_in,
234 const std::string& delimiter_in )
198{ 235{
199 LLWString key = utf8str_to_wstring(key_in); 236 LLWString key = utf8str_to_wstring(key_in);
200 LLWString tool_tip = utf8str_to_wstring(tool_tip_in); 237 LLWString tool_tip = utf8str_to_wstring(tool_tip_in);
238 LLWString delimiter = utf8str_to_wstring(delimiter_in);
201 switch(type) 239 switch(type)
202 { 240 {
203 case LLKeywordToken::WORD: 241 case LLKeywordToken::WORD:
204 mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip); 242 mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip, delimiter);
205 break; 243 break;
206 244
207 case LLKeywordToken::LINE: 245 case LLKeywordToken::LINE:
208 mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip)); 246 mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter));
209 break; 247 break;
210 248
211 case LLKeywordToken::TWO_SIDED_DELIMITER: 249 case LLKeywordToken::TWO_SIDED_DELIMITER:
212 case LLKeywordToken::ONE_SIDED_DELIMITER: 250 case LLKeywordToken::ONE_SIDED_DELIMITER:
213 mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip)); 251 case LLKeywordToken::TWO_SIDED_DELIMITER_ESC:
214 break; 252 mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter));
253 break;
215 254
216 default: 255 default:
217 llassert(0); 256 llassert(0);
@@ -341,12 +380,13 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
341 seg_start = cur - base; 380 seg_start = cur - base;
342 cur += cur_delimiter->getLength(); 381 cur += cur_delimiter->getLength();
343 382
344 if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER ) 383 if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER || LLKeywordToken::TWO_SIDED_DELIMITER_ESC)
345 { 384 {
346 while( *cur && !cur_delimiter->isHead(cur)) 385 llassert( cur_delimiter->getDelimiter() != NULL );
386 while( *cur && !cur_delimiter->isTail(cur))
347 { 387 {
348 // Check for an escape sequence. 388 // Check for an escape sequence.
349 if (*cur == '\\') 389 if (cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER_ESC && *cur == '\\')
350 { 390 {
351 // Count the number of backslashes. 391 // Count the number of backslashes.
352 S32 num_backslashes = 0; 392 S32 num_backslashes = 0;
@@ -357,7 +397,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
357 cur++; 397 cur++;
358 } 398 }
359 // Is the next character the end delimiter? 399 // Is the next character the end delimiter?
360 if (cur_delimiter->isHead(cur)) 400 if (cur_delimiter->isTail(cur))
361 { 401 {
362 // Is there was an odd number of backslashes, then this delimiter 402 // Is there was an odd number of backslashes, then this delimiter
363 // does not end the sequence. 403 // does not end the sequence.
@@ -383,7 +423,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
383 if( *cur ) 423 if( *cur )
384 { 424 {
385 cur += cur_delimiter->getLength(); 425 cur += cur_delimiter->getLength();
386 seg_end = seg_start + between_delimiters + 2 * cur_delimiter->getLength(); 426 seg_end = seg_start + between_delimiters
427 + cur_delimiter->getLength()
428 + cur_delimiter->getLength2();
387 } 429 }
388 else 430 else
389 { 431 {
diff --git a/linden/indra/llui/llkeywords.h b/linden/indra/llui/llkeywords.h
index e3361f6..742383a 100644
--- a/linden/indra/llui/llkeywords.h
+++ b/linden/indra/llui/llkeywords.h
@@ -45,23 +45,27 @@ class LLTextSegment;
45class LLKeywordToken 45class LLKeywordToken
46{ 46{
47public: 47public:
48 enum TOKEN_TYPE { WORD, LINE, TWO_SIDED_DELIMITER, ONE_SIDED_DELIMITER }; 48 enum TOKEN_TYPE { WORD, LINE, TWO_SIDED_DELIMITER, ONE_SIDED_DELIMITER, TWO_SIDED_DELIMITER_ESC };
49 49
50 LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip ) 50 LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
51 : 51 :
52 mType( type ), 52 mType( type ),
53 mToken( token ), 53 mToken( token ), // keyword or left delimiter
54 mColor( color ), 54 mColor( color ),
55 mToolTip( tool_tip ) 55 mToolTip( tool_tip ),
56 mDelimiter( delimiter ) // right delimiter
56 { 57 {
57 } 58 }
58 59
59 S32 getLength() const { return mToken.size(); } 60 S32 getLength() const { return mToken.size(); }
61 S32 getLength2() const { return mDelimiter.size(); }
60 BOOL isHead(const llwchar* s) const; 62 BOOL isHead(const llwchar* s) const;
63 BOOL isTail(const llwchar* s) const;
61 const LLWString& getToken() const { return mToken; } 64 const LLWString& getToken() const { return mToken; }
62 const LLColor3& getColor() const { return mColor; } 65 const LLColor3& getColor() const { return mColor; }
63 TOKEN_TYPE getType() const { return mType; } 66 TOKEN_TYPE getType() const { return mType; }
64 const LLWString& getToolTip() const { return mToolTip; } 67 const LLWString& getToolTip() const { return mToolTip; }
68 const LLWString& getDelimiter() const { return mDelimiter; }
65 69
66#ifdef _DEBUG 70#ifdef _DEBUG
67 void dump(); 71 void dump();
@@ -72,6 +76,7 @@ private:
72 LLWString mToken; 76 LLWString mToken;
73 LLColor3 mColor; 77 LLColor3 mColor;
74 LLWString mToolTip; 78 LLWString mToolTip;
79 LLWString mDelimiter;
75}; 80};
76 81
77class LLKeywords 82class LLKeywords
@@ -89,7 +94,8 @@ public:
89 void addToken(LLKeywordToken::TOKEN_TYPE type, 94 void addToken(LLKeywordToken::TOKEN_TYPE type,
90 const std::string& key, 95 const std::string& key,
91 const LLColor3& color, 96 const LLColor3& color,
92 const std::string& tool_tip = LLStringUtil::null); 97 const std::string& tool_tip = LLStringUtil::null,
98 const std::string& delimiter = LLStringUtil::null);
93 99
94 typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; 100 typedef std::map<LLWString, LLKeywordToken*> word_token_map_t;
95 typedef word_token_map_t::const_iterator keyword_iterator_t; 101 typedef word_token_map_t::const_iterator keyword_iterator_t;
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index 12d1929..9c8ee94 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -41,6 +41,7 @@
41#include "llgl.h" 41#include "llgl.h"
42#include "lltimer.h" 42#include "lltimer.h"
43 43
44#include "llcalc.h"
44//#include "llclipboard.h" 45//#include "llclipboard.h"
45#include "llcontrol.h" 46#include "llcontrol.h"
46#include "llbutton.h" 47#include "llbutton.h"
@@ -129,6 +130,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
129 mDrawAsterixes( FALSE ), 130 mDrawAsterixes( FALSE ),
130 mHandleEditKeysDirectly( FALSE ), 131 mHandleEditKeysDirectly( FALSE ),
131 mSelectAllonFocusReceived( FALSE ), 132 mSelectAllonFocusReceived( FALSE ),
133 mSelectAllonCommit( TRUE ),
132 mPassDelete(FALSE), 134 mPassDelete(FALSE),
133 mReadOnly(FALSE), 135 mReadOnly(FALSE),
134 mImage( sImage ), 136 mImage( sImage ),
@@ -226,7 +228,10 @@ void LLLineEditor::onCommit()
226 updateHistory(); 228 updateHistory();
227 229
228 LLUICtrl::onCommit(); 230 LLUICtrl::onCommit();
229 selectAll(); 231
232 // Selection on commit needs to be turned off when evaluating maths
233 // expressions, to allow indication of the error position
234 if (mSelectAllonCommit) selectAll();
230} 235}
231 236
232 237
@@ -2082,6 +2087,32 @@ BOOL LLLineEditor::prevalidateASCII(const LLWString &str)
2082 return rv; 2087 return rv;
2083} 2088}
2084 2089
2090BOOL LLLineEditor::evaluateFloat()
2091{
2092 bool success;
2093 F32 result = 0.f;
2094 std::string expr = getText();
2095
2096 success = LLCalc::getInstance()->evalString(expr, result);
2097
2098 if (!success)
2099 {
2100 // Move the cursor to near the error on failure
2101 setCursor(LLCalc::getInstance()->getLastErrorPos());
2102 // *TODO: Translated error message indicating the type of error? Select error text?
2103 }
2104 else
2105 {
2106 // Replace the expression with the result
2107 std::ostringstream result_str;
2108 result_str << result;
2109 setText(result_str.str());
2110 selectAll();
2111 }
2112
2113 return success;
2114}
2115
2085void LLLineEditor::onMouseCaptureLost() 2116void LLLineEditor::onMouseCaptureLost()
2086{ 2117{
2087 endSelection(); 2118 endSelection();
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h
index 09a240b..6738151 100644
--- a/linden/indra/llui/lllineeditor.h
+++ b/linden/indra/llui/lllineeditor.h
@@ -188,6 +188,7 @@ public:
188 188
189 void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; } 189 void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; }
190 void setSelectAllonFocusReceived(BOOL b); 190 void setSelectAllonFocusReceived(BOOL b);
191 void setSelectAllonCommit(BOOL b) { mSelectAllonCommit = b; }
191 192
192 void setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data)); 193 void setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data));
193 194
@@ -208,6 +209,8 @@ public:
208 static BOOL prevalidateASCII(const LLWString &str); 209 static BOOL prevalidateASCII(const LLWString &str);
209 210
210 static BOOL postvalidateFloat(const std::string &str); 211 static BOOL postvalidateFloat(const std::string &str);
212
213 BOOL evaluateFloat();
211 214
212 // line history support: 215 // line history support:
213 void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off 216 void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off
@@ -297,6 +300,7 @@ protected:
297 300
298 BOOL mHandleEditKeysDirectly; // If true, the standard edit keys (Ctrl-X, Delete, etc,) are handled here instead of routed by the menu system 301 BOOL mHandleEditKeysDirectly; // If true, the standard edit keys (Ctrl-X, Delete, etc,) are handled here instead of routed by the menu system
299 BOOL mSelectAllonFocusReceived; 302 BOOL mSelectAllonFocusReceived;
303 BOOL mSelectAllonCommit;
300 BOOL mPassDelete; 304 BOOL mPassDelete;
301 305
302 BOOL mReadOnly; 306 BOOL mReadOnly;
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp
index a106af4..b12d095 100644
--- a/linden/indra/llui/llspinctrl.cpp
+++ b/linden/indra/llui/llspinctrl.cpp
@@ -49,7 +49,7 @@
49#include "llfocusmgr.h" 49#include "llfocusmgr.h"
50#include "llresmgr.h" 50#include "llresmgr.h"
51 51
52const U32 MAX_STRING_LENGTH = 32; 52const U32 MAX_STRING_LENGTH = 255;
53 53
54static LLRegisterWidget<LLSpinCtrl> r2("spinner"); 54static LLRegisterWidget<LLSpinCtrl> r2("spinner");
55 55
@@ -123,7 +123,7 @@ LLSpinCtrl::LLSpinCtrl( const std::string& name, const LLRect& rect, const std::
123 mEditor = new LLLineEditor( std::string("SpinCtrl Editor"), editor_rect, LLStringUtil::null, font, 123 mEditor = new LLLineEditor( std::string("SpinCtrl Editor"), editor_rect, LLStringUtil::null, font,
124 MAX_STRING_LENGTH, 124 MAX_STRING_LENGTH,
125 &LLSpinCtrl::onEditorCommit, NULL, NULL, this, 125 &LLSpinCtrl::onEditorCommit, NULL, NULL, this,
126 &LLLineEditor::prevalidateFloat ); 126 &LLLineEditor::prevalidateASCII );
127 mEditor->setFollowsLeft(); 127 mEditor->setFollowsLeft();
128 mEditor->setFollowsBottom(); 128 mEditor->setFollowsBottom();
129 mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this ); 129 mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this );
@@ -132,6 +132,7 @@ LLSpinCtrl::LLSpinCtrl( const std::string& name, const LLRect& rect, const std::
132 // it's easier to understand 132 // it's easier to understand
133 //mEditor->setSelectAllonFocusReceived(TRUE); 133 //mEditor->setSelectAllonFocusReceived(TRUE);
134 mEditor->setIgnoreTab(TRUE); 134 mEditor->setIgnoreTab(TRUE);
135 mEditor->setSelectAllonCommit(FALSE);
135 addChild(mEditor); 136 addChild(mEditor);
136 137
137 updateEditor(); 138 updateEditor();
@@ -292,9 +293,10 @@ void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
292 LLSpinCtrl* self = (LLSpinCtrl*) userdata; 293 LLSpinCtrl* self = (LLSpinCtrl*) userdata;
293 llassert( caller == self->mEditor ); 294 llassert( caller == self->mEditor );
294 295
295 std::string text = self->mEditor->getText(); 296 if( self->mEditor->evaluateFloat() )
296 if( LLLineEditor::postvalidateFloat( text ) )
297 { 297 {
298 std::string text = self->mEditor->getText();
299
298 LLLocale locale(LLLocale::USER_LOCALE); 300 LLLocale locale(LLLocale::USER_LOCALE);
299 F32 val = (F32) atof(text.c_str()); 301 F32 val = (F32) atof(text.c_str());
300 302
@@ -322,9 +324,12 @@ void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
322 success = TRUE; 324 success = TRUE;
323 } 325 }
324 } 326 }
325 self->updateEditor();
326 327
327 if( !success ) 328 if( success )
329 {
330 self->updateEditor();
331 }
332 else
328 { 333 {
329 self->reportInvalidData(); 334 self->reportInvalidData();
330 } 335 }
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l
index 3e62195..2616b47 100644
--- a/linden/indra/lscript/lscript_compile/indra.l
+++ b/linden/indra/lscript/lscript_compile/indra.l
@@ -36,7 +36,8 @@ FS (f|F)
36#include "llclickaction.h" 36#include "llclickaction.h"
37 37
38void count(); 38void count();
39void comment(); 39void line_comment();
40void block_comment();
40void parse_string(); 41void parse_string();
41 42
42#define YYLMAX 16384 43#define YYLMAX 16384
@@ -60,7 +61,8 @@ extern "C" { int yyerror(const char *fmt, ...); }
60%} 61%}
61 62
62%% 63%%
63"//" { gInternalLine++; gInternalColumn = 0; comment(); } 64"//" { gInternalLine++; gInternalColumn = 0; line_comment(); }
65"/*" { block_comment(); }
64 66
65"integer" { count(); return(INTEGER); } 67"integer" { count(); return(INTEGER); }
66"float" { count(); return(FLOAT_TYPE); } 68"float" { count(); return(FLOAT_TYPE); }
@@ -790,7 +792,7 @@ S32 yywrap()
790 return(1); 792 return(1);
791} 793}
792 794
793void comment() 795void line_comment()
794{ 796{
795 char c; 797 char c;
796 798
@@ -798,6 +800,25 @@ void comment()
798 ; 800 ;
799} 801}
800 802
803void block_comment()
804{
805 char c1 = 0;
806 char c2 = yyinput();
807 while (c2 != 0 && c2 != EOF && !(c1 == '*' && c2 == '/')) {
808 if (c2 == '\n')
809 {
810 gInternalLine++;
811 gInternalColumn = 0;
812 }
813 else if (c2 == '\t')
814 gInternalColumn += 4 - (gInternalColumn % 8);
815 else
816 gInternalColumn++;
817 c1 = c2;
818 c2 = yyinput();
819 }
820}
821
801void count() 822void count()
802{ 823{
803 S32 i; 824 S32 i;
diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini
index 3679c38..2a911ba 100644
--- a/linden/indra/newview/app_settings/keywords.ini
+++ b/linden/indra/newview/app_settings/keywords.ini
@@ -533,7 +533,6 @@ SQRT2 1.4142135623730950488016887242097
533ZERO_VECTOR <0.0, 0.0, 0.0> 533ZERO_VECTOR <0.0, 0.0, 0.0>
534ZERO_ROTATION <0.0, 0.0, 0.0, 1.0> 534ZERO_ROTATION <0.0, 0.0, 0.0, 1.0>
535 535
536
537# flow control keywords 536# flow control keywords
538[word 0, 0, .8] 537[word 0, 0, .8]
539for for loop:for (initializer; test; iteration):{: statements:} 538for for loop:for (initializer; test; iteration):{: statements:}
@@ -551,9 +550,11 @@ return Leave current function or event handler
551# Comment 550# Comment
552[one_sided_delimiter .8, .3, .15] 551[one_sided_delimiter .8, .3, .15]
553// Comment:Non-functional commentary or disabled code 552// Comment:Non-functional commentary or disabled code
553[two_sided_delimiter .8, .3, .15]
554/* */ Comment:Non-functional commentary or disabled code
554 555
555# String literals 556# String literals
556[two_sided_delimiter 0, .2, 0] 557[two_sided_delimiter_esc 0, .2, 0]
557" String literal 558" " String literal
558 559
559#functions are supplied by the program now. 560#functions are supplied by the program now. \ No newline at end of file
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 7e591bf..01f6add 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -1849,17 +1849,6 @@
1849 <integer>0</integer> 1849 <integer>0</integer>
1850 </array> 1850 </array>
1851 </map> 1851 </map>
1852 <key>CompressSnapshotsToDisk</key>
1853 <map>
1854 <key>Comment</key>
1855 <string>Compress snapshots saved to disk (Using JPEG 2000)</string>
1856 <key>Persist</key>
1857 <integer>1</integer>
1858 <key>Type</key>
1859 <string>Boolean</string>
1860 <key>Value</key>
1861 <integer>0</integer>
1862 </map>
1863 <key>ConnectAsGod</key> 1852 <key>ConnectAsGod</key>
1864 <map> 1853 <map>
1865 <key>Comment</key> 1854 <key>Comment</key>
@@ -4387,7 +4376,7 @@
4387 <key>Type</key> 4376 <key>Type</key>
4388 <string>Boolean</string> 4377 <string>Boolean</string>
4389 <key>Value</key> 4378 <key>Value</key>
4390 <integer>0</integer> 4379 <integer>1</integer>
4391 </map> 4380 </map>
4392 <key>LipSyncOoh</key> 4381 <key>LipSyncOoh</key>
4393 <map> 4382 <map>
@@ -4730,6 +4719,17 @@
4730 <key>Value</key> 4719 <key>Value</key>
4731 <integer>1</integer> 4720 <integer>1</integer>
4732 </map> 4721 </map>
4722 <key>MiniMapTeleport</key>
4723 <map>
4724 <key>Comment</key>
4725 <string>Teleport on Mini-Map double click </string>
4726 <key>Persist</key>
4727 <integer>1</integer>
4728 <key>Type</key>
4729 <string>Boolean</string>
4730 <key>Value</key>
4731 <integer>1</integer>
4732 </map>
4733 <key>MiniMapScale</key> 4733 <key>MiniMapScale</key>
4734 <map> 4734 <map>
4735 <key>Comment</key> 4735 <key>Comment</key>
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 2cf418e..9e68078 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -109,6 +109,7 @@
109#include "llpostprocess.h" 109#include "llpostprocess.h"
110#include "llwlparammanager.h" 110#include "llwlparammanager.h"
111#include "llwaterparammanager.h" 111#include "llwaterparammanager.h"
112#include "llcalc.h"
112 113
113#include "lldebugview.h" 114#include "lldebugview.h"
114#include "llconsole.h" 115#include "llconsole.h"
@@ -1176,6 +1177,8 @@ bool LLAppViewer::cleanup()
1176 LLNotifyBox::cleanup(); 1177 LLNotifyBox::cleanup();
1177 1178
1178 LLWorldMap::getInstance()->reset(); // release any images 1179 LLWorldMap::getInstance()->reset(); // release any images
1180
1181 LLCalc::cleanUp();
1179 1182
1180 llinfos << "Global stuff deleted" << llendflush; 1183 llinfos << "Global stuff deleted" << llendflush;
1181 1184
@@ -1602,7 +1605,7 @@ bool LLAppViewer::initConfiguration()
1602 1605
1603 // - set procedural settings 1606 // - set procedural settings
1604 gSavedSettings.setString("ClientSettingsFile", 1607 gSavedSettings.setString("ClientSettingsFile",
1605 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFileName("Global"))); 1608 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml"));
1606 1609
1607 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME); 1610 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME);
1608 1611
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp
index 954bf9f..6e66103 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -992,6 +992,7 @@ public:
992 static void onClickLess(void* data) ; 992 static void onClickLess(void* data) ;
993 static void onClickMore(void* data) ; 993 static void onClickMore(void* data) ;
994 static void onClickUICheck(LLUICtrl *ctrl, void* data); 994 static void onClickUICheck(LLUICtrl *ctrl, void* data);
995 static void onClickHighResCheck(LLUICtrl *ctrl, void* data);
995 static void onClickHUDCheck(LLUICtrl *ctrl, void* data); 996 static void onClickHUDCheck(LLUICtrl *ctrl, void* data);
996 static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data); 997 static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data);
997 static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data); 998 static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data);
@@ -1105,6 +1106,10 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
1105{ 1106{
1106 LLSnapshotLivePreview* previewp = getPreviewView(floaterp); 1107 LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
1107 1108
1109 LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floaterp);
1110 if (shot_type != LLSnapshotLivePreview::SNAPSHOT_LOCAL)
1111 gSavedSettings.setBOOL("HighResSnapshot", FALSE);
1112
1108 S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; 1113 S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ;
1109 1114
1110 LLComboBox* combo; 1115 LLComboBox* combo;
@@ -1234,6 +1239,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1234 floater->childSetVisible("snapshot_height", is_advance); 1239 floater->childSetVisible("snapshot_height", is_advance);
1235 floater->childSetVisible("keep_aspect_check", is_advance); 1240 floater->childSetVisible("keep_aspect_check", is_advance);
1236 floater->childSetVisible("ui_check", is_advance); 1241 floater->childSetVisible("ui_check", is_advance);
1242 floater->childSetVisible("high_res_check", is_advance && is_local);
1237 floater->childSetVisible("hud_check", is_advance); 1243 floater->childSetVisible("hud_check", is_advance);
1238 floater->childSetVisible("keep_open_check", is_advance); 1244 floater->childSetVisible("keep_open_check", is_advance);
1239 floater->childSetVisible("freeze_frame_check", is_advance); 1245 floater->childSetVisible("freeze_frame_check", is_advance);
@@ -1246,7 +1252,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1246 layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; 1252 layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
1247 floater->childSetValue("layer_types", "colors"); 1253 floater->childSetValue("layer_types", "colors");
1248 if(is_advance) 1254 if(is_advance)
1249 { 1255 {
1250 setResolution(floater, "postcard_size_combo"); 1256 setResolution(floater, "postcard_size_combo");
1251 } 1257 }
1252 break; 1258 break;
@@ -1434,7 +1440,26 @@ void LLFloaterSnapshot::Impl::onClickUICheck(LLUICtrl *ctrl, void* data)
1434 1440
1435 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; 1441 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
1436 if (view) 1442 if (view)
1443 {
1444 BOOL high_res_snapshot = gSavedSettings.getBOOL("HighResSnapshot");
1445 if (high_res_snapshot) gSavedSettings.setBOOL("HighResSnapshot", FALSE);
1446 view->childSetEnabled("high_res_check", !check->get());
1447 checkAutoSnapshot(getPreviewView(view), TRUE);
1448 }
1449}
1450
1451// static
1452void LLFloaterSnapshot::Impl::onClickHighResCheck(LLUICtrl *ctrl, void* data)
1453{
1454 LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
1455 gSavedSettings.setBOOL( "HighResSnapshot", check->get() );
1456
1457 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
1458 if (view)
1437 { 1459 {
1460 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot");
1461 if (ui_in_snapshot) gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE);
1462 view->childSetEnabled("ui_check", !check->get());
1438 checkAutoSnapshot(getPreviewView(view), TRUE); 1463 checkAutoSnapshot(getPreviewView(view), TRUE);
1439 } 1464 }
1440} 1465}
@@ -1912,6 +1937,9 @@ BOOL LLFloaterSnapshot::postBuild()
1912 1937
1913 childSetCommitCallback("ui_check", Impl::onClickUICheck, this); 1938 childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
1914 1939
1940 childSetCommitCallback("high_res_check", Impl::onClickHighResCheck, this);
1941 childSetValue("high_res_check", gSavedSettings.getBOOL("HighResSnapshot"));
1942
1915 childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this); 1943 childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this);
1916 childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot")); 1944 childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot"));
1917 1945
@@ -2001,8 +2029,23 @@ void LLFloaterSnapshot::draw()
2001 childSetEnabled("send_btn", FALSE); 2029 childSetEnabled("send_btn", FALSE);
2002 childSetEnabled("save_btn", FALSE); 2030 childSetEnabled("save_btn", FALSE);
2003 } 2031 }
2004 2032
2005 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); 2033 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot");
2034
2035 if (previewp->getSnapshotType() != LLSnapshotLivePreview::SNAPSHOT_LOCAL)
2036 {
2037 childSetValue("high_res_check", FALSE);
2038 childSetEnabled("ui_check", TRUE);
2039 }
2040 else
2041 {
2042 if (ui_in_snapshot)
2043 {
2044 gSavedSettings.setBOOL("HighResSnapshot", FALSE);
2045 childSetEnabled("high_res_check", FALSE);
2046 }
2047 }
2048
2006 childSetValue("ui_check", ui_in_snapshot); 2049 childSetValue("ui_check", ui_in_snapshot);
2007 childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); 2050 childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot"));
2008 } 2051 }
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index b56bfcb..8396454 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -743,7 +743,7 @@ void LLFloaterWorldMap::updateLocation()
743void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) 743void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord)
744{ 744{
745 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); 745 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name);
746 z_coord = llclamp(z_coord, 0, 1000); 746 z_coord = llclamp(z_coord, 0, 4096);
747 if (sim_info) 747 if (sim_info)
748 { 748 {
749 LLVector3 local_pos; 749 LLVector3 local_pos;
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index bde36cc..34277f7 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -756,6 +756,10 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
756 model->deleteObject(mUUID); 756 model->deleteObject(mUUID);
757 model->notifyObservers(); 757 model->notifyObservers();
758 } 758 }
759 else if ("restoreToWorld" == action)
760 {
761 restoreToWorld();
762 }
759 else if ("restore" == action) 763 else if ("restore" == action)
760 { 764 {
761 restoreItem(); 765 restoreItem();
@@ -812,6 +816,47 @@ void LLItemBridge::restoreItem()
812 } 816 }
813} 817}
814 818
819void LLItemBridge::restoreToWorld()
820{
821 LLViewerInventoryItem* itemp = (LLViewerInventoryItem*)getItem();
822 if (itemp)
823 {
824 LLMessageSystem* msg = gMessageSystem;
825 msg->newMessage("RezRestoreToWorld");
826 msg->nextBlockFast(_PREHASH_AgentData);
827 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
828 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
829
830 msg->nextBlockFast(_PREHASH_InventoryData);
831 itemp->packMessage(msg);
832 msg->sendReliable(gAgent.getRegion()->getHost());
833 }
834
835 //Similar functionality to the drag and drop rez logic
836 BOOL remove_from_inventory = FALSE;
837
838 //remove local inventory copy, sim will deal with permissions and removing the item
839 //from the actual inventory if its a no-copy etc
840 if(!itemp->getPermissions().allowCopyBy(gAgent.getID()))
841 {
842 remove_from_inventory = TRUE;
843 }
844
845 // Check if it's in the trash. (again similar to the normal rez logic)
846 LLUUID trash_id;
847 trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
848 if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id))
849 {
850 remove_from_inventory = TRUE;
851 }
852
853 if(remove_from_inventory)
854 {
855 gInventory.deleteObject(itemp->getUUID());
856 gInventory.notifyObservers();
857 }
858}
859
815LLUIImagePtr LLItemBridge::getIcon() const 860LLUIImagePtr LLItemBridge::getIcon() const
816{ 861{
817 return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]); 862 return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]);
@@ -3376,6 +3421,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3376 items.push_back(std::string("Object Wear")); 3421 items.push_back(std::string("Object Wear"));
3377 items.push_back(std::string("Attach To")); 3422 items.push_back(std::string("Attach To"));
3378 items.push_back(std::string("Attach To HUD")); 3423 items.push_back(std::string("Attach To HUD"));
3424 items.push_back(std::string("Restore to Last Position"));
3379 3425
3380 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); 3426 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
3381 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE); 3427 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE);
@@ -4364,7 +4410,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4364 items.push_back(std::string("Wearable Wear")); 4410 items.push_back(std::string("Wearable Wear"));
4365 items.push_back(std::string("Wearable Edit")); 4411 items.push_back(std::string("Wearable Edit"));
4366 4412
4367
4368 if ((flags & FIRST_SELECTED_ITEM) == 0) 4413 if ((flags & FIRST_SELECTED_ITEM) == 0)
4369 { 4414 {
4370 disabled_items.push_back(std::string("Wearable Edit")); 4415 disabled_items.push_back(std::string("Wearable Edit"));
diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h
index 329e57f..eb17432 100644
--- a/linden/indra/newview/llinventorybridge.h
+++ b/linden/indra/newview/llinventorybridge.h
@@ -159,6 +159,7 @@ public:
159 159
160 virtual const std::string& getPrefix() { return LLStringUtil::null; } 160 virtual const std::string& getPrefix() { return LLStringUtil::null; }
161 virtual void restoreItem() {} 161 virtual void restoreItem() {}
162 virtual void restoreToWorld() {}
162 163
163 // LLFolderViewEventListener functions 164 // LLFolderViewEventListener functions
164 virtual const std::string& getName() const; 165 virtual const std::string& getName() const;
@@ -243,6 +244,7 @@ public:
243 244
244 virtual void selectItem(); 245 virtual void selectItem();
245 virtual void restoreItem(); 246 virtual void restoreItem();
247 virtual void restoreToWorld();
246 248
247 virtual LLUIImagePtr getIcon() const; 249 virtual LLUIImagePtr getIcon() const;
248 virtual const std::string& getDisplayName() const; 250 virtual const std::string& getDisplayName() const;
@@ -283,7 +285,6 @@ public:
283 virtual void selectItem(); 285 virtual void selectItem();
284 virtual void restoreItem(); 286 virtual void restoreItem();
285 287
286
287 virtual LLUIImagePtr getIcon() const; 288 virtual LLUIImagePtr getIcon() const;
288 virtual BOOL renameItem(const std::string& new_name); 289 virtual BOOL renameItem(const std::string& new_name);
289 virtual BOOL removeItem(); 290 virtual BOOL removeItem();
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp
index b1e3017..73f0fb3 100644
--- a/linden/indra/newview/llinventorymodel.cpp
+++ b/linden/indra/newview/llinventorymodel.cpp
@@ -73,7 +73,6 @@ F32 LLInventoryModel::sMinTimeBetweenFetches = 0.3f;
73F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f; 73F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f;
74BOOL LLInventoryModel::sTimelyFetchPending = FALSE; 74BOOL LLInventoryModel::sTimelyFetchPending = FALSE;
75LLFrameTimer LLInventoryModel::sFetchTimer; 75LLFrameTimer LLInventoryModel::sFetchTimer;
76LLInventoryModel::cat_map_t LLInventoryModel::sBulkFetchMap;
77S16 LLInventoryModel::sBulkFetchCount = 0; 76S16 LLInventoryModel::sBulkFetchCount = 0;
78 77
79// RN: for some reason, using std::queue in the header file confuses the compiler which things it's an xmlrpc_queue 78// RN: for some reason, using std::queue in the header file confuses the compiler which things it's an xmlrpc_queue
@@ -85,7 +84,7 @@ static std::deque<LLUUID> sFetchQueue;
85 84
86//BOOL decompress_file(const char* src_filename, const char* dst_filename); 85//BOOL decompress_file(const char* src_filename, const char* dst_filename);
87const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; 86const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f;
88const S32 MAX_FETCH_RETRIES = 5; 87const S32 MAX_FETCH_RETRIES = 10;
89const char CACHE_FORMAT_STRING[] = "%s.inv"; 88const char CACHE_FORMAT_STRING[] = "%s.inv";
90const char* NEW_CATEGORY_NAME = "New Folder"; 89const char* NEW_CATEGORY_NAME = "New Folder";
91const char* NEW_CATEGORY_NAMES[LLAssetType::AT_COUNT] = 90const char* NEW_CATEGORY_NAMES[LLAssetType::AT_COUNT] =
@@ -990,13 +989,24 @@ BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer)
990// Call this method when it's time to update everyone on a new state, 989// Call this method when it's time to update everyone on a new state,
991// by default, the inventory model will not update observers 990// by default, the inventory model will not update observers
992// automatically. 991// automatically.
993void LLInventoryModel::notifyObservers() 992// The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328]
993void LLInventoryModel::notifyObservers(const std::string service_name)
994{ 994{
995 for (observer_list_t::iterator iter = mObservers.begin(); 995 for (observer_list_t::iterator iter = mObservers.begin();
996 iter != mObservers.end(); ) 996 iter != mObservers.end(); )
997 { 997 {
998 LLInventoryObserver* observer = *iter; 998 LLInventoryObserver* observer = *iter;
999 observer->changed(mModifyMask); 999
1000 if (service_name.empty())
1001 {
1002 observer->changed(mModifyMask);
1003 }
1004 else
1005 {
1006 observer->mMessageName = service_name;
1007 observer->changed(mModifyMask);
1008 }
1009
1000 // safe way to incrament since changed may delete entries! (@!##%@!@&*!) 1010 // safe way to incrament since changed may delete entries! (@!##%@!@&*!)
1001 iter = mObservers.upper_bound(observer); 1011 iter = mObservers.upper_bound(observer);
1002 } 1012 }
@@ -1038,6 +1048,79 @@ void LLInventoryModel::mock(const LLUUID& root_id)
1038} 1048}
1039*/ 1049*/
1040 1050
1051//If we get back a normal response, handle it here
1052void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
1053{
1054 start_new_inventory_observer();
1055
1056 /*LLUUID agent_id;
1057 agent_id = content["agent_id"].asUUID();
1058 if(agent_id != gAgent.getID())
1059 {
1060 llwarns << "Got a inventory update for the wrong agent: " << agent_id
1061 << llendl;
1062 return;
1063 }*/
1064 item_array_t items;
1065 update_map_t update;
1066 S32 count = content["items"].size();
1067 bool all_one_folder = true;
1068 LLUUID folder_id;
1069 // Does this loop ever execute more than once? -Gigs
1070 for(S32 i = 0; i < count; ++i)
1071 {
1072 LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
1073 titem->unpackMessage(content["items"][i]);
1074
1075 lldebugs << "LLInventoryModel::messageUpdateCore() item id:"
1076 << titem->getUUID() << llendl;
1077 items.push_back(titem);
1078 // examine update for changes.
1079 LLViewerInventoryItem* itemp = gInventory.getItem(titem->getUUID());
1080 if(itemp)
1081 {
1082 if(titem->getParentUUID() == itemp->getParentUUID())
1083 {
1084 update[titem->getParentUUID()];
1085 }
1086 else
1087 {
1088 ++update[titem->getParentUUID()];
1089 --update[itemp->getParentUUID()];
1090 }
1091 }
1092 else
1093 {
1094 ++update[titem->getParentUUID()];
1095 }
1096 if (folder_id.isNull())
1097 {
1098 folder_id = titem->getParentUUID();
1099 }
1100 else
1101 {
1102 all_one_folder = false;
1103 }
1104 }
1105
1106 U32 changes = 0x0;
1107 //as above, this loop never seems to loop more than once per call
1108 for (item_array_t::iterator it = items.begin(); it != items.end(); ++it)
1109 {
1110 changes |= gInventory.updateItem(*it);
1111 }
1112 gInventory.notifyObservers("fetchinventory");
1113 gViewerWindow->getWindow()->decBusyCount();
1114}
1115
1116//If we get back an error (not found, etc...), handle it here
1117void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::string& reason)
1118{
1119 llinfos << "fetchInventory::error "
1120 << status << ": " << reason << llendl;
1121 gInventory.notifyObservers("fetchinventory");
1122}
1123
1041void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) 1124void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
1042{ 1125{
1043 LLViewerInventoryCategory* cat = getCategory(folder_id); 1126 LLViewerInventoryCategory* cat = getCategory(folder_id);
@@ -1065,21 +1148,31 @@ void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
1065} 1148}
1066 1149
1067//Initialize statics. 1150//Initialize statics.
1068LLAlertDialog* LLInventoryModel::fetchDescendentsResponder::sRetryDialog=NULL;
1069LLSD LLInventoryModel::fetchDescendentsResponder::sRetrySD;
1070
1071bool LLInventoryModel::isBulkFetchProcessingComplete() 1151bool LLInventoryModel::isBulkFetchProcessingComplete()
1072{ 1152{
1073 return ( (sFetchQueue.empty() 1153 return ( (sFetchQueue.empty()
1074 && sBulkFetchMap.empty() 1154 && sBulkFetchCount<=0) ? TRUE : FALSE ) ;
1075 && sBulkFetchCount==0) ? TRUE : FALSE ) ;
1076} 1155}
1077 1156
1157class fetchDescendentsResponder: public LLHTTPClient::Responder
1158{
1159 public:
1160 fetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
1161 //fetchDescendentsResponder() {};
1162 void result(const LLSD& content);
1163 void error(U32 status, const std::string& reason);
1164 public:
1165 typedef std::vector<LLViewerInventoryCategory*> folder_ref_t;
1166 protected:
1167 LLSD mRequestSD;
1168};
1169
1078//If we get back a normal response, handle it here 1170//If we get back a normal response, handle it here
1079void LLInventoryModel::fetchDescendentsResponder::result(const LLSD& content) 1171void fetchDescendentsResponder::result(const LLSD& content)
1080{ 1172{
1081 if (content.has("folders")) 1173 if (content.has("folders"))
1082 { 1174 {
1175
1083 for(LLSD::array_const_iterator folder_it = content["folders"].beginArray(); 1176 for(LLSD::array_const_iterator folder_it = content["folders"].beginArray();
1084 folder_it != content["folders"].endArray(); 1177 folder_it != content["folders"].endArray();
1085 ++folder_it) 1178 ++folder_it)
@@ -1087,19 +1180,54 @@ void LLInventoryModel::fetchDescendentsResponder::result(const LLSD& content)
1087 LLSD folder_sd = *folder_it; 1180 LLSD folder_sd = *folder_it;
1088 1181
1089 1182
1090 LLUUID agent_id = folder_sd["agent-id"]; 1183 //LLUUID agent_id = folder_sd["agent_id"];
1091 1184
1092 if(agent_id != gAgent.getID()) //This should never happen. 1185 //if(agent_id != gAgent.getID()) //This should never happen.
1093 { 1186 //{
1094 llwarns << "Got a UpdateInventoryItem for the wrong agent." 1187 // llwarns << "Got a UpdateInventoryItem for the wrong agent."
1095 << llendl; 1188 // << llendl;
1096 break; 1189 // break;
1097 } 1190 //}
1098 LLUUID parent_id = folder_sd["folder-id"]; 1191
1099 LLUUID owner_id = folder_sd["owner-id"]; 1192 LLUUID parent_id = folder_sd["folder_id"];
1193 LLUUID owner_id = folder_sd["owner_id"];
1100 S32 version = (S32)folder_sd["version"].asInteger(); 1194 S32 version = (S32)folder_sd["version"].asInteger();
1101 S32 descendents = (S32)folder_sd["descendents"].asInteger(); 1195 S32 descendents = (S32)folder_sd["descendents"].asInteger();
1102 LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id); 1196 LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id);
1197
1198 if (parent_id.isNull())
1199 {
1200 LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
1201 for(LLSD::array_const_iterator item_it = folder_sd["items"].beginArray();
1202 item_it != folder_sd["items"].endArray();
1203 ++item_it)
1204 {
1205 LLUUID lost_uuid = gInventory.findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND);
1206 if (lost_uuid.notNull())
1207 {
1208 LLSD item = *item_it;
1209 titem->unpackMessage(item);
1210
1211 LLInventoryModel::update_list_t update;
1212 LLInventoryModel::LLCategoryUpdate new_folder(lost_uuid, 1);
1213 update.push_back(new_folder);
1214 gInventory.accountForUpdate(update);
1215
1216 titem->setParent(lost_uuid);
1217 titem->updateParentOnServer(FALSE);
1218 gInventory.updateItem(titem);
1219 gInventory.notifyObservers("fetchDescendents");
1220
1221 }
1222 }
1223 }
1224
1225 LLViewerInventoryCategory* pcat = gInventory.getCategory(parent_id);
1226 if (!pcat)
1227 {
1228 continue;
1229 }
1230
1103 for(LLSD::array_const_iterator category_it = folder_sd["categories"].beginArray(); 1231 for(LLSD::array_const_iterator category_it = folder_sd["categories"].beginArray();
1104 category_it != folder_sd["categories"].endArray(); 1232 category_it != folder_sd["categories"].endArray();
1105 ++category_it) 1233 ++category_it)
@@ -1107,7 +1235,7 @@ void LLInventoryModel::fetchDescendentsResponder::result(const LLSD& content)
1107 LLSD category = *category_it; 1235 LLSD category = *category_it;
1108 tcategory->fromLLSD(category); 1236 tcategory->fromLLSD(category);
1109 1237
1110 if (sFullFetchStarted) 1238 if (LLInventoryModel::sFullFetchStarted)
1111 { 1239 {
1112 sFetchQueue.push_back(tcategory->getUUID()); 1240 sFetchQueue.push_back(tcategory->getUUID());
1113 } 1241 }
@@ -1139,37 +1267,37 @@ void LLInventoryModel::fetchDescendentsResponder::result(const LLSD& content)
1139 } 1267 }
1140 } 1268 }
1141 1269
1142 if (content.has("bad-folders")) 1270 if (content.has("bad_folders"))
1143 { 1271 {
1144 for(LLSD::array_const_iterator folder_it = content["bad-folders"].beginArray(); 1272 for(LLSD::array_const_iterator folder_it = content["bad_folders"].beginArray();
1145 folder_it != content["bad-folders"].endArray(); 1273 folder_it != content["bad_folders"].endArray();
1146 ++folder_it) 1274 ++folder_it)
1147 { 1275 {
1148 LLSD folder_sd = *folder_it; 1276 LLSD folder_sd = *folder_it;
1149 1277
1150 //These folders failed on the dataserver. We probably don't want to retry them. 1278 //These folders failed on the dataserver. We probably don't want to retry them.
1151 llinfos << "Folder " << folder_sd["folder-id"].asString() 1279 llinfos << "Folder " << folder_sd["folder_id"].asString()
1152 << "Error: " << folder_sd["error"].asString() << llendl; 1280 << "Error: " << folder_sd["error"].asString() << llendl;
1153 } 1281 }
1154 } 1282 }
1155 1283
1156 LLInventoryModel::incrBulkFetch(-1); 1284 LLInventoryModel::incrBulkFetch(-1);
1157 1285
1158 if (isBulkFetchProcessingComplete()) 1286 if (LLInventoryModel::isBulkFetchProcessingComplete())
1159 { 1287 {
1160 llinfos << "Inventory fetch completed" << llendl; 1288 llinfos << "Inventory fetch completed" << llendl;
1161 if (sFullFetchStarted) 1289 if (LLInventoryModel::sFullFetchStarted)
1162 { 1290 {
1163 sAllFoldersFetched = TRUE; 1291 LLInventoryModel::sAllFoldersFetched = TRUE;
1164 } 1292 }
1165 stopBackgroundFetch(); 1293 LLInventoryModel::stopBackgroundFetch();
1166 } 1294 }
1167 1295
1168 gInventory.notifyObservers(); 1296 gInventory.notifyObservers("fetchDescendents");
1169} 1297}
1170 1298
1171//If we get back an error (not found, etc...), handle it here 1299//If we get back an error (not found, etc...), handle it here
1172void LLInventoryModel::fetchDescendentsResponder::error(U32 status, const std::string& reason) 1300void fetchDescendentsResponder::error(U32 status, const std::string& reason)
1173{ 1301{
1174 llinfos << "fetchDescendentsResponder::error " 1302 llinfos << "fetchDescendentsResponder::error "
1175 << status << ": " << reason << llendl; 1303 << status << ": " << reason << llendl;
@@ -1183,61 +1311,22 @@ void LLInventoryModel::fetchDescendentsResponder::error(U32 status, const std::s
1183 ++folder_it) 1311 ++folder_it)
1184 { 1312 {
1185 LLSD folder_sd = *folder_it; 1313 LLSD folder_sd = *folder_it;
1186 sRetrySD["folders"].append(folder_sd); 1314 LLUUID folder_id = folder_sd["folder_id"];
1187 } 1315 sFetchQueue.push_front(folder_id);
1188 sMinTimeBetweenFetches = 10.0f; //Add 10 seconds for every time out in this sequence.
1189
1190 if (!sRetryDialog) //The dialog isn't up. Prompt the resident.
1191 {
1192 sRetryDialog = gViewerWindow->alertXml("RetryFetchInventoryDescendents", onClickRetry, this);
1193 } 1316 }
1194 } 1317 }
1195 else 1318 else
1196 { 1319 {
1197 if (isBulkFetchProcessingComplete()) 1320 if (LLInventoryModel::isBulkFetchProcessingComplete())
1198 { 1321 {
1199 if (sFullFetchStarted) 1322 if (LLInventoryModel::sFullFetchStarted)
1200 { 1323 {
1201 sAllFoldersFetched = TRUE; 1324 LLInventoryModel::sAllFoldersFetched = TRUE;
1202 } 1325 }
1203 stopBackgroundFetch(); 1326 LLInventoryModel::stopBackgroundFetch();
1204 } 1327 }
1205 } 1328 }
1206 gInventory.notifyObservers(); 1329 gInventory.notifyObservers("fetchDescendents");
1207}
1208
1209void LLInventoryModel::fetchDescendentsResponder::onClickRetry(S32 option, void* userdata)
1210{
1211 if (option == 0)
1212 {
1213 std::string url;
1214
1215 LLViewerRegion * agent_region = gAgent.getRegion();
1216 if (agent_region)
1217 {
1218 url = agent_region->getCapability("FetchInventoryDescendents");
1219 }
1220
1221 if (!url.empty()) //Capability found. Build up LLSD and use it.
1222 {
1223 LLSD body = sRetrySD;
1224 LLInventoryModel::incrBulkFetch(1);
1225 LLHTTPClient::post(url, body, new LLInventoryModel::fetchDescendentsResponder(body),300);
1226 }
1227 }
1228 else
1229 {
1230 if (isBulkFetchProcessingComplete())
1231 {
1232 if (sFullFetchStarted)
1233 {
1234 sAllFoldersFetched = TRUE;
1235 }
1236 stopBackgroundFetch();
1237 }
1238 }
1239 sRetryDialog=NULL;
1240 sRetrySD.clear();
1241} 1330}
1242 1331
1243//static Bundle up a bunch of requests to send all at once. 1332//static Bundle up a bunch of requests to send all at once.
@@ -1250,7 +1339,7 @@ void LLInventoryModel::bulkFetch(std::string url)
1250 1339
1251 S16 max_concurrent_fetches=8; 1340 S16 max_concurrent_fetches=8;
1252 F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. 1341 F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely.
1253 if (sMinTimeBetweenFetches <= new_min_time) sMinTimeBetweenFetches=new_min_time; //HACK! See above. 1342 if (sMinTimeBetweenFetches < new_min_time) sMinTimeBetweenFetches=new_min_time; //HACK! See above.
1254 1343
1255 if(gDisconnected 1344 if(gDisconnected
1256 || sBulkFetchCount > max_concurrent_fetches 1345 || sBulkFetchCount > max_concurrent_fetches
@@ -1263,84 +1352,83 @@ void LLInventoryModel::bulkFetch(std::string url)
1263 //redundant requests. When we get rid of the old code entirely, we can change 1352 //redundant requests. When we get rid of the old code entirely, we can change
1264 //the dequeue to a map. In the new model, there is no benefit to queue order. 1353 //the dequeue to a map. In the new model, there is no benefit to queue order.
1265 U32 folder_count=0; 1354 U32 folder_count=0;
1266 U32 max_batch_size=10; 1355 U32 max_batch_size=5;
1267 while( !(sFetchQueue.empty() ) ) 1356
1268 { 1357 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
1269 LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); 1358
1270 1359 LLSD body;
1271 if (cat) 1360 LLSD body_lib;
1272 { 1361 while( !(sFetchQueue.empty() ) && (folder_count < max_batch_size) )
1273 if ( !gInventory.isCategoryComplete(cat->getUUID()) ) //grab this folder. 1362 {
1274 { 1363 if (sFetchQueue.front().isNull()) //DEV-17797
1275 sBulkFetchMap[(cat->getUUID())] = cat; 1364 {
1276 } 1365 LLSD folder_sd;
1277 else if (sFullFetchStarted) 1366 folder_sd["folder_id"] = LLUUID::null.asString();
1278 { //Already have this folder but append child folders to list. 1367 folder_sd["owner_id"] = gAgent.getID();
1279 // add all children to queue 1368 folder_sd["sort_order"] = (LLSD::Integer)sort_order;
1280 parent_cat_map_t::iterator cat_it = gInventory.mParentChildCategoryTree.find(cat->getUUID()); 1369 folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE;
1281 if (cat_it != gInventory.mParentChildCategoryTree.end()) 1370 folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
1282 { 1371 body["folders"].append(folder_sd);
1283 cat_array_t* child_categories = cat_it->second; 1372 folder_count++;
1284 1373 }
1285 for (S32 child_num = 0; child_num < child_categories->count(); child_num++) 1374 else
1286 { 1375 {
1287 sFetchQueue.push_back(child_categories->get(child_num)->getUUID()); 1376
1288 }
1289 }
1290 1377
1291 } 1378 LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front());
1292 } 1379
1380 if (cat)
1381 {
1382 if ( LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
1383 {
1384 LLSD folder_sd;
1385 folder_sd["folder_id"] = cat->getUUID();
1386 folder_sd["owner_id"] = cat->getOwnerID();
1387 folder_sd["sort_order"] = (LLSD::Integer)sort_order;
1388 folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted;
1389 folder_sd["fetch_items"] = (LLSD::Boolean)TRUE;
1390
1391 if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
1392 body_lib["folders"].append(folder_sd);
1393 else
1394 body["folders"].append(folder_sd);
1395 folder_count++;
1396 }
1397 if (sFullFetchStarted)
1398 { //Already have this folder but append child folders to list.
1399 // add all children to queue
1400 parent_cat_map_t::iterator cat_it = gInventory.mParentChildCategoryTree.find(cat->getUUID());
1401 if (cat_it != gInventory.mParentChildCategoryTree.end())
1402 {
1403 cat_array_t* child_categories = cat_it->second;
1404
1405 for (S32 child_num = 0; child_num < child_categories->count(); child_num++)
1406 {
1407 sFetchQueue.push_back(child_categories->get(child_num)->getUUID());
1408 }
1409 }
1410
1411 }
1412 }
1413 }
1293 sFetchQueue.pop_front(); 1414 sFetchQueue.pop_front();
1294 } 1415 }
1295 1416
1296
1297 if (!sBulkFetchMap.empty()) //There's stuff to fetch.
1298 {
1299 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
1300
1301 LLSD body;
1302
1303 cat_map_t::iterator iter=sBulkFetchMap.begin();
1304 while( iter!=sBulkFetchMap.end() && (folder_count < max_batch_size) )
1305 {
1306 LLViewerInventoryCategory* cat = iter->second;
1307
1308 if (cat && !gInventory.isCategoryComplete(cat->getUUID()) ) //Category exists
1309 {
1310 BOOL fetchItems=TRUE;
1311 if ( sFullFetchStarted
1312 && gInventory.isCategoryComplete(cat->getUUID()) )
1313 {
1314 fetchItems=FALSE;
1315 }
1316
1317 LLSD folder_sd;
1318 folder_sd["folder-id"] = cat->getUUID();
1319 folder_sd["owner-id"] = cat->getOwnerID();
1320 folder_sd["sort-order"] = (LLSD::Integer)sort_order;
1321 folder_sd["fetch-folders"] = (LLSD::Boolean)sFullFetchStarted;
1322 folder_sd["fetch-items"] = (LLSD::Boolean)fetchItems;
1323 body["folders"].append(folder_sd);
1324
1325 folder_count++;
1326 }
1327 sBulkFetchMap.erase(iter);
1328 iter=sBulkFetchMap.begin();
1329 }
1330
1331 if (iter == sBulkFetchMap.end()) sBulkFetchMap.clear();
1332
1333 if (folder_count > 0) 1417 if (folder_count > 0)
1334 { 1418 {
1335 sBulkFetchCount++; 1419 sBulkFetchCount++;
1336 1420 if (body["folders"].size())
1337 LLHTTPClient::post(url, body, new LLInventoryModel::fetchDescendentsResponder(body)); 1421 {
1422 LLHTTPClient::post(url, body, new fetchDescendentsResponder(body),300.0);
1423 }
1424 if (body_lib["folders"].size())
1425 {
1426 std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents");
1427 LLHTTPClient::post(url_lib, body_lib, new fetchDescendentsResponder(body_lib),300.0);
1428 }
1338 sFetchTimer.reset(); 1429 sFetchTimer.reset();
1339 } 1430 }
1340 1431 else if (isBulkFetchProcessingComplete())
1341 }
1342
1343 if (isBulkFetchProcessingComplete())
1344 { 1432 {
1345 if (sFullFetchStarted) 1433 if (sFullFetchStarted)
1346 { 1434 {
@@ -1391,6 +1479,14 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id)
1391} 1479}
1392 1480
1393//static 1481//static
1482void LLInventoryModel::findLostItems()
1483{
1484 sBackgroundFetchActive = TRUE;
1485 sFetchQueue.push_back(LLUUID::null);
1486 gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL);
1487}
1488
1489//static
1394void LLInventoryModel::stopBackgroundFetch() 1490void LLInventoryModel::stopBackgroundFetch()
1395{ 1491{
1396 if (sBackgroundFetchActive) 1492 if (sBackgroundFetchActive)
@@ -1409,14 +1505,7 @@ void LLInventoryModel::backgroundFetch(void*)
1409 if (sBackgroundFetchActive) 1505 if (sBackgroundFetchActive)
1410 { 1506 {
1411 //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. 1507 //If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
1412 std::string url; 1508 std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
1413
1414 LLViewerRegion * agent_region = gAgent.getRegion();
1415 if (agent_region)
1416 {
1417 url = agent_region->getCapability("FetchInventoryDescendents");
1418 }
1419
1420 if (!url.empty()) 1509 if (!url.empty())
1421 { 1510 {
1422 bulkFetch(url); 1511 bulkFetch(url);
@@ -3373,12 +3462,72 @@ bool LLInventoryFetchObserver::isEverythingComplete() const
3373 return mIncomplete.empty(); 3462 return mIncomplete.empty();
3374} 3463}
3375 3464
3465void fetch_items_from_llsd(const LLSD& items_llsd)
3466{
3467 if (!items_llsd.size()) return;
3468 LLSD body;
3469 body[0]["cap_name"] = "FetchInventory";
3470 body[1]["cap_name"] = "FetchLib";
3471 for (S32 i=0; i<items_llsd.size();i++)
3472 {
3473 if (items_llsd[i]["owner_id"].asString() == gAgent.getID().asString())
3474 {
3475 body[0]["items"].append(items_llsd[i]);
3476 continue;
3477 }
3478 if (items_llsd[i]["owner_id"].asString() == ALEXANDRIA_LINDEN_ID.asString())
3479 {
3480 body[1]["items"].append(items_llsd[i]);
3481 continue;
3482 }
3483 }
3484
3485 for (S32 i=0; i<body.size(); i++)
3486 {
3487 if (0 >= body[i].size()) continue;
3488 std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
3489
3490 if (!url.empty())
3491 {
3492 body[i]["agent_id"] = gAgent.getID();
3493 LLHTTPClient::post(url, body[i], new LLInventoryModel::fetchInventoryResponder(body[i]));
3494 break;
3495 }
3496
3497 LLMessageSystem* msg = gMessageSystem;
3498 BOOL start_new_message = TRUE;
3499 for (S32 j=0; j<body[i]["items"].size(); j++)
3500 {
3501 LLSD item_entry = body[i]["items"][j];
3502 if(start_new_message)
3503 {
3504 start_new_message = FALSE;
3505 msg->newMessageFast(_PREHASH_FetchInventory);
3506 msg->nextBlockFast(_PREHASH_AgentData);
3507 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3508 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3509 }
3510 msg->nextBlockFast(_PREHASH_InventoryData);
3511 msg->addUUIDFast(_PREHASH_OwnerID, item_entry["owner_id"].asUUID());
3512 msg->addUUIDFast(_PREHASH_ItemID, item_entry["item_id"].asUUID());
3513 if(msg->isSendFull(NULL))
3514 {
3515 start_new_message = TRUE;
3516 gAgent.sendReliableMessage();
3517 }
3518 }
3519 if(!start_new_message)
3520 {
3521 gAgent.sendReliableMessage();
3522 }
3523 }
3524}
3525
3376void LLInventoryFetchObserver::fetchItems( 3526void LLInventoryFetchObserver::fetchItems(
3377 const LLInventoryFetchObserver::item_ref_t& ids) 3527 const LLInventoryFetchObserver::item_ref_t& ids)
3378{ 3528{
3379 LLMessageSystem* msg = gMessageSystem;
3380 BOOL start_new_message = TRUE;
3381 LLUUID owner_id; 3529 LLUUID owner_id;
3530 LLSD items_llsd;
3382 for(item_ref_t::const_iterator it = ids.begin(); it < ids.end(); ++it) 3531 for(item_ref_t::const_iterator it = ids.begin(); it < ids.end(); ++it)
3383 { 3532 {
3384 LLViewerInventoryItem* item = gInventory.getItem(*it); 3533 LLViewerInventoryItem* item = gInventory.getItem(*it);
@@ -3400,31 +3549,18 @@ void LLInventoryFetchObserver::fetchItems(
3400 // assume it's agent inventory. 3549 // assume it's agent inventory.
3401 owner_id = gAgent.getID(); 3550 owner_id = gAgent.getID();
3402 } 3551 }
3403 3552
3404 // It's incomplete, so put it on the incomplete container, and 3553 // It's incomplete, so put it on the incomplete container, and
3405 // pack this on the message. 3554 // pack this on the message.
3406 mIncomplete.push_back(*it); 3555 mIncomplete.push_back(*it);
3407 if(start_new_message) 3556
3408 { 3557 // Prepare the data to fetch
3409 start_new_message = FALSE; 3558 LLSD item_entry;
3410 msg->newMessageFast(_PREHASH_FetchInventory); 3559 item_entry["owner_id"] = owner_id;
3411 msg->nextBlockFast(_PREHASH_AgentData); 3560 item_entry["item_id"] = (*it);
3412 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 3561 items_llsd.append(item_entry);
3413 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3414 }
3415 msg->nextBlockFast(_PREHASH_InventoryData);
3416 msg->addUUIDFast(_PREHASH_OwnerID, owner_id);
3417 msg->addUUIDFast(_PREHASH_ItemID, (*it));
3418 if(msg->isSendFull(NULL))
3419 {
3420 start_new_message = TRUE;
3421 gAgent.sendReliableMessage();
3422 }
3423 }
3424 if(!start_new_message)
3425 {
3426 gAgent.sendReliableMessage();
3427 } 3562 }
3563 fetch_items_from_llsd(items_llsd);
3428} 3564}
3429 3565
3430// virtual 3566// virtual
@@ -3579,9 +3715,8 @@ void LLInventoryFetchComboObserver::fetch(
3579 // descendent of an incomplete folder because the item will show 3715 // descendent of an incomplete folder because the item will show
3580 // up in an inventory descendents message soon enough so we do not 3716 // up in an inventory descendents message soon enough so we do not
3581 // have to fetch it individually. 3717 // have to fetch it individually.
3718 LLSD items_llsd;
3582 LLUUID owner_id; 3719 LLUUID owner_id;
3583 LLMessageSystem* msg = gMessageSystem;
3584 bool start_new_message = true;
3585 for(item_ref_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit) 3720 for(item_ref_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit)
3586 { 3721 {
3587 LLViewerInventoryItem* item = gInventory.getItem(*iit); 3722 LLViewerInventoryItem* item = gInventory.getItem(*iit);
@@ -3604,33 +3739,17 @@ void LLInventoryFetchComboObserver::fetch(
3604 } 3739 }
3605 if(std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end()) 3740 if(std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end())
3606 { 3741 {
3607 lldebugs << "fetching item " << *iit << llendl; 3742 LLSD item_entry;
3608 if(start_new_message) 3743 item_entry["owner_id"] = owner_id;
3609 { 3744 item_entry["item_id"] = (*iit);
3610 start_new_message = false; 3745 items_llsd.append(item_entry);
3611 msg->newMessageFast(_PREHASH_FetchInventory);
3612 msg->nextBlockFast(_PREHASH_AgentData);
3613 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3614 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3615 }
3616 msg->nextBlockFast(_PREHASH_InventoryData);
3617 msg->addUUIDFast(_PREHASH_OwnerID, owner_id);
3618 msg->addUUIDFast(_PREHASH_ItemID, (*iit));
3619 if(msg->isSendFullFast(_PREHASH_InventoryData))
3620 {
3621 start_new_message = true;
3622 gAgent.sendReliableMessage();
3623 }
3624 } 3746 }
3625 else 3747 else
3626 { 3748 {
3627 lldebugs << "not worrying about " << *iit << llendl; 3749 lldebugs << "not worrying about " << *iit << llendl;
3628 } 3750 }
3629 } 3751 }
3630 if(!start_new_message) 3752 fetch_items_from_llsd(items_llsd);
3631 {
3632 gAgent.sendReliableMessage();
3633 }
3634} 3753}
3635 3754
3636void LLInventoryExistenceObserver::watchItem(const LLUUID& id) 3755void LLInventoryExistenceObserver::watchItem(const LLUUID& id)
@@ -3676,7 +3795,17 @@ void LLInventoryAddedObserver::changed(U32 mask)
3676 // the network, figure out which item was updated. 3795 // the network, figure out which item was updated.
3677 // Code from Gigs Taggert, sin allowed by JC. 3796 // Code from Gigs Taggert, sin allowed by JC.
3678 LLMessageSystem* msg = gMessageSystem; 3797 LLMessageSystem* msg = gMessageSystem;
3679 std::string msg_name = msg->getMessageName(); 3798
3799 std::string msg_name;
3800 if (mMessageName.empty())
3801 {
3802 msg_name = msg->getMessageName();
3803 }
3804 else
3805 {
3806 msg_name = mMessageName;
3807 }
3808
3680 if (msg_name.empty()) 3809 if (msg_name.empty())
3681 { 3810 {
3682 return; 3811 return;
diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h
index 8017410..d2be761 100644
--- a/linden/indra/newview/llinventorymodel.h
+++ b/linden/indra/newview/llinventorymodel.h
@@ -69,6 +69,7 @@ public:
69 }; 69 };
70 virtual ~LLInventoryObserver() {}; 70 virtual ~LLInventoryObserver() {};
71 virtual void changed(U32 mask) = 0; 71 virtual void changed(U32 mask) = 0;
72 std::string mMessageName; // used by Agent Inventory Service only. [DEV-20328]
72}; 73};
73 74
74//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -110,20 +111,17 @@ public:
110 LLInventoryModel(); 111 LLInventoryModel();
111 ~LLInventoryModel(); 112 ~LLInventoryModel();
112 113
113 class fetchDescendentsResponder: public LLHTTPClient::Responder 114 class fetchInventoryResponder: public LLHTTPClient::Responder
114 { 115 {
115 public: 116 public:
116 fetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; 117 fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
117 void result(const LLSD& content); 118 void result(const LLSD& content);
118 void error(U32 status, const std::string& reason); 119 void error(U32 status, const std::string& reason);
119 static void onClickRetry(S32 option, void* userdata); 120
120 static void appendRetryList(LLSD retry_sd); 121 public:
121 public: 122 typedef std::vector<LLViewerInventoryCategory*> folder_ref_t;
122 typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; 123 protected:
123 protected: 124 LLSD mRequestSD;
124 LLSD mRequestSD;
125 static LLSD sRetrySD;
126 static LLAlertDialog *sRetryDialog;
127 }; 125 };
128 126
129 // 127 //
@@ -268,7 +266,8 @@ public:
268 // Call this method when it's time to update everyone on a new 266 // Call this method when it's time to update everyone on a new
269 // state, by default, the inventory model will not update 267 // state, by default, the inventory model will not update
270 // observers automatically. 268 // observers automatically.
271 void notifyObservers(); 269 // The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328]
270 void notifyObservers(const std::string service_name="");
272 271
273 // This allows outsiders to tell the inventory if something has 272 // This allows outsiders to tell the inventory if something has
274 // been changed 'under the hood', but outside the control of the 273 // been changed 'under the hood', but outside the control of the
@@ -370,7 +369,7 @@ public:
370 // start and stop background breadth-first fetching of inventory contents 369 // start and stop background breadth-first fetching of inventory contents
371 // this gets triggered when performing a filter-search 370 // this gets triggered when performing a filter-search
372 static void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); // start fetch process 371 static void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); // start fetch process
373 static void stopBackgroundFetch(); // stop fetch process 372 static void findLostItems();
374 static BOOL backgroundFetchActive(); 373 static BOOL backgroundFetchActive();
375 static bool isEverythingFetched(); 374 static bool isEverythingFetched();
376 static void backgroundFetch(void*); // background fetch idle function 375 static void backgroundFetch(void*); // background fetch idle function
@@ -419,7 +418,6 @@ protected:
419 static void processInventoryDescendents(LLMessageSystem* msg, void**); 418 static void processInventoryDescendents(LLMessageSystem* msg, void**);
420 static void processMoveInventoryItem(LLMessageSystem* msg, void**); 419 static void processMoveInventoryItem(LLMessageSystem* msg, void**);
421 static void processFetchInventoryReply(LLMessageSystem* msg, void**); 420 static void processFetchInventoryReply(LLMessageSystem* msg, void**);
422 static bool isBulkFetchProcessingComplete();
423 421
424 bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); 422 bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting);
425 423
@@ -460,11 +458,8 @@ protected:
460 observer_list_t mObservers; 458 observer_list_t mObservers;
461 459
462 // completing the fetch once per session should be sufficient 460 // completing the fetch once per session should be sufficient
463 static cat_map_t sBulkFetchMap;
464 static BOOL sBackgroundFetchActive; 461 static BOOL sBackgroundFetchActive;
465 static BOOL sTimelyFetchPending; 462 static BOOL sTimelyFetchPending;
466 static BOOL sAllFoldersFetched;
467 static BOOL sFullFetchStarted;
468 static S32 sNumFetchRetries; 463 static S32 sNumFetchRetries;
469 static LLFrameTimer sFetchTimer; 464 static LLFrameTimer sFetchTimer;
470 static F32 sMinTimeBetweenFetches; 465 static F32 sMinTimeBetweenFetches;
@@ -477,6 +472,11 @@ protected:
477public: 472public:
478 // *NOTE: DEBUG functionality 473 // *NOTE: DEBUG functionality
479 void dumpInventory(); 474 void dumpInventory();
475 static bool isBulkFetchProcessingComplete();
476 static void stopBackgroundFetch(); // stop fetch process
477
478 static BOOL sFullFetchStarted;
479 static BOOL sAllFoldersFetched;
480}; 480};
481 481
482// a special inventory model for the agent 482// a special inventory model for the agent
diff --git a/linden/indra/newview/llmaniptranslate.h b/linden/indra/newview/llmaniptranslate.h
index 7784860..383f4da 100644
--- a/linden/indra/newview/llmaniptranslate.h
+++ b/linden/indra/newview/llmaniptranslate.h
@@ -113,7 +113,7 @@ private:
113 LLVector3d mDragCursorStartGlobal; 113 LLVector3d mDragCursorStartGlobal;
114 LLVector3d mDragSelectionStartGlobal; 114 LLVector3d mDragSelectionStartGlobal;
115 LLTimer mUpdateTimer; 115 LLTimer mUpdateTimer;
116 typedef std::set<ManipulatorHandle*, compare_manipulators> minpulator_list_t; 116 typedef std::multiset<ManipulatorHandle*, compare_manipulators> minpulator_list_t;
117 minpulator_list_t mProjectedManipulators; 117 minpulator_list_t mProjectedManipulators;
118 LLVector4 mManipulatorVertices[18]; 118 LLVector4 mManipulatorVertices[18];
119 F32 mSnapOffsetMeters; 119 F32 mSnapOffsetMeters;
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp
index 22dee9d..ee853fe 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -604,9 +604,13 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
604 buffer = region->getHost().getString(); 604 buffer = region->getHost().getString();
605 msg.append(buffer); 605 msg.append(buffer);
606#endif 606#endif
607 // *TODO: put this under the control of XUI so it can be 607 // *TODO:
608 // translated. 608 // - put this under the control of XUI so it can be translated.
609 msg.append("\n(Double-click to open Map)"); 609
610 if ( gSavedSettings.getBOOL( "MiniMapTeleport" ))
611 msg.append("\n(Double-click to teleport)");
612 else
613 msg.append("\n(Double-click to open Map)");
610 614
611 S32 SLOP = 4; 615 S32 SLOP = 4;
612 localPointToScreen( 616 localPointToScreen(
@@ -767,7 +771,14 @@ void LLNetMap::createObjectImage()
767 771
768BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask ) 772BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
769{ 773{
770 LLFloaterWorldMap::show(NULL, FALSE); 774 if (gSavedSettings.getBOOL( "MiniMapTeleport" ))
775 {
776 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
777 gAgent.teleportViaLocation( viewPosToGlobal(x,y) );
778 }
779 else
780 LLFloaterWorldMap::show(NULL, FALSE);
781
771 return TRUE; 782 return TRUE;
772} 783}
773 784
diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp
index 4742627..d1c34f1 100644
--- a/linden/indra/newview/llpanelface.cpp
+++ b/linden/indra/newview/llpanelface.cpp
@@ -35,6 +35,7 @@
35#include "llpanelface.h" 35#include "llpanelface.h"
36 36
37// library includes 37// library includes
38#include "llcalc.h"
38#include "llerror.h" 39#include "llerror.h"
39#include "llfocusmgr.h" 40#include "llfocusmgr.h"
40#include "llrect.h" 41#include "llrect.h"
@@ -60,6 +61,7 @@
60#include "llviewermedia.h" 61#include "llviewermedia.h"
61#include "llviewerobject.h" 62#include "llviewerobject.h"
62#include "llviewerstats.h" 63#include "llviewerstats.h"
64#include "llviewerwindow.h"
63#include "lluictrlfactory.h" 65#include "lluictrlfactory.h"
64 66
65// 67//
@@ -179,6 +181,7 @@ BOOL LLPanelFace::postBuild()
179 childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this); 181 childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
180 childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this); 182 childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
181 childSetAction("button align",onClickAutoFix,this); 183 childSetAction("button align",onClickAutoFix,this);
184 childSetAction("texture_math_constants",onClickTextureConstants,this);
182 185
183 clearCtrls(); 186 clearCtrls();
184 187
@@ -381,6 +384,7 @@ void LLPanelFace::sendTextureInfo()
381void LLPanelFace::getState() 384void LLPanelFace::getState()
382{ 385{
383 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); 386 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
387 LLCalc* calcp = LLCalc::getInstance();
384 388
385 if( objectp 389 if( objectp
386 && objectp->getPCode() == LL_PCODE_VOLUME 390 && objectp->getPCode() == LL_PCODE_VOLUME
@@ -754,6 +758,16 @@ void LLPanelFace::getState()
754 childSetEnabled("button apply",enabled); 758 childSetEnabled("button apply",enabled);
755 } 759 }
756 } 760 }
761 childSetEnabled("texture_math_constants",true);
762
763 // Set variable values for numeric expressions
764 calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal());
765 calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal());
766 calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal());
767 calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal());
768 calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal());
769 calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal());
770 calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal());
757 } 771 }
758 else 772 else
759 { 773 {
@@ -787,6 +801,17 @@ void LLPanelFace::getState()
787 801
788 childSetEnabled("button align",FALSE); 802 childSetEnabled("button align",FALSE);
789 childSetEnabled("button apply",FALSE); 803 childSetEnabled("button apply",FALSE);
804
805 childSetEnabled("texture_math_constants",false);
806
807 // Set variable values for numeric expressions
808 calcp->clearVar(LLCalc::TEX_U_SCALE);
809 calcp->clearVar(LLCalc::TEX_V_SCALE);
810 calcp->clearVar(LLCalc::TEX_U_OFFSET);
811 calcp->clearVar(LLCalc::TEX_V_OFFSET);
812 calcp->clearVar(LLCalc::TEX_ROTATION);
813 calcp->clearVar(LLCalc::TEX_TRANSPARENCY);
814 calcp->clearVar(LLCalc::TEX_GLOW);
790 } 815 }
791} 816}
792 817
@@ -969,3 +994,9 @@ void LLPanelFace::onClickAutoFix(void* userdata)
969 LLPanelFaceSendFunctor sendfunc; 994 LLPanelFaceSendFunctor sendfunc;
970 LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); 995 LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
971} 996}
997
998// static
999void LLPanelFace::onClickTextureConstants(void *)
1000{
1001 gViewerWindow->alertXml("ClickTextureConstants");
1002} \ No newline at end of file
diff --git a/linden/indra/newview/llpanelface.h b/linden/indra/newview/llpanelface.h
index 230772b..b977583 100644
--- a/linden/indra/newview/llpanelface.h
+++ b/linden/indra/newview/llpanelface.h
@@ -88,6 +88,7 @@ protected:
88 88
89 static void onClickApply(void*); 89 static void onClickApply(void*);
90 static void onClickAutoFix(void*); 90 static void onClickAutoFix(void*);
91 static void onClickTextureConstants(void *);
91 static F32 valueGlow(LLViewerObject* object, S32 face); 92 static F32 valueGlow(LLViewerObject* object, S32 face);
92}; 93};
93 94
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp
index 256f02a..16da49d 100644
--- a/linden/indra/newview/llpanelgeneral.cpp
+++ b/linden/indra/newview/llpanelgeneral.cpp
@@ -109,6 +109,7 @@ LLPanelGeneral::LLPanelGeneral()
109BOOL LLPanelGeneral::postBuild() 109BOOL LLPanelGeneral::postBuild()
110{ 110{
111 childSetCommitCallback("fade_out_combobox", set_render_name_fade_out); 111 childSetCommitCallback("fade_out_combobox", set_render_name_fade_out);
112 childSetAction("reset_ui_size", onClickResetUISize, this);
112 113
113 std::string region_name_prompt = getString("region_name_prompt"); 114 std::string region_name_prompt = getString("region_name_prompt");
114 115
@@ -199,6 +200,7 @@ void LLPanelGeneral::refresh()
199 mChatOnlineNotification = gSavedSettings.getBOOL("ChatOnlineNotification"); 200 mChatOnlineNotification = gSavedSettings.getBOOL("ChatOnlineNotification");
200 mAFKTimeout = gSavedSettings.getF32("AFKTimeout"); 201 mAFKTimeout = gSavedSettings.getF32("AFKTimeout");
201 mMiniMapRotate = gSavedSettings.getBOOL("MiniMapRotate"); 202 mMiniMapRotate = gSavedSettings.getBOOL("MiniMapRotate");
203 mMiniMapTeleport = gSavedSettings.getBOOL("MiniMapTeleport");
202 mNotifyMoney = gSavedSettings.getBOOL("NotifyMoneyChange"); 204 mNotifyMoney = gSavedSettings.getBOOL("NotifyMoneyChange");
203 mUseDefaultColor = gSavedSettings.getBOOL("UseDefaultColorPicker"); 205 mUseDefaultColor = gSavedSettings.getBOOL("UseDefaultColorPicker");
204 mEffectColor = gSavedSettings.getColor4("EffectColor"); 206 mEffectColor = gSavedSettings.getColor4("EffectColor");
@@ -223,6 +225,7 @@ void LLPanelGeneral::cancel()
223 gSavedSettings.setBOOL("ChatOnlineNotification", mChatOnlineNotification ); 225 gSavedSettings.setBOOL("ChatOnlineNotification", mChatOnlineNotification );
224 gSavedSettings.setF32("AFKTimeout", mAFKTimeout ); 226 gSavedSettings.setF32("AFKTimeout", mAFKTimeout );
225 gSavedSettings.setBOOL("MiniMapRotate", mMiniMapRotate ); 227 gSavedSettings.setBOOL("MiniMapRotate", mMiniMapRotate );
228 gSavedSettings.setBOOL("MiniMapTeleport", mMiniMapTeleport);
226 gSavedSettings.setBOOL("NotifyMoneyChange", mNotifyMoney ); 229 gSavedSettings.setBOOL("NotifyMoneyChange", mNotifyMoney );
227 gSavedSettings.setBOOL("UseDefaultColorPicker", mUseDefaultColor ); 230 gSavedSettings.setBOOL("UseDefaultColorPicker", mUseDefaultColor );
228 gSavedSettings.setBOOL("ShowSearchBar", mShowSearch); 231 gSavedSettings.setBOOL("ShowSearchBar", mShowSearch);
@@ -240,3 +243,10 @@ void LLPanelGeneral::clickShowStartLocation(LLUICtrl*, void* user_data)
240{ 243{
241 LLPanelLogin::refreshLocation( false ); // in case LLPanelLogin is visible 244 LLPanelLogin::refreshLocation( false ); // in case LLPanelLogin is visible
242} 245}
246
247// static
248void LLPanelGeneral::onClickResetUISize(void* user_data)
249{
250 gSavedSettings.setF32("UIScaleFactor", 1.0f);
251 gViewerWindow->reshape(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
252} \ No newline at end of file
diff --git a/linden/indra/newview/llpanelgeneral.h b/linden/indra/newview/llpanelgeneral.h
index a7b526d..00dc874 100644
--- a/linden/indra/newview/llpanelgeneral.h
+++ b/linden/indra/newview/llpanelgeneral.h
@@ -56,6 +56,7 @@ public:
56 static void clickShowStartLocation(LLUICtrl*, void* user_data); 56 static void clickShowStartLocation(LLUICtrl*, void* user_data);
57 static void set_start_location(LLUICtrl* ctrl, void* data); 57 static void set_start_location(LLUICtrl* ctrl, void* data);
58 static void set_specific_start_location(LLLineEditor* line_editor, void* data); 58 static void set_specific_start_location(LLLineEditor* line_editor, void* data);
59 static void onClickResetUISize(void*);
59 60
60protected: 61protected:
61 S32 mRenderName; 62 S32 mRenderName;
@@ -71,6 +72,7 @@ protected:
71 F32 mUIScaleFactor; 72 F32 mUIScaleFactor;
72 BOOL mUIAutoScale; 73 BOOL mUIAutoScale;
73 BOOL mMiniMapRotate; 74 BOOL mMiniMapRotate;
75 BOOL mMiniMapTeleport;
74 S32 mOldCrashBehavior; 76 S32 mOldCrashBehavior;
75 std::string mLoginLocation; 77 std::string mLoginLocation;
76 std::string mLanguage; 78 std::string mLanguage;
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp
index cc9d969..5cd8690 100644
--- a/linden/indra/newview/llpanelobject.cpp
+++ b/linden/indra/newview/llpanelobject.cpp
@@ -46,6 +46,7 @@
46// project includes 46// project includes
47#include "llagent.h" 47#include "llagent.h"
48#include "llbutton.h" 48#include "llbutton.h"
49#include "llcalc.h"
49#include "llcheckboxctrl.h" 50#include "llcheckboxctrl.h"
50#include "llcolorswatch.h" 51#include "llcolorswatch.h"
51#include "llcombobox.h" 52#include "llcombobox.h"
@@ -109,6 +110,9 @@ BOOL LLPanelObject::postBuild()
109 // Top 110 // Top
110 //-------------------------------------------------------- 111 //--------------------------------------------------------
111 112
113 // Build constant tipsheet
114 childSetAction("build_math_constants",onClickBuildConstants,this);
115
112 // Lock checkbox 116 // Lock checkbox
113 mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked"); 117 mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked");
114 childSetCommitCallback("checkbox locked",onCommitLock,this); 118 childSetCommitCallback("checkbox locked",onCommitLock,this);
@@ -341,6 +345,8 @@ void LLPanelObject::getState( )
341 } 345 }
342 } 346 }
343 347
348 LLCalc* calcp = LLCalc::getInstance();
349
344 LLVOVolume *volobjp = NULL; 350 LLVOVolume *volobjp = NULL;
345 if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME)) 351 if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME))
346 { 352 {
@@ -357,6 +363,7 @@ void LLPanelObject::getState( )
357 363
358 // Disable all text input fields 364 // Disable all text input fields
359 clearCtrls(); 365 clearCtrls();
366 calcp->clearAllVariables();
360 return; 367 return;
361 } 368 }
362 369
@@ -365,6 +372,7 @@ void LLPanelObject::getState( )
365 BOOL enable_scale = objectp->permMove() && objectp->permModify(); 372 BOOL enable_scale = objectp->permMove() && objectp->permModify();
366 BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); 373 BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
367 374
375 childSetEnabled("build_math_constants",true);
368 LLVector3 vec; 376 LLVector3 vec;
369 if (enable_move) 377 if (enable_move)
370 { 378 {
@@ -372,12 +380,18 @@ void LLPanelObject::getState( )
372 mCtrlPosX->set( vec.mV[VX] ); 380 mCtrlPosX->set( vec.mV[VX] );
373 mCtrlPosY->set( vec.mV[VY] ); 381 mCtrlPosY->set( vec.mV[VY] );
374 mCtrlPosZ->set( vec.mV[VZ] ); 382 mCtrlPosZ->set( vec.mV[VZ] );
383 calcp->setVar(LLCalc::X_POS, vec.mV[VX]);
384 calcp->setVar(LLCalc::Y_POS, vec.mV[VY]);
385 calcp->setVar(LLCalc::Z_POS, vec.mV[VZ]);
375 } 386 }
376 else 387 else
377 { 388 {
378 mCtrlPosX->clear(); 389 mCtrlPosX->clear();
379 mCtrlPosY->clear(); 390 mCtrlPosY->clear();
380 mCtrlPosZ->clear(); 391 mCtrlPosZ->clear();
392 calcp->clearVar(LLCalc::X_POS);
393 calcp->clearVar(LLCalc::Y_POS);
394 calcp->clearVar(LLCalc::Z_POS);
381 } 395 }
382 396
383 397
@@ -392,12 +406,18 @@ void LLPanelObject::getState( )
392 mCtrlScaleX->set( vec.mV[VX] ); 406 mCtrlScaleX->set( vec.mV[VX] );
393 mCtrlScaleY->set( vec.mV[VY] ); 407 mCtrlScaleY->set( vec.mV[VY] );
394 mCtrlScaleZ->set( vec.mV[VZ] ); 408 mCtrlScaleZ->set( vec.mV[VZ] );
409 calcp->setVar(LLCalc::X_SCALE, vec.mV[VX]);
410 calcp->setVar(LLCalc::Y_SCALE, vec.mV[VY]);
411 calcp->setVar(LLCalc::Z_SCALE, vec.mV[VZ]);
395 } 412 }
396 else 413 else
397 { 414 {
398 mCtrlScaleX->clear(); 415 mCtrlScaleX->clear();
399 mCtrlScaleY->clear(); 416 mCtrlScaleY->clear();
400 mCtrlScaleZ->clear(); 417 mCtrlScaleZ->clear();
418 calcp->setVar(LLCalc::X_SCALE, 0.f);
419 calcp->setVar(LLCalc::Y_SCALE, 0.f);
420 calcp->setVar(LLCalc::Z_SCALE, 0.f);
401 } 421 }
402 422
403 mLabelSize->setEnabled( enable_scale ); 423 mLabelSize->setEnabled( enable_scale );
@@ -417,12 +437,18 @@ void LLPanelObject::getState( )
417 mCtrlRotX->set( mCurEulerDegrees.mV[VX] ); 437 mCtrlRotX->set( mCurEulerDegrees.mV[VX] );
418 mCtrlRotY->set( mCurEulerDegrees.mV[VY] ); 438 mCtrlRotY->set( mCurEulerDegrees.mV[VY] );
419 mCtrlRotZ->set( mCurEulerDegrees.mV[VZ] ); 439 mCtrlRotZ->set( mCurEulerDegrees.mV[VZ] );
440 calcp->setVar(LLCalc::X_ROT, mCurEulerDegrees.mV[VX]);
441 calcp->setVar(LLCalc::Y_ROT, mCurEulerDegrees.mV[VY]);
442 calcp->setVar(LLCalc::Z_ROT, mCurEulerDegrees.mV[VZ]);
420 } 443 }
421 else 444 else
422 { 445 {
423 mCtrlRotX->clear(); 446 mCtrlRotX->clear();
424 mCtrlRotY->clear(); 447 mCtrlRotY->clear();
425 mCtrlRotZ->clear(); 448 mCtrlRotZ->clear();
449 calcp->clearVar(LLCalc::X_ROT);
450 calcp->clearVar(LLCalc::Y_ROT);
451 calcp->clearVar(LLCalc::Z_ROT);
426 } 452 }
427 453
428 mLabelRotation->setEnabled( enable_rotate ); 454 mLabelRotation->setEnabled( enable_rotate );
@@ -678,8 +704,9 @@ void LLPanelObject::getState( )
678 F32 end_t = volume_params.getEndT(); 704 F32 end_t = volume_params.getEndT();
679 705
680 // Hollowness 706 // Hollowness
681 F32 hollow = volume_params.getHollow(); 707 F32 hollow = 100.f * volume_params.getHollow();
682 mSpinHollow->set( 100.f * hollow ); 708 mSpinHollow->set( hollow );
709 calcp->setVar(LLCalc::HOLLOW, hollow);
683 710
684 // All hollow objects allow a shape to be selected. 711 // All hollow objects allow a shape to be selected.
685 if (hollow > 0.f) 712 if (hollow > 0.f)
@@ -732,6 +759,10 @@ void LLPanelObject::getState( )
732 mSpinCutEnd ->set( cut_end ); 759 mSpinCutEnd ->set( cut_end );
733 mCtrlPathBegin ->set( adv_cut_begin ); 760 mCtrlPathBegin ->set( adv_cut_begin );
734 mCtrlPathEnd ->set( adv_cut_end ); 761 mCtrlPathEnd ->set( adv_cut_end );
762 calcp->setVar(LLCalc::CUT_BEGIN, cut_begin);
763 calcp->setVar(LLCalc::CUT_END, cut_end);
764 calcp->setVar(LLCalc::PATH_BEGIN, adv_cut_begin);
765 calcp->setVar(LLCalc::PATH_END, adv_cut_end);
735 766
736 // Twist 767 // Twist
737 F32 twist = volume_params.getTwist(); 768 F32 twist = volume_params.getTwist();
@@ -750,18 +781,24 @@ void LLPanelObject::getState( )
750 781
751 mSpinTwist ->set( twist ); 782 mSpinTwist ->set( twist );
752 mSpinTwistBegin ->set( twist_begin ); 783 mSpinTwistBegin ->set( twist_begin );
784 calcp->setVar(LLCalc::TWIST_END, twist);
785 calcp->setVar(LLCalc::TWIST_BEGIN, twist_begin);
753 786
754 // Shear 787 // Shear
755 F32 shear_x = volume_params.getShearX(); 788 F32 shear_x = volume_params.getShearX();
756 F32 shear_y = volume_params.getShearY(); 789 F32 shear_y = volume_params.getShearY();
757 mSpinShearX->set( shear_x ); 790 mSpinShearX->set( shear_x );
758 mSpinShearY->set( shear_y ); 791 mSpinShearY->set( shear_y );
792 calcp->setVar(LLCalc::X_SHEAR, shear_x);
793 calcp->setVar(LLCalc::Y_SHEAR, shear_y);
759 794
760 // Taper 795 // Taper
761 F32 taper_x = volume_params.getTaperX(); 796 F32 taper_x = volume_params.getTaperX();
762 F32 taper_y = volume_params.getTaperY(); 797 F32 taper_y = volume_params.getTaperY();
763 mSpinTaperX->set( taper_x ); 798 mSpinTaperX->set( taper_x );
764 mSpinTaperY->set( taper_y ); 799 mSpinTaperY->set( taper_y );
800 calcp->setVar(LLCalc::X_TAPER, taper_x);
801 calcp->setVar(LLCalc::Y_TAPER, taper_y);
765 802
766 // Radius offset. 803 // Radius offset.
767 F32 radius_offset = volume_params.getRadiusOffset(); 804 F32 radius_offset = volume_params.getRadiusOffset();
@@ -791,10 +828,12 @@ void LLPanelObject::getState( )
791 } 828 }
792 } 829 }
793 mSpinRadiusOffset->set( radius_offset); 830 mSpinRadiusOffset->set( radius_offset);
831 calcp->setVar(LLCalc::RADIUS_OFFSET, radius_offset);
794 832
795 // Revolutions 833 // Revolutions
796 F32 revolutions = volume_params.getRevolutions(); 834 F32 revolutions = volume_params.getRevolutions();
797 mSpinRevolutions->set( revolutions ); 835 mSpinRevolutions->set( revolutions );
836 calcp->setVar(LLCalc::REVOLUTIONS, revolutions);
798 837
799 // Skew 838 // Skew
800 F32 skew = volume_params.getSkew(); 839 F32 skew = volume_params.getSkew();
@@ -819,6 +858,7 @@ void LLPanelObject::getState( )
819 } 858 }
820 } 859 }
821 mSpinSkew->set( skew ); 860 mSpinSkew->set( skew );
861 calcp->setVar(LLCalc::SKEW, skew);
822 } 862 }
823 863
824 // Compute control visibility, label names, and twist range. 864 // Compute control visibility, label names, and twist range.
@@ -924,6 +964,8 @@ void LLPanelObject::getState( )
924 case MI_RING: 964 case MI_RING:
925 mSpinScaleX->set( scale_x ); 965 mSpinScaleX->set( scale_x );
926 mSpinScaleY->set( scale_y ); 966 mSpinScaleY->set( scale_y );
967 calcp->setVar(LLCalc::X_HOLE, scale_x);
968 calcp->setVar(LLCalc::Y_HOLE, scale_y);
927 mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); 969 mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE);
928 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); 970 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X);
929 mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); 971 mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE);
@@ -934,6 +976,8 @@ void LLPanelObject::getState( )
934 { 976 {
935 mSpinScaleX->set( 1.f - scale_x ); 977 mSpinScaleX->set( 1.f - scale_x );
936 mSpinScaleY->set( 1.f - scale_y ); 978 mSpinScaleY->set( 1.f - scale_y );
979 calcp->setVar(LLCalc::X_HOLE, 1.f - scale_x);
980 calcp->setVar(LLCalc::Y_HOLE, 1.f - scale_y);
937 mSpinScaleX->setMinValue(-1.f); 981 mSpinScaleX->setMinValue(-1.f);
938 mSpinScaleX->setMaxValue(1.f); 982 mSpinScaleX->setMaxValue(1.f);
939 mSpinScaleY->setMinValue(-1.f); 983 mSpinScaleY->setMinValue(-1.f);
@@ -1148,7 +1192,7 @@ void LLPanelObject::getState( )
1148 mSculptTextureRevert = LLUUID::null; 1192 mSculptTextureRevert = LLUUID::null;
1149 } 1193 }
1150 1194
1151 1195
1152 //---------------------------------------------------------------------------- 1196 //----------------------------------------------------------------------------
1153 1197
1154 mObject = objectp; 1198 mObject = objectp;
@@ -1913,6 +1957,8 @@ void LLPanelObject::clearCtrls()
1913 childSetEnabled( "advanced_cut", FALSE ); 1957 childSetEnabled( "advanced_cut", FALSE );
1914 childSetEnabled( "advanced_dimple", FALSE ); 1958 childSetEnabled( "advanced_dimple", FALSE );
1915 childSetVisible("advanced_slice", FALSE); 1959 childSetVisible("advanced_slice", FALSE);
1960
1961 childSetEnabled("build_math_constants",false);
1916} 1962}
1917 1963
1918// 1964//
@@ -1954,6 +2000,9 @@ void LLPanelObject::onCommitRotation( LLUICtrl* ctrl, void* userdata )
1954 LLPanelObject* self = (LLPanelObject*) userdata; 2000 LLPanelObject* self = (LLPanelObject*) userdata;
1955 BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; 2001 BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
1956 self->sendRotation(btn_down); 2002 self->sendRotation(btn_down);
2003
2004 // Needed to ensure all rotations are shown consistently in range
2005 self->refresh();
1957} 2006}
1958 2007
1959// static 2008// static
@@ -2048,3 +2097,9 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
2048 2097
2049 self->sendSculpt(); 2098 self->sendSculpt();
2050} 2099}
2100
2101// static
2102void LLPanelObject::onClickBuildConstants(void *)
2103{
2104 gViewerWindow->alertXml("ClickBuildConstants");
2105}
diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h
index afdfd30..b72289c 100644
--- a/linden/indra/newview/llpanelobject.h
+++ b/linden/indra/newview/llpanelobject.h
@@ -83,6 +83,7 @@ public:
83 static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud); 83 static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
84 static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); 84 static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
85 85
86 static void onClickBuildConstants(void *);
86 87
87protected: 88protected:
88 void getState(); 89 void getState();
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index c863d19..84a5ecd 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -2285,6 +2285,9 @@ bool idle_startup()
2285 } 2285 }
2286 } 2286 }
2287 2287
2288 //DEV-17797. get null folder. Any items found here moved to Lost and Found
2289 LLInventoryModel::findLostItems();
2290
2288 LLStartUp::setStartupState( STATE_PRECACHE ); 2291 LLStartUp::setStartupState( STATE_PRECACHE );
2289 timeout.reset(); 2292 timeout.reset();
2290 return FALSE; 2293 return FALSE;
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp
index 6d9d685..0323bb7 100644
--- a/linden/indra/newview/llviewerinventory.cpp
+++ b/linden/indra/newview/llviewerinventory.cpp
@@ -196,15 +196,34 @@ void LLViewerInventoryItem::fetchFromServer(void) const
196{ 196{
197 if(!mIsComplete) 197 if(!mIsComplete)
198 { 198 {
199 LLMessageSystem* msg = gMessageSystem; 199 std::string url;
200 msg->newMessage("FetchInventory"); 200
201 msg->nextBlock("AgentData"); 201 if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString())
202 msg->addUUID("AgentID", gAgent.getID()); 202 url = gAgent.getRegion()->getCapability("FetchLib");
203 msg->addUUID("SessionID", gAgent.getSessionID()); 203 else
204 msg->nextBlock("InventoryData"); 204 url = gAgent.getRegion()->getCapability("FetchInventory");
205 msg->addUUID("OwnerID", mPermissions.getOwner()); 205
206 msg->addUUID("ItemID", mUUID); 206 if (!url.empty())
207 gAgent.sendReliableMessage(); 207 {
208 LLSD body;
209 body["agent_id"] = gAgent.getID();
210 body["items"][0]["owner_id"] = mPermissions.getOwner();
211 body["items"][0]["item_id"] = mUUID;
212
213 LLHTTPClient::post(url, body, new LLInventoryModel::fetchInventoryResponder(body));
214 }
215 else
216 {
217 LLMessageSystem* msg = gMessageSystem;
218 msg->newMessage("FetchInventory");
219 msg->nextBlock("AgentData");
220 msg->addUUID("AgentID", gAgent.getID());
221 msg->addUUID("SessionID", gAgent.getSessionID());
222 msg->nextBlock("InventoryData");
223 msg->addUUID("OwnerID", mPermissions.getOwner());
224 msg->addUUID("ItemID", mUUID);
225 gAgent.sendReliableMessage();
226 }
208 } 227 }
209 else 228 else
210 { 229 {
@@ -441,7 +460,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
441 // This comes from LLInventoryFilter from llfolderview.h 460 // This comes from LLInventoryFilter from llfolderview.h
442 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1; 461 U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
443 462
444 std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); 463 std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
445 464
446 if (!url.empty()) //Capability found. Build up LLSD and use it. 465 if (!url.empty()) //Capability found. Build up LLSD and use it.
447 { 466 {
@@ -449,7 +468,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
449 } 468 }
450 else 469 else
451 { //Deprecated, but if we don't have a capability, use the old system. 470 { //Deprecated, but if we don't have a capability, use the old system.
452 llinfos << "FetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl; 471 llinfos << "WebFetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl;
453 LLMessageSystem* msg = gMessageSystem; 472 LLMessageSystem* msg = gMessageSystem;
454 msg->newMessage("FetchInventoryDescendents"); 473 msg->newMessage("FetchInventoryDescendents");
455 msg->nextBlock("AgentData"); 474 msg->nextBlock("AgentData");
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 3bf390e..d607afe 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -146,13 +146,14 @@
146#include "llinventorymodel.h" 146#include "llinventorymodel.h"
147#include "llinventoryview.h" 147#include "llinventoryview.h"
148#include "llkeyboard.h" 148#include "llkeyboard.h"
149#include "llpanellogin.h" 149#include "lllineeditor.h"
150#include "llmenucommands.h" 150#include "llmenucommands.h"
151#include "llmenugl.h" 151#include "llmenugl.h"
152#include "llmorphview.h" 152#include "llmorphview.h"
153#include "llmoveview.h" 153#include "llmoveview.h"
154#include "llmutelist.h" 154#include "llmutelist.h"
155#include "llnotify.h" 155#include "llnotify.h"
156#include "llpanellogin.h"
156#include "llpanelobject.h" 157#include "llpanelobject.h"
157#include "llparcel.h" 158#include "llparcel.h"
158#include "llprimitive.h" 159#include "llprimitive.h"
@@ -174,6 +175,7 @@
174#include "lltoolpie.h" 175#include "lltoolpie.h"
175#include "lltoolplacer.h" 176#include "lltoolplacer.h"
176#include "lltoolselectland.h" 177#include "lltoolselectland.h"
178#include "lltrans.h"
177#include "lluictrlfactory.h" 179#include "lluictrlfactory.h"
178#include "lluploaddialog.h" 180#include "lluploaddialog.h"
179#include "lluserauth.h" 181#include "lluserauth.h"
@@ -303,8 +305,6 @@ void near_sit_object();
303void label_sit_or_stand(std::string& label, void*); 305void label_sit_or_stand(std::string& label, void*);
304// buy and take alias into the same UI positions, so these 306// buy and take alias into the same UI positions, so these
305// declarations handle this mess. 307// declarations handle this mess.
306BOOL is_selection_buy_not_take();
307S32 selection_price();
308BOOL enable_take(); 308BOOL enable_take();
309void handle_take(); 309void handle_take();
310void confirm_take(S32 option, void* data); 310void confirm_take(S32 option, void* data);
@@ -786,12 +786,6 @@ void init_client_menu(LLMenuGL* menu)
786 menu->appendMenu(sub_menu); 786 menu->appendMenu(sub_menu);
787 787
788 menu->appendSeparator(); 788 menu->appendSeparator();
789
790 menu->append(new LLMenuItemCheckGL( "High-res Snapshot",
791 &menu_toggle_control,
792 NULL,
793 &menu_check_control,
794 (void*)"HighResSnapshot"));
795 789
796 menu->append(new LLMenuItemCheckGL( "Quiet Snapshots to Disk", 790 menu->append(new LLMenuItemCheckGL( "Quiet Snapshots to Disk",
797 &menu_toggle_control, 791 &menu_toggle_control,
@@ -799,12 +793,6 @@ void init_client_menu(LLMenuGL* menu)
799 &menu_check_control, 793 &menu_check_control,
800 (void*)"QuietSnapshotsToDisk")); 794 (void*)"QuietSnapshotsToDisk"));
801 795
802 menu->append(new LLMenuItemCheckGL( "Compress Snapshots to Disk",
803 &menu_toggle_control,
804 NULL,
805 &menu_check_control,
806 (void*)"CompressSnapshotsToDisk"));
807
808 menu->append(new LLMenuItemCheckGL("Show Mouselook Crosshairs", 796 menu->append(new LLMenuItemCheckGL("Show Mouselook Crosshairs",
809 &menu_toggle_control, 797 &menu_toggle_control,
810 NULL, 798 NULL,
@@ -923,12 +911,6 @@ void init_client_menu(LLMenuGL* menu)
923 &menu_check_control, 911 &menu_check_control,
924 (void*)"LimitSelectDistance")); 912 (void*)"LimitSelectDistance"));
925 913
926 menu->append(new LLMenuItemCheckGL("Disable Camera Constraints",
927 &menu_toggle_control,
928 NULL,
929 &menu_check_control,
930 (void*)"DisableCameraConstraints"));
931
932 menu->append(new LLMenuItemCheckGL("Mouse Smoothing", 914 menu->append(new LLMenuItemCheckGL("Mouse Smoothing",
933 &menu_toggle_control, 915 &menu_toggle_control,
934 NULL, 916 NULL,
@@ -1379,7 +1361,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
1379 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); 1361 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget));
1380 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); 1362 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation));
1381 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); 1363 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
1382 menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL )); 1364 menu->append(new LLMenuItemCallGL("Refresh Appearance", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
1383#ifndef LL_RELEASE_FOR_DOWNLOAD 1365#ifndef LL_RELEASE_FOR_DOWNLOAD
1384 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT)); 1366 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
1385 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT )); 1367 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));
@@ -1660,7 +1642,6 @@ class LLObjectEnableOpen : public view_listener_t
1660 } 1642 }
1661}; 1643};
1662 1644
1663
1664class LLViewCheckBuildMode : public view_listener_t 1645class LLViewCheckBuildMode : public view_listener_t
1665{ 1646{
1666 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 1647 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -3257,17 +3238,6 @@ class LLViewFullscreen : public view_listener_t
3257 } 3238 }
3258}; 3239};
3259 3240
3260class LLViewDefaultUISize : public view_listener_t
3261{
3262 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
3263 {
3264 gSavedSettings.setF32("UIScaleFactor", 1.0f);
3265 gSavedSettings.setBOOL("UIAutoScale", FALSE);
3266 gViewerWindow->reshape(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
3267 return true;
3268 }
3269};
3270
3271class LLEditDuplicate : public view_listener_t 3241class LLEditDuplicate : public view_listener_t
3272{ 3242{
3273 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 3243 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -3928,7 +3898,7 @@ BOOL enable_take()
3928 return FALSE; 3898 return FALSE;
3929} 3899}
3930 3900
3931class LLToolsBuyOrTake : public view_listener_t 3901class LLToolsTake : public view_listener_t
3932{ 3902{
3933 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 3903 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
3934 { 3904 {
@@ -3936,115 +3906,24 @@ class LLToolsBuyOrTake : public view_listener_t
3936 { 3906 {
3937 return true; 3907 return true;
3938 } 3908 }
3939
3940 if (is_selection_buy_not_take())
3941 {
3942 S32 total_price = selection_price();
3943
3944 if (total_price <= gStatusBar->getBalance() || total_price == 0)
3945 {
3946 handle_buy(NULL);
3947 }
3948 else
3949 {
3950 LLFloaterBuyCurrency::buyCurrency(
3951 "Buying this costs", total_price);
3952 }
3953 }
3954 else 3909 else
3955 { 3910 {
3956 handle_take(); 3911 handle_take();
3912 return true;
3957 } 3913 }
3958 return true;
3959 } 3914 }
3960}; 3915};
3961 3916
3962class LLToolsEnableBuyOrTake : public view_listener_t 3917class LLToolsEnableTake : public view_listener_t
3963{ 3918{
3964 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 3919 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
3965 { 3920 {
3966 bool is_buy = is_selection_buy_not_take(); 3921 bool new_value = enable_take();
3967 bool new_value = is_buy ? enable_buy(NULL) : enable_take();
3968 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 3922 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
3969
3970 // Update label
3971 std::string label;
3972 std::string buy_text;
3973 std::string take_text;
3974 std::string param = userdata["data"].asString();
3975 std::string::size_type offset = param.find(",");
3976 if (offset != param.npos)
3977 {
3978 buy_text = param.substr(0, offset);
3979 take_text = param.substr(offset+1);
3980 }
3981 if (is_buy)
3982 {
3983 label = buy_text;
3984 }
3985 else
3986 {
3987 label = take_text;
3988 }
3989 gMenuHolder->childSetText("Pie Object Take", label);
3990 gMenuHolder->childSetText("Menu Object Take", label);
3991
3992 return true; 3923 return true;
3993 } 3924 }
3994}; 3925};
3995 3926
3996// This is a small helper function to determine if we have a buy or a
3997// take in the selection. This method is to help with the aliasing
3998// problems of putting buy and take in the same pie menu space. After
3999// a fair amont of discussion, it was determined to prefer buy over
4000// take. The reasoning follows from the fact that when users walk up
4001// to buy something, they will click on one or more items. Thus, if
4002// anything is for sale, it becomes a buy operation, and the server
4003// will group all of the buy items, and copyable/modifiable items into
4004// one package and give the end user as much as the permissions will
4005// allow. If the user wanted to take something, they will select fewer
4006// and fewer items until only 'takeable' items are left. The one
4007// exception is if you own everything in the selection that is for
4008// sale, in this case, you can't buy stuff from yourself, so you can
4009// take it.
4010// return value = TRUE if selection is a 'buy'.
4011// FALSE if selection is a 'take'
4012BOOL is_selection_buy_not_take()
4013{
4014 for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
4015 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
4016 {
4017 LLSelectNode* node = *iter;
4018 LLViewerObject* obj = node->getObject();
4019 if(obj && !(obj->permYouOwner()) && (node->mSaleInfo.isForSale()))
4020 {
4021 // you do not own the object and it is for sale, thus,
4022 // it's a buy
4023 return TRUE;
4024 }
4025 }
4026 return FALSE;
4027}
4028
4029S32 selection_price()
4030{
4031 S32 total_price = 0;
4032 for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
4033 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
4034 {
4035 LLSelectNode* node = *iter;
4036 LLViewerObject* obj = node->getObject();
4037 if(obj && !(obj->permYouOwner()) && (node->mSaleInfo.isForSale()))
4038 {
4039 // you do not own the object and it is for sale.
4040 // Add its price.
4041 total_price += node->mSaleInfo.getSalePrice();
4042 }
4043 }
4044
4045 return total_price;
4046}
4047
4048void callback_show_buy_currency(S32 option, void*) 3927void callback_show_buy_currency(S32 option, void*)
4049{ 3928{
4050 if (0 == option) 3929 if (0 == option)
@@ -4874,10 +4753,17 @@ class LLWorldCreateLandmark : public view_listener_t
4874 return true; 4753 return true;
4875 } 4754 }
4876 4755
4756 LLChat chat;
4757
4877 LLUUID folder_id; 4758 LLUUID folder_id;
4878 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); 4759 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
4879 std::string pos_string; 4760 std::string pos_string;
4880 gAgent.buildLocationString(pos_string); 4761 gAgent.buildLocationString(pos_string);
4762
4763 std::string log_message = LLTrans::getString("landmark_created") + " ";
4764 log_message += pos_string;
4765 chat.mText = log_message;
4766 LLFloaterChat::addChat(chat, FALSE, FALSE);
4881 4767
4882 create_inventory_item(gAgent.getID(), gAgent.getSessionID(), 4768 create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
4883 folder_id, LLTransactionID::tnull, 4769 folder_id, LLTransactionID::tnull,
@@ -5188,10 +5074,6 @@ class LLShowFloater : public view_listener_t
5188 { 5074 {
5189 LLFloaterPreference::show(NULL); 5075 LLFloaterPreference::show(NULL);
5190 } 5076 }
5191 else if (floater_name == "toolbar")
5192 {
5193 LLToolBar::toggle(NULL);
5194 }
5195 else if (floater_name == "chat history") 5077 else if (floater_name == "chat history")
5196 { 5078 {
5197 LLFloaterChat::toggleInstance(LLSD()); 5079 LLFloaterChat::toggleInstance(LLSD());
@@ -5324,10 +5206,6 @@ class LLFloaterVisible : public view_listener_t
5324 { 5206 {
5325 new_value = LLFloaterMyFriends::instanceVisible(0); 5207 new_value = LLFloaterMyFriends::instanceVisible(0);
5326 } 5208 }
5327 else if (floater_name == "toolbar")
5328 {
5329 new_value = LLToolBar::visible(NULL);
5330 }
5331 else if (floater_name == "chat history") 5209 else if (floater_name == "chat history")
5332 { 5210 {
5333 new_value = LLFloaterChat::instanceVisible(); 5211 new_value = LLFloaterChat::instanceVisible();
@@ -6259,11 +6137,6 @@ BOOL menu_ui_enabled(void *user_data)
6259void menu_toggle_control( void* user_data ) 6137void menu_toggle_control( void* user_data )
6260{ 6138{
6261 BOOL checked = gSavedSettings.getBOOL( static_cast<char*>(user_data) ); 6139 BOOL checked = gSavedSettings.getBOOL( static_cast<char*>(user_data) );
6262 if (std::string(static_cast<char*>(user_data)) == "HighResSnapshot" && !checked)
6263 {
6264 // High Res Snapshot active, must uncheck RenderUIInSnapshot
6265 gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
6266 }
6267 gSavedSettings.setBOOL( static_cast<char*>(user_data), !checked ); 6140 gSavedSettings.setBOOL( static_cast<char*>(user_data), !checked );
6268} 6141}
6269 6142
@@ -6275,11 +6148,6 @@ class LLToggleControl : public view_listener_t
6275 { 6148 {
6276 std::string control_name = userdata.asString(); 6149 std::string control_name = userdata.asString();
6277 BOOL checked = gSavedSettings.getBOOL( control_name ); 6150 BOOL checked = gSavedSettings.getBOOL( control_name );
6278 if (control_name == "HighResSnapshot" && !checked)
6279 {
6280 // High Res Snapshot active, must uncheck RenderUIInSnapshot
6281 gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
6282 }
6283 gSavedSettings.setBOOL( control_name, !checked ); 6151 gSavedSettings.setBOOL( control_name, !checked );
6284 return true; 6152 return true;
6285 } 6153 }
@@ -7341,25 +7209,6 @@ class LLViewCheckRenderType : public view_listener_t
7341 } 7209 }
7342}; 7210};
7343 7211
7344class LLViewShowHUDAttachments : public view_listener_t
7345{
7346 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7347 {
7348 LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments;
7349 return true;
7350 }
7351};
7352
7353class LLViewCheckHUDAttachments : public view_listener_t
7354{
7355 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7356 {
7357 bool new_value = LLPipeline::sShowHUDAttachments;
7358 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
7359 return true;
7360 }
7361};
7362
7363class LLEditEnableTakeOff : public view_listener_t 7212class LLEditEnableTakeOff : public view_listener_t
7364{ 7213{
7365 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7214 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9751,6 +9600,19 @@ class LLAdvancedLeaveAdminStatus : public view_listener_t
9751 } 9600 }
9752}; 9601};
9753 9602
9603class LLAvatarReportAbuse : public view_listener_t
9604{
9605 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
9606 {
9607 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
9608 if(avatar)
9609 {
9610 LLFloaterReporter::showFromObject(avatar->getID());
9611 }
9612 return true;
9613 }
9614};
9615
9754 9616
9755 9617
9756static void addMenu(view_listener_t *menu, const char *name) 9618static void addMenu(view_listener_t *menu, const char *name)
@@ -9788,6 +9650,7 @@ void initialize_menus()
9788 addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); 9650 addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
9789 addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); 9651 addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
9790 addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); 9652 addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
9653 addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
9791 9654
9792 // View menu 9655 // View menu
9793 addMenu(new LLViewMouselook(), "View.Mouselook"); 9656 addMenu(new LLViewMouselook(), "View.Mouselook");
@@ -9800,12 +9663,10 @@ void initialize_menus()
9800 addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); 9663 addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon");
9801 addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); 9664 addMenu(new LLViewBeaconWidth(), "View.BeaconWidth");
9802 addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); 9665 addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
9803 addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
9804 addMenu(new LLViewZoomOut(), "View.ZoomOut"); 9666 addMenu(new LLViewZoomOut(), "View.ZoomOut");
9805 addMenu(new LLViewZoomIn(), "View.ZoomIn"); 9667 addMenu(new LLViewZoomIn(), "View.ZoomIn");
9806 addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); 9668 addMenu(new LLViewZoomDefault(), "View.ZoomDefault");
9807 addMenu(new LLViewFullscreen(), "View.Fullscreen"); 9669 addMenu(new LLViewFullscreen(), "View.Fullscreen");
9808 addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
9809 9670
9810 addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); 9671 addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
9811 addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); 9672 addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
@@ -9816,7 +9677,6 @@ void initialize_menus()
9816 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); 9677 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
9817 addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); 9678 addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled");
9818 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); 9679 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
9819 addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
9820 9680
9821 // World menu 9681 // World menu
9822 addMenu(new LLWorldChat(), "World.Chat"); 9682 addMenu(new LLWorldChat(), "World.Chat");
@@ -9858,7 +9718,7 @@ void initialize_menus()
9858 addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys"); 9718 addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys");
9859 addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys"); 9719 addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys");
9860 addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection"); 9720 addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection");
9861 addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake"); 9721 addMenu(new LLToolsTake(), "Tools.Take");
9862 addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy"); 9722 addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy");
9863 addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); 9723 addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory");
9864 addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); 9724 addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
@@ -9868,7 +9728,7 @@ void initialize_menus()
9868 addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); 9728 addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie");
9869 addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); 9729 addMenu(new LLToolsEnableLink(), "Tools.EnableLink");
9870 addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); 9730 addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
9871 addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); 9731 addMenu(new LLToolsEnableTake(), "Tools.EnableTake");
9872 addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy"); 9732 addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy");
9873 addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory"); 9733 addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory");
9874 addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory"); 9734 addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory");
@@ -9897,6 +9757,7 @@ void initialize_menus()
9897 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); 9757 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
9898 addMenu(new LLAvatarEject(), "Avatar.Eject"); 9758 addMenu(new LLAvatarEject(), "Avatar.Eject");
9899 addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); 9759 addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
9760 addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
9900 9761
9901 addMenu(new LLObjectEnableMute(), "Avatar.EnableMute"); 9762 addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
9902 addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); 9763 addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
@@ -9942,6 +9803,7 @@ void initialize_menus()
9942 // Land pie menu 9803 // Land pie menu
9943 addMenu(new LLLandBuild(), "Land.Build"); 9804 addMenu(new LLLandBuild(), "Land.Build");
9944 addMenu(new LLLandSit(), "Land.Sit"); 9805 addMenu(new LLLandSit(), "Land.Sit");
9806 addMenu(new LLWorldCreateLandmark(),"Land.NewLandmark");
9945 addMenu(new LLLandBuyPass(), "Land.BuyPass"); 9807 addMenu(new LLLandBuyPass(), "Land.BuyPass");
9946 addMenu(new LLLandEdit(), "Land.Edit"); 9808 addMenu(new LLLandEdit(), "Land.Edit");
9947 9809
@@ -10096,7 +9958,6 @@ void initialize_menus()
10096 addMenu(new LLAdvancedToggleDebugAvatarRotation(), "Advanced.ToggleDebugAvatarRotation"); 9958 addMenu(new LLAdvancedToggleDebugAvatarRotation(), "Advanced.ToggleDebugAvatarRotation");
10097 addMenu(new LLAdvancedCheckDebugAvatarRotation(), "Advanced.CheckDebugAvatarRotation"); 9959 addMenu(new LLAdvancedCheckDebugAvatarRotation(), "Advanced.CheckDebugAvatarRotation");
10098 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); 9960 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
10099 addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
10100 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); 9961 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
10101 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); 9962 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
10102 9963
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp
index 2944d9d..b2fd621 100644
--- a/linden/indra/newview/llviewerregion.cpp
+++ b/linden/indra/newview/llviewerregion.cpp
@@ -1391,8 +1391,12 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1391 capabilityNames.append("DispatchRegionInfo"); 1391 capabilityNames.append("DispatchRegionInfo");
1392 capabilityNames.append("EstateChangeInfo"); 1392 capabilityNames.append("EstateChangeInfo");
1393 capabilityNames.append("EventQueueGet"); 1393 capabilityNames.append("EventQueueGet");
1394 capabilityNames.append("FetchInventoryDescendents"); 1394 capabilityNames.append("FetchInventory");
1395 capabilityNames.append("WebFetchInventoryDescendents");
1396 capabilityNames.append("FetchLib");
1397 capabilityNames.append("FetchLibDescendents");
1395 capabilityNames.append("GroupProposalBallot"); 1398 capabilityNames.append("GroupProposalBallot");
1399 capabilityNames.append("HomeLocation");
1396 capabilityNames.append("MapLayer"); 1400 capabilityNames.append("MapLayer");
1397 capabilityNames.append("MapLayerGod"); 1401 capabilityNames.append("MapLayerGod");
1398 capabilityNames.append("NewFileAgentInventory"); 1402 capabilityNames.append("NewFileAgentInventory");
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 2e77316..854d757 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -3812,10 +3812,6 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
3812 } 3812 }
3813 3813
3814 std::string extension("." + image->getExtension()); 3814 std::string extension("." + image->getExtension());
3815 if (extension.empty())
3816 {
3817 extension = (gSavedSettings.getBOOL("CompressSnapshotsToDisk")) ? ".j2c" : ".bmp";
3818 }
3819 3815
3820 LLFilePicker::ESaveFilter pick_type; 3816 LLFilePicker::ESaveFilter pick_type;
3821 if (extension == ".j2c") 3817 if (extension == ".j2c")
diff --git a/linden/indra/newview/llwindebug.cpp b/linden/indra/newview/llwindebug.cpp
index d2f6748..e48b7bf 100644
--- a/linden/indra/newview/llwindebug.cpp
+++ b/linden/indra/newview/llwindebug.cpp
@@ -704,8 +704,8 @@ void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop
704 ExInfo.ExceptionPointers = exception_infop; 704 ExInfo.ExceptionPointers = exception_infop;
705 ExInfo.ClientPointers = NULL; 705 ExInfo.ClientPointers = NULL;
706 706
707 writeDumpToFile(MiniDumpNormal, &ExInfo, "SecondLife.dmp"); 707 writeDumpToFile(MiniDumpNormal, &ExInfo, "Imprudence.dmp");
708 writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLifePlus.dmp"); 708 writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "ImprudencePlus.dmp");
709 } 709 }
710 710
711 info = Get_Exception_Info(exception_infop); 711 info = Get_Exception_Info(exception_infop);
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
index c2d4301..dc9b5ea 100644
--- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
@@ -385,6 +385,73 @@ Go to the Second Life web site for more information on partnering?
385 Cancel 385 Cancel
386 </option> 386 </option>
387 </alert> 387 </alert>
388 <alert modal="true" name="ClickBuildConstants">
389 <message name="message">
390 The following constants are accepted in this tab:
391
392 XP -- X-axis position
393 YP -- Y-axis position
394 ZP -- Z-axis position
395 XS -- X-axis size
396 YS -- Y-axis size
397 ZS -- Z-axis size
398 XR -- X-axis rotation
399 YR -- Y-axis rotation
400 ZR -- Z-axis rotation
401 CB -- Path cut begin
402 CE -- Path cut end
403 HLW -- Hollow size
404 SKW -- Skew
405 PB -- Slice/Dimple/Profile cut begin
406 PE -- Slice/Dimple/Profile cut end
407 XSH -- X-axis top shear
408 YSH -- Y-axis top shear
409 XHL -- X-axis hole size
410 YHL -- Y-axis hole size
411 XTP -- X-axis taper
412 YTP -- Y-axis taper
413 ROF -- Radius offset
414 REV -- Revolutions
415
416 * -- Multiplication
417 \ -- Division
418 + -- Addition
419 - -- Subtraction
420
421 Examples:
422
423 * Enter &apos;ZP + 20&apos; in the Z-axis position field
424 to move an object up 20 meters.
425 * Enter &apos;XS - YS&apos; in the X-axis size field
426 to subtract the Y size from the X size.
427 </message>
428 </alert>
429 <alert modal="true" name="ClickTextureConstants">
430 <message name="message">
431 The following constants are accepted in this tab:
432
433 TSU -- Repeats per face (horizontal)
434 TSV -- Repeats per face (vertical)
435 TOU -- Offsets per face (horizontal)
436 TOV -- Offsets per face (vertical)
437 TRNS -- Transparency
438 TROT -- Texture rotation
439 GLOW -- Glow
440
441 * -- Multiplication
442 \ -- Division
443 + -- Addition
444 - -- Subtraction
445
446 Examples:
447
448 * Enter &apos;TSU * 4&apos; in horizantal repeats field
449 to increase the amount of repeats by 4x.
450 * Enter &apos;TSV&apos; in the horizontal repeats field
451 to make the horizontal and vertical
452 repeats match.
453 </message>
454 </alert>
388 <alert modal="true" name="ClickWebProfileHelpAvatar"> 455 <alert modal="true" name="ClickWebProfileHelpAvatar">
389 <message name="message"> 456 <message name="message">
390 If this Resident has set a web profile URL then you can: 457 If this Resident has set a web profile URL then you can:
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
index 076598c..eb8e672 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
@@ -46,6 +46,11 @@
46 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" 46 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left"
47 label="End Call" left_delta="0" name="end_call_btn" pad_right="10" 47 label="End Call" left_delta="0" name="end_call_btn" pad_right="10"
48 visible="false" width="100" /> 48 visible="false" width="100" />
49 <text bottom_delta="0" left="-258" height="14" width="230" name="inventory_send" halign="right"
50 text_color="LabelTextColor" follows="right|top" drop_shadow_visible="true"
51 bg_visible="false" border_drop_shadow_visible="false" border_visible="false">
52 Drag and drop inventory here to send
53 </text>
49 <panel border="false" bottom="-37" follows="left|top|right" height="20" 54 <panel border="false" bottom="-37" follows="left|top|right" height="20"
50 left_delta="96" name="speaker_controls" width="100"> 55 left_delta="96" name="speaker_controls" width="100">
51 <volume_slider bottom="0" follows="left|bottom" height="15" increment="0.05" initial_val="0.5" 56 <volume_slider bottom="0" follows="left|bottom" height="15" increment="0.05" initial_val="0.5"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml
index 72c92bd..3a6e4ec 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml
@@ -49,7 +49,7 @@
49 <button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" 49 <button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20"
50 image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" 50 image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left"
51 label="Join Call" left_delta="85" name="start_call_btn" pad_right="12" 51 label="Join Call" left_delta="85" name="start_call_btn" pad_right="12"
52 width="80" /> 52 width="92" />
53 <button bottom_delta="0" follows="left|top" halign="right" height="20" 53 <button bottom_delta="0" follows="left|top" halign="right" height="20"
54 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" 54 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left"
55 label="End Call" left_delta="0" name="end_call_btn" pad_right="12" 55 label="End Call" left_delta="0" name="end_call_btn" pad_right="12"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
index 0c60090..c2eb3c2 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
@@ -139,6 +139,8 @@
139 <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15" 139 <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15"
140 increment="1" initial_val="75" label="Image Quality" left="10" 140 increment="1" initial_val="75" label="Image Quality" left="10"
141 max_val="100" min_val="0" name="image_quality_slider" width="210" /> 141 max_val="100" min_val="0" name="image_quality_slider" width="210" />
142 <check_box bottom_delta="0" follows="left|top" label="High resolution snapshot"
143 left="10" name="high_res_check" />
142 <text bottom_delta="-28" follows="left|top" height="20" left="10" 144 <text bottom_delta="-28" follows="left|top" height="20" left="10"
143 name="layer_type_label" width="50"> 145 name="layer_type_label" width="50">
144 Capture: 146 Capture:
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
index 742da45..eb9b1c6 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
@@ -587,7 +587,10 @@
587 mouse_opaque="true" name="edit_object" v_pad="0" width="252"> 587 mouse_opaque="true" name="edit_object" v_pad="0" width="252">
588 Edit object parameters: 588 Edit object parameters:
589 </text> 589 </text>
590 <check_box bottom_delta="-26" follows="left|top" font="SansSerifSmall" height="16" 590 <button bottom_delta="-10" follows="left|top" font="SansSerif" halign="center"
591 height="22" label="?" label_selected="?" right="-8" tool_tip="Object math constants"
592 mouse_opaque="true" name="build_math_constants" scale_image="true" width="22" />
593 <check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
591 initial_value="false" label="Locked" left="8" mouse_opaque="true" 594 initial_value="false" label="Locked" left="8" mouse_opaque="true"
592 name="checkbox locked" 595 name="checkbox locked"
593 tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits." 596 tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits."
@@ -614,15 +617,15 @@
614 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16" 617 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16"
615 increment="0.01" initial_val="0" label="X" label_width="10" left="10" 618 increment="0.01" initial_val="0" label="X" label_width="10" left="10"
616 max_val="512" min_val="-256" mouse_opaque="true" name="Pos X" 619 max_val="512" min_val="-256" mouse_opaque="true" name="Pos X"
617 text_enabled_color="110, 15, 15, 255" width="87" /> 620 text_enabled_color="110, 15, 15, 255" width="96" />
618 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 621 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
619 increment="0.01" initial_val="0" label="Y" label_width="10" left="10" 622 increment="0.01" initial_val="0" label="Y" label_width="10" left="10"
620 max_val="512" min_val="-256" mouse_opaque="true" name="Pos Y" 623 max_val="512" min_val="-256" mouse_opaque="true" name="Pos Y"
621 text_enabled_color="0, 100, 40, 255" width="87" /> 624 text_enabled_color="0, 100, 40, 255" width="96" />
622 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 625 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
623 increment="0.01" initial_val="0" label="Z" label_width="10" left="10" 626 increment="0.01" initial_val="0" label="Z" label_width="10" left="10"
624 max_val="4096" min_val="0" mouse_opaque="true" name="Pos Z" 627 max_val="4096" min_val="0" mouse_opaque="true" name="Pos Z"
625 text_enabled_color="0, 67, 132, 255" width="87" /> 628 text_enabled_color="0, 67, 132, 255" width="96" />
626 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 629 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
627 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 630 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
628 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 631 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -632,15 +635,15 @@
632 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16" 635 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16"
633 increment="0.01" initial_val="0" label="X" label_width="10" left="10" 636 increment="0.01" initial_val="0" label="X" label_width="10" left="10"
634 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale X" 637 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale X"
635 text_enabled_color="1, 1, 1, 1" width="87" /> 638 text_enabled_color="1, 1, 1, 1" width="96" />
636 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 639 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
637 increment="0.01" initial_val="0" label="Y" label_width="10" left="10" 640 increment="0.01" initial_val="0" label="Y" label_width="10" left="10"
638 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Y" 641 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Y"
639 text_enabled_color="1, 1, 1, 1" width="87" /> 642 text_enabled_color="1, 1, 1, 1" width="96" />
640 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 643 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
641 increment="0.01" initial_val="0" label="Z" label_width="10" left="10" 644 increment="0.01" initial_val="0" label="Z" label_width="10" left="10"
642 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Z" 645 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Z"
643 text_enabled_color="1, 1, 1, 1" width="87" /> 646 text_enabled_color="1, 1, 1, 1" width="96" />
644 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 647 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
645 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 648 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
646 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 649 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -650,15 +653,15 @@
650 <spinner bottom_delta="-22" decimal_digits="2" follows="left|top" height="16" 653 <spinner bottom_delta="-22" decimal_digits="2" follows="left|top" height="16"
651 increment="1" initial_val="0" label="X" label_width="10" left="10" 654 increment="1" initial_val="0" label="X" label_width="10" left="10"
652 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot X" 655 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot X"
653 text_enabled_color="1, 1, 1, 1" width="87" /> 656 text_enabled_color="1, 1, 1, 1" width="96" />
654 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16" 657 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16"
655 increment="1" initial_val="0" label="Y" label_width="10" left="10" 658 increment="1" initial_val="0" label="Y" label_width="10" left="10"
656 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Y" 659 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Y"
657 text_enabled_color="1, 1, 1, 1" width="87" /> 660 text_enabled_color="1, 1, 1, 1" width="96" />
658 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16" 661 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16"
659 increment="1" initial_val="0" label="Z" label_width="10" left="10" 662 increment="1" initial_val="0" label="Z" label_width="10" left="10"
660 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Z" 663 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Z"
661 text_enabled_color="1, 1, 1, 1" width="87" /> 664 text_enabled_color="1, 1, 1, 1" width="96" />
662 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 665 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
663 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 666 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
664 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 667 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -748,12 +751,12 @@
748 Skew 751 Skew
749 </text> 752 </text>
750 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16" 753 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16"
751 increment="5" initial_val="0" left="121" max_val="95" min_val="0" 754 increment="5" initial_val="0" left="121" max_val="95" min_val="0"
752 mouse_opaque="true" name="Scale 1" width="68" /> 755 mouse_opaque="true" name="Scale 1" width="68" label=" " label_width="10"/>
753 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 756 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
754 increment="0.05" initial_val="0" left_delta="73" max_val="0.95" 757 increment="0.05" initial_val="0" left_delta="73" max_val="0.95" label_width="10"
755 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" /> 758 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" label=" " />
756 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 759 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
757 bottom_delta="-15" drop_shadow_visible="true" follows="left|top" 760 bottom_delta="-15" drop_shadow_visible="true" follows="left|top"
758 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" 761 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121"
759 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> 762 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141">
@@ -872,10 +875,10 @@
872 </text> 875 </text>
873 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" 876 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16"
874 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1" 877 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1"
875 mouse_opaque="true" name="Radius Offset" width="68" /> 878 mouse_opaque="true" name="Radius Offset" width="68" label=" " label_width="10" />
876 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 879 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
877 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1" 880 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1"
878 mouse_opaque="true" name="Revolutions" width="68" /> 881 mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" />
879 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" 882 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true"
880 default_image_name="Default" follows="left|top" height="141" 883 default_image_name="Default" follows="left|top" height="141"
881 label="Sculpt Texture" left="121" mouse_opaque="true" 884 label="Sculpt Texture" left="121" mouse_opaque="true"
@@ -1018,7 +1021,7 @@
1018 </text> 1021 </text>
1019 <spinner bottom_delta="-20" decimal_digits="0" follows="left|top" height="16" 1022 <spinner bottom_delta="-20" decimal_digits="0" follows="left|top" height="16"
1020 increment="2" initial_val="0" left="180" max_val="100" min_val="0" 1023 increment="2" initial_val="0" left="180" max_val="100" min_val="0"
1021 mouse_opaque="true" name="ColorTrans" width="80" /> 1024 mouse_opaque="true" name="ColorTrans" width="58" />
1022 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 1025 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1023 bottom_delta="-12" drop_shadow_visible="true" follows="left|top" 1026 bottom_delta="-12" drop_shadow_visible="true" follows="left|top"
1024 font="SansSerifSmall" h_pad="0" halign="left" height="10" 1027 font="SansSerifSmall" h_pad="0" halign="left" height="10"
@@ -1027,7 +1030,7 @@
1027 </text> 1030 </text>
1028 <spinner bottom_delta="-20" decimal_digits="2" follows="left|top" height="16" 1031 <spinner bottom_delta="-20" decimal_digits="2" follows="left|top" height="16"
1029 increment="0.1" initial_val="0" left="180" max_val="1" 1032 increment="0.1" initial_val="0" left="180" max_val="1"
1030 min_val="0" mouse_opaque="true" name="glow" width="80" /> 1033 min_val="0" mouse_opaque="true" name="glow" width="58" />
1031 <check_box bottom_delta="-23" follows="left|top" font="SansSerifSmall" height="16" 1034 <check_box bottom_delta="-23" follows="left|top" font="SansSerifSmall" height="16"
1032 initial_value="false" label="Full Bright" left="180" mouse_opaque="true" 1035 initial_value="false" label="Full Bright" left="180" mouse_opaque="true"
1033 name="checkbox fullbright" width="81" /> 1036 name="checkbox fullbright" width="81" />
@@ -1201,6 +1204,9 @@
1201 <button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center" 1204 <button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center"
1202 height="16" label="Align" label_selected="Align" left="112" 1205 height="16" label="Align" label_selected="Align" left="112"
1203 mouse_opaque="true" name="button align" scale_image="TRUE" width="68" /> 1206 mouse_opaque="true" name="button align" scale_image="TRUE" width="68" />
1207 <button bottom="-162" follows="left|top" font="SansSerif" halign="center"
1208 height="22" label="?" label_selected="?" right="-8" tool_tip="Texture math constants"
1209 mouse_opaque="true" name="texture_math_constants" scale_image="true" width="24" />
1204 </panel> 1210 </panel>
1205 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" 1211 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
1206 label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> 1212 label="Content" left="1" mouse_opaque="false" name="Contents" width="270">
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index 31288ac..aa61e77 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -223,6 +223,10 @@
223 mouse_opaque="true" name="Detach From Yourself" width="128"> 223 mouse_opaque="true" name="Detach From Yourself" width="128">
224 <on_click filter="" function="Inventory.DoToSelected" userdata="detach" /> 224 <on_click filter="" function="Inventory.DoToSelected" userdata="detach" />
225 </menu_item_call> 225 </menu_item_call>
226 <menu_item_call bottom_delta="-18" height="18" label="Restore to Last Position" left="0" mouse_opaque="true"
227 name="Restore to Last Position" width="128">
228 <on_click filter="" function="Inventory.DoToSelected" userdata="restoreToWorld" />
229 </menu_item_call>
226 <menu_item_call bottom_delta="-18" height="18" label="Wear" left="0" mouse_opaque="true" 230 <menu_item_call bottom_delta="-18" height="18" label="Wear" left="0" mouse_opaque="true"
227 name="Object Wear" width="128"> 231 name="Object Wear" width="128">
228 <on_click filter="" function="Inventory.DoToSelected" userdata="attach" /> 232 <on_click filter="" function="Inventory.DoToSelected" userdata="attach" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
index 85028d5..d16c22c 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
@@ -1,20 +1,46 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<pie_menu name="Attachment Pie"> 2<pie_menu name="Attachment Pie">
3 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop"> 3 <menu_item_call enabled="true" label="Profile..." name="Profile...">
4 <on_click function="Attachment.Drop" /> 4 <on_click function="ShowAgentProfile" userdata="agent" />
5 <on_enable function="Attachment.EnableDrop" />
6 </menu_item_call> 5 </menu_item_call>
7 <menu_item_separator /> 6 <menu_item_call enabled="true" label="Groups..." name="Groups...">
8 <menu_item_separator /> 7 <on_click function="ShowAgentGroups" userdata="agent" />
9 <menu_item_separator />
10 <menu_item_separator />
11 <menu_item_separator />
12 <menu_item_call enabled="false" label="Detach" mouse_opaque="true" name="Detach">
13 <on_click function="Attachment.Detach" />
14 <on_enable function="Attachment.EnableDetach" />
15 </menu_item_call> 8 </menu_item_call>
16 <menu_item_call enabled="false" label="Edit" mouse_opaque="true" name="Edit"> 9 <menu_item_call enabled="false" label="Touch" mouse_opaque="true" name="Object Touch">
17 <on_click function="Object.Edit" /> 10 <on_click function="Object.Touch" />
18 <on_enable function="EnableEdit" /> 11 <on_enable function="Object.EnableTouch" userdata="Touch" />
12 </menu_item_call>
13 <menu_item_call enabled="true" label="Stand Up" name="Stand Up">
14 <on_click function="Self.StandUp" userdata="" />
15 <on_enable function="Self.EnableStandUp" />
16 </menu_item_call>
17 <menu_item_call enabled="true" label="Friends..." name="Friends...">
18 <on_click function="ShowFloater" userdata="friends" />
19 </menu_item_call>
20 <menu_item_call enabled="true" label="Gestures..." name="Gestures...">
21 <on_click function="ShowFloater" userdata="gestures" />
22 </menu_item_call>
23 <pie_menu label="More &gt;" name="More &gt;">
24 <menu_item_call enabled="false" label="Detach" mouse_opaque="true" name="Detach">
25 <on_click function="Attachment.Detach" />
26 <on_enable function="Attachment.EnableDetach" />
27 </menu_item_call>
28 <menu_item_separator />
29 <menu_item_separator />
30 <menu_item_separator />
31 <menu_item_separator />
32 <menu_item_separator />
33 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit...">
34 <on_click function="Object.Edit" />
35 <on_enable function="EnableEdit" />
36 </menu_item_call>
37 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop">
38 <on_click function="Attachment.Drop" />
39 <on_enable function="Attachment.EnableDrop" />
40 </menu_item_call>
41 </pie_menu>
42 <menu_item_call enabled="true" label="Appearance..." name="Appearance...">
43 <on_click function="ShowFloater" userdata="appearance" />
44 <on_enable function="Edit.EnableCustomizeAvatar" />
19 </menu_item_call> 45 </menu_item_call>
20</pie_menu> 46</pie_menu>
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
index c8d8ed6..2d44dab 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
@@ -10,7 +10,9 @@
10 <menu_item_call enabled="false" label="Go To" mouse_opaque="true" name="Go To"> 10 <menu_item_call enabled="false" label="Go To" mouse_opaque="true" name="Go To">
11 <on_click function="GoToObject" /> 11 <on_click function="GoToObject" />
12 </menu_item_call> 12 </menu_item_call>
13 <menu_item_separator /> 13 <menu_item_call enabled="false" label="Abuse..." mouse_opaque="true" name="abuse">
14 <on_click function="Avatar.ReportAbuse" />
15 </menu_item_call>
14 <menu_item_call enabled="false" label="Add Friend..." mouse_opaque="true" name="Add Friend"> 16 <menu_item_call enabled="false" label="Add Friend..." mouse_opaque="true" name="Add Friend">
15 <on_click function="Avatar.AddFriend" /> 17 <on_click function="Avatar.AddFriend" />
16 <on_enable function="Avatar.EnableAddFriend" /> 18 <on_enable function="Avatar.EnableAddFriend" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
index ee2a431..81ae04f 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
@@ -3,7 +3,7 @@
3 <menu_item_call enabled="false" label="About Land..." mouse_opaque="true" name="About Land..."> 3 <menu_item_call enabled="false" label="About Land..." mouse_opaque="true" name="About Land...">
4 <on_click function="ShowFloater" userdata="about land" /> 4 <on_click function="ShowFloater" userdata="about land" />
5 </menu_item_call> 5 </menu_item_call>
6 <menu_item_call enabled="false" label="Create" mouse_opaque="true" name="Create"> 6 <menu_item_call enabled="false" label="Build" mouse_opaque="true" name="Create">
7 <on_click function="Land.Build" /> 7 <on_click function="Land.Build" />
8 <on_enable function="EnableEdit" /> 8 <on_enable function="EnableEdit" />
9 </menu_item_call> 9 </menu_item_call>
@@ -13,7 +13,9 @@
13 <menu_item_call enabled="false" label="Sit Here" mouse_opaque="true" name="Sit Here"> 13 <menu_item_call enabled="false" label="Sit Here" mouse_opaque="true" name="Sit Here">
14 <on_click function="Land.Sit" /> 14 <on_click function="Land.Sit" />
15 </menu_item_call> 15 </menu_item_call>
16 <menu_item_separator /> 16 <menu_item_call enabled="false" label="Landmark..." mouse_opaque="true" name="Add Landmark">
17 <on_click function="Land.NewLandmark" />
18 </menu_item_call>
17 <menu_item_call enabled="false" label="Buy Pass..." mouse_opaque="true" name="Land Buy Pass"> 19 <menu_item_call enabled="false" label="Buy Pass..." mouse_opaque="true" name="Land Buy Pass">
18 <on_click function="Land.BuyPass" /> 20 <on_click function="Land.BuyPass" />
19 <on_enable function="Land.EnableBuyPass" /> 21 <on_enable function="Land.EnableBuyPass" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
index c5a04ce..b63e007 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
@@ -4,9 +4,9 @@
4 <on_click function="Object.Open" /> 4 <on_click function="Object.Open" />
5 <on_enable function="Object.EnableOpen" /> 5 <on_enable function="Object.EnableOpen" />
6 </menu_item_call> 6 </menu_item_call>
7 <menu_item_call enabled="false" label="Create" mouse_opaque="true" name="Create"> 7 <menu_item_call enabled="false" label="Buy..." mouse_opaque="true" name="Buy...">
8 <on_click function="Object.Build" /> 8 <on_click function="Object.Buy" />
9 <on_enable function="EnableEdit" /> 9 <on_enable function="Object.EnableBuy" />
10 </menu_item_call> 10 </menu_item_call>
11 <menu_item_call enabled="false" label="Touch" mouse_opaque="true" name="Object Touch"> 11 <menu_item_call enabled="false" label="Touch" mouse_opaque="true" name="Object Touch">
12 <on_click function="Object.Touch" /> 12 <on_click function="Object.Touch" />
@@ -17,56 +17,56 @@
17 <on_enable function="Object.EnableSitOrStand" userdata="Sit Here,Stand Up" /> 17 <on_enable function="Object.EnableSitOrStand" userdata="Sit Here,Stand Up" />
18 </menu_item_call> 18 </menu_item_call>
19 <menu_item_call enabled="false" label="Take" mouse_opaque="true" name="Pie Object Take"> 19 <menu_item_call enabled="false" label="Take" mouse_opaque="true" name="Pie Object Take">
20 <on_click function="Tools.BuyOrTake" /> 20 <on_click function="Tools.Take" />
21 <on_enable function="Tools.EnableBuyOrTake" userdata="Buy,Take" /> 21 <on_enable function="Tools.EnableTake" />
22 </menu_item_call> 22 </menu_item_call>
23 <menu_item_call enabled="false" label="Pay..." mouse_opaque="true" name="Pay..."> 23 <menu_item_call enabled="false" label="Pay..." mouse_opaque="true" name="Pay...">
24 <on_click function="PayObject" /> 24 <on_click function="PayObject" />
25 <on_enable function="EnablePayObject" /> 25 <on_enable function="EnablePayObject" />
26 </menu_item_call> 26 </menu_item_call>
27 <pie_menu label="More &gt;" name="More &gt;"> 27 <pie_menu label="More &gt;" name="More &gt;">
28 <menu_item_call enabled="false" label="Delete" mouse_opaque="true" name="Delete"> 28 <menu_item_call enabled="false" label="Build" mouse_opaque="true" name="Create">
29 <on_click function="Object.Delete" /> 29 <on_click function="Object.Build" />
30 <on_enable function="Object.EnableDelete" /> 30 <on_enable function="EnableEdit" />
31 </menu_item_call> 31 </menu_item_call>
32 <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear"> 32 <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear">
33 <on_click function="Object.AttachToAvatar" /> 33 <on_click function="Object.AttachToAvatar" />
34 <on_enable function="Object.EnableWear" /> 34 <on_enable function="Object.EnableWear" />
35 </menu_item_call> 35 </menu_item_call>
36 <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy"> 36 <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy">
37 <on_click function="Tools.TakeCopy" /> 37 <on_click function="Tools.TakeCopy" />
38 <on_enable function="Tools.EnableTakeCopy" /> 38 <on_enable function="Tools.EnableTakeCopy" />
39 </menu_item_call> 39 </menu_item_call>
40 <pie_menu label="Attach HUD &gt;" name="Object Attach HUD" /> 40 <pie_menu label="Attach HUD &gt;" name="Object Attach HUD" />
41 <pie_menu label="Attach &gt;" name="Object Attach" /> 41 <pie_menu label="Attach &gt;" name="Object Attach" />
42 <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return..."> 42 <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return...">
43 <on_click function="Object.Return" /> 43 <on_click function="Object.Return" />
44 <on_enable function="Object.EnableReturn" /> 44 <on_enable function="Object.EnableReturn" />
45 </menu_item_call> 45 </menu_item_call>
46 <pie_menu label="More &gt;" name="Rate Menu"> 46 <pie_menu label="More &gt;" name="Rate Menu">
47 <menu_item_separator /> 47 <menu_item_separator />
48 <menu_item_separator /> 48 <menu_item_separator />
49 <menu_item_call enabled="false" label="Report Abuse..." mouse_opaque="true" 49 <menu_item_call enabled="false" label="Abuse..." mouse_opaque="true"
50 name="Report Abuse..."> 50 name="Report Abuse...">
51 <on_click function="Object.ReportAbuse" /> 51 <on_click function="Object.ReportAbuse" />
52 <on_enable function="Object.EnableReportAbuse" /> 52 <on_enable function="Object.EnableReportAbuse" />
53 </menu_item_call> 53 </menu_item_call>
54 <menu_item_separator /> 54 <menu_item_separator />
55 <menu_item_separator /> 55 <menu_item_separator />
56 <menu_item_separator /> 56 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
57 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute"> 57 <on_click function="Object.Mute" />
58 <on_click function="Object.Mute" /> 58 <on_enable function="Object.EnableMute" />
59 <on_enable function="Object.EnableMute" /> 59 </menu_item_call>
60 </menu_item_call> 60 <menu_item_separator />
61 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> 61 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
62 <on_click function="Object.Inspect" /> 62 <on_click function="Object.Inspect" />
63 <on_enable function="Object.EnableInspect" /> 63 <on_enable function="Object.EnableInspect" />
64 </menu_item_call> 64 </menu_item_call>
65 </pie_menu> 65 </pie_menu>
66 <menu_item_call enabled="false" label="Buy..." mouse_opaque="true" name="Buy..."> 66 <menu_item_call enabled="false" label="Delete" mouse_opaque="true" name="Delete">
67 <on_click function="Object.Buy" /> 67 <on_click function="Object.Delete" />
68 <on_enable function="Object.EnableBuy" /> 68 <on_enable function="Object.EnableDelete" />
69 </menu_item_call> 69 </menu_item_call>
70 </pie_menu> 70 </pie_menu>
71 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit..."> 71 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit...">
72 <on_click function="Object.Edit" /> 72 <on_click function="Object.Edit" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
index 327e22e..4fb7262 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
@@ -6,85 +6,85 @@
6 <menu_item_call enabled="true" label="Groups..." name="Groups..."> 6 <menu_item_call enabled="true" label="Groups..." name="Groups...">
7 <on_click function="ShowAgentGroups" userdata="agent" /> 7 <on_click function="ShowAgentGroups" userdata="agent" />
8 </menu_item_call> 8 </menu_item_call>
9 <menu_item_call enabled="true" label="Go..." name="Go..."> 9 <menu_item_call enabled="true" label="Inventory" name="Inventory">
10 <on_click function="ShowFloater" userdata="movement controls" /> 10 <on_click function="ShowFloater" userdata="inventory" />
11 </menu_item_call> 11 </menu_item_call>
12 <menu_item_call enabled="true" label="Stand Up" name="Stand Up"> 12 <menu_item_call enabled="true" label="Stand Up" name="Stand Up">
13 <on_click function="Self.StandUp" userdata="" /> 13 <on_click function="Self.StandUp" userdata="" />
14 <on_enable function="Self.EnableStandUp" /> 14 <on_enable function="Self.EnableStandUp" />
15 </menu_item_call> 15 </menu_item_call>
16 <menu_item_call enabled="true" label="Friends..." name="Friends..."> 16 <menu_item_call enabled="true" label="Friends..." name="Friends...">
17 <on_click function="ShowFloater" userdata="friends" /> 17 <on_click function="ShowFloater" userdata="friends" />
18 </menu_item_call> 18 </menu_item_call>
19 <menu_item_call enabled="true" label="Gestures..." name="Gestures..."> 19 <menu_item_call enabled="true" label="Gestures..." name="Gestures...">
20 <on_click function="ShowFloater" userdata="gestures" /> 20 <on_click function="ShowFloater" userdata="gestures" />
21 </menu_item_call> 21 </menu_item_call>
22 <pie_menu enabled="true" label="Take Off &gt;" name="Take Off &gt;"> 22 <pie_menu enabled="true" label="Take Off &gt;" name="Take Off &gt;">
23 <pie_menu enabled="true" label="Clothes &gt;" name="Clothes &gt;"> 23 <pie_menu enabled="true" label="Clothes &gt;" name="Clothes &gt;">
24 <menu_item_call bottom="-29" enabled="false" height="19" label="Shirt" left="0" 24 <menu_item_call bottom="-29" enabled="false" height="19" label="Shirt" left="0"
25 mouse_opaque="true" name="Shirt" width="118"> 25 mouse_opaque="true" name="Shirt" width="118">
26 <on_click function="Edit.TakeOff" userdata="shirt" /> 26 <on_click function="Edit.TakeOff" userdata="shirt" />
27 <on_enable function="Edit.EnableTakeOff" userdata="shirt" /> 27 <on_enable function="Edit.EnableTakeOff" userdata="shirt" />
28 </menu_item_call> 28 </menu_item_call>
29 <menu_item_call bottom="-48" enabled="false" height="19" label="Pants" left="0" 29 <menu_item_call bottom="-48" enabled="false" height="19" label="Pants" left="0"
30 mouse_opaque="true" name="Pants" width="118"> 30 mouse_opaque="true" name="Pants" width="118">
31 <on_click function="Edit.TakeOff" userdata="pants" /> 31 <on_click function="Edit.TakeOff" userdata="pants" />
32 <on_enable function="Edit.EnableTakeOff" userdata="pants" /> 32 <on_enable function="Edit.EnableTakeOff" userdata="pants" />
33 </menu_item_call> 33 </menu_item_call>
34 <menu_item_call bottom="-67" enabled="false" height="19" label="Shoes" left="0" 34 <menu_item_call bottom="-67" enabled="false" height="19" label="Shoes" left="0"
35 mouse_opaque="true" name="Shoes" width="118"> 35 mouse_opaque="true" name="Shoes" width="118">
36 <on_click function="Edit.TakeOff" userdata="shoes" /> 36 <on_click function="Edit.TakeOff" userdata="shoes" />
37 <on_enable function="Edit.EnableTakeOff" userdata="shoes" /> 37 <on_enable function="Edit.EnableTakeOff" userdata="shoes" />
38 </menu_item_call> 38 </menu_item_call>
39 <menu_item_call bottom="-86" enabled="false" height="19" label="Socks" left="0" 39 <menu_item_call bottom="-86" enabled="false" height="19" label="Socks" left="0"
40 mouse_opaque="true" name="Socks" width="118"> 40 mouse_opaque="true" name="Socks" width="118">
41 <on_click function="Edit.TakeOff" userdata="socks" /> 41 <on_click function="Edit.TakeOff" userdata="socks" />
42 <on_enable function="Edit.EnableTakeOff" userdata="socks" /> 42 <on_enable function="Edit.EnableTakeOff" userdata="socks" />
43 </menu_item_call> 43 </menu_item_call>
44 <menu_item_call bottom="-105" enabled="false" height="19" label="Jacket" left="0" 44 <menu_item_call bottom="-105" enabled="false" height="19" label="Jacket" left="0"
45 mouse_opaque="true" name="Jacket" width="118"> 45 mouse_opaque="true" name="Jacket" width="118">
46 <on_click function="Edit.TakeOff" userdata="jacket" /> 46 <on_click function="Edit.TakeOff" userdata="jacket" />
47 <on_enable function="Edit.EnableTakeOff" userdata="jacket" /> 47 <on_enable function="Edit.EnableTakeOff" userdata="jacket" />
48 </menu_item_call> 48 </menu_item_call>
49 <menu_item_call bottom="-124" enabled="false" height="19" label="Gloves" left="0" 49 <menu_item_call bottom="-124" enabled="false" height="19" label="Gloves" left="0"
50 mouse_opaque="true" name="Gloves" width="118"> 50 mouse_opaque="true" name="Gloves" width="118">
51 <on_click function="Edit.TakeOff" userdata="gloves" /> 51 <on_click function="Edit.TakeOff" userdata="gloves" />
52 <on_enable function="Edit.EnableTakeOff" userdata="gloves" /> 52 <on_enable function="Edit.EnableTakeOff" userdata="gloves" />
53 </menu_item_call> 53 </menu_item_call>
54 <pie_menu enabled="true" label="More &gt;" name="More &gt;"> 54 <pie_menu enabled="true" label="More &gt;" name="More &gt;">
55 <menu_item_call bottom="-143" enabled="false" height="19" label="Undershirt" left="0" 55 <menu_item_call bottom="-143" enabled="false" height="19" label="Undershirt" left="0"
56 mouse_opaque="true" name="Self Undershirt" width="118"> 56 mouse_opaque="true" name="Self Undershirt" width="118">
57 <on_click function="Edit.TakeOff" userdata="undershirt" /> 57 <on_click function="Edit.TakeOff" userdata="undershirt" />
58 <on_enable function="Edit.EnableTakeOff" userdata="undershirt" /> 58 <on_enable function="Edit.EnableTakeOff" userdata="undershirt" />
59 </menu_item_call> 59 </menu_item_call>
60 <menu_item_separator /> 60 <menu_item_separator />
61 <menu_item_call bottom="-200" enabled="true" height="19" label="All Clothes" left="0" 61 <menu_item_call bottom="-200" enabled="true" height="19" label="All Clothes" left="0"
62 mouse_opaque="true" name="All Clothes" width="118"> 62 mouse_opaque="true" name="All Clothes" width="118">
63 <on_click function="Edit.TakeOff" userdata="all" /> 63 <on_click function="Edit.TakeOff" userdata="all" />
64 </menu_item_call> 64 </menu_item_call>
65 <menu_item_separator /> 65 <menu_item_separator />
66 <menu_item_call bottom="-162" enabled="false" height="19" label="Underpants" left="0" 66 <menu_item_call bottom="-162" enabled="false" height="19" label="Underpants" left="0"
67 mouse_opaque="true" name="Self Underpants" width="118"> 67 mouse_opaque="true" name="Self Underpants" width="118">
68 <on_click function="Edit.TakeOff" userdata="underpants" /> 68 <on_click function="Edit.TakeOff" userdata="underpants" />
69 <on_enable function="Edit.EnableTakeOff" userdata="underpants" /> 69 <on_enable function="Edit.EnableTakeOff" userdata="underpants" />
70 </menu_item_call> 70 </menu_item_call>
71 </pie_menu> 71 </pie_menu>
72 <menu_item_call bottom="-181" enabled="false" height="19" label="Skirt" left="0" 72 <menu_item_call bottom="-181" enabled="false" height="19" label="Skirt" left="0"
73 mouse_opaque="true" name="Skirt" width="118"> 73 mouse_opaque="true" name="Skirt" width="118">
74 <on_click function="Edit.TakeOff" userdata="skirt" /> 74 <on_click function="Edit.TakeOff" userdata="skirt" />
75 <on_enable function="Edit.EnableTakeOff" userdata="skirt" /> 75 <on_enable function="Edit.EnableTakeOff" userdata="skirt" />
76 </menu_item_call> 76 </menu_item_call>
77 </pie_menu> 77 </pie_menu>
78 <menu_item_separator /> 78 <menu_item_separator />
79 <pie_menu enabled="true" label="HUD &gt;" name="Object Detach HUD" /> 79 <pie_menu enabled="true" label="HUD &gt;" name="Object Detach HUD" />
80 <menu_item_separator /> 80 <menu_item_separator />
81 <pie_menu enabled="true" label="Detach &gt;" name="Object Detach" /> 81 <pie_menu enabled="true" label="Detach &gt;" name="Object Detach" />
82 <menu_item_separator /> 82 <menu_item_separator />
83 <menu_item_call enabled="true" label="Detach All" name="Detach All"> 83 <menu_item_call enabled="true" label="Detach All" name="Detach All">
84 <on_click function="Self.RemoveAllAttachments" userdata="" /> 84 <on_click function="Self.RemoveAllAttachments" userdata="" />
85 <on_enable function="Self.EnableRemoveAllAttachments" /> 85 <on_enable function="Self.EnableRemoveAllAttachments" />
86 </menu_item_call> 86 </menu_item_call>
87 </pie_menu> 87 </pie_menu>
88 <menu_item_call enabled="true" label="Appearance..." name="Appearance..."> 88 <menu_item_call enabled="true" label="Appearance..." name="Appearance...">
89 <on_click function="ShowFloater" userdata="appearance" /> 89 <on_click function="ShowFloater" userdata="appearance" />
90 <on_enable function="Edit.EnableCustomizeAvatar" /> 90 <on_enable function="Edit.EnableCustomizeAvatar" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 682acb9..a741b94 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -127,8 +127,7 @@
127 </menu_item_call> 127 </menu_item_call>
128 <menu_item_separator /> 128 <menu_item_separator />
129 <menu_item_call name="Duplicate" enabled="false" 129 <menu_item_call name="Duplicate" enabled="false"
130 label="Duplicate" 130 label="Duplicate">
131 shortcut="control|D">
132 <on_click function="Edit.Duplicate" userdata="" /> 131 <on_click function="Edit.Duplicate" userdata="" />
133 <on_enable function="Edit.EnableDuplicate" /> 132 <on_enable function="Edit.EnableDuplicate" />
134 </menu_item_call> 133 </menu_item_call>
@@ -205,6 +204,12 @@
205 userdata="all" /> 204 userdata="all" />
206 </menu_item_call> 205 </menu_item_call>
207 </menu> 206 </menu>
207 <menu_item_call name="Refresh Appearance"
208 label="Refresh Appearance"
209 shortcut="control|alt|R">
210 <on_click function="Advanced.RebakeTextures"
211 userdata="" />
212 </menu_item_call>
208 <menu_item_separator /> 213 <menu_item_separator />
209 <menu_item_call name="Gestures..." label="Gestures..." 214 <menu_item_call name="Gestures..." label="Gestures..."
210 shortcut="control|G"> 215 shortcut="control|G">
@@ -276,10 +281,6 @@
276 <on_click function="ShowFloater" userdata="inworld browser" /> 281 <on_click function="ShowFloater" userdata="inworld browser" />
277 </menu_item_call> 282 </menu_item_call>
278 <menu_item_separator /> 283 <menu_item_separator />
279 <menu_item_check name="Toolbar" label="Toolbar">
280 <on_click function="ShowFloater" userdata="toolbar" />
281 <on_check function="FloaterVisible" userdata="toolbar" />
282 </menu_item_check>
283 <menu_item_check name="Chat History" label="Local Chat" 284 <menu_item_check name="Chat History" label="Local Chat"
284 shortcut="control|H"> 285 shortcut="control|H">
285 <on_click function="ShowFloater" userdata="chat history" /> 286 <on_click function="ShowFloater" userdata="chat history" />
@@ -423,7 +424,7 @@
423 userdata="hideparticles" /> 424 userdata="hideparticles" />
424 </menu_item_check> 425 </menu_item_check>
425 <menu_item_separator /> 426 <menu_item_separator />
426 <menu name="Beacon Width" color="0 0 0 1" create_jump_keys="true" 427 <menu name="Beacon Width" create_jump_keys="true"
427 label="Beacon Width" opaque="true" tear_off="true"> 428 label="Beacon Width" opaque="true" tear_off="true">
428 <menu_item_call name="Beacon Width 1" label="1"> 429 <menu_item_call name="Beacon Width 1" label="1">
429 <on_click function="View.BeaconWidth" userdata="1" /> 430 <on_click function="View.BeaconWidth" userdata="1" />
@@ -439,34 +440,27 @@
439 </menu_item_call> 440 </menu_item_call>
440 </menu> 441 </menu>
441 </menu> 442 </menu>
442 <menu_item_check name="Show HUD Attachments"
443 label="Show HUD Attachments"
444 shortcut="alt|shift|H">
445 <on_click function="View.ShowHUDAttachments" userdata="" />
446 <on_check function="View.CheckHUDAttachments" />
447 </menu_item_check>
448 <menu_item_separator /> 443 <menu_item_separator />
449 <menu_item_call name="Zoom In" label="Zoom In" 444 <menu name="Zoom Level" create_jump_keys="true"
450 shortcut="control|0"> 445 label="Zoom Level" opaque="true" tear_off="true">
451 <on_click function="View.ZoomIn" userdata="" /> 446 <menu_item_call name="Zoom In" label="Zoom In"
452 </menu_item_call> 447 shortcut="control|0">
453 <menu_item_call name="Zoom Default" label="Zoom Default" 448 <on_click function="View.ZoomIn" userdata="" />
454 shortcut="control|9"> 449 </menu_item_call>
455 <on_click function="View.ZoomDefault" userdata="" /> 450 <menu_item_call name="Zoom Default" label="Zoom Default"
456 </menu_item_call> 451 shortcut="control|9">
457 <menu_item_call name="Zoom Out" label="Zoom Out" 452 <on_click function="View.ZoomDefault" userdata="" />
458 shortcut="control|8"> 453 </menu_item_call>
459 <on_click function="View.ZoomOut" userdata="" /> 454 <menu_item_call name="Zoom Out" label="Zoom Out"
460 </menu_item_call> 455 shortcut="control|8">
456 <on_click function="View.ZoomOut" userdata="" />
457 </menu_item_call>
458 </menu>
461 <menu_item_separator /> 459 <menu_item_separator />
462 <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen" 460 <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen"
463 shortcut="alt|Enter"> 461 shortcut="alt|Enter">
464 <on_click function="View.Fullscreen" userdata="" /> 462 <on_click function="View.Fullscreen" userdata="" />
465 </menu_item_call> 463 </menu_item_call>
466 <menu_item_call name="Set UI Size to Default"
467 label="Set UI Size to Default">
468 <on_click function="View.DefaultUISize" userdata="" />
469 </menu_item_call>
470 </menu> 464 </menu>
471 465
472 466
@@ -489,7 +483,7 @@
489 <on_check control="FlyBtnState" /> 483 <on_check control="FlyBtnState" />
490 </menu_item_check> 484 </menu_item_check>
491 <menu_item_separator /> 485 <menu_item_separator />
492 <menu_item_call name="Create Landmark Here" 486 <menu_item_call name="Create Landmark Here" shortcut="control|D"
493 label="Create Landmark Here"> 487 label="Create Landmark Here">
494 <on_click function="World.CreateLandmark" userdata="" /> 488 <on_click function="World.CreateLandmark" userdata="" />
495 <on_enable function="World.EnableCreateLandmark" userdata="" /> 489 <on_enable function="World.EnableCreateLandmark" userdata="" />
@@ -696,9 +690,9 @@
696 <on_enable function="Tools.SomethingSelectedNoHUD" /> 690 <on_enable function="Tools.SomethingSelectedNoHUD" />
697 </menu_item_call> 691 </menu_item_call>
698 <menu_item_call name="Menu Object Take" enabled="false" 692 <menu_item_call name="Menu Object Take" enabled="false"
699 label="Buy Object" visible="false"> 693 label="Take" visible="false">
700 <on_click function="Tools.BuyOrTake" userdata="" /> 694 <on_click function="Tools.Take" userdata="" />
701 <on_enable function="Tools.EnableBuyOrTake" userdata="Buy,Take" /> 695 <on_enable function="Tools.EnableTake" />
702 </menu_item_call> 696 </menu_item_call>
703 <menu_item_call name="Take Copy" enabled="false" 697 <menu_item_call name="Take Copy" enabled="false"
704 label="Take Copy"> 698 label="Take Copy">
@@ -932,24 +926,13 @@
932 926
933 <menu_item_separator /> 927 <menu_item_separator />
934 928
935 <menu_item_check name="High-res Snapshot" 929
936 label="High-res Snapshot">
937 <on_click function="ToggleControl"
938 userdata="HighResSnapshot" />
939 <on_check control="HighResSnapshot" />
940 </menu_item_check>
941 <menu_item_check name="Quiet Snapshots to Disk" 930 <menu_item_check name="Quiet Snapshots to Disk"
942 label="Quiet Snapshots to Disk"> 931 label="Quiet Snapshots to Disk">
943 <on_click function="ToggleControl" 932 <on_click function="ToggleControl"
944 userdata="QuietSnapshotsToDisk" /> 933 userdata="QuietSnapshotsToDisk" />
945 <on_check control="QuietSnapshotsToDisk" /> 934 <on_check control="QuietSnapshotsToDisk" />
946 </menu_item_check> 935 </menu_item_check>
947 <menu_item_check name="Compress Snapshots to Disk"
948 label="Compress Snapshots to Disk">
949 <on_click function="ToggleControl"
950 userdata="CompressSnapshotsToDisk" />
951 <on_check control="CompressSnapshotsToDisk" />
952 </menu_item_check>
953 <menu_item_check name="Show Mouselook Crosshairs" 936 <menu_item_check name="Show Mouselook Crosshairs"
954 label="Show Mouselook Crosshairs"> 937 label="Show Mouselook Crosshairs">
955 <on_click function="ToggleControl" 938 <on_click function="ToggleControl"
@@ -1619,7 +1602,8 @@
1619 userdata="" /> 1602 userdata="" />
1620 </menu_item_call> 1603 </menu_item_call>
1621 <menu_item_check name="Show XUI Names" 1604 <menu_item_check name="Show XUI Names"
1622 label="Show XUI Names"> 1605 label="Show XUI Names"
1606 shortcut="control|shift|x">
1623 <on_click function="Advanced.ToggleXUINames" 1607 <on_click function="Advanced.ToggleXUINames"
1624 userdata="" /> 1608 userdata="" />
1625 <on_check function="Advanced.CheckXUINames" 1609 <on_check function="Advanced.CheckXUINames"
@@ -1835,12 +1819,6 @@
1835 <on_click function="Advanced.DumpAttachments" 1819 <on_click function="Advanced.DumpAttachments"
1836 userdata="" /> 1820 userdata="" />
1837 </menu_item_call> 1821 </menu_item_call>
1838 <menu_item_call name="Rebake Textures"
1839 label="Rebake Textures"
1840 shortcut="control|alt|R">
1841 <on_click function="Advanced.RebakeTextures"
1842 userdata="" />
1843 </menu_item_call>
1844 </menu> 1822 </menu>
1845 1823
1846 1824
@@ -1963,12 +1941,6 @@
1963 userdata="LimitSelectDistance" /> 1941 userdata="LimitSelectDistance" />
1964 <on_check control="LimitSelectDistance" /> 1942 <on_check control="LimitSelectDistance" />
1965 </menu_item_check> 1943 </menu_item_check>
1966 <menu_item_check name="Disable Camera Constraints"
1967 label="Disable Camera Constraints">
1968 <on_click function="ToggleControl"
1969 userdata="DisableCameraConstraints" />
1970 <on_check control="DisableCameraConstraints" />
1971 </menu_item_check>
1972 <menu_item_check name="Mouse Smoothing" 1944 <menu_item_check name="Mouse Smoothing"
1973 label="Mouse Smoothing"> 1945 label="Mouse Smoothing">
1974 <on_click function="ToggleControl" 1946 <on_click function="ToggleControl"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
index 67d3307..7bd966a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
@@ -63,7 +63,11 @@
63 <slider bottom="-217" can_edit_text="true" control_name="UIScaleFactor" 63 <slider bottom="-217" can_edit_text="true" control_name="UIScaleFactor"
64 decimal_digits="3" enabled="true" height="16" increment="0.025" 64 decimal_digits="3" enabled="true" height="16" increment="0.025"
65 initial_val="1" left="148" max_val="1.4" min_val="0.75" mouse_opaque="true" 65 initial_val="1" left="148" max_val="1.4" min_val="0.75" mouse_opaque="true"
66 name="UI Scale" show_text="true" value="1" width="256" /> 66 name="UI Scale" show_text="true" value="1" width="220" />
67 <button bottom="-221" enabled="true" follows="left|top"
68 font="SansSerif" halign="center" height="22" label="Reset"
69 label_selected="Reset" left_delta="226" mouse_opaque="true"
70 name="reset_ui_size" scale_image="true" width="80" />
67 <check_box bottom="-236" control_name="UIAutoScale" enabled="true" follows="left|top" 71 <check_box bottom="-236" control_name="UIAutoScale" enabled="true" follows="left|top"
68 font="SansSerifSmall" height="16" initial_value="false" 72 font="SansSerifSmall" height="16" initial_value="false"
69 label="Use resolution independent scale" left="151" mouse_opaque="true" 73 label="Use resolution independent scale" left="151" mouse_opaque="true"
@@ -76,6 +80,10 @@
76 font="SansSerifSmall" height="16" initial_value="false" 80 font="SansSerifSmall" height="16" initial_value="false"
77 label="Rotate Mini-Map" left="151" mouse_opaque="true" 81 label="Rotate Mini-Map" left="151" mouse_opaque="true"
78 name="rotate_mini_map_checkbox" radio_style="false" width="256" /> 82 name="rotate_mini_map_checkbox" radio_style="false" width="256" />
83 <check_box bottom="-286" control_name="MiniMapTeleport" enabled="true" follows="left|top"
84 font="SansSerifSmall" height="16" initial_value="false"
85 label="Doubleclick Mini-Map Teleports" left="280" mouse_opaque="true"
86 name="teleport_mini_map_checkbox" radio_style="false" width="256" />
79 <check_box bottom="-304" control_name="NotifyMoneyChange" enabled="true" 87 <check_box bottom="-304" control_name="NotifyMoneyChange" enabled="true"
80 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 88 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
81 label="Notify when Linden dollars (L$) spent or received" left="151" 89 label="Notify when Linden dollars (L$) spent or received" left="151"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
index 23e357f..1867323 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
@@ -79,18 +79,23 @@
79 label="Automatic Appearance Camera Movement" left="148" mouse_opaque="true" 79 label="Automatic Appearance Camera Movement" left="148" mouse_opaque="true"
80 name="appearance camera movement" radio_style="false" 80 name="appearance camera movement" radio_style="false"
81 tool_tip="Use automatic camera positioning while in edit mode" width="242" /> 81 tool_tip="Use automatic camera positioning while in edit mode" width="242" />
82 <check_box bottom_delta="-18" control_name="DisableCameraConstraints" enabled="true"
83 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
84 label="Disable camera constraints" left="148" mouse_opaque="true"
85 name="Disable camera constraints" radio_style="false"
86 tool_tip="Disables camera limits such as distance and terrain" width="242" />
82 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 87 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
83 bottom="-228" drop_shadow_visible="true" enabled="true" follows="left|top" 88 bottom_delta="-32" drop_shadow_visible="true" enabled="true" follows="left|top"
84 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 89 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
85 mouse_opaque="true" name="text2" v_pad="0" width="128"> 90 mouse_opaque="true" name="text2" v_pad="0" width="128">
86 Avatar Display Options: 91 Avatar Display Options:
87 </text> 92 </text>
88 <check_box bottom="-232" control_name="FirstPersonAvatarVisible" enabled="true" 93 <check_box bottom_delta="-4" control_name="FirstPersonAvatarVisible" enabled="true"
89 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 94 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
90 label="Show Avatar in Mouselook" left="148" mouse_opaque="true" name="avfp" 95 label="Show Avatar in Mouselook" left="148" mouse_opaque="true" name="avfp"
91 radio_style="false" width="256" /> 96 radio_style="false" width="256" />
92 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 97 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
93 bottom="-264" drop_shadow_visible="true" enabled="true" follows="left|top" 98 bottom_delta="-32" drop_shadow_visible="true" enabled="true" follows="left|top"
94 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 99 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
95 mouse_opaque="true" name="text5" v_pad="0" width="128"> 100 mouse_opaque="true" name="text5" v_pad="0" width="128">
96 Joystick Options: 101 Joystick Options:
diff --git a/linden/indra/newview/skins/default/xui/en-us/strings.xml b/linden/indra/newview/skins/default/xui/en-us/strings.xml
index e8c341e..ecacc78 100644
--- a/linden/indra/newview/skins/default/xui/en-us/strings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/strings.xml
@@ -1,180 +1,183 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<!-- This file contains strings that used to be hardcoded in the source. 2<!-- This file contains strings that used to be hardcoded in the source.
3 It is only for those strings which don't belong in a floater. 3 It is only for those strings which don't belong in a floater.
4 For example, the strings used in avatar chat bubbles, and strings 4 For example, the strings used in avatar chat bubbles, and strings
5 that are returned from one component and may appear in many places--> 5 that are returned from one component and may appear in many places-->
6<strings> 6<strings>
7 7
8 <!-- Login --> 8 <!-- Login -->
9 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string> 9 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string>
10 <string name="LoginAuthenticating">Authenticating</string> 10 <string name="LoginAuthenticating">Authenticating</string>
11 <string name="LoginMaintenance">Performing account maintenance...</string> 11 <string name="LoginMaintenance">Performing account maintenance...</string>
12 <string name="LoginAttempt">Previous login attempt failed. Logging in, attempt [NUMBER]</string> 12 <string name="LoginAttempt">Previous login attempt failed. Logging in, attempt [NUMBER]</string>
13 <string name="LoginPrecaching">Loading world...</string> 13 <string name="LoginPrecaching">Loading world...</string>
14 <string name="LoginInitializingBrowser">Initializing embedded web browser...</string> 14 <string name="LoginInitializingBrowser">Initializing embedded web browser...</string>
15 <string name="LoginInitializingMultimedia">Initializing multimedia...</string> 15 <string name="LoginInitializingMultimedia">Initializing multimedia...</string>
16 <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string> 16 <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string>
17 <string name="LoginProcessingResponse">Processing Response...</string> 17 <string name="LoginProcessingResponse">Processing Response...</string>
18 <string name="LoginInitializingWorld">Initializing World...</string> 18 <string name="LoginInitializingWorld">Initializing World...</string>
19 <string name="LoginDecodingImages">Decoding images...</string> 19 <string name="LoginDecodingImages">Decoding images...</string>
20 <string name="LoginInitializingQuicktime">Initializing QuickTime...</string> 20 <string name="LoginInitializingQuicktime">Initializing QuickTime...</string>
21 <string name="LoginQuicktimeNotFound">QuickTime not found - unable to initialize.</string> 21 <string name="LoginQuicktimeNotFound">QuickTime not found - unable to initialize.</string>
22 <string name="LoginQuicktimeOK">QuickTime initialized successfully.</string> 22 <string name="LoginQuicktimeOK">QuickTime initialized successfully.</string>
23 <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string> 23 <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string>
24 <string name="LoginConnectingToRegion">Connecting to region...</string> 24 <string name="LoginConnectingToRegion">Connecting to region...</string>
25 <string name="LoginDownloadingClothing">Downloading clothing...</string> 25 <string name="LoginDownloadingClothing">Downloading clothing...</string>
26 <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string> 26 <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string>
27 27
28 28
29 <!-- Disconnection --> 29 <!-- Disconnection -->
30 <string name="AgentLostConnection">This region may be experiencing trouble. Please check your connection to the Internet.</string> 30 <string name="AgentLostConnection">This region may be experiencing trouble. Please check your connection to the Internet.</string>
31 31
32 32
33 <!-- Tooltip, llhoverview.cpp --> 33 <!-- Tooltip, llhoverview.cpp -->
34 <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar --> 34 <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar -->
35 <string name="TooltipNoName">(no name)</string> <!-- No name on an object --> 35 <string name="TooltipNoName">(no name)</string> <!-- No name on an object -->
36 <string name="TooltipOwner">Owner:</string> <!-- Owner name follows --> 36 <string name="TooltipOwner">Owner:</string> <!-- Owner name follows -->
37 <string name="TooltipPublic">Public</string> <!-- Public permissions on an object --> 37 <string name="TooltipPublic">Public</string> <!-- Public permissions on an object -->
38 <string name="TooltipIsGroup">(Group)</string> <!-- The name before this text is that of a group --> 38 <string name="TooltipIsGroup">(Group)</string> <!-- The name before this text is that of a group -->
39 <string name="TooltipFlagScript">Script</string> 39 <string name="TooltipFlagScript">Script</string>
40 <string name="TooltipFlagPhysics">Physics</string> 40 <string name="TooltipFlagPhysics">Physics</string>
41 <string name="TooltipFlagTouch">Touch</string> 41 <string name="TooltipFlagTouch">Touch</string>
42 <string name="TooltipFlagL$">L$</string> 42 <string name="TooltipFlagL$">L$</string>
43 <string name="TooltipFlagDropInventory">Drop Inventory</string> 43 <string name="TooltipFlagDropInventory">Drop Inventory</string>
44 <string name="TooltipFlagPhantom">Phantom</string> 44 <string name="TooltipFlagPhantom">Phantom</string>
45 <string name="TooltipFlagTemporary">Temporary</string> 45 <string name="TooltipFlagTemporary">Temporary</string>
46 <string name="TooltipFlagRightClickMenu">(Right-click for menu)</string> 46 <string name="TooltipFlagRightClickMenu">(Right-click for menu)</string>
47 <string name="TooltipFreeToCopy">Free to copy</string> 47 <string name="TooltipFreeToCopy">Free to copy</string>
48 <string name="TooltipForSaleL$">For Sale: L$[AMOUNT]</string> <!-- L$ version --> 48 <string name="TooltipForSaleL$">For Sale: L$[AMOUNT]</string> <!-- L$ version -->
49 <string name="TooltipForSaleMsg">For Sale: [MESSAGE]</string> <!-- Message (RetrievingData) --> 49 <string name="TooltipForSaleMsg">For Sale: [MESSAGE]</string> <!-- Message (RetrievingData) -->
50 <string name="TooltipFlagGroupBuild">Group Build</string> 50 <string name="TooltipFlagGroupBuild">Group Build</string>
51 <string name="TooltipFlagNoBuild">No Build</string> 51 <string name="TooltipFlagNoBuild">No Build</string>
52 <string name="TooltipFlagNoEdit">Group Build</string> 52 <string name="TooltipFlagNoEdit">Group Build</string>
53 <string name="TooltipFlagNotSafe">Not Safe</string><!-- damage area --> 53 <string name="TooltipFlagNotSafe">Not Safe</string><!-- damage area -->
54 <string name="TooltipFlagNoFly">No Fly</string> 54 <string name="TooltipFlagNoFly">No Fly</string>
55 <string name="TooltipFlagGroupScripts">Group Scripts</string> 55 <string name="TooltipFlagGroupScripts">Group Scripts</string>
56 <string name="TooltipFlagNoScripts">No Scripts</string> 56 <string name="TooltipFlagNoScripts">No Scripts</string>
57 <string name="TooltipLand">Land:</string> 57 <string name="TooltipLand">Land:</string>
58 <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string> 58 <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string>
59 59
60 60
61 <!-- Indicates that an avatar's name or other similar datum is being retrieved. General usage. --> 61 <!-- Indicates that an avatar's name or other similar datum is being retrieved. General usage. -->
62 <string name="RetrievingData">Retrieving...</string> 62 <string name="RetrievingData">Retrieving...</string>
63 63
64 <string name="ReleaseNotes">Release Notes</string> 64 <string name="ReleaseNotes">Release Notes</string>
65 65
66 <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData --> 66 <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData -->
67 <string name="LoadingData">Loading...</string> 67 <string name="LoadingData">Loading...</string>
68 68
69 69
70 <!-- namecache --> 70 <!-- namecache -->
71 <!-- Avatar name: text shown for LLUUID::null --> 71 <!-- Avatar name: text shown for LLUUID::null -->
72 <string name="AvatarNameNobody">(nobody)</string> 72 <string name="AvatarNameNobody">(nobody)</string>
73 73
74 <!-- Avatar name: text shown while fetching name --> 74 <!-- Avatar name: text shown while fetching name -->
75 <string name="AvatarNameWaiting">(waiting)</string> 75 <string name="AvatarNameWaiting">(waiting)</string>
76 76
77 <!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. --> 77 <!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. -->
78 <string name="AvatarNameHippos">(hippos)</string> 78 <string name="AvatarNameHippos">(hippos)</string>
79 79
80 <!-- Group name: text shown for LLUUID::null --> 80 <!-- Group name: text shown for LLUUID::null -->
81 <string name="GroupNameNone">(none)</string> 81 <string name="GroupNameNone">(none)</string>
82 82
83 <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. --> 83 <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. -->
84 <string name="AssetErrorNone">No error</string> 84 <string name="AssetErrorNone">No error</string>
85 <string name="AssetErrorRequestFailed">Asset request: failed</string> 85 <string name="AssetErrorRequestFailed">Asset request: failed</string>
86 <string name="AssetErrorNonexistentFile">Asset request: non-existent file</string> 86 <string name="AssetErrorNonexistentFile">Asset request: non-existent file</string>
87 <string name="AssetErrorNotInDatabase">Asset request: asset not found in database</string> 87 <string name="AssetErrorNotInDatabase">Asset request: asset not found in database</string>
88 <string name="AssetErrorEOF">End of file</string> 88 <string name="AssetErrorEOF">End of file</string>
89 <string name="AssetErrorCannotOpenFile">Cannot open file</string> 89 <string name="AssetErrorCannotOpenFile">Cannot open file</string>
90 <string name="AssetErrorFileNotFound">File not found</string> 90 <string name="AssetErrorFileNotFound">File not found</string>
91 <string name="AssetErrorTCPTimeout">File transfer timeout</string> 91 <string name="AssetErrorTCPTimeout">File transfer timeout</string>
92 <string name="AssetErrorCircuitGone">Circuit gone</string> 92 <string name="AssetErrorCircuitGone">Circuit gone</string>
93 <string name="AssetErrorUnknownStatus">Unknown status</string> 93 <string name="AssetErrorUnknownStatus">Unknown status</string>
94 94
95 <!-- llvoavatar. Displayed in the avatar's chat bubble --> 95 <!-- llvoavatar. Displayed in the avatar's chat bubble -->
96 <string name="AvatarEditingApparance">(Editing Appearance)</string> 96 <string name="AvatarEditingApparance">(Editing Appearance)</string>
97 <string name="AvatarAway">Away</string> 97 <string name="AvatarAway">Away</string>
98 <string name="AvatarBusy">Busy</string> 98 <string name="AvatarBusy">Busy</string>
99 <string name="AvatarMuted">Muted</string> 99 <string name="AvatarMuted">Muted</string>
100 100
101 <!-- animations --> 101 <!-- animations -->
102 <string name="anim_express_afraid">Afraid</string> 102 <string name="anim_express_afraid">Afraid</string>
103 <string name="anim_express_anger">Angry</string> 103 <string name="anim_express_anger">Angry</string>
104 <string name="anim_away">Away</string> 104 <string name="anim_away">Away</string>
105 <string name="anim_backflip">Backflip</string> 105 <string name="anim_backflip">Backflip</string>
106 <string name="anim_express_laugh">Belly Laugh</string> 106 <string name="anim_express_laugh">Belly Laugh</string>
107 <string name="anim_express_toothsmile">BigSmile</string> 107 <string name="anim_express_toothsmile">BigSmile</string>
108 <string name="anim_blowkiss">Blow Kiss</string> 108 <string name="anim_blowkiss">Blow Kiss</string>
109 <string name="anim_express_bored">Bored</string> 109 <string name="anim_express_bored">Bored</string>
110 <string name="anim_bow">Bow</string> 110 <string name="anim_bow">Bow</string>
111 <string name="anim_clap">Clap</string> 111 <string name="anim_clap">Clap</string>
112 <string name="anim_courtbow">Court Bow</string> 112 <string name="anim_courtbow">Court Bow</string>
113 <string name="anim_express_cry">Cry</string> 113 <string name="anim_express_cry">Cry</string>
114 <string name="anim_dance1">Dance 1</string> 114 <string name="anim_dance1">Dance 1</string>
115 <string name="anim_dance2">Dance 2</string> 115 <string name="anim_dance2">Dance 2</string>
116 <string name="anim_dance3">Dance 3</string> 116 <string name="anim_dance3">Dance 3</string>
117 <string name="anim_dance4">Dance 4</string> 117 <string name="anim_dance4">Dance 4</string>
118 <string name="anim_dance5">Dance 5</string> 118 <string name="anim_dance5">Dance 5</string>
119 <string name="anim_dance6">Dance 6</string> 119 <string name="anim_dance6">Dance 6</string>
120 <string name="anim_dance7">Dance 7</string> 120 <string name="anim_dance7">Dance 7</string>
121 <string name="anim_dance8">Dance 8</string> 121 <string name="anim_dance8">Dance 8</string>
122 <string name="anim_express_disdain">Disdain</string> 122 <string name="anim_express_disdain">Disdain</string>
123 <string name="anim_drink">Drink</string> 123 <string name="anim_drink">Drink</string>
124 <string name="anim_express_embarrased">Embarrassed</string> 124 <string name="anim_express_embarrased">Embarrassed</string>
125 <string name="anim_angry_fingerwag">Finger Wag</string> 125 <string name="anim_angry_fingerwag">Finger Wag</string>
126 <string name="anim_fist_pump">Fist Pump</string> 126 <string name="anim_fist_pump">Fist Pump</string>
127 <string name="anim_yoga_float">Floating Yoga</string> 127 <string name="anim_yoga_float">Floating Yoga</string>
128 <string name="anim_express_frown">Frown</string> 128 <string name="anim_express_frown">Frown</string>
129 <string name="anim_impatient">Impatient</string> 129 <string name="anim_impatient">Impatient</string>
130 <string name="anim_jumpforjoy">Jump For Joy</string> 130 <string name="anim_jumpforjoy">Jump For Joy</string>
131 <string name="anim_kissmybutt">Kiss My Butt</string> 131 <string name="anim_kissmybutt">Kiss My Butt</string>
132 <string name="anim_express_kiss">Kiss</string> 132 <string name="anim_express_kiss">Kiss</string>
133 <string name="anim_laugh_short">Laugh</string> 133 <string name="anim_laugh_short">Laugh</string>
134 <string name="anim_musclebeach">Muscle Beach</string> 134 <string name="anim_musclebeach">Muscle Beach</string>
135 <string name="anim_no_unhappy">No (Unhappy)</string> 135 <string name="anim_no_unhappy">No (Unhappy)</string>
136 <string name="anim_no_head">No</string> 136 <string name="anim_no_head">No</string>
137 <string name="anim_nyanya">Nya-nya-nya</string> 137 <string name="anim_nyanya">Nya-nya-nya</string>
138 <string name="anim_punch_onetwo">One-Two Punch</string> 138 <string name="anim_punch_onetwo">One-Two Punch</string>
139 <string name="anim_express_open_mouth">Open Mouth</string> 139 <string name="anim_express_open_mouth">Open Mouth</string>
140 <string name="anim_peace">Peace</string> 140 <string name="anim_peace">Peace</string>
141 <string name="anim_point_you">Point at Other</string> 141 <string name="anim_point_you">Point at Other</string>
142 <string name="anim_point_me">Point at Self</string> 142 <string name="anim_point_me">Point at Self</string>
143 <string name="anim_punch_l">Punch Left</string> 143 <string name="anim_punch_l">Punch Left</string>
144 <string name="anim_punch_r">Punch Right</string> 144 <string name="anim_punch_r">Punch Right</string>
145 <string name="anim_rps_countdown">RPS count</string> 145 <string name="anim_rps_countdown">RPS count</string>
146 <string name="anim_rps_paper">RPS paper</string> 146 <string name="anim_rps_paper">RPS paper</string>
147 <string name="anim_rps_rock">RPS rock</string> 147 <string name="anim_rps_rock">RPS rock</string>
148 <string name="anim_rps_scissors">RPS scissors</string> 148 <string name="anim_rps_scissors">RPS scissors</string>
149 <string name="anim_express_repulsed">Repulsed</string> 149 <string name="anim_express_repulsed">Repulsed</string>
150 <string name="anim_kick_roundhouse_r">Roundhouse Kick</string> 150 <string name="anim_kick_roundhouse_r">Roundhouse Kick</string>
151 <string name="anim_express_sad">Sad</string> 151 <string name="anim_express_sad">Sad</string>
152 <string name="anim_salute">Salute</string> 152 <string name="anim_salute">Salute</string>
153 <string name="anim_shout">Shout</string> 153 <string name="anim_shout">Shout</string>
154 <string name="anim_express_shrug">Shrug</string> 154 <string name="anim_express_shrug">Shrug</string>
155 <string name="anim_express_smile">Smile</string> 155 <string name="anim_express_smile">Smile</string>
156 <string name="anim_smoke_idle">Smoke Idle</string> 156 <string name="anim_smoke_idle">Smoke Idle</string>
157 <string name="anim_smoke_inhale">Smoke Inhale</string> 157 <string name="anim_smoke_inhale">Smoke Inhale</string>
158 <string name="anim_smoke_throw_down">Smoke Throw Down</string> 158 <string name="anim_smoke_throw_down">Smoke Throw Down</string>
159 <string name="anim_express_surprise">Surprise</string> 159 <string name="anim_express_surprise">Surprise</string>
160 <string name="anim_sword_strike_r">Sword Strike</string> 160 <string name="anim_sword_strike_r">Sword Strike</string>
161 <string name="anim_angry_tantrum">Tantrum</string> 161 <string name="anim_angry_tantrum">Tantrum</string>
162 <string name="anim_express_tongue_out">TongueOut</string> 162 <string name="anim_express_tongue_out">TongueOut</string>
163 <string name="anim_hello">Wave</string> 163 <string name="anim_hello">Wave</string>
164 <string name="anim_whisper">Whisper</string> 164 <string name="anim_whisper">Whisper</string>
165 <string name="anim_whistle">Whistle</string> 165 <string name="anim_whistle">Whistle</string>
166 <string name="anim_express_wink">Wink</string> 166 <string name="anim_express_wink">Wink</string>
167 <string name="anim_wink_hollywood">Wink (Hollywood)</string> 167 <string name="anim_wink_hollywood">Wink (Hollywood)</string>
168 <string name="anim_express_worry">Worry</string> 168 <string name="anim_express_worry">Worry</string>
169 <string name="anim_yes_happy">Yes (Happy)</string> 169 <string name="anim_yes_happy">Yes (Happy)</string>
170 <string name="anim_yes_head">Yes</string> 170 <string name="anim_yes_head">Yes</string>
171 171
172 <string name="texture_loading">Loading...</string> 172 <string name="texture_loading">Loading...</string>
173 <string name="worldmap_offline">Offline</string> 173 <string name="worldmap_offline">Offline</string>
174 174
175 <!-- Chat --> 175 <!-- Chat -->
176 <string name="whisper">whispers:</string> 176 <string name="whisper">whispers:</string>
177 <string name="shout">shouts:</string> 177 <string name="shout">shouts:</string>
178 178
179</strings> 179 <!-- System messages -->
180 180 <string name="landmark_created">You created a landmark at</string>
181
182</strings>
183
diff --git a/linden/indra/newview/skins/default/xui/fr/floater_about_land.xml b/linden/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 50ce466..9742d2f 100644
--- a/linden/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/linden/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -1,508 +1,508 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="floaterland" title="À propos du terrain"> 2<floater name="floaterland" title="À propos du terrain">
3 <tab_container name="landtab"> 3 <tab_container name="landtab">
4 <panel label="Général" name="land_general_panel"> 4 <panel label="Général" name="land_general_panel">
5 <text type="string" length="1" name="Name:"> 5 <text type="string" length="1" name="Name:">
6 Nom : 6 Nom :
7 </text> 7 </text>
8 <text type="string" length="1" name="Description:"> 8 <text type="string" length="1" name="Description:">
9 Description : 9 Description :
10 </text> 10 </text>
11 <text type="string" length="1" name="Owner:"> 11 <text type="string" length="1" name="Owner:">
12 Propriétaire : 12 Propriétaire :
13 </text> 13 </text>
14 <text type="string" length="1" name="OwnerText"> 14 <text type="string" length="1" name="OwnerText">
15 Leyla Linden 15 Leyla Linden
16 </text> 16 </text>
17 <button label="Profil..." label_selected="Profil..." name="Profile..." /> 17 <button label="Profil..." label_selected="Profil..." name="Profile..." />
18 <text type="string" length="1" name="Group:"> 18 <text type="string" length="1" name="Group:">
19 Groupe : 19 Groupe :
20 </text> 20 </text>
21 <button label="Définir..." label_selected="Définir..." name="Set..." /> 21 <button label="Définir..." label_selected="Définir..." name="Set..." />
22 <check_box label="Autoriser le transfert au groupe" name="check deed" 22 <check_box label="Autoriser le transfert au groupe" name="check deed"
23 tool_tip="Un officier peut transférer ce terrain au groupe. Il viendra alors s&apos;ajouter au patrimoine du groupe." /> 23 tool_tip="Un officier peut transférer ce terrain au groupe. Il viendra alors s&apos;ajouter au patrimoine du groupe." />
24 <button label="Transférer..." label_selected="Transférer..." name="Deed..." 24 <button label="Transférer..." label_selected="Transférer..." name="Deed..."
25 tool_tip="Vous ne pouvez transférer le terrain que si vous avez un rôle d&apos;officier dans le groupe sélectionné." /> 25 tool_tip="Vous ne pouvez transférer le terrain que si vous avez un rôle d&apos;officier dans le groupe sélectionné." />
26 <check_box label="Le propriétaire contribue par transfert" name="check contib" 26 <check_box label="Le propriétaire contribue par transfert" name="check contib"
27 tool_tip="Lorsque le terrain est transféré au groupe, la contribution du précédent propriétaire suffit à l&apos;entretenir." /> 27 tool_tip="Lorsque le terrain est transféré au groupe, la contribution du précédent propriétaire suffit à l&apos;entretenir." />
28 <check_box label="Le propriétaire contribue par une donation" name="check contrib" 28 <check_box label="Le propriétaire contribue par une donation" name="check contrib"
29 tool_tip="Lorsqu&apos;un titre de propriété est transféré au groupe, l&apos;ancien propriétaire fait également un don de terrain suffisant." /> 29 tool_tip="Lorsqu&apos;un titre de propriété est transféré au groupe, l&apos;ancien propriétaire fait également un don de terrain suffisant." />
30 <text type="string" length="1" name="For Sale:"> 30 <text type="string" length="1" name="For Sale:">
31 À vendre : 31 À vendre :
32 </text> 32 </text>
33 <text type="string" length="1" name="Not for sale."> 33 <text type="string" length="1" name="Not for sale.">
34 Pas à vendre. 34 Pas à vendre.
35 </text> 35 </text>
36 <text type="string" length="1" name="For Sale: Price L$[PRICE]."> 36 <text type="string" length="1" name="For Sale: Price L$[PRICE].">
37 Prix : [PRICE] $L. 37 Prix : [PRICE] $L.
38 </text> 38 </text>
39 <button label="Vendre le terrain..." label_selected="Vendre le terrain..." 39 <button label="Vendre le terrain..." label_selected="Vendre le terrain..."
40 name="Sell Land..." /> 40 name="Sell Land..." />
41 <text type="string" length="1" name="For sale to"> 41 <text type="string" length="1" name="For sale to">
42 À vendre à : [BUYER] 42 À vendre à : [BUYER]
43 </text> 43 </text>
44 <text type="string" length="1" name="Sell with landowners objects in parcel."> 44 <text type="string" length="1" name="Sell with landowners objects in parcel.">
45 Objets inclus dans la vente. 45 Objets inclus dans la vente.
46 </text> 46 </text>
47 <text type="string" length="1" name="Selling with no objects in parcel."> 47 <text type="string" length="1" name="Selling with no objects in parcel.">
48 Objets non inclus dans la vente. 48 Objets non inclus dans la vente.
49 </text> 49 </text>
50 <button label="Annuler la vente du terrain" 50 <button label="Annuler la vente du terrain"
51 label_selected="Annuler la vente du terrain" name="Cancel Land Sale" /> 51 label_selected="Annuler la vente du terrain" name="Cancel Land Sale" />
52 <text type="string" length="1" name="Claimed:"> 52 <text type="string" length="1" name="Claimed:">
53 Réclamée : 53 Réclamée :
54 </text> 54 </text>
55 <text type="string" length="1" name="DateClaimText"> 55 <text type="string" length="1" name="DateClaimText">
56 Tue Aug 15 13:47:25 2006 56 Tue Aug 15 13:47:25 2006
57 </text> 57 </text>
58 <text type="string" length="1" name="PriceLabel"> 58 <text type="string" length="1" name="PriceLabel">
59 Surface : 59 Surface :
60 </text> 60 </text>
61 <text type="string" length="1" name="PriceText"> 61 <text type="string" length="1" name="PriceText">
62 4048 m² 62 4048 m²
63 </text> 63 </text>
64 <text type="string" length="1" name="Traffic:"> 64 <text type="string" length="1" name="Traffic:">
65 Trafic : 65 Trafic :
66 </text> 66 </text>
67 <text type="string" length="1" name="DwellText"> 67 <text type="string" length="1" name="DwellText">
68 0 68 0
69 </text> 69 </text>
70 <button label="Acheter le terrain..." label_selected="Acheter le terrain..." 70 <button label="Acheter le terrain..." label_selected="Acheter le terrain..."
71 name="Buy Land..." /> 71 name="Buy Land..." />
72 <button label="Acheter pour le groupe..." label_selected="Acheter pour le groupe..." 72 <button label="Acheter pour le groupe..." label_selected="Acheter pour le groupe..."
73 name="Buy For Group..." /> 73 name="Buy For Group..." />
74 <button label="Acheter un passe..." label_selected="Acheter un passe..." 74 <button label="Acheter un passe..." label_selected="Acheter un passe..."
75 name="Buy Pass..." 75 name="Buy Pass..."
76 tool_tip="Un passe vous donne un accès temporaire à ce terrain." /> 76 tool_tip="Un passe vous donne un accès temporaire à ce terrain." />
77 <button label="Céder le terrain..." label_selected="Céder le terrain..." 77 <button label="Céder le terrain..." label_selected="Céder le terrain..."
78 name="Abandon Land..." /> 78 name="Abandon Land..." />
79 <button label="Récupérer le terrain…" label_selected="Récupérer le terrain…" 79 <button label="Récupérer le terrain…" label_selected="Récupérer le terrain…"
80 name="Reclaim Land..." /> 80 name="Reclaim Land..." />
81 <button label="Vente Linden..." label_selected="Vente Linden..." name="Linden Sale..." 81 <button label="Vente Linden..." label_selected="Vente Linden..." name="Linden Sale..."
82 tool_tip="Le terrain doit être la propriété d&apos;un résident, avoir un contenu défini et ne pas être aux enchères." /> 82 tool_tip="Le terrain doit être la propriété d&apos;un résident, avoir un contenu défini et ne pas être aux enchères." />
83 <text name="new users only"> 83 <text name="new users only">
84 Nouveaux utilisateurs uniquement 84 Nouveaux utilisateurs uniquement
85 </text> 85 </text>
86 <text name="anyone"> 86 <text name="anyone">
87 Tout le monde 87 Tout le monde
88 </text> 88 </text>
89 <string name="area_text"> 89 <string name="area_text">
90 Surface 90 Surface
91 </string> 91 </string>
92 <string name="area_size_text"> 92 <string name="area_size_text">
93 [AREA] m² 93 [AREA] m²
94 </string> 94 </string>
95 <string name="auction_id_text"> 95 <string name="auction_id_text">
96 Code de l&apos;enchère : [ID] 96 Code de l&apos;enchère : [ID]
97 </string> 97 </string>
98 <string name="need_tier_to_modify"> 98 <string name="need_tier_to_modify">
99 Pour modifier ce terrain, vous devez approuver votre achat. 99 Pour modifier ce terrain, vous devez approuver votre achat.
100 </string> 100 </string>
101 <string name="group_owned_text"> 101 <string name="group_owned_text">
102 (propriété du groupe) 102 (propriété du groupe)
103 </string> 103 </string>
104 <string name="profile_text"> 104 <string name="profile_text">
105 Profil... 105 Profil...
106 </string> 106 </string>
107 <string name="info_text"> 107 <string name="info_text">
108 Infos... 108 Infos...
109 </string> 109 </string>
110 <string name="public_text"> 110 <string name="public_text">
111 (public) 111 (public)
112 </string> 112 </string>
113 <string name="none_text"> 113 <string name="none_text">
114 (aucun) 114 (aucun)
115 </string> 115 </string>
116 <string name="sale_pending_text"> 116 <string name="sale_pending_text">
117 (vente en cours) 117 (vente en cours)
118 </string> 118 </string>
119 <string name="no_selection_text"> 119 <string name="no_selection_text">
120 Aucune parcelle sélectionnée. 120 Aucune parcelle sélectionnée.
121Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre parcelle pour en afficher les détails. 121Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre parcelle pour en afficher les détails.
122 </string> 122 </string>
123 </panel> 123 </panel>
124 <panel label="Règlement" name="land_covenant_panel"> 124 <panel label="Règlement" name="land_covenant_panel">
125 <text type="string" length="1" name="covenant_timestamp_text"> 125 <text type="string" length="1" name="covenant_timestamp_text">
126 Last Modified Wed Dec 31 16:00:00 1969 126 Last Modified Wed Dec 31 16:00:00 1969
127 </text> 127 </text>
128 <text type="string" length="1" name="region_name_lbl"> 128 <text type="string" length="1" name="region_name_lbl">
129 Région : 129 Région :
130 </text> 130 </text>
131 <text type="string" length="1" name="region_name_text"> 131 <text type="string" length="1" name="region_name_text">
132 leyla 132 leyla
133 </text> 133 </text>
134 <text type="string" length="1" name="estate_name_lbl"> 134 <text type="string" length="1" name="estate_name_lbl">
135 Domaine : 135 Domaine :
136 </text> 136 </text>
137 <text type="string" length="1" name="estate_name_text"> 137 <text type="string" length="1" name="estate_name_text">
138 continent 138 continent
139 </text> 139 </text>
140 <text type="string" length="1" name="estate_owner_lbl"> 140 <text type="string" length="1" name="estate_owner_lbl">
141 Propriétaire : 141 Propriétaire :
142 </text> 142 </text>
143 <text type="string" length="1" name="estate_owner_text"> 143 <text type="string" length="1" name="estate_owner_text">
144 (aucun) 144 (aucun)
145 </text> 145 </text>
146 <text type="string" length="1" name="resellable_clause"> 146 <text type="string" length="1" name="resellable_clause">
147 Le terrain acheté dans cette région ne peut être revendu. 147 Le terrain acheté dans cette région ne peut être revendu.
148 </text> 148 </text>
149 <text type="string" length="1" name="changeable_clause"> 149 <text type="string" length="1" name="changeable_clause">
150 Le terrain acheté dans cette région ne peut être revendu/divisé. 150 Le terrain acheté dans cette région ne peut être revendu/divisé.
151 </text> 151 </text>
152 <text_editor type="string" length="1" name="covenant_editor"> 152 <text_editor type="string" length="1" name="covenant_editor">
153 Il n&apos;y a aucun règlement pour ce domaine. 153 Il n&apos;y a aucun règlement pour ce domaine.
154 </text_editor> 154 </text_editor>
155 <text name="can_resell"> 155 <text name="can_resell">
156 Le terrain acheté dans cette région peut être revendu. 156 Le terrain acheté dans cette région peut être revendu.
157 </text> 157 </text>
158 <text name="can_not_resell"> 158 <text name="can_not_resell">
159 Le terrain acheté dans cette région ne peut pas être revendu. 159 Le terrain acheté dans cette région ne peut pas être revendu.
160 </text> 160 </text>
161 <text name="can_change"> 161 <text name="can_change">
162 Le terrain acheté dans cette région peut être fusionné ou divisé. 162 Le terrain acheté dans cette région peut être fusionné ou divisé.
163 </text> 163 </text>
164 <text name="can_not_change"> 164 <text name="can_not_change">
165 Le terrain acheté dans cette région ne peut pas être fusionné ou divisé. 165 Le terrain acheté dans cette région ne peut pas être fusionné ou divisé.
166 </text> 166 </text>
167 </panel> 167 </panel>
168 <panel label="Objets" name="land_objects_panel"> 168 <panel label="Objets" name="land_objects_panel">
169 <text name="parcel_object_bonus"> 169 <text name="parcel_object_bonus">
170 Facteur Bonus Objets : [BONUS] 170 Facteur Bonus Objets : [BONUS]
171 </text> 171 </text>
172 <text type="string" length="1" name="Simulator primitive usage:"> 172 <text type="string" length="1" name="Simulator primitive usage:">
173 Prims utilisés sur le sim : 173 Prims utilisés sur le sim :
174 </text> 174 </text>
175 <text type="string" length="1" name="0 out of 0 available"> 175 <text type="string" length="1" name="0 out of 0 available">
176 0 sur 14055 (14055 disponibles) 176 0 sur 14055 (14055 disponibles)
177 </text> 177 </text>
178 <text name="objects_available"> 178 <text name="objects_available">
179 [COUNT] sur [COUNT] ([COUNT] disponibles) 179 [COUNT] sur [COUNT] ([COUNT] disponibles)
180 </text> 180 </text>
181 <string name="objects_available_text"> 181 <string name="objects_available_text">
182 [COUNT] sur [MAX] ([AVAILABLE] disponibles) 182 [COUNT] sur [MAX] ([AVAILABLE] disponibles)
183 </string> 183 </string>
184 <string name="objects_deleted_text"> 184 <string name="objects_deleted_text">
185 [COUNT] sur [MAX] ([DELETED] seront supprimés) 185 [COUNT] sur [MAX] ([DELETED] seront supprimés)
186 </string> 186 </string>
187 <text type="string" length="1" name="Primitives parcel supports:"> 187 <text type="string" length="1" name="Primitives parcel supports:">
188 Prims max. sur la parcelle : 188 Prims max. sur la parcelle :
189 </text> 189 </text>
190 <text type="string" length="1" name="object_contrib_text"> 190 <text type="string" length="1" name="object_contrib_text">
191 [COUNT] 191 [COUNT]
192 </text> 192 </text>
193 <text type="string" length="1" name="Primitives on parcel:"> 193 <text type="string" length="1" name="Primitives on parcel:">
194 Prims sur la parcelle : 194 Prims sur la parcelle :
195 </text> 195 </text>
196 <text type="string" length="1" name="total_objects_text"> 196 <text type="string" length="1" name="total_objects_text">
197 [COUNT] 197 [COUNT]
198 </text> 198 </text>
199 <text type="string" length="1" name="Owned by parcel owner:"> 199 <text type="string" length="1" name="Owned by parcel owner:">
200 Appartenant au propriétaire : 200 Appartenant au propriétaire :
201 </text> 201 </text>
202 <text type="string" length="1" name="owner_objects_text"> 202 <text type="string" length="1" name="owner_objects_text">
203 [COUNT] 203 [COUNT]
204 </text> 204 </text>
205 <button label="Afficher" label_selected="Afficher" name="ShowOwner" /> 205 <button label="Afficher" label_selected="Afficher" name="ShowOwner" />
206 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOwner..." 206 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOwner..."
207 tool_tip="Renvoyer les objets à leurs propriétaires." /> 207 tool_tip="Renvoyer les objets à leurs propriétaires." />
208 <text type="string" length="1" name="Set to group:"> 208 <text type="string" length="1" name="Set to group:">
209 Donnés au groupe : 209 Donnés au groupe :
210 </text> 210 </text>
211 <text type="string" length="1" name="group_objects_text"> 211 <text type="string" length="1" name="group_objects_text">
212 0 212 0
213 </text> 213 </text>
214 <button label="Afficher" label_selected="Afficher" name="ShowGroup" /> 214 <button label="Afficher" label_selected="Afficher" name="ShowGroup" />
215 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnGroup..." 215 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnGroup..."
216 tool_tip="Renvoyer les objets à leurs propriétaires." /> 216 tool_tip="Renvoyer les objets à leurs propriétaires." />
217 <text type="string" length="1" name="Owned by others:"> 217 <text type="string" length="1" name="Owned by others:">
218 Appartenant à d&apos;autres : 218 Appartenant à d&apos;autres :
219 </text> 219 </text>
220 <text type="string" length="1" name="other_objects_text"> 220 <text type="string" length="1" name="other_objects_text">
221 0 221 0
222 </text> 222 </text>
223 <button label="Afficher" label_selected="Afficher" name="ShowOther" /> 223 <button label="Afficher" label_selected="Afficher" name="ShowOther" />
224 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOther..." 224 <button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOther..."
225 tool_tip="Renvoyer les objets à leurs propriétaires." /> 225 tool_tip="Renvoyer les objets à leurs propriétaires." />
226 <text type="string" length="1" name="Selected / sat upon:"> 226 <text type="string" length="1" name="Selected / sat upon:">
227 Sélectionnés/où quelqu&apos;un est assis : 227 Sélectionnés/où quelqu&apos;un est assis :
228 </text> 228 </text>
229 <text type="string" length="1" name="selected_objects_text"> 229 <text type="string" length="1" name="selected_objects_text">
230 0 230 0
231 </text> 231 </text>
232 <text type="string" length="1" name="Autoreturn other resident&amp;apos;s objects (minutes, 0 for off):"> 232 <text type="string" length="1" name="Autoreturn other resident&amp;apos;s objects (minutes, 0 for off):">
233 Renvoi automatique des objets appartenant aux autres résidents (minutes, 0 pour désactiver): 233 Renvoi automatique des objets appartenant aux autres résidents (minutes, 0 pour désactiver):
234 </text> 234 </text>
235 <text name="Autoreturn"> 235 <text name="Autoreturn">
236 Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) : 236 Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) :
237 </text> 237 </text>
238 <text type="string" length="1" name="Object Owners:"> 238 <text type="string" length="1" name="Object Owners:">
239 Propriétaires : 239 Propriétaires :
240 </text> 240 </text>
241 <button label="Rafraîchir la liste" label_selected="Rafraîchir la liste" 241 <button label="Rafraîchir la liste" label_selected="Rafraîchir la liste"
242 name="Refresh List" /> 242 name="Refresh List" />
243 <button label="Renvoyer les objets..." label_selected="Renvoyer les objets..." 243 <button label="Renvoyer les objets..." label_selected="Renvoyer les objets..."
244 name="Return objects..." /> 244 name="Return objects..." />
245 <button label="" label_selected="" name="Type" tool_tip="Trier par type" /> 245 <button label="" label_selected="" name="Type" tool_tip="Trier par type" />
246 <button label="Nom" label_selected="Nom" name="Name" tool_tip="Trier par nom" /> 246 <button label="Nom" label_selected="Nom" name="Name" tool_tip="Trier par nom" />
247 <button label="Trafic" label_selected="Trafic" name="Count" tool_tip="Trier par trafic" /> 247 <button label="Trafic" label_selected="Trafic" name="Count" tool_tip="Trier par trafic" />
248 <name_list label="Plus récents" name="owner list"> 248 <name_list label="Plus récents" name="owner list">
249 <column label="Type" name="type" /> 249 <column label="Type" name="type" />
250 <column label="Nom" name="name" /> 250 <column label="Nom" name="name" />
251 <column label="Nombre" name="count" /> 251 <column label="Nombre" name="count" />
252 </name_list> 252 </name_list>
253 </panel> 253 </panel>
254 <panel label="Options" name="land_options_panel"> 254 <panel label="Options" name="land_options_panel">
255 <text type="string" length="1" name="allow_label"> 255 <text type="string" length="1" name="allow_label">
256 Autoriser les autres résidents à : 256 Autoriser les autres résidents à :
257 </text> 257 </text>
258 <text name="allow_label2"> 258 <text name="allow_label2">
259 Créer des objets : 259 Créer des objets :
260 </text> 260 </text>
261 <check_box label="Tous les résidents" name="edit objects check" /> 261 <check_box label="Tous les résidents" name="edit objects check" />
262 <check_box label="Modifier le terrain" name="edit land check" /> 262 <check_box label="Modifier le terrain" name="edit land check" />
263 <check_box label="Créer des repères" name="check landmark" /> 263 <check_box label="Créer des repères" name="check landmark" />
264 <check_box label="Groupe" name="edit group objects check" /> 264 <check_box label="Groupe" name="edit group objects check" />
265 <text name="allow_label3"> 265 <text name="allow_label3">
266 Apporter des objets : 266 Apporter des objets :
267 </text> 267 </text>
268 <check_box label="Tous les résidents" name="all object entry check" /> 268 <check_box label="Tous les résidents" name="all object entry check" />
269 <check_box label="Groupe" name="group object entry check" /> 269 <check_box label="Groupe" name="group object entry check" />
270 <text name="allow_label4"> 270 <text name="allow_label4">
271 Exécuter des scripts : 271 Exécuter des scripts :
272 </text> 272 </text>
273 <check_box label="Groupe" name="check group scripts" /> 273 <check_box label="Groupe" name="check group scripts" />
274 <check_box label="Voler" name="check fly" /> 274 <check_box label="Voler" name="check fly" />
275 <check_box label="Tous les résidents" name="check other scripts" /> 275 <check_box label="Tous les résidents" name="check other scripts" />
276 <text type="string" length="1" name="land_options_label"> 276 <text type="string" length="1" name="land_options_label">
277 Options du terrain : 277 Options du terrain :
278 </text> 278 </text>
279 <check_box label="Sécurisé (pas de dégâts)" name="check safe" /> 279 <check_box label="Sécurisé (pas de dégâts)" name="check safe" />
280 <check_box label="Interdire les bousculades" name="PushRestrictCheck" 280 <check_box label="Interdire les bousculades" name="PushRestrictCheck"
281 tool_tip="llPushObject ne fonctionne que sur les scripts du propriétaire de la parcelle ou sur les scripts où la personne qui bouscule est aussi la propriétaire du script." /> 281 tool_tip="llPushObject ne fonctionne que sur les scripts du propriétaire de la parcelle ou sur les scripts où la personne qui bouscule est aussi la propriétaire du script." />
282 <check_box label="Afficher dans la recherche (30 $L/semaine) sous" 282 <check_box label="Afficher dans la recherche (30 $L/semaine) sous"
283 name="ShowDirectoryCheck" 283 name="ShowDirectoryCheck"
284 tool_tip="Afficher la parcelle dans les résultats de recherche" /> 284 tool_tip="Afficher la parcelle dans les résultats de recherche" />
285 <combo_box name="land category"> 285 <combo_box name="land category">
286 <combo_item name="AnyCategory"> 286 <combo_item name="AnyCategory">
287 Toute catégorie 287 Toute catégorie
288 </combo_item> 288 </combo_item>
289 <combo_item name="LindenLocation"> 289 <combo_item name="LindenLocation">
290 Emplacement Linden 290 Emplacement Linden
291 </combo_item> 291 </combo_item>
292 <combo_item name="Adult"> 292 <combo_item name="Adult">
293 Adultes 293 Adultes
294 </combo_item> 294 </combo_item>
295 <combo_item name="Arts&amp;Culture"> 295 <combo_item name="Arts&amp;Culture">
296 Art et Culture 296 Art et Culture
297 </combo_item> 297 </combo_item>
298 <combo_item name="Business"> 298 <combo_item name="Business">
299 Affaires 299 Affaires
300 </combo_item> 300 </combo_item>
301 <combo_item name="Educational"> 301 <combo_item name="Educational">
302 Éducation 302 Éducation
303 </combo_item> 303 </combo_item>
304 <combo_item name="Gaming"> 304 <combo_item name="Gaming">
305 Jeux 305 Jeux
306 </combo_item> 306 </combo_item>
307 <combo_item name="Hangout"> 307 <combo_item name="Hangout">
308 Endroit favori 308 Endroit favori
309 </combo_item> 309 </combo_item>
310 <combo_item name="NewcomerFriendly"> 310 <combo_item name="NewcomerFriendly">
311 Convivial pour les nouveaux 311 Convivial pour les nouveaux
312 </combo_item> 312 </combo_item>
313 <combo_item name="Parks&amp;Nature"> 313 <combo_item name="Parks&amp;Nature">
314 Parcs et Nature 314 Parcs et Nature
315 </combo_item> 315 </combo_item>
316 <combo_item name="Residential"> 316 <combo_item name="Residential">
317 Résidentiel 317 Résidentiel
318 </combo_item> 318 </combo_item>
319 <combo_item name="Shopping"> 319 <combo_item name="Shopping">
320 Shopping 320 Shopping
321 </combo_item> 321 </combo_item>
322 <combo_item name="Other"> 322 <combo_item name="Other">
323 Autre 323 Autre
324 </combo_item> 324 </combo_item>
325 </combo_box> 325 </combo_box>
326 <check_box label="Publier liste sur le web" name="PublishCheck" 326 <check_box label="Publier liste sur le web" name="PublishCheck"
327 tool_tip="Publiez vos informations de parcelle sur le web." /> 327 tool_tip="Publiez vos informations de parcelle sur le web." />
328 <check_box label="Contenu pour adultes" name="MatureCheck" 328 <check_box label="Contenu pour adultes" name="MatureCheck"
329 tool_tip="Les infos sur votre parcelle, ou le contenu de cette dernière, sont à caractère adulte." /> 329 tool_tip="Les infos sur votre parcelle, ou le contenu de cette dernière, sont à caractère adulte." />
330 <button label="?" label_selected="?" name="?" /> 330 <button label="?" label_selected="?" name="?" />
331 <text type="string" length="1" name="Snapshot:"> 331 <text type="string" length="1" name="Snapshot:">
332 Photo : 332 Photo :
333 </text> 333 </text>
334 <texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image" /> 334 <texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image" />
335 <text type="string" length="1" name="Landing Point: (none)"> 335 <text type="string" length="1" name="Landing Point: (none)">
336 Point d&apos;atterrissage : (aucun) 336 Point d&apos;atterrissage : (aucun)
337 </text> 337 </text>
338 <text name="landing_point"> 338 <text name="landing_point">
339 Lieu d&apos;arrivée : [LANDING] 339 Lieu d&apos;arrivée : [LANDING]
340 </text> 340 </text>
341 <string name="landing_point_none"> 341 <string name="landing_point_none">
342 (aucun) 342 (aucun)
343 </string> 343 </string>
344 <button label="Définir" label_selected="Définir" name="Set" 344 <button label="Définir" label_selected="Définir" name="Set"
345 tool_tip="Définir le lieu d&apos;arrivée de l&apos;avatar sur votre position actuelle. ll doit se trouver sur cette parcelle de terrain." /> 345 tool_tip="Définir le lieu d&apos;arrivée de l&apos;avatar sur votre position actuelle. ll doit se trouver sur cette parcelle de terrain." />
346 <button label="Annuler" label_selected="Annuler" name="Clear" 346 <button label="Annuler" label_selected="Annuler" name="Clear"
347 tool_tip="Dégager le lieu d&apos;arrivée." /> 347 tool_tip="Dégager le lieu d&apos;arrivée." />
348 <text type="string" length="1" name="Teleport Routing: "> 348 <text type="string" length="1" name="Teleport Routing: ">
349 Options de téléportation : 349 Options de téléportation :
350 </text> 350 </text>
351 <combo_box name="landing type" 351 <combo_box name="landing type"
352 tool_tip="Vous permet de paramétrer les téléportations sur votre terrain."> 352 tool_tip="Vous permet de paramétrer les téléportations sur votre terrain.">
353 <combo_item type="string" length="1" name="Blocked"> 353 <combo_item type="string" length="1" name="Blocked">
354 Bloquée 354 Bloquée
355 </combo_item> 355 </combo_item>
356 <combo_item type="string" length="1" name="LandingPoint"> 356 <combo_item type="string" length="1" name="LandingPoint">
357 Lieu d&apos;arrivée défini 357 Lieu d&apos;arrivée défini
358 </combo_item> 358 </combo_item>
359 <combo_item type="string" length="1" name="Anywhere"> 359 <combo_item type="string" length="1" name="Anywhere">
360 Lieu d&apos;arrivée indéfini 360 Lieu d&apos;arrivée indéfini
361 </combo_item> 361 </combo_item>
362 </combo_box> 362 </combo_box>
363 <string name="push_restrict_text"> 363 <string name="push_restrict_text">
364 Interdire les bousculades 364 Interdire les bousculades
365 </string> 365 </string>
366 <string name="push_restrict_region_text"> 366 <string name="push_restrict_region_text">
367 Interdire les bousculades (passer outre les règles de la région) 367 Interdire les bousculades (passer outre les règles de la région)
368 </string> 368 </string>
369 </panel> 369 </panel>
370 <panel label="Média" name="land_media_panel"> 370 <panel label="Média" name="land_media_panel">
371 <text name="with media:"> 371 <text name="with media:">
372 Type de média : 372 Type de média :
373 </text> 373 </text>
374 <combo_box name="media type" 374 <combo_box name="media type"
375 tool_tip="Indiquez s&apos;il s&apos;agit de l&apos;URL d&apos;un film, d&apos;une page web ou autre" /> 375 tool_tip="Indiquez s&apos;il s&apos;agit de l&apos;URL d&apos;un film, d&apos;une page web ou autre" />
376 <text name="at URL:"> 376 <text name="at URL:">
377 URL du média : 377 URL du média :
378 </text> 378 </text>
379 <button label="Définir..." label_selected="Définir..." name="set_media_url" /> 379 <button label="Définir..." label_selected="Définir..." name="set_media_url" />
380 <text name="Description:"> 380 <text name="Description:">
381 Description : 381 Description :
382 </text> 382 </text>
383 <line_editor name="url_description" 383 <line_editor name="url_description"
384 tool_tip="Texte affiché à côté du bouton Jouer/Charger" /> 384 tool_tip="Texte affiché à côté du bouton Jouer/Charger" />
385 <text name="replace_texture_help"> 385 <text name="replace_texture_help">
386 (Les objets avec cette texture affichent le film ou 386 (Les objets avec cette texture affichent le film ou
387la page web quand vous cliquez sur la flèche Jouer). 387la page web quand vous cliquez sur la flèche Jouer).
388 </text> 388 </text>
389 <text name="Options:"> 389 <text name="Options:">
390 Options 390 Options
391média : 391média :
392 </text> 392 </text>
393 <check_box label="Média en boucle" name="media_loop" 393 <check_box label="Média en boucle" name="media_loop"
394 tool_tip="Jouer le média en boucle. Lorsque le média aura fini de jouer, il recommencera." /> 394 tool_tip="Jouer le média en boucle. Lorsque le média aura fini de jouer, il recommencera." />
395 <check_box label="Masquer l&apos;URL du média" name="hide_media_url" 395 <check_box label="Masquer l&apos;URL du média" name="hide_media_url"
396 tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL du média. Cette option n&apos;est pas disponible pour les fichiers HTML." /> 396 tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL du média. Cette option n&apos;est pas disponible pour les fichiers HTML." />
397 <check_box label="Masquer l&apos;URL de la musique" name="hide_music_url" 397 <check_box label="Masquer l&apos;URL de la musique" name="hide_music_url"
398 tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL de la musique." /> 398 tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL de la musique." />
399 <text name="media_size" 399 <text name="media_size"
400 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut."> 400 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut.">
401 Taille du média : 401 Taille du média :
402 </text> 402 </text>
403 <spinner name="media_size_width" 403 <spinner name="media_size_width"
404 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." /> 404 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." />
405 <spinner name="media_size_height" 405 <spinner name="media_size_height"
406 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." /> 406 tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." />
407 <text name="pixels"> 407 <text name="pixels">
408 pixels 408 pixels
409 </text> 409 </text>
410 <text name="MusicURL:"> 410 <text name="MusicURL:">
411 URL de la musique : 411 URL de la musique :
412 </text> 412 </text>
413 <text name="Sound:"> 413 <text name="Sound:">
414 Son : 414 Son :
415 </text> 415 </text>
416 <check_box label="Limiter le son spatial à cette parcelle" name="check sound local" /> 416 <check_box label="Limiter le son spatial à cette parcelle" name="check sound local" />
417 <text type="string" length="1" name="Music URL:"> 417 <text type="string" length="1" name="Music URL:">
418 URL du flux : 418 URL du flux :
419 </text> 419 </text>
420 <text type="string" length="1" name="Media texture:"> 420 <text type="string" length="1" name="Media texture:">
421 Remplacer 421 Remplacer
422la texture : 422la texture :
423 </text> 423 </text>
424 <text type="string" length="1" name="Replace this texture:"> 424 <text type="string" length="1" name="Replace this texture:">
425 Remplacer cette texture : 425 Remplacer cette texture :
426 </text> 426 </text>
427 <texture_picker label="" name="media texture" tool_tip="Cliquez pour sélectionner une image" /> 427 <texture_picker label="" name="media texture" tool_tip="Cliquez pour sélectionner une image" />
428 <text type="string" length="1" name="with content from this URL:"> 428 <text type="string" length="1" name="with content from this URL:">
429 par du contenu situé à l&apos;URL suivante : 429 par du contenu situé à l&apos;URL suivante :
430 </text> 430 </text>
431 <check_box label="Échelle automatique" name="media_auto_scale" 431 <check_box label="Échelle automatique" name="media_auto_scale"
432 tool_tip="Si vous sélectionnez cette option, le contenu de cette parcelle sera automatiquement mis à l&apos;échelle. La qualité visuelle sera peut-être amoindrie mais vous n&apos;aurez à faire aucune autre mise à l&apos;échelle ou alignement." /> 432 tool_tip="Si vous sélectionnez cette option, le contenu de cette parcelle sera automatiquement mis à l&apos;échelle. La qualité visuelle sera peut-être amoindrie mais vous n&apos;aurez à faire aucune autre mise à l&apos;échelle ou alignement." />
433 <text name="Voice settings:"> 433 <text name="Voice settings:">
434 Voix : 434 Voix :
435 </text> 435 </text>
436 <radio_group name="parcel_voice_channel"> 436 <radio_group name="parcel_voice_channel">
437 <radio_item name="Estate"> 437 <radio_item name="Estate">
438 Utiliser le canal spatial du domaine 438 Utiliser le canal spatial du domaine
439 </radio_item> 439 </radio_item>
440 <radio_item name="Private"> 440 <radio_item name="Private">
441 Utiliser un canal spatial privé 441 Utiliser un canal spatial privé
442 </radio_item> 442 </radio_item>
443 <radio_item name="Disabled"> 443 <radio_item name="Disabled">
444 Désactiver les canaux spatiaux audios sur cette parcelle 444 Désactiver les canaux spatiaux audios sur cette parcelle
445 </radio_item> 445 </radio_item>
446 </radio_group> 446 </radio_group>
447 </panel> 447 </panel>
448 <panel label="Accès" name="land_access_panel"> 448 <panel label="Accès" name="land_access_panel">
449 <text type="string" length="1" name="Limit access to this parcel to:"> 449 <text type="string" length="1" name="Limit access to this parcel to:">
450 Accès à cette parcelle 450 Accès à cette parcelle
451 </text> 451 </text>
452 <check_box label="Autoriser l&apos;accès public" name="public_access" /> 452 <check_box label="Autoriser l&apos;accès public" name="public_access" />
453 <text name="Only Allow"> 453 <text name="Only Allow">
454 Bloquer l&apos;accès : 454 Bloquer l&apos;accès :
455 </text> 455 </text>
456 <check_box 456 <check_box
457 label="Aux résidents qui n&apos;ont pas fourni leurs informations de paiement à Linden Lab" 457 label="Aux résidents qui n&apos;ont pas fourni leurs informations de paiement à Linden Lab"
458 name="limit_payment" tool_tip="Aux résidents non identifés" /> 458 name="limit_payment" tool_tip="Aux résidents non identifés" />
459 <check_box label="Aux résidents dont l&apos;âge n&apos;a pas été vérifié" 459 <check_box label="Aux résidents dont l&apos;âge n&apos;a pas été vérifié"
460 name="limit_age_verified" 460 name="limit_age_verified"
461 tool_tip="Aux résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com." /> 461 tool_tip="Aux résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com." />
462 <string name="estate_override"> 462 <string name="estate_override">
463 Au moins une de ces options est définie au niveau du domaine. 463 Au moins une de ces options est définie au niveau du domaine.
464 </string> 464 </string>
465 <check_box label="Autoriser l&apos;accès au groupe : [GROUP]" name="GroupCheck" 465 <check_box label="Autoriser l&apos;accès au groupe : [GROUP]" name="GroupCheck"
466 tool_tip="Définir le groupe à l&apos;onglet Général." /> 466 tool_tip="Définir le groupe à l&apos;onglet Général." />
467 <check_box label="Avatars : (0 dans la liste, 300 max)" name="AccessCheck" /> 467 <check_box label="Avatars : (0 dans la liste, 300 max)" name="AccessCheck" />
468 <button label="Ajouter..." label_selected="Ajouter..." name="Add..." /> 468 <button label="Ajouter..." label_selected="Ajouter..." name="Add..." />
469 <button label="Retirer" label_selected="Retirer" name="Remove" /> 469 <button label="Retirer" label_selected="Retirer" name="Remove" />
470 <check_box label="Vendre des passes à :" name="PassCheck" 470 <check_box label="Vendre des passes à :" name="PassCheck"
471 tool_tip="Autoriser un accès temporaire à cette parcelle" /> 471 tool_tip="Autoriser un accès temporaire à cette parcelle" />
472 <combo_box name="pass_combo"> 472 <combo_box name="pass_combo">
473 <combo_item name="Anyone"> 473 <combo_item name="Anyone">
474 N&apos;importe qui 474 N&apos;importe qui
475 </combo_item> 475 </combo_item>
476 <combo_item name="Group"> 476 <combo_item name="Group">
477 Groupe 477 Groupe
478 </combo_item> 478 </combo_item>
479 </combo_box> 479 </combo_box>
480 <spinner label="Prix en $L :" name="PriceSpin" /> 480 <spinner label="Prix en $L :" name="PriceSpin" />
481 <spinner label="Heures d&apos;accès :" name="HoursSpin" /> 481 <spinner label="Heures d&apos;accès :" name="HoursSpin" />
482 <text label="Toujours autoriser" name="AllowedText"> 482 <text label="Toujours autoriser" name="AllowedText">
483 Résidents autorisés 483 Résidents autorisés
484 </text> 484 </text>
485 <name_list name="AccessList" tool_tip="([LISTED] listés, [MAX] max)" /> 485 <name_list name="AccessList" tool_tip="([LISTED] listés, [MAX] max)" />
486 <button label="Ajouter..." label_selected="Ajouter..." name="add_allowed" /> 486 <button label="Ajouter..." label_selected="Ajouter..." name="add_allowed" />
487 <button label="Supprimer" label_selected="Supprimer" name="remove_allowed" /> 487 <button label="Supprimer" label_selected="Supprimer" name="remove_allowed" />
488 <text label="Interdire" name="BanCheck"> 488 <text label="Interdire" name="BanCheck">
489 Résidents interdits 489 Résidents interdits
490 </text> 490 </text>
491 <name_list name="BannedList" tool_tip="([LISTED] listés, [MAX] max)" /> 491 <name_list name="BannedList" tool_tip="([LISTED] listés, [MAX] max)" />
492 <button label="Ajouter..." label_selected="Ajouter..." name="add_banned" /> 492 <button label="Ajouter..." label_selected="Ajouter..." name="add_banned" />
493 <button label="Supprimer" label_selected="Supprimer" name="remove_banned" /> 493 <button label="Supprimer" label_selected="Supprimer" name="remove_banned" />
494 </panel> 494 </panel>
495 <panel label="Bannir" name="land_ban_panel"> 495 <panel label="Bannir" name="land_ban_panel">
496 <check_box label="Bannir les avatars suivants : (0 dans la liste, 300 max)" 496 <check_box label="Bannir les avatars suivants : (0 dans la liste, 300 max)"
497 name="LandBanCheck" /> 497 name="LandBanCheck" />
498 <button label="Ajouter..." label_selected="Ajouter..." name="Add..." /> 498 <button label="Ajouter..." label_selected="Ajouter..." name="Add..." />
499 <button label="Retirer" label_selected="Retirer" name="Remove" /> 499 <button label="Retirer" label_selected="Retirer" name="Remove" />
500 <text type="string" length="1" name="Deny by Payment Status:"> 500 <text type="string" length="1" name="Deny by Payment Status:">
501 Refuser selon les infos de paiement : 501 Refuser selon les infos de paiement :
502 </text> 502 </text>
503 <check_box label="Refuser sans infos de paiement enregistrées" name="DenyAnonymousCheck" /> 503 <check_box label="Refuser sans infos de paiement enregistrées" name="DenyAnonymousCheck" />
504 <check_box label="Refuser avec infos de paiement enregistrées" name="DenyIdentifiedCheck" /> 504 <check_box label="Refuser avec infos de paiement enregistrées" name="DenyIdentifiedCheck" />
505 <check_box label="Refuser avec infos de paiement utilisées" name="DenyTransactedCheck" /> 505 <check_box label="Refuser avec infos de paiement utilisées" name="DenyTransactedCheck" />
506 </panel> 506 </panel>
507 </tab_container> 507 </tab_container>
508</floater> 508</floater>
diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml
index 623b800..b6e77be 100644
--- a/linden/indra/newview/skins/silver/colors_base.xml
+++ b/linden/indra/newview/skins/silver/colors_base.xml
@@ -100,9 +100,9 @@
100<PieMenuSelectedColor value="185, 200, 220, 120" /> <!-- Color of pie menu slice when selected --> 100<PieMenuSelectedColor value="185, 200, 220, 120" /> <!-- Color of pie menu slice when selected -->
101 101
102<!-- MENU BAR --> 102<!-- MENU BAR -->
103<ParcelTextColor value="40, 40, 90, 255" /> <!-- Parcel name on menu bar, normal state --> 103<ParcelTextColor value="40, 40, 90, 255" /> <!-- Parcel name on menu bar, normal state -->
104<ParcelHoverColor value="70, 70, 100, 255" /> <!-- Parcel name on menu bar, hover state --> 104<ParcelHoverColor value="70, 70, 100, 255" /> <!-- Parcel name on menu bar, hover state -->
105<TimeTextColor value="0, 30, 60, 255" /> <!-- SL Time on menu bar --> 105<TimeTextColor value="0, 30, 60, 255" /> <!-- SL Time on menu bar -->
106<BalanceTextColor value="0, 100, 40, 255" /> <!-- Linden dollar balance on menu bar --> 106<BalanceTextColor value="0, 100, 40, 255" /> <!-- Linden dollar balance on menu bar -->
107<HealthTextColor value="110, 15, 15, 255" /> <!-- Damage meter text on menu bar --> 107<HealthTextColor value="110, 15, 15, 255" /> <!-- Damage meter text on menu bar -->
108 108
@@ -175,14 +175,6 @@
175<FilterTextColor value="255, 200, 70, 255" /> <!-- Inventory search text --> 175<FilterTextColor value="255, 200, 70, 255" /> <!-- Inventory search text -->
176<InventorySearchStatusColor value="0, 0, 0, 255" /> <!-- "Searching..." --> 176<InventorySearchStatusColor value="0, 0, 0, 255" /> <!-- "Searching..." -->
177 177
178<!-- HELP WINDOW -->
179<HelpBgColor value="200, 209, 204, 255" />
180<HelpFgColor value="0, 0, 0, 255" />
181<HelpScrollTrackColor value="0, 0, 0, 255" />
182<HelpScrollThumbColor value="255, 255, 255, 255" />
183<HelpScrollHighlightColor value="115, 132, 155, 255" />
184<HelpScrollShadowColor value="0, 0, 0, 255" />
185
186<!-- MISC --> 178<!-- MISC -->
187<AvatarNameColor value="251, 175, 93, 255" /> <!-- Text color of avatar nametags --> 179<AvatarNameColor value="251, 175, 93, 255" /> <!-- Text color of avatar nametags -->
188<FocusColor value="239, 156, 0, 255" /> <!-- Color of the glow around UI controls with keyboard focus --> 180<FocusColor value="239, 156, 0, 255" /> <!-- Color of the glow around UI controls with keyboard focus -->
@@ -192,5 +184,5 @@
192<ContextSilhouetteColor value="239, 156, 0, 255" /> <!-- For "context" highlighting, i.e. pie menu --> 184<ContextSilhouetteColor value="239, 156, 0, 255" /> <!-- For "context" highlighting, i.e. pie menu -->
193<GroupOverTierColor value="110, 15, 15, 255" /> <!-- Warning text in Group Info window --> 185<GroupOverTierColor value="110, 15, 15, 255" /> <!-- Warning text in Group Info window -->
194<ConsoleBackground value="0, 0, 0, 255" /> <!-- Background for inworld chat --> 186<ConsoleBackground value="0, 0, 0, 255" /> <!-- Background for inworld chat -->
195 187
196</settings> 188</settings>
diff --git a/linden/install.xml b/linden/install.xml
index 4d2b5d0..fd8f6ff 100644
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -390,13 +390,6 @@
390 <key>url</key> 390 <key>url</key>
391 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-linux-20080817.tar.bz2</uri> 391 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-linux-20080817.tar.bz2</uri>
392 </map> 392 </map>
393 <key>windows</key>
394 <map>
395 <key>md5sum</key>
396 <string>3d5e29d444dde4815b36082eedfc775a</string>
397 <key>url</key>
398 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-windows-20080817.tar.bz2</uri>
399 </map>
400 </map> 393 </map>
401 </map> 394 </map>
402 <key>google</key> 395 <key>google</key>
diff --git a/linden/scripts/messages/message_template.msg b/linden/scripts/messages/message_template.msg
index a7835ad..6d90622 100644
--- a/linden/scripts/messages/message_template.msg
+++ b/linden/scripts/messages/message_template.msg
@@ -2942,6 +2942,14 @@ version 2.0
2942 { UseEstateSun BOOL } 2942 { UseEstateSun BOOL }
2943 { SunHour F32 } // last value set by estate or region controls JC 2943 { SunHour F32 } // last value set by estate or region controls JC
2944 } 2944 }
2945 {
2946 RegionInfo2 Single
2947 { ProductSKU Variable 1 } // string
2948 { ProductName Variable 1 } // string
2949 { MaxAgents32 U32 } // Identical to RegionInfo.MaxAgents but allows greater range
2950 { HardMaxAgents U32 }
2951 { HardMaxObjects U32 }
2952 }
2945} 2953}
2946 2954
2947// GodUpdateRegionInfo 2955// GodUpdateRegionInfo
@@ -3059,6 +3067,14 @@ version 2.0
3059 RegionInfo2 Single 3067 RegionInfo2 Single
3060 { RegionID LLUUID } 3068 { RegionID LLUUID }
3061 } 3069 }
3070 {
3071 RegionInfo3 Single
3072 { CPUClassID S32 }
3073 { CPURatio S32 }
3074 { ColoName Variable 1 } // string
3075 { ProductSKU Variable 1 } // string
3076 { ProductName Variable 1 } // string
3077 }
3062} 3078}
3063 3079
3064// RegionHandshakeReply 3080// RegionHandshakeReply
@@ -8854,3 +8870,39 @@ version 2.0
8854 } 8870 }
8855} 8871}
8856 8872
8873
8874// This message is sent from viewer -> simulator when the viewer wants
8875// to rez an object out of inventory back to its position before it
8876// last moved into the inventory
8877{
8878 RezRestoreToWorld Low 425 NotTrusted Unencoded UDPDeprecated
8879 {
8880 AgentData Single
8881 { AgentID LLUUID }
8882 { SessionID LLUUID }
8883 }
8884 {
8885 InventoryData Single
8886 { ItemID LLUUID }
8887 { FolderID LLUUID }
8888 { CreatorID LLUUID } // permissions
8889 { OwnerID LLUUID } // permissions
8890 { GroupID LLUUID } // permissions
8891 { BaseMask U32 } // permissions
8892 { OwnerMask U32 } // permissions
8893 { GroupMask U32 } // permissions
8894 { EveryoneMask U32 } // permissions
8895 { NextOwnerMask U32 } // permissions
8896 { GroupOwned BOOL } // permissions
8897 { TransactionID LLUUID }
8898 { Type S8 }
8899 { InvType S8 }
8900 { Flags U32 }
8901 { SaleType U8 }
8902 { SalePrice S32 }
8903 { Name Variable 1 }
8904 { Description Variable 1 }
8905 { CreationDate S32 }
8906 { CRC U32 }
8907 }
8908}