diff options
author | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
commit | 8465910c79b8e746e04fd581cca2d60399e569b9 (patch) | |
tree | f43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra | |
parent | Second Life viewer sources 1.18.2.1 (diff) | |
download | meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2 meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz |
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to 'linden/indra')
253 files changed, 3182 insertions, 1711 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index e90a7e6..6105759 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct | |||
@@ -38,35 +38,25 @@ if platform == 'linux2': | |||
38 | # GET VERSION # | 38 | # GET VERSION # |
39 | ###################### | 39 | ###################### |
40 | 40 | ||
41 | def grep(filestr,searchstr): | 41 | def get_version(type): |
42 | try: | 42 | file = open('llcommon/llversion%s.h' % type,"r") |
43 | f = open( filestr, 'r' ) | 43 | file_str = file.read() |
44 | except IOError: | 44 | file.close() |
45 | print "No such file " + filestr | 45 | |
46 | sys.exit(2) | 46 | m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str) |
47 | r = re.compile( searchstr ) | 47 | VER_MAJOR = m.group(1) |
48 | for line in f.read().split('\n'): | 48 | m = re.search('const S32 LL_VERSION_MINOR = (\d+);', file_str) |
49 | if ( r.search(line) ): | 49 | VER_MINOR = m.group(1) |
50 | f.close() | 50 | m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str) |
51 | return line | 51 | VER_PATCH = m.group(1) |
52 | f.close() | 52 | m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str) |
53 | return None | 53 | VER_BUILD = m.group(1) |
54 | 54 | version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals() | |
55 | def get_version(llver): | ||
56 | re_vernum = re.compile("[0-9]+") | ||
57 | rstr = grep('llcommon/llversion.h', "LL_VERSION_" + llver) | ||
58 | if rstr == None: | ||
59 | print "No version information in llversion.h" | ||
60 | sys.exit(2) | ||
61 | version = re_vernum.findall( rstr )[1] | ||
62 | return version | ||
63 | 55 | ||
64 | version_major = get_version("MAJOR") | 56 | return version |
65 | version_minor = get_version("MINOR") | ||
66 | version_patch = get_version("PATCH") | ||
67 | version_build = get_version("BUILD") | ||
68 | 57 | ||
69 | version = version_major + '.' + version_minor + '.' + version_patch + '.' + version_build | 58 | version_viewer = get_version('viewer') |
59 | version_server = get_version('server') | ||
70 | 60 | ||
71 | 61 | ||
72 | ############### | 62 | ############### |
@@ -82,8 +72,6 @@ try: | |||
82 | except: | 72 | except: |
83 | debian_sarge = False | 73 | debian_sarge = False |
84 | 74 | ||
85 | fedora = os.path.exists('/etc/fedora-release') | ||
86 | |||
87 | ######################### | 75 | ######################### |
88 | # COMMAND LINE OPTIONS # | 76 | # COMMAND LINE OPTIONS # |
89 | ######################### | 77 | ######################### |
@@ -103,6 +91,8 @@ opts.AddOptions( | |||
103 | BoolOption('COLORGCC', 'Enabled colorgcc', True), | 91 | BoolOption('COLORGCC', 'Enabled colorgcc', True), |
104 | EnumOption('GRID', 'Client package\'s default grid', 'default', | 92 | EnumOption('GRID', 'Client package\'s default grid', 'default', |
105 | allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'firstlook', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')), | 93 | allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'firstlook', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')), |
94 | EnumOption('CHANNEL', 'Client package default channel', 'default', | ||
95 | allowed_values=('default', 'Release', 'Release Candidate', 'WindLight')), | ||
106 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), | 96 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), |
107 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), | 97 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), |
108 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line | 98 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line |
@@ -118,6 +108,7 @@ enable_mozlib = optenv['MOZLIB'] | |||
118 | enable_gstreamer = optenv['GSTREAMER'] | 108 | enable_gstreamer = optenv['GSTREAMER'] |
119 | enable_colorgcc = optenv['COLORGCC'] | 109 | enable_colorgcc = optenv['COLORGCC'] |
120 | grid = optenv['GRID'] | 110 | grid = optenv['GRID'] |
111 | channel = optenv['CHANNEL'] | ||
121 | standalone = optenv['STANDALONE'] | 112 | standalone = optenv['STANDALONE'] |
122 | opensource = standalone or optenv['OPENSOURCE'] | 113 | opensource = standalone or optenv['OPENSOURCE'] |
123 | enable_fmod = not opensource and optenv['FMOD'] | 114 | enable_fmod = not opensource and optenv['FMOD'] |
@@ -136,8 +127,6 @@ if standalone and platform != 'linux': | |||
136 | print >> sys.stderr, 'Warning: standalone builds have only been tested on Linux' | 127 | print >> sys.stderr, 'Warning: standalone builds have only been tested on Linux' |
137 | 128 | ||
138 | standalone_pkgs = [ | 129 | standalone_pkgs = [ |
139 | 'apr-1', | ||
140 | 'apr-util-1', | ||
141 | 'atk', | 130 | 'atk', |
142 | 'cairo', | 131 | 'cairo', |
143 | 'freetype2', | 132 | 'freetype2', |
@@ -146,7 +135,6 @@ standalone_pkgs = [ | |||
146 | 'glib-2.0', | 135 | 'glib-2.0', |
147 | 'gmodule-2.0', | 136 | 'gmodule-2.0', |
148 | 'gtk+-2.0', | 137 | 'gtk+-2.0', |
149 | 'libcurl', | ||
150 | 'libpng', | 138 | 'libpng', |
151 | 'pango', | 139 | 'pango', |
152 | 'pangoft2', | 140 | 'pangoft2', |
@@ -158,12 +146,22 @@ standalone_pkgs = [ | |||
158 | 'vorbisfile', | 146 | 'vorbisfile', |
159 | ] | 147 | ] |
160 | 148 | ||
149 | standalone_net_pkgs = [ | ||
150 | 'apr-1', | ||
151 | 'apr-util-1', | ||
152 | 'libcrypto', | ||
153 | 'libcurl', | ||
154 | 'libssl', | ||
155 | ] | ||
156 | |||
161 | def pkgconfig(opt, pkgs=None): | 157 | def pkgconfig(opt, pkgs=None): |
158 | if pkgs is None: | ||
159 | pkgs = standalone_pkgs + standalone_net_pkgs | ||
162 | return os.popen('pkg-config %s %s' % | 160 | return os.popen('pkg-config %s %s' % |
163 | (opt, pkgs or ' '.join(standalone_pkgs))).read().strip() | 161 | (opt, ' '.join(pkgs))).read().strip() |
164 | 162 | ||
165 | if standalone: | 163 | if standalone: |
166 | missing = [pkg for pkg in standalone_pkgs | 164 | missing = [pkg for pkg in standalone_pkgs + standalone_net_pkgs |
167 | if os.system('pkg-config --exists ' + pkg)] | 165 | if os.system('pkg-config --exists ' + pkg)] |
168 | if missing: | 166 | if missing: |
169 | print >> sys.stderr, ('Error: pkg-config cannot find these ' | 167 | print >> sys.stderr, ('Error: pkg-config cannot find these ' |
@@ -181,7 +179,7 @@ for build_target in targets: | |||
181 | 179 | ||
182 | system_str = arch + '-' + platform | 180 | system_str = arch + '-' + platform |
183 | 181 | ||
184 | print 'Building ' + build_target + ' ' + version + ' on ' + system_str + ' (' + buildtype + ')' | 182 | print 'Building ' + build_target + ' ' + version_server + ' on ' + system_str + ' (' + buildtype + ')' |
185 | 183 | ||
186 | system_lib_dir = '../libraries/' + system_str | 184 | system_lib_dir = '../libraries/' + system_str |
187 | 185 | ||
@@ -214,8 +212,11 @@ for build_target in targets: | |||
214 | '../libraries/' + system_str + '/include' ) | 212 | '../libraries/' + system_str + '/include' ) |
215 | 213 | ||
216 | if platform == 'linux' and build_target == 'client': | 214 | if platform == 'linux' and build_target == 'client': |
217 | if arch == 'x86_64' and os.path.exists('/usr/lib64'): | 215 | if standalone: |
218 | client_external_libs = [File('/usr/lib64/libresolv.a')] | 216 | if arch == 'x86_64' and os.path.exists('/usr/lib64'): |
217 | client_external_libs = [File('/usr/lib64/libresolv.a')] | ||
218 | else: | ||
219 | client_external_libs = [File('/usr/lib/libresolv.a')] | ||
219 | else: | 220 | else: |
220 | # Custom libresolv build which avoids a billion flavors of | 221 | # Custom libresolv build which avoids a billion flavors of |
221 | # brokenness prevalent in common libresolvs out there. | 222 | # brokenness prevalent in common libresolvs out there. |
@@ -254,7 +255,7 @@ for build_target in targets: | |||
254 | ############## | 255 | ############## |
255 | 256 | ||
256 | # Generic GCC flags | 257 | # Generic GCC flags |
257 | cflags = '-g -pipe -Wall -Wno-trigraphs -Wno-sign-compare -Werror ' | 258 | cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror ' |
258 | cxxflags = '' | 259 | cxxflags = '' |
259 | cppflags = '-D_FORTIFY_SOURCE=2 ' | 260 | cppflags = '-D_FORTIFY_SOURCE=2 ' |
260 | if standalone: | 261 | if standalone: |
@@ -275,7 +276,7 @@ for build_target in targets: | |||
275 | cppflags += server_cppflags + ' ' | 276 | cppflags += server_cppflags + ' ' |
276 | else: | 277 | else: |
277 | # Viewer flags | 278 | # Viewer flags |
278 | cflags += '-fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing ' | 279 | cflags += '-pthread -D_REENTRANT -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing ' |
279 | cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' | 280 | cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' |
280 | try: | 281 | try: |
281 | client_cppflags = os.environ['CLIENT_CPPFLAGS'] | 282 | client_cppflags = os.environ['CLIENT_CPPFLAGS'] |
@@ -318,8 +319,7 @@ for build_target in targets: | |||
318 | # GStreamer stuff | 319 | # GStreamer stuff |
319 | if enable_gstreamer: | 320 | if enable_gstreamer: |
320 | cppflags += '-DLL_GSTREAMER_ENABLED=1 ' | 321 | cppflags += '-DLL_GSTREAMER_ENABLED=1 ' |
321 | client_external_libs += [ 'glib-2.0', 'gobject-2.0' ] | 322 | client_external_libs += [ 'glib-2.0', 'gobject-2.0', 'gthread-2.0' ] |
322 | #client_external_libs += [ 'gstreamer-0.10', 'gstvideo-0.10', 'gstaudio-0.10' ] | ||
323 | include_dirs += [ '../libraries/' + system_str + '/include/gstreamer-0.10' ] | 323 | include_dirs += [ '../libraries/' + system_str + '/include/gstreamer-0.10' ] |
324 | include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0', '../libraries/' + system_str + '/include/glib-2.0/include' ] | 324 | include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0', '../libraries/' + system_str + '/include/glib-2.0/include' ] |
325 | include_dirs += [ '../libraries/' + system_str + '/include/libxml2'] | 325 | include_dirs += [ '../libraries/' + system_str + '/include/libxml2'] |
@@ -544,9 +544,15 @@ for build_target in targets: | |||
544 | local_flags="", | 544 | local_flags="", |
545 | module_libs = [], | 545 | module_libs = [], |
546 | source_files = 'files.lst'): | 546 | source_files = 'files.lst'): |
547 | # -Bsymbolic avoids having the lib pull symbols from the app's | ||
548 | # namespace instead of its own by default. This avoids some | ||
549 | # rediculous problems with multiple destruction of the wrong | ||
550 | # objects, though has some gotchas of its own. | ||
551 | dyn_link_flags = '-Wl,-Bsymbolic' | ||
547 | files_list = load_files(module, source_files) | 552 | files_list = load_files(module, source_files) |
548 | BuildDir(build_dir + '/' + module, module, duplicate=duplicate) | 553 | BuildDir(build_dir + '/' + module, module, duplicate=duplicate) |
549 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | 554 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags, |
555 | LINKFLAGS = env['LINKFLAGS'] + ' ' + dyn_link_flags) | ||
550 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) | 556 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) |
551 | Default(tgt) | 557 | Default(tgt) |
552 | 558 | ||
@@ -596,12 +602,15 @@ for build_target in targets: | |||
596 | create_static_module('llxml') | 602 | create_static_module('llxml') |
597 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') | 603 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') |
598 | 604 | ||
599 | net_external_libs = [ 'curl', 'cares', 'ssl', 'crypto', 'expat', 'aprutil-1', 'apr-1' ] | 605 | if standalone: |
600 | common_external_libs = net_external_libs + [ 'z' ] | 606 | net_external_libs = [d[2:] for d in |
601 | if standalone and fedora: | 607 | pkgconfig('--libs-only-l', |
602 | common_external_libs += [ 'xmlrpc-epi' ] | 608 | standalone_net_pkgs).split()] |
603 | else: | 609 | else: |
604 | common_external_libs += [ 'xmlrpc' ] | 610 | net_external_libs = [ 'curl', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ] |
611 | net_external_libs += [ 'cares', 'expat' ] | ||
612 | |||
613 | common_external_libs = net_external_libs + [ 'xmlrpc-epi', 'z' ] | ||
605 | 614 | ||
606 | if build_target == 'client': | 615 | if build_target == 'client': |
607 | if platform == 'linux': | 616 | if platform == 'linux': |
@@ -612,7 +621,7 @@ for build_target in targets: | |||
612 | if standalone: | 621 | if standalone: |
613 | external_libs = net_external_libs | 622 | external_libs = net_external_libs |
614 | external_libs += [d[2:] for d in | 623 | external_libs += [d[2:] for d in |
615 | pkgconfig('--libs-only-l', 'gtk+-2.0').split()] | 624 | pkgconfig('--libs-only-l', ['gtk+-2.0']).split()] |
616 | else: | 625 | else: |
617 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] | 626 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] |
618 | external_libs.remove('cares') | 627 | external_libs.remove('cares') |
@@ -672,14 +681,19 @@ for build_target in targets: | |||
672 | if platform == 'linux': | 681 | if platform == 'linux': |
673 | env.Command(output_bin + '-stripped', output_bin, strip_cmd) | 682 | env.Command(output_bin + '-stripped', output_bin, strip_cmd) |
674 | env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd) | 683 | env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd) |
675 | product_name = 'SecondLife_' + arch + '_' + version_major + "_" + version_minor + "_" + version_patch + "_" + version_build | 684 | product_name = 'SecondLife_' + arch + '_' + "_".join(version_viewer.split(".")) |
676 | if grid not in ['default', 'agni']: | 685 | if grid not in ['default', 'agni']: |
677 | product_name += "_" + grid.upper() | 686 | product_name += "_" + grid.upper() |
687 | if channel not in ['default', 'Release']: | ||
688 | product_name += "_" + "".join(channel.upper().split()) | ||
689 | |||
678 | package_name = product_name + '.tar.bz2' | 690 | package_name = product_name + '.tar.bz2' |
679 | cmd = 'rm -rf newview/%(pn)s* && newview/viewer_manifest.py --grid=%(grid)s --installer_name=%(pn)s --arch=%(arch)s' % { | 691 | complete_channel = 'Second Life ' + channel |
692 | cmd = 'rm -rf newview/%(pn)s* && newview/viewer_manifest.py --grid=%(grid)s --channel=\'%(ch)s\' --installer_name=%(pn)s --arch=%(arch)s' % { | ||
680 | 'pn': product_name, | 693 | 'pn': product_name, |
681 | 'grid':grid, | 694 | 'grid':grid, |
682 | 'arch':arch} | 695 | 'arch':arch, |
696 | 'ch':complete_channel} | ||
683 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) | 697 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) |
684 | Depends('newview/' + package_name, output_bin + '-stripped') | 698 | Depends('newview/' + package_name, output_bin + '-stripped') |
685 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') | 699 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') |
@@ -724,7 +738,9 @@ for build_target in targets: | |||
724 | internal_libs + external_libs) | 738 | internal_libs + external_libs) |
725 | 739 | ||
726 | # Dataserver | 740 | # Dataserver |
727 | external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient'] | 741 | external_libs = common_external_libs + [ |
742 | 'boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace', | ||
743 | ] | ||
728 | internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory', | 744 | internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory', |
729 | 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] | 745 | 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] |
730 | create_executable('dataserver/dataserver' + file_suffix, 'dataserver', | 746 | create_executable('dataserver/dataserver' + file_suffix, 'dataserver', |
@@ -738,7 +754,7 @@ for build_target in targets: | |||
738 | internal_libs + external_libs) | 754 | internal_libs + external_libs) |
739 | 755 | ||
740 | # Rpcserver | 756 | # Rpcserver |
741 | external_libs = common_external_libs + ['xmlrpc', 'mysqlclient'] | 757 | external_libs = common_external_libs + ['xmlrpc-epi', 'mysqlclient'] |
742 | internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', | 758 | internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', |
743 | 'llmath', 'llcommon'] | 759 | 'llmath', 'llcommon'] |
744 | create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', | 760 | create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', |
@@ -754,7 +770,11 @@ for build_target in targets: | |||
754 | internal_libs + external_libs) | 770 | internal_libs + external_libs) |
755 | 771 | ||
756 | # Simulator | 772 | # Simulator |
757 | external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu', 'mysqlclient', 'iconv'] | 773 | external_libs = common_external_libs + [ |
774 | 'hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', | ||
775 | 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu', | ||
776 | 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace', | ||
777 | ] | ||
758 | internal_libs = [ 'lscript', 'llprimitive', | 778 | internal_libs = [ 'lscript', 'llprimitive', |
759 | 'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj', | 779 | 'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj', |
760 | 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', | 780 | 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', |
diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 0e46589..c496e95 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py | |||
@@ -1,4 +1,3 @@ | |||
1 | #!/usr/bin/python | ||
2 | """\ | 1 | """\ |
3 | @file llmanifest.py | 2 | @file llmanifest.py |
4 | @author Ryan Williams | 3 | @author Ryan Williams |
@@ -77,7 +76,7 @@ def get_default_platform(dummy): | |||
77 | 76 | ||
78 | def get_default_version(srctree): | 77 | def get_default_version(srctree): |
79 | # look up llversion.h and parse out the version info | 78 | # look up llversion.h and parse out the version info |
80 | paths = [os.path.join(srctree, x, 'llversion.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']] | 79 | paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']] |
81 | for p in paths: | 80 | for p in paths: |
82 | if os.path.exists(p): | 81 | if os.path.exists(p): |
83 | contents = open(p, 'r').read() | 82 | contents = open(p, 'r').read() |
@@ -87,6 +86,16 @@ def get_default_version(srctree): | |||
87 | build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1) | 86 | build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1) |
88 | return major, minor, patch, build | 87 | return major, minor, patch, build |
89 | 88 | ||
89 | def get_channel(srctree): | ||
90 | # look up llversionserver.h and parse out the version info | ||
91 | paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']] | ||
92 | for p in paths: | ||
93 | if os.path.exists(p): | ||
94 | contents = open(p, 'r').read() | ||
95 | channel = re.search("LL_CHANNEL\s=\s\"([\w\s]+)\"", contents).group(1) | ||
96 | return channel | ||
97 | |||
98 | |||
90 | DEFAULT_CHANNEL = 'Second Life Release' | 99 | DEFAULT_CHANNEL = 'Second Life Release' |
91 | 100 | ||
92 | ARGUMENTS=[ | 101 | ARGUMENTS=[ |
@@ -118,7 +127,7 @@ ARGUMENTS=[ | |||
118 | default=""), | 127 | default=""), |
119 | dict(name='channel', | 128 | dict(name='channel', |
120 | description="""The channel to use for updates.""", | 129 | description="""The channel to use for updates.""", |
121 | default=DEFAULT_CHANNEL), | 130 | default=get_channel), |
122 | dict(name='installer_name', | 131 | dict(name='installer_name', |
123 | description=""" The name of the file that the installer should be | 132 | description=""" The name of the file that the installer should be |
124 | packaged up into. Only used on Linux at the moment.""", | 133 | packaged up into. Only used on Linux at the moment.""", |
@@ -322,7 +331,9 @@ class LLManifest(object): | |||
322 | output = ''.join(lines) | 331 | output = ''.join(lines) |
323 | status = fd.close() | 332 | status = fd.close() |
324 | if(status): | 333 | if(status): |
325 | raise RuntimeError, "Command " + command + " returned non-zero status (" + str(status) + ")" | 334 | raise RuntimeError( |
335 | "Command %s returned non-zero status (%s) \noutput:\n%s" | ||
336 | % (command, status, output) ) | ||
326 | return output | 337 | return output |
327 | 338 | ||
328 | def created_path(self, path): | 339 | def created_path(self, path): |
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 4428cea..373b0c1 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp | |||
@@ -1136,7 +1136,7 @@ void LLAudioEngine::startNextTransfer() | |||
1136 | 1136 | ||
1137 | 1137 | ||
1138 | // static | 1138 | // static |
1139 | void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code) | 1139 | void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status) |
1140 | { | 1140 | { |
1141 | if (result_code) | 1141 | if (result_code) |
1142 | { | 1142 | { |
@@ -1665,3 +1665,4 @@ BOOL LLAudioData::load() | |||
1665 | return TRUE; | 1665 | return TRUE; |
1666 | } | 1666 | } |
1667 | 1667 | ||
1668 | |||
diff --git a/linden/indra/llaudio/audioengine.h b/linden/indra/llaudio/audioengine.h index 5a0186c..3b6bbd7 100644 --- a/linden/indra/llaudio/audioengine.h +++ b/linden/indra/llaudio/audioengine.h | |||
@@ -157,7 +157,7 @@ public: | |||
157 | 157 | ||
158 | // Asset callback when we're retrieved a sound from the asset server. | 158 | // Asset callback when we're retrieved a sound from the asset server. |
159 | void startNextTransfer(); | 159 | void startNextTransfer(); |
160 | static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code); | 160 | static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status); |
161 | 161 | ||
162 | 162 | ||
163 | friend class LLPipeline; // For debugging | 163 | friend class LLPipeline; // For debugging |
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp index e5d610a..cf489aa 100644 --- a/linden/indra/llcharacter/llkeyframemotion.cpp +++ b/linden/indra/llcharacter/llkeyframemotion.cpp | |||
@@ -425,15 +425,17 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time, | |||
425 | // LLKeyframeMotion() | 425 | // LLKeyframeMotion() |
426 | // Class Constructor | 426 | // Class Constructor |
427 | //----------------------------------------------------------------------------- | 427 | //----------------------------------------------------------------------------- |
428 | LLKeyframeMotion::LLKeyframeMotion( const LLUUID &id) : LLMotion(id) | 428 | LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id) |
429 | : LLMotion(id), | ||
430 | mJointMotionList(NULL), | ||
431 | mJointStates(NULL), | ||
432 | mPelvisp(NULL), | ||
433 | mLastSkeletonSerialNum(0), | ||
434 | mLastUpdateTime(0.f), | ||
435 | mLastLoopedTime(0.f), | ||
436 | mAssetStatus(ASSET_UNDEFINED) | ||
429 | { | 437 | { |
430 | mJointMotionList = NULL; | 438 | |
431 | mJointStates = NULL; | ||
432 | mLastSkeletonSerialNum = 0; | ||
433 | mLastLoopedTime = 0.f; | ||
434 | mLastUpdateTime = 0.f; | ||
435 | mAssetStatus = ASSET_UNDEFINED; | ||
436 | mPelvisp = NULL; | ||
437 | } | 439 | } |
438 | 440 | ||
439 | 441 | ||
@@ -1738,7 +1740,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const | |||
1738 | } | 1740 | } |
1739 | 1741 | ||
1740 | success &= dp.packS32(mJointMotionList->mConstraints.size(), "num_constraints"); | 1742 | success &= dp.packS32(mJointMotionList->mConstraints.size(), "num_constraints"); |
1741 | for (JointMotionList::constraint_list_t::iterator iter = mJointMotionList->mConstraints.begin(); | 1743 | for (JointMotionList::constraint_list_t::const_iterator iter = mJointMotionList->mConstraints.begin(); |
1742 | iter != mJointMotionList->mConstraints.end(); ++iter) | 1744 | iter != mJointMotionList->mConstraints.end(); ++iter) |
1743 | { | 1745 | { |
1744 | JointConstraintSharedData* shared_constraintp = *iter; | 1746 | JointConstraintSharedData* shared_constraintp = *iter; |
@@ -1933,7 +1935,7 @@ void LLKeyframeMotion::setLoopOut(F32 out_point) | |||
1933 | void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, | 1935 | void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, |
1934 | const LLUUID& asset_uuid, | 1936 | const LLUUID& asset_uuid, |
1935 | LLAssetType::EType type, | 1937 | LLAssetType::EType type, |
1936 | void* user_data, S32 status) | 1938 | void* user_data, S32 status, LLExtStat ext_status) |
1937 | { | 1939 | { |
1938 | LLUUID* id = (LLUUID*)user_data; | 1940 | LLUUID* id = (LLUUID*)user_data; |
1939 | 1941 | ||
diff --git a/linden/indra/llcharacter/llkeyframemotion.h b/linden/indra/llcharacter/llkeyframemotion.h index 1e5cd62..9e1b11d 100644 --- a/linden/indra/llcharacter/llkeyframemotion.h +++ b/linden/indra/llcharacter/llkeyframemotion.h | |||
@@ -144,7 +144,7 @@ public: | |||
144 | static void onLoadComplete(LLVFS *vfs, | 144 | static void onLoadComplete(LLVFS *vfs, |
145 | const LLUUID& asset_uuid, | 145 | const LLUUID& asset_uuid, |
146 | LLAssetType::EType type, | 146 | LLAssetType::EType type, |
147 | void* user_data, S32 status); | 147 | void* user_data, S32 status, LLExtStat ext_status); |
148 | 148 | ||
149 | public: | 149 | public: |
150 | U32 getFileSize(); | 150 | U32 getFileSize(); |
@@ -456,3 +456,4 @@ public: | |||
456 | 456 | ||
457 | #endif // LL_LLKEYFRAMEMOTION_H | 457 | #endif // LL_LLKEYFRAMEMOTION_H |
458 | 458 | ||
459 | |||
diff --git a/linden/indra/llcharacter/llmultigesture.cpp b/linden/indra/llcharacter/llmultigesture.cpp index 0a4d99a..e92fcbd 100644 --- a/linden/indra/llcharacter/llmultigesture.cpp +++ b/linden/indra/llcharacter/llmultigesture.cpp | |||
@@ -278,7 +278,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp) | |||
278 | 278 | ||
279 | // Apparently an earlier version of the gesture code added \r to the end | 279 | // Apparently an earlier version of the gesture code added \r to the end |
280 | // of the animation names. Get rid of it. JC | 280 | // of the animation names. Get rid of it. JC |
281 | if (mAnimName[mAnimName.length() - 1] == '\r') | 281 | if (!mAnimName.empty() && mAnimName[mAnimName.length() - 1] == '\r') |
282 | { | 282 | { |
283 | // chop the last character | 283 | // chop the last character |
284 | mAnimName.resize(mAnimName.length() - 1); | 284 | mAnimName.resize(mAnimName.length() - 1); |
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index 21635b5..bd591c5 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h | |||
@@ -136,6 +136,7 @@ const MASK MASK_ALT = 0x0002; | |||
136 | const MASK MASK_SHIFT = 0x0004; | 136 | const MASK MASK_SHIFT = 0x0004; |
137 | const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys | 137 | const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys |
138 | const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows | 138 | const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows |
139 | const MASK MASK_MODIFIERS = MASK_CONTROL|MASK_ALT|MASK_SHIFT|MASK_MAC_CONTROL; | ||
139 | 140 | ||
140 | // Special keys go into >128 | 141 | // Special keys go into >128 |
141 | const KEY KEY_SPECIAL = 0x80; // special keys start here | 142 | const KEY KEY_SPECIAL = 0x80; // special keys start here |
diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h index 5a6018a..24a346c 100644 --- a/linden/indra/llcommon/linden_common.h +++ b/linden/indra/llcommon/linden_common.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "stdtypes.h" | 50 | #include "stdtypes.h" |
51 | #include "lldefs.h" | 51 | #include "lldefs.h" |
52 | #include "llerror.h" | 52 | #include "llerror.h" |
53 | #include "llextendedstatus.h" | ||
53 | #include "llformat.h" | 54 | #include "llformat.h" |
54 | #include "llstring.h" | 55 | #include "llstring.h" |
55 | #include "lltimer.h" | 56 | #include "lltimer.h" |
diff --git a/linden/indra/llcommon/llcommon.vcproj b/linden/indra/llcommon/llcommon.vcproj index 5557f94..70006e0 100644 --- a/linden/indra/llcommon/llcommon.vcproj +++ b/linden/indra/llcommon/llcommon.vcproj | |||
@@ -385,6 +385,9 @@ | |||
385 | RelativePath=".\llevent.h"> | 385 | RelativePath=".\llevent.h"> |
386 | </File> | 386 | </File> |
387 | <File | 387 | <File |
388 | RelativePath=".\llextendedstatus.h"> | ||
389 | </File> | ||
390 | <File | ||
388 | RelativePath=".\llfasttimer.h"> | 391 | RelativePath=".\llfasttimer.h"> |
389 | </File> | 392 | </File> |
390 | <File | 393 | <File |
@@ -523,7 +526,10 @@ | |||
523 | RelativePath=".\lluuidhashmap.h"> | 526 | RelativePath=".\lluuidhashmap.h"> |
524 | </File> | 527 | </File> |
525 | <File | 528 | <File |
526 | RelativePath=".\llversion.h"> | 529 | RelativePath=".\llversionserver.h"> |
530 | </File> | ||
531 | <File | ||
532 | RelativePath=".\llversionviewer.h"> | ||
527 | </File> | 533 | </File> |
528 | <File | 534 | <File |
529 | RelativePath=".\llworkerthread.h"> | 535 | RelativePath=".\llworkerthread.h"> |
diff --git a/linden/indra/llcommon/llevent.cpp b/linden/indra/llcommon/llevent.cpp index a6c4ef0..9c736c8 100644 --- a/linden/indra/llcommon/llevent.cpp +++ b/linden/indra/llcommon/llevent.cpp | |||
@@ -238,6 +238,7 @@ LLEventDispatcher::~LLEventDispatcher() | |||
238 | if (impl) | 238 | if (impl) |
239 | { | 239 | { |
240 | delete impl; | 240 | delete impl; |
241 | impl = NULL; | ||
241 | } | 242 | } |
242 | } | 243 | } |
243 | 244 | ||
diff --git a/linden/indra/llcommon/llextendedstatus.h b/linden/indra/llcommon/llextendedstatus.h new file mode 100644 index 0000000..a1c998f --- /dev/null +++ b/linden/indra/llcommon/llextendedstatus.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /** | ||
2 | * @file llextendedstatus.h | ||
3 | * @date August 2007 | ||
4 | * @brief extended status codes for curl/vfs/resident asset storage and delivery | ||
5 | * | ||
6 | * Copyright (c) 2007-2007, Linden Research, Inc. | ||
7 | * | ||
8 | * Second Life Viewer Source Code | ||
9 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
10 | * to you under the terms of the GNU General Public License, version 2.0 | ||
11 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
12 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
13 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
14 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlife.com/developers/opensource/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | */ | ||
29 | |||
30 | #ifndef LL_LLEXTENDEDSTATUS_H | ||
31 | #define LL_LLEXTENDEDSTATUS_H | ||
32 | |||
33 | |||
34 | typedef S32 LLExtStat; | ||
35 | |||
36 | |||
37 | // Status provider groups - Top bits indicate which status type it is | ||
38 | // Zero is common status code (next section) | ||
39 | const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below | ||
40 | const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy | ||
41 | const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs | ||
42 | |||
43 | |||
44 | // Common Status Codes | ||
45 | // | ||
46 | const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry! | ||
47 | const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID | ||
48 | const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider | ||
49 | const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced | ||
50 | const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist | ||
51 | const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open | ||
52 | |||
53 | |||
54 | // curl status codes: | ||
55 | // | ||
56 | // Mask off LL_EXSTAT_CURL_RESULT for original result and | ||
57 | // see: libraries/include/curl/curl.h | ||
58 | |||
59 | |||
60 | // Memory-Resident status codes: | ||
61 | // None at present | ||
62 | |||
63 | |||
64 | // VFS status codes: | ||
65 | const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001; | ||
66 | const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002; | ||
67 | |||
68 | |||
69 | #endif // LL_LLEXTENDEDSTATUS_H | ||
diff --git a/linden/indra/llcommon/lllivefile.cpp b/linden/indra/llcommon/lllivefile.cpp index f116a2a..17fe210 100644 --- a/linden/indra/llcommon/lllivefile.cpp +++ b/linden/indra/llcommon/lllivefile.cpp | |||
@@ -146,8 +146,11 @@ namespace | |||
146 | : LLEventTimer(refresh), mLiveFile(f) | 146 | : LLEventTimer(refresh), mLiveFile(f) |
147 | { } | 147 | { } |
148 | 148 | ||
149 | void tick() | 149 | BOOL tick() |
150 | { mLiveFile.checkAndReload(); } | 150 | { |
151 | mLiveFile.checkAndReload(); | ||
152 | return FALSE; | ||
153 | } | ||
151 | 154 | ||
152 | private: | 155 | private: |
153 | LLLiveFile& mLiveFile; | 156 | LLLiveFile& mLiveFile; |
diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h index afe4a9e..151c7a2 100644 --- a/linden/indra/llcommon/lllslconstants.h +++ b/linden/indra/llcommon/lllslconstants.h | |||
@@ -166,4 +166,15 @@ const S32 STRING_TRIM_HEAD = 0x01; | |||
166 | const S32 STRING_TRIM_TAIL = 0x02; | 166 | const S32 STRING_TRIM_TAIL = 0x02; |
167 | const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; | 167 | const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; |
168 | 168 | ||
169 | // llGetObjectDetails | ||
170 | const S32 OBJECT_UNKOWN_DETAIL = -1; | ||
171 | const S32 OBJECT_NAME = 1; | ||
172 | const S32 OBJECT_DESC = 2; | ||
173 | const S32 OBJECT_POS = 3; | ||
174 | const S32 OBJECT_ROT = 4; | ||
175 | const S32 OBJECT_VELOCITY = 5; | ||
176 | const S32 OBJECT_OWNER = 6; | ||
177 | const S32 OBJECT_GROUP = 7; | ||
178 | const S32 OBJECT_CREATOR = 8; | ||
179 | |||
169 | #endif | 180 | #endif |
diff --git a/linden/indra/llcommon/llmetrics.cpp b/linden/indra/llcommon/llmetrics.cpp index 583f840..74bd13d 100644 --- a/linden/indra/llcommon/llmetrics.cpp +++ b/linden/indra/llcommon/llmetrics.cpp | |||
@@ -67,7 +67,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location, | |||
67 | metrics["location"] = location; | 67 | metrics["location"] = location; |
68 | metrics["stats"] = stats; | 68 | metrics["stats"] = stats; |
69 | 69 | ||
70 | llinfos << "LLMETRICS: " << LLSDOStreamer<LLSDNotationFormatter>(metrics) << llendl; | 70 | llinfos << "LLMETRICS: " << LLSDNotationStreamer(metrics) << llendl; |
71 | } | 71 | } |
72 | 72 | ||
73 | // Store this: | 73 | // Store this: |
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp index 25749e1..95b6b55 100644 --- a/linden/indra/llcommon/llsys.cpp +++ b/linden/indra/llcommon/llsys.cpp | |||
@@ -46,6 +46,7 @@ | |||
46 | #elif LL_DARWIN | 46 | #elif LL_DARWIN |
47 | # include <sys/sysctl.h> | 47 | # include <sys/sysctl.h> |
48 | # include <sys/utsname.h> | 48 | # include <sys/utsname.h> |
49 | # include <stdint.h> | ||
49 | #elif LL_LINUX | 50 | #elif LL_LINUX |
50 | # include <sys/utsname.h> | 51 | # include <sys/utsname.h> |
51 | # include <unistd.h> | 52 | # include <unistd.h> |
@@ -482,57 +483,97 @@ LLMemoryInfo::LLMemoryInfo() | |||
482 | { | 483 | { |
483 | } | 484 | } |
484 | 485 | ||
485 | U32 LLMemoryInfo::getPhysicalMemory() const | 486 | #if LL_WINDOWS |
487 | static U32 LLMemoryAdjustKBResult(U32 inKB) | ||
488 | { | ||
489 | // Moved this here from llfloaterabout.cpp | ||
490 | |||
491 | //! \bug | ||
492 | // For some reason, the reported amount of memory is always wrong. | ||
493 | // The original adjustment assumes it's always off by one meg, however | ||
494 | // errors of as much as 2520 KB have been observed in the value | ||
495 | // returned from the GetMemoryStatusEx function. Here we keep the | ||
496 | // original adjustment from llfoaterabout.cpp until this can be | ||
497 | // fixed somehow. | ||
498 | inKB += 1024; | ||
499 | |||
500 | return inKB; | ||
501 | } | ||
502 | #endif | ||
503 | |||
504 | U32 LLMemoryInfo::getPhysicalMemoryKB() const | ||
486 | { | 505 | { |
487 | #if LL_WINDOWS | 506 | #if LL_WINDOWS |
488 | MEMORYSTATUS state; | 507 | MEMORYSTATUSEX state; |
489 | state.dwLength = sizeof(state); | 508 | state.dwLength = sizeof(state); |
490 | GlobalMemoryStatus(&state); | 509 | GlobalMemoryStatusEx(&state); |
491 | 510 | ||
492 | return (U32)state.dwTotalPhys; | 511 | return LLMemoryAdjustKBResult((U32)(state.ullTotalPhys >> 10)); |
493 | 512 | ||
494 | #elif LL_DARWIN | 513 | #elif LL_DARWIN |
495 | // This might work on Linux as well. Someone check... | 514 | // This might work on Linux as well. Someone check... |
496 | unsigned int phys = 0; | 515 | uint64_t phys = 0; |
497 | int mib[2] = { CTL_HW, HW_PHYSMEM }; | 516 | int mib[2] = { CTL_HW, HW_MEMSIZE }; |
498 | 517 | ||
499 | size_t len = sizeof(phys); | 518 | size_t len = sizeof(phys); |
500 | sysctl(mib, 2, &phys, &len, NULL, 0); | 519 | sysctl(mib, 2, &phys, &len, NULL, 0); |
501 | 520 | ||
502 | return phys; | 521 | return (U32)(phys >> 10); |
522 | |||
503 | #elif LL_LINUX | 523 | #elif LL_LINUX |
524 | U64 phys = 0; | ||
525 | phys = (U64)(getpagesize()) * (U64)(get_phys_pages()); | ||
526 | return (U32)(phys >> 10); | ||
504 | 527 | ||
505 | return getpagesize() * get_phys_pages(); | ||
506 | #elif LL_SOLARIS | 528 | #elif LL_SOLARIS |
507 | return getpagesize() * sysconf(_SC_PHYS_PAGES); | 529 | U64 phys = 0; |
530 | phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES)); | ||
531 | return (U32)(phys >> 10); | ||
532 | |||
508 | #else | 533 | #else |
509 | return 0; | 534 | return 0; |
510 | 535 | ||
511 | #endif | 536 | #endif |
512 | } | 537 | } |
513 | 538 | ||
539 | U32 LLMemoryInfo::getPhysicalMemoryClamped() const | ||
540 | { | ||
541 | // Return the total physical memory in bytes, but clamp it | ||
542 | // to no more than U32_MAX | ||
543 | |||
544 | U32 phys_kb = getPhysicalMemoryKB(); | ||
545 | if (phys_kb >= 4194304 /* 4GB in KB */) | ||
546 | { | ||
547 | return U32_MAX; | ||
548 | } | ||
549 | else | ||
550 | { | ||
551 | return phys_kb << 10; | ||
552 | } | ||
553 | } | ||
554 | |||
514 | void LLMemoryInfo::stream(std::ostream& s) const | 555 | void LLMemoryInfo::stream(std::ostream& s) const |
515 | { | 556 | { |
516 | #if LL_WINDOWS | 557 | #if LL_WINDOWS |
517 | MEMORYSTATUS state; | 558 | MEMORYSTATUSEX state; |
518 | state.dwLength = sizeof(state); | 559 | state.dwLength = sizeof(state); |
519 | GlobalMemoryStatus(&state); | 560 | GlobalMemoryStatusEx(&state); |
520 | 561 | ||
521 | s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl; | 562 | s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl; |
522 | s << "Total Physical Kb: " << (U32)state.dwTotalPhys/1024 << std::endl; | 563 | s << "Total Physical KB: " << (U32)(state.ullTotalPhys/1024) << std::endl; |
523 | s << "Avail Physical Kb: " << (U32)state.dwAvailPhys/1024 << std::endl; | 564 | s << "Avail Physical KB: " << (U32)(state.ullAvailPhys/1024) << std::endl; |
524 | s << "Total page Kb: " << (U32)state.dwTotalPageFile/1024 << std::endl; | 565 | s << "Total page KB: " << (U32)(state.ullTotalPageFile/1024) << std::endl; |
525 | s << "Avail page Kb: " << (U32)state.dwAvailPageFile/1024 << std::endl; | 566 | s << "Avail page KB: " << (U32)(state.ullAvailPageFile/1024) << std::endl; |
526 | s << "Total Virtual Kb: " << (U32)state.dwTotalVirtual/1024 << std::endl; | 567 | s << "Total Virtual KB: " << (U32)(state.ullTotalVirtual/1024) << std::endl; |
527 | s << "Avail Virtual Kb: " << (U32)state.dwAvailVirtual/1024 << std::endl; | 568 | s << "Avail Virtual KB: " << (U32)(state.ullAvailVirtual/1024) << std::endl; |
528 | #elif LL_DARWIN | 569 | #elif LL_DARWIN |
529 | U64 phys = 0; | 570 | uint64_t phys = 0; |
530 | 571 | ||
531 | size_t len = sizeof(phys); | 572 | size_t len = sizeof(phys); |
532 | 573 | ||
533 | if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0) | 574 | if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0) |
534 | { | 575 | { |
535 | s << "Total Physical Kb: " << phys/1024 << std::endl; | 576 | s << "Total Physical KB: " << phys/1024 << std::endl; |
536 | } | 577 | } |
537 | else | 578 | else |
538 | { | 579 | { |
@@ -543,7 +584,7 @@ void LLMemoryInfo::stream(std::ostream& s) const | |||
543 | 584 | ||
544 | phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024); | 585 | phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024); |
545 | 586 | ||
546 | s << "Total Physical Kb: " << phys << std::endl; | 587 | s << "Total Physical KB: " << phys << std::endl; |
547 | #else | 588 | #else |
548 | // *NOTE: This works on linux. What will it do on other systems? | 589 | // *NOTE: This works on linux. What will it do on other systems? |
549 | FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb"); | 590 | FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb"); |
diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h index 416bd54..66a3465 100644 --- a/linden/indra/llcommon/llsys.h +++ b/linden/indra/llcommon/llsys.h | |||
@@ -89,13 +89,31 @@ private: | |||
89 | std::string mCPUString; | 89 | std::string mCPUString; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | //============================================================================= | ||
93 | // | ||
94 | // CLASS LLMemoryInfo | ||
95 | |||
92 | class LLMemoryInfo | 96 | class LLMemoryInfo |
97 | |||
98 | /*! @brief Class to query the memory subsystem | ||
99 | |||
100 | @details | ||
101 | Here's how you use an LLMemoryInfo: | ||
102 | |||
103 | LLMemoryInfo info; | ||
104 | <br> llinfos << info << llendl; | ||
105 | */ | ||
93 | { | 106 | { |
94 | public: | 107 | public: |
95 | LLMemoryInfo(); | 108 | LLMemoryInfo(); ///< Default constructor |
96 | void stream(std::ostream& s) const; | 109 | void stream(std::ostream& s) const; ///< output text info to s |
97 | 110 | ||
98 | U32 getPhysicalMemory() const; | 111 | U32 getPhysicalMemoryKB() const; ///< Memory size in KiloBytes |
112 | |||
113 | /*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will | ||
114 | ** be returned. | ||
115 | */ | ||
116 | U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes | ||
99 | }; | 117 | }; |
100 | 118 | ||
101 | 119 | ||
diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h index c863322..d700592 100644 --- a/linden/indra/llcommon/llthread.h +++ b/linden/indra/llcommon/llthread.h | |||
@@ -220,7 +220,7 @@ public: | |||
220 | if (0 == res) | 220 | if (0 == res) |
221 | { | 221 | { |
222 | delete this; | 222 | delete this; |
223 | res = 0; | 223 | return 0; |
224 | } | 224 | } |
225 | return res; | 225 | return res; |
226 | } | 226 | } |
diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp index 6077063..177f1de 100644 --- a/linden/indra/llcommon/lltimer.cpp +++ b/linden/indra/llcommon/lltimer.cpp | |||
@@ -525,13 +525,27 @@ LLEventTimer::~LLEventTimer() | |||
525 | 525 | ||
526 | void LLEventTimer::updateClass() | 526 | void LLEventTimer::updateClass() |
527 | { | 527 | { |
528 | std::list<LLEventTimer*> completed_timers; | ||
528 | for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) | 529 | for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) |
529 | { | 530 | { |
530 | LLEventTimer* timer = *iter++; | 531 | LLEventTimer* timer = *iter++; |
531 | F32 et = timer->mEventTimer.getElapsedTimeF32(); | 532 | F32 et = timer->mEventTimer.getElapsedTimeF32(); |
532 | if (et > timer->mPeriod) { | 533 | if (et > timer->mPeriod) { |
533 | timer->mEventTimer.reset(); | 534 | timer->mEventTimer.reset(); |
534 | timer->tick(); | 535 | if ( timer->tick() ) |
536 | { | ||
537 | completed_timers.push_back( timer ); | ||
538 | } | ||
539 | } | ||
540 | } | ||
541 | |||
542 | if ( completed_timers.size() > 0 ) | ||
543 | { | ||
544 | for (std::list<LLEventTimer*>::iterator completed_iter = completed_timers.begin(); | ||
545 | completed_iter != completed_timers.end(); | ||
546 | completed_iter++ ) | ||
547 | { | ||
548 | delete *completed_iter; | ||
535 | } | 549 | } |
536 | } | 550 | } |
537 | } | 551 | } |
diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h index 37917d0..35f0a7b 100644 --- a/linden/indra/llcommon/lltimer.h +++ b/linden/indra/llcommon/lltimer.h | |||
@@ -142,11 +142,12 @@ void secondsToTimecodeString(F32 current_time, char *tcstring); | |||
142 | class LLEventTimer | 142 | class LLEventTimer |
143 | { | 143 | { |
144 | public: | 144 | public: |
145 | LLEventTimer(F32 period); // period is the amount of time between each call to tick() | 145 | LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds |
146 | virtual ~LLEventTimer(); | 146 | virtual ~LLEventTimer(); |
147 | 147 | ||
148 | //function to be called at the supplied frequency | 148 | //function to be called at the supplied frequency |
149 | virtual void tick() = 0; | 149 | // Normally return FALSE; TRUE will delete the timer after the function returns. |
150 | virtual BOOL tick() = 0; | ||
150 | 151 | ||
151 | static void updateClass(); | 152 | static void updateClass(); |
152 | 153 | ||
diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp index 43d2147..892ac02 100644 --- a/linden/indra/llcommon/lluri.cpp +++ b/linden/indra/llcommon/lluri.cpp | |||
@@ -319,117 +319,6 @@ LLURI LLURI::buildHTTP(const std::string& host, | |||
319 | return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query); | 319 | return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query); |
320 | } | 320 | } |
321 | 321 | ||
322 | namespace { | ||
323 | LLURI buildBackboneURL(LLApp* app, | ||
324 | const std::string& p1 = "", | ||
325 | const std::string& p2 = "", | ||
326 | const std::string& p3 = "") | ||
327 | { | ||
328 | std::string host = "localhost:12040"; | ||
329 | |||
330 | if (app) | ||
331 | { | ||
332 | host = app->getOption("backbone-host-port").asString(); | ||
333 | } | ||
334 | |||
335 | LLSD path = LLSD::emptyArray(); | ||
336 | if (!p1.empty()) path.append(p1); | ||
337 | if (!p2.empty()) path.append(p2); | ||
338 | if (!p3.empty()) path.append(p3); | ||
339 | |||
340 | return LLURI::buildHTTP(host, path); | ||
341 | } | ||
342 | } | ||
343 | |||
344 | #if LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS | ||
345 | // static | ||
346 | LLURI LLURI::buildBulkAgentNamesURI(LLApp* app) | ||
347 | { | ||
348 | std::string host = "localhost:12040"; | ||
349 | |||
350 | if (app) | ||
351 | { | ||
352 | host = app->getOption("backbone-host-port").asString(); | ||
353 | } | ||
354 | |||
355 | LLSD path = LLSD::emptyArray(); | ||
356 | path.append("agent"); | ||
357 | path.append("names"); | ||
358 | |||
359 | return buildHTTP(host, path); | ||
360 | } | ||
361 | |||
362 | // static | ||
363 | LLURI LLURI::buildBulkAgentNamesURI(LLApp* app) | ||
364 | { | ||
365 | std::string host = "localhost:12040"; | ||
366 | |||
367 | if (app) | ||
368 | { | ||
369 | host = app->getOption("backbone-host-port").asString(); | ||
370 | } | ||
371 | |||
372 | LLSD path = LLSD::emptyArray(); | ||
373 | path.append("agent"); | ||
374 | path.append("names"); | ||
375 | |||
376 | return buildHTTP(host, path); | ||
377 | } | ||
378 | |||
379 | // static | ||
380 | LLURI LLURI::buildAgentSessionURI(const LLUUID& agent_id, LLApp* app) | ||
381 | { | ||
382 | return buildBackboneURL(app, "agent", agent_id.asString(), "session"); | ||
383 | } | ||
384 | |||
385 | // static | ||
386 | LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app) | ||
387 | { | ||
388 | std::string host = "localhost:12040"; | ||
389 | |||
390 | if (app) | ||
391 | { | ||
392 | host = app->getOption("backbone-host-port").asString(); | ||
393 | } | ||
394 | |||
395 | LLSD path = LLSD::emptyArray(); | ||
396 | path.append("agent"); | ||
397 | path.append(agent_id); | ||
398 | path.append("name"); | ||
399 | |||
400 | return buildHTTP(host, path); | ||
401 | } | ||
402 | |||
403 | // static | ||
404 | LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app) | ||
405 | { | ||
406 | std::string host = "localhost:12040"; | ||
407 | |||
408 | if (app) | ||
409 | { | ||
410 | host = app->getOption("backbone-host-port").asString(); | ||
411 | } | ||
412 | |||
413 | LLSD path = LLSD::emptyArray(); | ||
414 | path.append("agent"); | ||
415 | path.append(agent_id); | ||
416 | path.append("name"); | ||
417 | |||
418 | return buildHTTP(host, path); | ||
419 | } | ||
420 | |||
421 | // static | ||
422 | LLURI LLURI::buildAgentLoginInfoURI(const LLUUID& agent_id, const std::string& dataserver) | ||
423 | { | ||
424 | LLSD path = LLSD::emptyArray(); | ||
425 | path.append("agent"); | ||
426 | path.append(agent_id); | ||
427 | path.append("logininfo"); | ||
428 | |||
429 | return buildHTTP(dataserver, path); | ||
430 | } | ||
431 | #endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS | ||
432 | |||
433 | std::string LLURI::asString() const | 322 | std::string LLURI::asString() const |
434 | { | 323 | { |
435 | if (mScheme.empty()) | 324 | if (mScheme.empty()) |
diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversionserver.h index 00c3039..0680501 100644 --- a/linden/indra/llcommon/llversion.h +++ b/linden/indra/llcommon/llversionserver.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | * @file llversion.h | 2 | * @file llversionserver.h |
3 | * @brief | 3 | * @brief |
4 | * | 4 | * |
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 5 | * Copyright (c) 2002-2007, Linden Research, Inc. |
@@ -26,12 +26,15 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef LL_LLVERSION_H | 29 | #ifndef LL_LLVERSIONSERVER_H |
30 | #define LL_LLVERSION_H | 30 | #define LL_LLVERSIONSERVER_H |
31 | 31 | ||
32 | const S32 LL_VERSION_MAJOR = 1; | 32 | const S32 LL_VERSION_MAJOR = 1; |
33 | const S32 LL_VERSION_MINOR = 18; | 33 | const S32 LL_VERSION_MINOR = 18; |
34 | const S32 LL_VERSION_PATCH = 2; | 34 | const S32 LL_VERSION_PATCH = 2; |
35 | const S32 LL_VERSION_BUILD = 1; | 35 | const S32 LL_VERSION_BUILD = 0; |
36 | |||
37 | const char * const LL_CHANNEL = "Second Life Server"; | ||
38 | |||
36 | 39 | ||
37 | #endif | 40 | #endif |
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h new file mode 100644 index 0000000..8c001e0 --- /dev/null +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /** | ||
2 | * @file llversionviewer.h | ||
3 | * @brief | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
29 | #ifndef LL_LLVERSIONVIEWER_H | ||
30 | #define LL_LLVERSIONVIEWER_H | ||
31 | |||
32 | const S32 LL_VERSION_MAJOR = 1; | ||
33 | const S32 LL_VERSION_MINOR = 18; | ||
34 | const S32 LL_VERSION_PATCH = 3; | ||
35 | const S32 LL_VERSION_BUILD = 2; | ||
36 | |||
37 | const char * const LL_CHANNEL = "Second Life Release"; | ||
38 | |||
39 | #endif | ||
diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index b846606..fccd7b3 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp | |||
@@ -310,42 +310,15 @@ BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height, | |||
310 | // Should do some simple bounds checking | 310 | // Should do some simple bounds checking |
311 | 311 | ||
312 | U32 i; | 312 | U32 i; |
313 | U32 to_offset; | 313 | for (i = 0; i < height; i++) |
314 | U32 from_offset; | ||
315 | if (!reverse_y) | ||
316 | { | 314 | { |
317 | for (i = 0; i < height; i++) | 315 | const U32 row = reverse_y ? height - 1 - i : i; |
318 | { | 316 | const U32 from_offset = row * ((stride == 0) ? width*getComponents() : stride); |
319 | to_offset = (y_pos + i)*getWidth() + x_pos; | 317 | const U32 to_offset = (y_pos + i)*getWidth() + x_pos; |
320 | if (stride != 0) | 318 | memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */ |
321 | { | 319 | data + from_offset, getComponents()*width); |
322 | from_offset = i*stride; | ||
323 | } | ||
324 | else | ||
325 | { | ||
326 | from_offset = i*width*getComponents(); | ||
327 | } | ||
328 | memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */ | ||
329 | data + from_offset, getComponents()*width); | ||
330 | } | ||
331 | } | ||
332 | else | ||
333 | { | ||
334 | for (i = 0; i < height; i++) | ||
335 | { | ||
336 | to_offset = (y_pos + i)*getWidth() + x_pos; | ||
337 | if (stride != 0) | ||
338 | { | ||
339 | from_offset = (height - 1 - i)*stride; | ||
340 | } | ||
341 | else | ||
342 | { | ||
343 | from_offset = (height - 1 - i)*width*getComponents(); | ||
344 | } | ||
345 | memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */ | ||
346 | data + from_offset, getComponents()*width); | ||
347 | } | ||
348 | } | 320 | } |
321 | |||
349 | return TRUE; | 322 | return TRUE; |
350 | } | 323 | } |
351 | 324 | ||
diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h index cd559ec..e706c0a 100644 --- a/linden/indra/llimage/llimage.h +++ b/linden/indra/llimage/llimage.h | |||
@@ -116,7 +116,7 @@ public: | |||
116 | 116 | ||
117 | static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels); | 117 | static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels); |
118 | 118 | ||
119 | // Function for calculating the download priority for textes | 119 | // Function for calculating the download priority for textures |
120 | // <= 0 priority means that there's no need for more data. | 120 | // <= 0 priority means that there's no need for more data. |
121 | static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent); | 121 | static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent); |
122 | 122 | ||
diff --git a/linden/indra/llimage/llimagej2c.cpp b/linden/indra/llimage/llimagej2c.cpp index b116027..305b11d 100644 --- a/linden/indra/llimage/llimagej2c.cpp +++ b/linden/indra/llimage/llimagej2c.cpp | |||
@@ -152,7 +152,9 @@ void LLImageJ2C::closeDSO() | |||
152 | LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C), | 152 | LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C), |
153 | mMaxBytes(0), | 153 | mMaxBytes(0), |
154 | mRawDiscardLevel(-1), | 154 | mRawDiscardLevel(-1), |
155 | mRate(0.0f) | 155 | mRate(0.0f), |
156 | mReversible(FALSE) | ||
157 | |||
156 | { | 158 | { |
157 | //We assume here that if we wanted to destory via | 159 | //We assume here that if we wanted to destory via |
158 | //a dynamic library that the approriate open calls were made | 160 | //a dynamic library that the approriate open calls were made |
@@ -272,7 +274,7 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time) | |||
272 | BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) | 274 | BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) |
273 | { | 275 | { |
274 | LLMemType mt1((LLMemType::EMemType)mMemType); | 276 | LLMemType mt1((LLMemType::EMemType)mMemType); |
275 | return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time); | 277 | return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible); |
276 | } | 278 | } |
277 | 279 | ||
278 | //static | 280 | //static |
@@ -341,11 +343,11 @@ void LLImageJ2C::setMaxBytes(S32 max_bytes) | |||
341 | { | 343 | { |
342 | mMaxBytes = max_bytes; | 344 | mMaxBytes = max_bytes; |
343 | } | 345 | } |
344 | // NOT USED | 346 | |
345 | // void LLImageJ2C::setReversible(const BOOL reversible) | 347 | void LLImageJ2C::setReversible(const BOOL reversible) |
346 | // { | 348 | { |
347 | // mReversible = reversible; | 349 | mReversible = reversible; |
348 | // } | 350 | } |
349 | 351 | ||
350 | 352 | ||
351 | BOOL LLImageJ2C::loadAndValidate(const LLString &filename) | 353 | BOOL LLImageJ2C::loadAndValidate(const LLString &filename) |
diff --git a/linden/indra/llimage/llimagej2c.h b/linden/indra/llimage/llimagej2c.h index 63ebe38..00cb919 100644 --- a/linden/indra/llimage/llimagej2c.h +++ b/linden/indra/llimage/llimagej2c.h | |||
@@ -79,6 +79,7 @@ protected: | |||
79 | S32 mMaxBytes; // Maximum number of bytes of data to use... | 79 | S32 mMaxBytes; // Maximum number of bytes of data to use... |
80 | S8 mRawDiscardLevel; | 80 | S8 mRawDiscardLevel; |
81 | F32 mRate; | 81 | F32 mRate; |
82 | BOOL mReversible; | ||
82 | LLImageJ2CImpl *mImpl; | 83 | LLImageJ2CImpl *mImpl; |
83 | }; | 84 | }; |
84 | 85 | ||
@@ -100,7 +101,8 @@ protected: | |||
100 | // true: decoding complete (even if it failed) | 101 | // true: decoding complete (even if it failed) |
101 | // false: time expired while decoding | 102 | // false: time expired while decoding |
102 | virtual BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) = 0; | 103 | virtual BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) = 0; |
103 | virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0) = 0; | 104 | virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, |
105 | BOOL reversible=FALSE) = 0; | ||
104 | 106 | ||
105 | friend class LLImageJ2C; | 107 | friend class LLImageJ2C; |
106 | }; | 108 | }; |
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index 9366a62..be6a087 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp | |||
@@ -193,7 +193,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod | |||
193 | } | 193 | } |
194 | 194 | ||
195 | 195 | ||
196 | BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time) | 196 | BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible) |
197 | { | 197 | { |
198 | const S32 MAX_COMPS = 5; | 198 | const S32 MAX_COMPS = 5; |
199 | opj_cparameters_t parameters; /* compression parameters */ | 199 | opj_cparameters_t parameters; /* compression parameters */ |
diff --git a/linden/indra/llimagej2coj/llimagej2coj.h b/linden/indra/llimagej2coj/llimagej2coj.h index 822ebc2..e896b0a 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.h +++ b/linden/indra/llimagej2coj/llimagej2coj.h | |||
@@ -40,7 +40,8 @@ public: | |||
40 | protected: | 40 | protected: |
41 | /*virtual*/ BOOL getMetadata(LLImageJ2C &base); | 41 | /*virtual*/ BOOL getMetadata(LLImageJ2C &base); |
42 | /*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count); | 42 | /*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count); |
43 | /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0); | 43 | /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, |
44 | BOOL reversible = FALSE); | ||
44 | int ceildivpow2(int a, int b) | 45 | int ceildivpow2(int a, int b) |
45 | { | 46 | { |
46 | // Divide a by b to the power of 2 and round upwards. | 47 | // Divide a by b to the power of 2 and round upwards. |
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index c0a33c7..1a25b3d 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -461,6 +461,20 @@ F32 next_power_of_two(F32 value) | |||
461 | return pow(2.0f, power); | 461 | return pow(2.0f, power); |
462 | } | 462 | } |
463 | 463 | ||
464 | F32 nearest_power_of_two(F32 value) | ||
465 | { | ||
466 | // nearest in the linear sense means closest w/r/t a "halfway" point. | ||
467 | // in the exponential sense, the "halfway" point isn't 1/2, it's 1/sqrt(2). | ||
468 | |||
469 | // our windows build hates the math.h defines, so do it here. -qarl | ||
470 | F32 const INVSQRT2 = 0.7071067812f; | ||
471 | |||
472 | F32 answer = next_power_of_two(value * INVSQRT2); | ||
473 | |||
474 | // llwarns << value << " -> " << answer << llendl; | ||
475 | |||
476 | return answer; | ||
477 | } | ||
464 | 478 | ||
465 | 479 | ||
466 | BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted) | 480 | BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted) |
@@ -605,7 +619,7 @@ BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted) | |||
605 | S32 sides = (S32)circle_detail; | 619 | S32 sides = (S32)circle_detail; |
606 | 620 | ||
607 | if (is_sculpted) | 621 | if (is_sculpted) |
608 | sides = (S32)next_power_of_two((F32)sides); | 622 | sides = (S32)nearest_power_of_two((F32)sides - 1); |
609 | 623 | ||
610 | genNGon(sides); | 624 | genNGon(sides); |
611 | 625 | ||
@@ -1152,7 +1166,7 @@ BOOL LLPath::generate(F32 detail, S32 split, BOOL is_sculpted) | |||
1152 | S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions()); | 1166 | S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions()); |
1153 | 1167 | ||
1154 | if (is_sculpted) | 1168 | if (is_sculpted) |
1155 | sides = (S32)next_power_of_two((F32)sides); | 1169 | sides = (S32)nearest_power_of_two((F32)sides - 1); |
1156 | 1170 | ||
1157 | genNGon(sides); | 1171 | genNGon(sides); |
1158 | } | 1172 | } |
@@ -1829,7 +1843,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, | |||
1829 | sNumMeshPoints += mMesh.size(); | 1843 | sNumMeshPoints += mMesh.size(); |
1830 | 1844 | ||
1831 | S32 vertex_change = 0; | 1845 | S32 vertex_change = 0; |
1832 | // first test to see if image has enough variation to create geometry | 1846 | // first test to see if image has enough variation to create non-degenerate geometry |
1833 | if (!data_is_empty) | 1847 | if (!data_is_empty) |
1834 | { | 1848 | { |
1835 | S32 last_index = 0; | 1849 | S32 last_index = 0; |
@@ -1855,12 +1869,13 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, | |||
1855 | 1869 | ||
1856 | if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) + | 1870 | if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) + |
1857 | fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) + | 1871 | fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) + |
1858 | fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 256 * 0.02) | 1872 | fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 0) |
1859 | vertex_change++; | 1873 | vertex_change++; |
1860 | 1874 | ||
1861 | last_index = index; | 1875 | last_index = index; |
1862 | } | 1876 | } |
1863 | if ((F32)vertex_change / sizeS / sizeT < 0.05) // less than 5% | 1877 | |
1878 | if ((F32)vertex_change / sizeS / sizeT < 0.02) // less than 2% | ||
1864 | data_is_empty = TRUE; | 1879 | data_is_empty = TRUE; |
1865 | } | 1880 | } |
1866 | 1881 | ||
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index f8b4c74..36d2e07 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -156,6 +156,7 @@ init () | |||
156 | 156 | ||
157 | if (0 == llgst_init_check(NULL, NULL, NULL)) | 157 | if (0 == llgst_init_check(NULL, NULL, NULL)) |
158 | { | 158 | { |
159 | llwarns << "GST init failed for unspecified reason." << llendl; | ||
159 | return FALSE; | 160 | return FALSE; |
160 | } | 161 | } |
161 | 162 | ||
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc index c00947f..26cefc0 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc +++ b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc | |||
@@ -38,5 +38,4 @@ LL_GST_SYM(true, gst_structure_get_name, G_CONST_RETURN gchar *, const GstStruct | |||
38 | // optional symbols to grab | 38 | // optional symbols to grab |
39 | LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled); | 39 | LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled); |
40 | LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent); | 40 | LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent); |
41 | LL_GST_SYM(false, expected_to_be_missing, void, gboolean enabled); | ||
42 | LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug); | 41 | LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug); |
diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index 8696438..b1d7fef 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp | |||
@@ -365,11 +365,11 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) | |||
365 | LLAssetRequest* tmp = *curiter; | 365 | LLAssetRequest* tmp = *curiter; |
366 | if (tmp->mUpCallback) | 366 | if (tmp->mUpCallback) |
367 | { | 367 | { |
368 | tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error); | 368 | tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error, LL_EXSTAT_NONE); |
369 | } | 369 | } |
370 | if (tmp->mDownCallback) | 370 | if (tmp->mDownCallback) |
371 | { | 371 | { |
372 | tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error); | 372 | tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error, LL_EXSTAT_NONE); |
373 | } | 373 | } |
374 | if (tmp->mInfoCallback) | 374 | if (tmp->mInfoCallback) |
375 | { | 375 | { |
@@ -390,7 +390,7 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType | |||
390 | /////////////////////////////////////////////////////////////////////////// | 390 | /////////////////////////////////////////////////////////////////////////// |
391 | 391 | ||
392 | // IW - uuid is passed by value to avoid side effects, please don't re-add & | 392 | // IW - uuid is passed by value to avoid side effects, please don't re-add & |
393 | void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *,S32), void *user_data, BOOL is_priority) | 393 | void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), void *user_data, BOOL is_priority) |
394 | { | 394 | { |
395 | lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl; | 395 | lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl; |
396 | 396 | ||
@@ -404,7 +404,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo | |||
404 | // Special case early out for NULL uuid | 404 | // Special case early out for NULL uuid |
405 | if (callback) | 405 | if (callback) |
406 | { | 406 | { |
407 | callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE); | 407 | callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); |
408 | } | 408 | } |
409 | return; | 409 | return; |
410 | } | 410 | } |
@@ -459,7 +459,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo | |||
459 | // unless there's a weird error | 459 | // unless there's a weird error |
460 | if (callback) | 460 | if (callback) |
461 | { | 461 | { |
462 | callback(mVFS, uuid, type, user_data, LL_ERR_NOERR); | 462 | callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); |
463 | } | 463 | } |
464 | } | 464 | } |
465 | } | 465 | } |
@@ -502,7 +502,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at | |||
502 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; | 502 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; |
503 | if (callback) | 503 | if (callback) |
504 | { | 504 | { |
505 | callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE); | 505 | callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | } | 508 | } |
@@ -512,7 +512,7 @@ void LLAssetStorage::downloadCompleteCallback( | |||
512 | S32 result, | 512 | S32 result, |
513 | const LLUUID& file_id, | 513 | const LLUUID& file_id, |
514 | LLAssetType::EType file_type, | 514 | LLAssetType::EType file_type, |
515 | void* user_data) | 515 | void* user_data, LLExtStat ext_status) |
516 | { | 516 | { |
517 | lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id | 517 | lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id |
518 | << "," << LLAssetType::lookup(file_type) << llendl; | 518 | << "," << LLAssetType::lookup(file_type) << llendl; |
@@ -566,7 +566,7 @@ void LLAssetStorage::downloadCompleteCallback( | |||
566 | LLAssetRequest* tmp = *curiter; | 566 | LLAssetRequest* tmp = *curiter; |
567 | if (tmp->mDownCallback) | 567 | if (tmp->mDownCallback) |
568 | { | 568 | { |
569 | tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result); | 569 | tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status); |
570 | } | 570 | } |
571 | delete tmp; | 571 | delete tmp; |
572 | } | 572 | } |
@@ -586,7 +586,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen | |||
586 | // Special case early out for NULL uuid | 586 | // Special case early out for NULL uuid |
587 | if (callback) | 587 | if (callback) |
588 | { | 588 | { |
589 | callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE); | 589 | callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); |
590 | } | 590 | } |
591 | return; | 591 | return; |
592 | } | 592 | } |
@@ -642,7 +642,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen | |||
642 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; | 642 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; |
643 | if (callback) | 643 | if (callback) |
644 | { | 644 | { |
645 | callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE); | 645 | callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); |
646 | } | 646 | } |
647 | } | 647 | } |
648 | } | 648 | } |
@@ -653,7 +653,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen | |||
653 | // unless there's a weird error | 653 | // unless there's a weird error |
654 | if (callback) | 654 | if (callback) |
655 | { | 655 | { |
656 | callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR); | 656 | callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); |
657 | } | 657 | } |
658 | } | 658 | } |
659 | } | 659 | } |
@@ -662,7 +662,8 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( | |||
662 | S32 result, | 662 | S32 result, |
663 | const LLUUID& file_id, | 663 | const LLUUID& file_id, |
664 | LLAssetType::EType file_type, | 664 | LLAssetType::EType file_type, |
665 | void* user_data) | 665 | void* user_data, |
666 | LLExtStat ext_status) | ||
666 | { | 667 | { |
667 | LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data; | 668 | LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data; |
668 | if(!req) | 669 | if(!req) |
@@ -693,7 +694,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( | |||
693 | } | 694 | } |
694 | } | 695 | } |
695 | 696 | ||
696 | req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result); | 697 | req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status); |
697 | } | 698 | } |
698 | 699 | ||
699 | void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, | 700 | void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, |
@@ -777,7 +778,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age | |||
777 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; | 778 | llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; |
778 | if (callback) | 779 | if (callback) |
779 | { | 780 | { |
780 | callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE); | 781 | callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); |
781 | } | 782 | } |
782 | } | 783 | } |
783 | } | 784 | } |
@@ -788,7 +789,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age | |||
788 | // unless there's a weird error | 789 | // unless there's a weird error |
789 | if (callback) | 790 | if (callback) |
790 | { | 791 | { |
791 | callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR); | 792 | callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); |
792 | } | 793 | } |
793 | } | 794 | } |
794 | } | 795 | } |
@@ -798,7 +799,8 @@ void LLAssetStorage::downloadInvItemCompleteCallback( | |||
798 | S32 result, | 799 | S32 result, |
799 | const LLUUID& file_id, | 800 | const LLUUID& file_id, |
800 | LLAssetType::EType file_type, | 801 | LLAssetType::EType file_type, |
801 | void* user_data) | 802 | void* user_data, |
803 | LLExtStat ext_status) | ||
802 | { | 804 | { |
803 | LLInvItemRequest *req = (LLInvItemRequest*)user_data; | 805 | LLInvItemRequest *req = (LLInvItemRequest*)user_data; |
804 | if(!req) | 806 | if(!req) |
@@ -828,7 +830,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback( | |||
828 | } | 830 | } |
829 | } | 831 | } |
830 | 832 | ||
831 | req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result); | 833 | req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status); |
832 | } | 834 | } |
833 | 835 | ||
834 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 836 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
@@ -836,7 +838,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback( | |||
836 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 838 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
837 | 839 | ||
838 | // static | 840 | // static |
839 | void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result) // StoreAssetData callback (fixed) | 841 | void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) |
840 | { | 842 | { |
841 | if (!gAssetStorage) | 843 | if (!gAssetStorage) |
842 | { | 844 | { |
@@ -876,10 +878,10 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat | |||
876 | msg->getBOOLFast(_PREHASH_AssetBlock, _PREHASH_Success, success); | 878 | msg->getBOOLFast(_PREHASH_AssetBlock, _PREHASH_Success, success); |
877 | 879 | ||
878 | asset_type = (LLAssetType::EType)asset_type_s8; | 880 | asset_type = (LLAssetType::EType)asset_type_s8; |
879 | this_ptr->_callUploadCallbacks(uuid, asset_type, success); | 881 | this_ptr->_callUploadCallbacks(uuid, asset_type, success, LL_EXSTAT_NONE); |
880 | } | 882 | } |
881 | 883 | ||
882 | void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success) | 884 | void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status ) |
883 | { | 885 | { |
884 | // SJB: We process the callbacks in reverse order, I do not know if this is important, | 886 | // SJB: We process the callbacks in reverse order, I do not know if this is important, |
885 | // but I didn't want to mess with it. | 887 | // but I didn't want to mess with it. |
@@ -913,7 +915,7 @@ void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType | |||
913 | LLAssetRequest* req = *curiter; | 915 | LLAssetRequest* req = *curiter; |
914 | if (req->mUpCallback) | 916 | if (req->mUpCallback) |
915 | { | 917 | { |
916 | req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED )); | 918 | req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED ), ext_status ); |
917 | } | 919 | } |
918 | delete req; | 920 | delete req; |
919 | } | 921 | } |
@@ -1136,11 +1138,11 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::request_list_t* reques | |||
1136 | // Run callbacks. | 1138 | // Run callbacks. |
1137 | if (req->mUpCallback) | 1139 | if (req->mUpCallback) |
1138 | { | 1140 | { |
1139 | req->mUpCallback(req->getUUID(), req->mUserData, error); | 1141 | req->mUpCallback(req->getUUID(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED); |
1140 | } | 1142 | } |
1141 | if (req->mDownCallback) | 1143 | if (req->mDownCallback) |
1142 | { | 1144 | { |
1143 | req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error); | 1145 | req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED); |
1144 | } | 1146 | } |
1145 | if (req->mInfoCallback) | 1147 | if (req->mInfoCallback) |
1146 | { | 1148 | { |
@@ -1193,7 +1195,7 @@ const char* LLAssetStorage::getErrorString(S32 status) | |||
1193 | 1195 | ||
1194 | 1196 | ||
1195 | 1197 | ||
1196 | void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority) | 1198 | void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority) |
1197 | { | 1199 | { |
1198 | // check for duplicates here, since we're about to fool the normal duplicate checker | 1200 | // check for duplicates here, since we're about to fool the normal duplicate checker |
1199 | for (request_list_t::iterator iter = mPendingDownloads.begin(); | 1201 | for (request_list_t::iterator iter = mPendingDownloads.begin(); |
@@ -1223,7 +1225,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo | |||
1223 | } | 1225 | } |
1224 | 1226 | ||
1225 | // static | 1227 | // static |
1226 | void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status) | 1228 | void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status) |
1227 | { | 1229 | { |
1228 | LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data; | 1230 | LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data; |
1229 | char filename[LL_MAX_PATH] = ""; /* Flawfinder: ignore */ | 1231 | char filename[LL_MAX_PATH] = ""; /* Flawfinder: ignore */ |
@@ -1259,7 +1261,7 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAss | |||
1259 | } | 1261 | } |
1260 | } | 1262 | } |
1261 | 1263 | ||
1262 | legacy->mDownCallback(filename, uuid, legacy->mUserData, status); | 1264 | legacy->mDownCallback(filename, uuid, legacy->mUserData, status, ext_status); |
1263 | delete legacy; | 1265 | delete legacy; |
1264 | } | 1266 | } |
1265 | 1267 | ||
@@ -1329,12 +1331,12 @@ void LLAssetStorage::storeAssetData( | |||
1329 | } | 1331 | } |
1330 | 1332 | ||
1331 | // static | 1333 | // static |
1332 | void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status) | 1334 | void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status) |
1333 | { | 1335 | { |
1334 | LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data; | 1336 | LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data; |
1335 | if (legacy && legacy->mUpCallback) | 1337 | if (legacy && legacy->mUpCallback) |
1336 | { | 1338 | { |
1337 | legacy->mUpCallback(uuid, legacy->mUserData, status); | 1339 | legacy->mUpCallback(uuid, legacy->mUserData, status, ext_status); |
1338 | } | 1340 | } |
1339 | delete legacy; | 1341 | delete legacy; |
1340 | } | 1342 | } |
diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h index ab12b7a..630268d 100644 --- a/linden/indra/llmessage/llassetstorage.h +++ b/linden/indra/llmessage/llassetstorage.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "lltransfermanager.h" // For LLTSCode enum | 40 | #include "lltransfermanager.h" // For LLTSCode enum |
41 | #include "llassettype.h" | 41 | #include "llassettype.h" |
42 | #include "llstring.h" | 42 | #include "llstring.h" |
43 | #include "llextendedstatus.h" | ||
43 | 44 | ||
44 | // Forward declarations | 45 | // Forward declarations |
45 | class LLMessageSystem; | 46 | class LLMessageSystem; |
@@ -102,8 +103,8 @@ protected: | |||
102 | LLAssetType::EType mType; | 103 | LLAssetType::EType mType; |
103 | 104 | ||
104 | public: | 105 | public: |
105 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32); | 106 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat); |
106 | void (*mUpCallback)(const LLUUID&, void *, S32); | 107 | void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat); |
107 | void (*mInfoCallback)(LLAssetInfo *, void *, S32); | 108 | void (*mInfoCallback)(LLAssetInfo *, void *, S32); |
108 | 109 | ||
109 | void *mUserData; | 110 | void *mUserData; |
@@ -150,7 +151,7 @@ protected: | |||
150 | LLAssetType::EType mType; | 151 | LLAssetType::EType mType; |
151 | 152 | ||
152 | public: | 153 | public: |
153 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32); | 154 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat); |
154 | 155 | ||
155 | void *mUserData; | 156 | void *mUserData; |
156 | LLHost mHost; | 157 | LLHost mHost; |
@@ -180,7 +181,7 @@ protected: | |||
180 | EstateAssetType mEstateAssetType; | 181 | EstateAssetType mEstateAssetType; |
181 | 182 | ||
182 | public: | 183 | public: |
183 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32); | 184 | void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat); |
184 | 185 | ||
185 | void *mUserData; | 186 | void *mUserData; |
186 | LLHost mHost; | 187 | LLHost mHost; |
@@ -196,14 +197,14 @@ public: | |||
196 | 197 | ||
197 | 198 | ||
198 | typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id, | 199 | typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id, |
199 | LLAssetType::EType asset_type, void *user_data, S32 status); | 200 | LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status); |
200 | 201 | ||
201 | class LLAssetStorage | 202 | class LLAssetStorage |
202 | { | 203 | { |
203 | public: | 204 | public: |
204 | // VFS member is public because static child methods need it :( | 205 | // VFS member is public because static child methods need it :( |
205 | LLVFS *mVFS; | 206 | LLVFS *mVFS; |
206 | typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status); | 207 | typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status, LLExtStat ext_status); |
207 | 208 | ||
208 | enum ERequestType | 209 | enum ERequestType |
209 | { | 210 | { |
@@ -335,27 +336,27 @@ public: | |||
335 | S32 result, | 336 | S32 result, |
336 | const LLUUID& file_id, | 337 | const LLUUID& file_id, |
337 | LLAssetType::EType file_type, | 338 | LLAssetType::EType file_type, |
338 | void* user_data); | 339 | void* user_data, LLExtStat ext_status); |
339 | static void downloadEstateAssetCompleteCallback( | 340 | static void downloadEstateAssetCompleteCallback( |
340 | S32 result, | 341 | S32 result, |
341 | const LLUUID& file_id, | 342 | const LLUUID& file_id, |
342 | LLAssetType::EType file_type, | 343 | LLAssetType::EType file_type, |
343 | void* user_data); | 344 | void* user_data, LLExtStat ext_status); |
344 | static void downloadInvItemCompleteCallback( | 345 | static void downloadInvItemCompleteCallback( |
345 | S32 result, | 346 | S32 result, |
346 | const LLUUID& file_id, | 347 | const LLUUID& file_id, |
347 | LLAssetType::EType file_type, | 348 | LLAssetType::EType file_type, |
348 | void* user_data); | 349 | void* user_data, LLExtStat ext_status); |
349 | 350 | ||
350 | // upload process callbacks | 351 | // upload process callbacks |
351 | static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result); | 352 | static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result, LLExtStat ext_status); |
352 | static void processUploadComplete(LLMessageSystem *msg, void **this_handle); | 353 | static void processUploadComplete(LLMessageSystem *msg, void **this_handle); |
353 | 354 | ||
354 | // debugging | 355 | // debugging |
355 | static const char* getErrorString( S32 status ); | 356 | static const char* getErrorString( S32 status ); |
356 | 357 | ||
357 | // deprecated file-based methods | 358 | // deprecated file-based methods |
358 | void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority = FALSE); | 359 | void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE); |
359 | 360 | ||
360 | /* | 361 | /* |
361 | * AssetID version. | 362 | * AssetID version. |
@@ -385,8 +386,8 @@ public: | |||
385 | bool user_waiting = false, | 386 | bool user_waiting = false, |
386 | F64 timeout = LL_ASSET_STORAGE_TIMEOUT); | 387 | F64 timeout = LL_ASSET_STORAGE_TIMEOUT); |
387 | 388 | ||
388 | static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status); | 389 | static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status, LLExtStat ext_status); |
389 | static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status); | 390 | static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status); |
390 | 391 | ||
391 | // Temp assets are stored on sim nodes, they have agent ID and location data associated with them. | 392 | // Temp assets are stored on sim nodes, they have agent ID and location data associated with them. |
392 | // This is a no-op for non-http asset systems | 393 | // This is a no-op for non-http asset systems |
@@ -404,10 +405,10 @@ public: | |||
404 | 405 | ||
405 | protected: | 406 | protected: |
406 | void _cleanupRequests(BOOL all, S32 error); | 407 | void _cleanupRequests(BOOL all, S32 error); |
407 | void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success); | 408 | void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status); |
408 | 409 | ||
409 | virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, | 410 | virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, |
410 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32), | 411 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), |
411 | void *user_data, BOOL duplicate, | 412 | void *user_data, BOOL duplicate, |
412 | BOOL is_priority); | 413 | BOOL is_priority); |
413 | 414 | ||
@@ -425,7 +426,7 @@ private: | |||
425 | class LLLegacyAssetRequest | 426 | class LLLegacyAssetRequest |
426 | { | 427 | { |
427 | public: | 428 | public: |
428 | void (*mDownCallback)(const char *, const LLUUID&, void *, S32); | 429 | void (*mDownCallback)(const char *, const LLUUID&, void *, S32, LLExtStat); |
429 | LLAssetStorage::LLStoreAssetCallback mUpCallback; | 430 | LLAssetStorage::LLStoreAssetCallback mUpCallback; |
430 | 431 | ||
431 | void *mUserData; | 432 | void *mUserData; |
diff --git a/linden/indra/llmessage/llcircuit.cpp b/linden/indra/llmessage/llcircuit.cpp index 239c1df..3c947d9 100644 --- a/linden/indra/llmessage/llcircuit.cpp +++ b/linden/indra/llmessage/llcircuit.cpp | |||
@@ -1158,7 +1158,7 @@ std::ostream& operator<<(std::ostream& s, LLCircuitData& circuit) | |||
1158 | s << S32(circuit.mBytesInLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f); | 1158 | s << S32(circuit.mBytesInLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f); |
1159 | s << "/"; | 1159 | s << "/"; |
1160 | s << S32(circuit.mBytesOutLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f); | 1160 | s << S32(circuit.mBytesOutLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f); |
1161 | s << " Peak Kbps: "; | 1161 | s << " Peak kbps: "; |
1162 | s << S32(circuit.mPeakBPSIn / 1024.f); | 1162 | s << S32(circuit.mPeakBPSIn / 1024.f); |
1163 | s << "/"; | 1163 | s << "/"; |
1164 | s << S32(circuit.mPeakBPSOut / 1024.f); | 1164 | s << S32(circuit.mPeakBPSOut / 1024.f); |
diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp index b6c20b9..924d903 100644 --- a/linden/indra/llmessage/llhttpassetstorage.cpp +++ b/linden/indra/llmessage/llhttpassetstorage.cpp | |||
@@ -464,7 +464,7 @@ void LLHTTPAssetStorage::storeAssetData( | |||
464 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl; | 464 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl; |
465 | if (callback) | 465 | if (callback) |
466 | { | 466 | { |
467 | callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE ); | 467 | callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE); |
468 | } | 468 | } |
469 | } | 469 | } |
470 | } | 470 | } |
@@ -529,7 +529,7 @@ void LLHTTPAssetStorage::storeAssetData( | |||
529 | { | 529 | { |
530 | if (callback) | 530 | if (callback) |
531 | { | 531 | { |
532 | callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE); | 532 | callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE); |
533 | } | 533 | } |
534 | } | 534 | } |
535 | // Coverity CID-269 says there's a leak of 'legacy' here, but | 535 | // Coverity CID-269 says there's a leak of 'legacy' here, but |
@@ -631,7 +631,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, | |||
631 | { | 631 | { |
632 | if (pending_req->mUpCallback) //Clean up here rather than _callUploadCallbacks because this request is already cleared the req. | 632 | if (pending_req->mUpCallback) //Clean up here rather than _callUploadCallbacks because this request is already cleared the req. |
633 | { | 633 | { |
634 | pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1); | 634 | pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1, LL_EXSTAT_REQUEST_DROPPED); |
635 | } | 635 | } |
636 | 636 | ||
637 | } | 637 | } |
@@ -657,7 +657,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, | |||
657 | 657 | ||
658 | // internal requester, used by getAssetData in superclass | 658 | // internal requester, used by getAssetData in superclass |
659 | void LLHTTPAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, | 659 | void LLHTTPAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, |
660 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32), | 660 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), |
661 | void *user_data, BOOL duplicate, | 661 | void *user_data, BOOL duplicate, |
662 | BOOL is_priority) | 662 | BOOL is_priority) |
663 | { | 663 | { |
@@ -922,7 +922,7 @@ void LLHTTPAssetStorage::checkForTimeouts() | |||
922 | { | 922 | { |
923 | // shared upload finished callback | 923 | // shared upload finished callback |
924 | // in the base class, this is called from processUploadComplete | 924 | // in the base class, this is called from processUploadComplete |
925 | _callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0)); | 925 | _callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0), LL_EXSTAT_CURL_RESULT | curl_result); |
926 | // Pending upload flag will get cleared when the request is deleted | 926 | // Pending upload flag will get cleared when the request is deleted |
927 | } | 927 | } |
928 | } | 928 | } |
@@ -964,7 +964,8 @@ void LLHTTPAssetStorage::checkForTimeouts() | |||
964 | xfer_result, | 964 | xfer_result, |
965 | req->getUUID(), | 965 | req->getUUID(), |
966 | req->getType(), | 966 | req->getType(), |
967 | (void *)req); | 967 | (void *)req, |
968 | LL_EXSTAT_CURL_RESULT | curl_result); | ||
968 | // Pending download flag will get cleared when the request is deleted | 969 | // Pending download flag will get cleared when the request is deleted |
969 | } | 970 | } |
970 | else | 971 | else |
@@ -1389,3 +1390,4 @@ void LLHTTPAssetStorage::clearTempAssetData() | |||
1389 | mTempAssets.clear(); | 1390 | mTempAssets.clear(); |
1390 | } | 1391 | } |
1391 | 1392 | ||
1393 | |||
diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h index 962bece..7fee143 100644 --- a/linden/indra/llmessage/llhttpassetstorage.h +++ b/linden/indra/llmessage/llhttpassetstorage.h | |||
@@ -128,7 +128,7 @@ public: | |||
128 | 128 | ||
129 | protected: | 129 | protected: |
130 | void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, | 130 | void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, |
131 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32), | 131 | void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), |
132 | void *user_data, BOOL duplicate, BOOL is_priority); | 132 | void *user_data, BOOL duplicate, BOOL is_priority); |
133 | 133 | ||
134 | private: | 134 | private: |
diff --git a/linden/indra/llmessage/llmessageconfig.cpp b/linden/indra/llmessage/llmessageconfig.cpp index 6ecb1ad..a619e80 100644 --- a/linden/indra/llmessage/llmessageconfig.cpp +++ b/linden/indra/llmessage/llmessageconfig.cpp | |||
@@ -163,7 +163,7 @@ void LLMessageConfigFile::loadMessageBans(const LLSD& data) | |||
163 | 163 | ||
164 | bool LLMessageConfigFile::isCapBanned(const std::string& cap_name) const | 164 | bool LLMessageConfigFile::isCapBanned(const std::string& cap_name) const |
165 | { | 165 | { |
166 | llinfos << "mCapBans is " << LLSDXMLStreamer(mCapBans) << llendl; | 166 | lldebugs << "mCapBans is " << LLSDNotationStreamer(mCapBans) << llendl; |
167 | return mCapBans[cap_name]; | 167 | return mCapBans[cap_name]; |
168 | } | 168 | } |
169 | 169 | ||
diff --git a/linden/indra/llmessage/llsdmessagebuilder.cpp b/linden/indra/llmessage/llsdmessagebuilder.cpp index d3dcd5b..f8fb30e 100755 --- a/linden/indra/llmessage/llsdmessagebuilder.cpp +++ b/linden/indra/llmessage/llsdmessagebuilder.cpp | |||
@@ -276,7 +276,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data) | |||
276 | void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg) | 276 | void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg) |
277 | { | 277 | { |
278 | mCurrentMessage = msg; | 278 | mCurrentMessage = msg; |
279 | lldebugs << LLSDXMLStreamer(mCurrentMessage) << llendl; | 279 | lldebugs << LLSDNotationStreamer(mCurrentMessage) << llendl; |
280 | } | 280 | } |
281 | 281 | ||
282 | const LLSD& LLSDMessageBuilder::getMessage() const | 282 | const LLSD& LLSDMessageBuilder::getMessage() const |
diff --git a/linden/indra/llmessage/llteleportflags.h b/linden/indra/llmessage/llteleportflags.h index 60916bd..a40b081 100644 --- a/linden/indra/llmessage/llteleportflags.h +++ b/linden/indra/llmessage/llteleportflags.h | |||
@@ -45,6 +45,7 @@ const U32 TELEPORT_FLAGS_DISABLE_CANCEL = 1 << 11; // Used for llTeleportAgentH | |||
45 | const U32 TELEPORT_FLAGS_VIA_REGION_ID = 1 << 12; | 45 | const U32 TELEPORT_FLAGS_VIA_REGION_ID = 1 << 12; |
46 | const U32 TELEPORT_FLAGS_IS_FLYING = 1 << 13; | 46 | const U32 TELEPORT_FLAGS_IS_FLYING = 1 << 13; |
47 | const U32 TELEPORT_FLAGS_SHOW_RESET_HOME = 1 << 14; | 47 | const U32 TELEPORT_FLAGS_SHOW_RESET_HOME = 1 << 14; |
48 | const U32 TELEPORT_FLAGS_FORCE_REDIRECT = 1 << 15; // used to force a redirect to some random location - used when kicking someone from land. | ||
48 | 49 | ||
49 | const U32 TELEPORT_FLAGS_MASK_VIA = TELEPORT_FLAGS_VIA_LURE | 50 | const U32 TELEPORT_FLAGS_MASK_VIA = TELEPORT_FLAGS_VIA_LURE |
50 | | TELEPORT_FLAGS_VIA_LANDMARK | 51 | | TELEPORT_FLAGS_VIA_LANDMARK |
diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp index 329d2a8..4cde483 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.cpp +++ b/linden/indra/llmessage/lltemplatemessagereader.cpp | |||
@@ -502,12 +502,15 @@ BOOL LLTemplateMessageReader::decodeTemplate( | |||
502 | return(TRUE); | 502 | return(TRUE); |
503 | } | 503 | } |
504 | 504 | ||
505 | void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host ) | 505 | void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) |
506 | { | 506 | { |
507 | // we've run off the end of the packet! | 507 | // we've run off the end of the packet! |
508 | llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName | 508 | llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName |
509 | // << " with id " << mCurrentRecvPacketID | 509 | // << " with id " << mCurrentRecvPacketID |
510 | << " from " << host | 510 | << " from " << host |
511 | << " trying to read " << wanted | ||
512 | << " bytes at position " << where | ||
513 | << " going past packet end at " << mReceiveSize | ||
511 | << llendl; | 514 | << llendl; |
512 | if(gMessageSystem->mVerboseLog) | 515 | if(gMessageSystem->mVerboseLog) |
513 | { | 516 | { |
@@ -562,7 +565,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender | |||
562 | // repeat number is a single byte | 565 | // repeat number is a single byte |
563 | if (decode_pos >= mReceiveSize) | 566 | if (decode_pos >= mReceiveSize) |
564 | { | 567 | { |
565 | logRanOffEndOfPacket(sender); | 568 | logRanOffEndOfPacket(sender, decode_pos, 1); |
566 | 569 | ||
567 | // default to 0 repeats | 570 | // default to 0 repeats |
568 | repeat_number = 0; | 571 | repeat_number = 0; |
@@ -621,7 +624,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender | |||
621 | 624 | ||
622 | if ((decode_pos + data_size) > mReceiveSize) | 625 | if ((decode_pos + data_size) > mReceiveSize) |
623 | { | 626 | { |
624 | logRanOffEndOfPacket(sender); | 627 | logRanOffEndOfPacket(sender, decode_pos, data_size); |
625 | 628 | ||
626 | // default to 0 length variable blocks | 629 | // default to 0 length variable blocks |
627 | tsize = 0; | 630 | tsize = 0; |
@@ -657,7 +660,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender | |||
657 | // so, copy data pointer and set data size to fixed size | 660 | // so, copy data pointer and set data size to fixed size |
658 | if ((decode_pos + mvci.getSize()) > mReceiveSize) | 661 | if ((decode_pos + mvci.getSize()) > mReceiveSize) |
659 | { | 662 | { |
660 | logRanOffEndOfPacket(sender); | 663 | logRanOffEndOfPacket(sender, decode_pos, mvci.getSize()); |
661 | 664 | ||
662 | // default to 0s. | 665 | // default to 0s. |
663 | U32 size = mvci.getSize(); | 666 | U32 size = mvci.getSize(); |
diff --git a/linden/indra/llmessage/lltemplatemessagereader.h b/linden/indra/llmessage/lltemplatemessagereader.h index 86d4ab6..687b75b 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.h +++ b/linden/indra/llmessage/lltemplatemessagereader.h | |||
@@ -113,7 +113,7 @@ private: | |||
113 | BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs | 113 | BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs |
114 | LLMessageTemplate** msg_template ); // outputs | 114 | LLMessageTemplate** msg_template ); // outputs |
115 | 115 | ||
116 | void logRanOffEndOfPacket( const LLHost& host ); | 116 | void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ); |
117 | 117 | ||
118 | BOOL decodeData(const U8* buffer, const LLHost& sender ); | 118 | BOOL decodeData(const U8* buffer, const LLHost& sender ); |
119 | 119 | ||
diff --git a/linden/indra/llmessage/lltransfersourceasset.cpp b/linden/indra/llmessage/lltransfersourceasset.cpp index 31094c1..cfc7561 100644 --- a/linden/indra/llmessage/lltransfersourceasset.cpp +++ b/linden/indra/llmessage/lltransfersourceasset.cpp | |||
@@ -174,7 +174,7 @@ BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp) | |||
174 | 174 | ||
175 | 175 | ||
176 | void LLTransferSourceAsset::responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, | 176 | void LLTransferSourceAsset::responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, |
177 | void *user_data, S32 result) | 177 | void *user_data, S32 result, LLExtStat ext_status ) |
178 | { | 178 | { |
179 | LLUUID *tidp = ((LLUUID*) user_data); | 179 | LLUUID *tidp = ((LLUUID*) user_data); |
180 | LLUUID transfer_id = *(tidp); | 180 | LLUUID transfer_id = *(tidp); |
diff --git a/linden/indra/llmessage/lltransfersourceasset.h b/linden/indra/llmessage/lltransfersourceasset.h index 7b1aa63..b953f78 100644 --- a/linden/indra/llmessage/lltransfersourceasset.h +++ b/linden/indra/llmessage/lltransfersourceasset.h | |||
@@ -59,7 +59,7 @@ public: | |||
59 | virtual ~LLTransferSourceAsset(); | 59 | virtual ~LLTransferSourceAsset(); |
60 | 60 | ||
61 | static void responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, | 61 | static void responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, |
62 | void *user_data, S32 result); | 62 | void *user_data, S32 result, LLExtStat ext_status ); |
63 | protected: | 63 | protected: |
64 | /*virtual*/ void initTransfer(); | 64 | /*virtual*/ void initTransfer(); |
65 | /*virtual*/ F32 updatePriority(); | 65 | /*virtual*/ F32 updatePriority(); |
diff --git a/linden/indra/llmessage/lltransfertargetvfile.cpp b/linden/indra/llmessage/lltransfertargetvfile.cpp index 79919b8..6f2252d 100644 --- a/linden/indra/llmessage/lltransfertargetvfile.cpp +++ b/linden/indra/llmessage/lltransfertargetvfile.cpp | |||
@@ -215,6 +215,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status) | |||
215 | mParams.mCompleteCallback(err_code, | 215 | mParams.mCompleteCallback(err_code, |
216 | mParams.getAssetID(), | 216 | mParams.getAssetID(), |
217 | mParams.getAssetType(), | 217 | mParams.getAssetType(), |
218 | mParams.mUserDatap); | 218 | mParams.mUserDatap, |
219 | LL_EXSTAT_NONE); | ||
219 | } | 220 | } |
220 | } | 221 | } |
diff --git a/linden/indra/llmessage/lltransfertargetvfile.h b/linden/indra/llmessage/lltransfertargetvfile.h index 6ba8745..98fcbc9 100644 --- a/linden/indra/llmessage/lltransfertargetvfile.h +++ b/linden/indra/llmessage/lltransfertargetvfile.h | |||
@@ -41,7 +41,7 @@ typedef void (*LLTTVFCompleteCallback)( | |||
41 | S32 status, | 41 | S32 status, |
42 | const LLUUID& file_id, | 42 | const LLUUID& file_id, |
43 | LLAssetType::EType file_type, | 43 | LLAssetType::EType file_type, |
44 | void* user_data); | 44 | void* user_data, LLExtStat ext_status ); |
45 | 45 | ||
46 | class LLTransferTargetParamsVFile : public LLTransferTargetParams | 46 | class LLTransferTargetParamsVFile : public LLTransferTargetParams |
47 | { | 47 | { |
diff --git a/linden/indra/llmessage/llxfer.cpp b/linden/indra/llmessage/llxfer.cpp index e12996d..4647980 100644 --- a/linden/indra/llmessage/llxfer.cpp +++ b/linden/indra/llmessage/llxfer.cpp | |||
@@ -301,7 +301,7 @@ S32 LLXfer::processEOF() | |||
301 | 301 | ||
302 | if (mCallback) | 302 | if (mCallback) |
303 | { | 303 | { |
304 | mCallback(mCallbackDataHandle,mCallbackResult); | 304 | mCallback(mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE); |
305 | } | 305 | } |
306 | 306 | ||
307 | return(retval); | 307 | return(retval); |
@@ -375,3 +375,4 @@ std::ostream& operator<< (std::ostream& os, LLXfer &hh) | |||
375 | 375 | ||
376 | 376 | ||
377 | 377 | ||
378 | |||
diff --git a/linden/indra/llmessage/llxfer.h b/linden/indra/llmessage/llxfer.h index 51d7731..de93dba 100644 --- a/linden/indra/llmessage/llxfer.h +++ b/linden/indra/llmessage/llxfer.h | |||
@@ -67,7 +67,7 @@ class LLXfer | |||
67 | 67 | ||
68 | BOOL mWaitingForACK; | 68 | BOOL mWaitingForACK; |
69 | 69 | ||
70 | void (*mCallback)(void **,S32); | 70 | void (*mCallback)(void **,S32,LLExtStat); |
71 | void **mCallbackDataHandle; | 71 | void **mCallbackDataHandle; |
72 | S32 mCallbackResult; | 72 | S32 mCallbackResult; |
73 | 73 | ||
@@ -116,3 +116,4 @@ class LLXfer | |||
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | |||
diff --git a/linden/indra/llmessage/llxfer_file.cpp b/linden/indra/llmessage/llxfer_file.cpp index b36dd5a..7478316 100644 --- a/linden/indra/llmessage/llxfer_file.cpp +++ b/linden/indra/llmessage/llxfer_file.cpp | |||
@@ -123,7 +123,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id, | |||
123 | ELLPath remote_path, | 123 | ELLPath remote_path, |
124 | const LLHost& remote_host, | 124 | const LLHost& remote_host, |
125 | BOOL delete_remote_on_completion, | 125 | BOOL delete_remote_on_completion, |
126 | void (*callback)(void**,S32), | 126 | void (*callback)(void**,S32,LLExtStat), |
127 | void** user_data) | 127 | void** user_data) |
128 | { | 128 | { |
129 | S32 retval = 0; // presume success | 129 | S32 retval = 0; // presume success |
diff --git a/linden/indra/llmessage/llxfer_file.h b/linden/indra/llmessage/llxfer_file.h index 6a9ee51..4d34acb 100644 --- a/linden/indra/llmessage/llxfer_file.h +++ b/linden/indra/llmessage/llxfer_file.h | |||
@@ -60,7 +60,7 @@ class LLXfer_File : public LLXfer | |||
60 | ELLPath remote_path, | 60 | ELLPath remote_path, |
61 | const LLHost& remote_host, | 61 | const LLHost& remote_host, |
62 | BOOL delete_remote_on_completion, | 62 | BOOL delete_remote_on_completion, |
63 | void (*callback)(void**,S32), | 63 | void (*callback)(void**,S32,LLExtStat), |
64 | void** user_data); | 64 | void** user_data); |
65 | virtual S32 startDownload(); | 65 | virtual S32 startDownload(); |
66 | 66 | ||
@@ -86,3 +86,4 @@ class LLXfer_File : public LLXfer | |||
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | |||
diff --git a/linden/indra/llmessage/llxfer_mem.cpp b/linden/indra/llmessage/llxfer_mem.cpp index 0f055c8..223ce08 100644 --- a/linden/indra/llmessage/llxfer_mem.cpp +++ b/linden/indra/llmessage/llxfer_mem.cpp | |||
@@ -136,7 +136,7 @@ S32 LLXfer_Mem::processEOF() | |||
136 | 136 | ||
137 | if (mCallback) | 137 | if (mCallback) |
138 | { | 138 | { |
139 | mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult); | 139 | mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE); |
140 | } | 140 | } |
141 | 141 | ||
142 | return(retval); | 142 | return(retval); |
@@ -149,7 +149,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id, | |||
149 | ELLPath remote_path, | 149 | ELLPath remote_path, |
150 | const LLHost& remote_host, | 150 | const LLHost& remote_host, |
151 | BOOL delete_remote_on_completion, | 151 | BOOL delete_remote_on_completion, |
152 | void (*callback)(void*,S32,void**,S32), | 152 | void (*callback)(void*,S32,void**,S32,LLExtStat), |
153 | void** user_data) | 153 | void** user_data) |
154 | { | 154 | { |
155 | S32 retval = 0; // presume success | 155 | S32 retval = 0; // presume success |
@@ -218,3 +218,4 @@ U32 LLXfer_Mem::getXferTypeTag() | |||
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
221 | |||
diff --git a/linden/indra/llmessage/llxfer_mem.h b/linden/indra/llmessage/llxfer_mem.h index b80807a..8523c7d 100644 --- a/linden/indra/llmessage/llxfer_mem.h +++ b/linden/indra/llmessage/llxfer_mem.h | |||
@@ -40,7 +40,7 @@ class LLXfer_Mem : public LLXfer | |||
40 | { | 40 | { |
41 | private: | 41 | private: |
42 | protected: | 42 | protected: |
43 | void (*mCallback)(void *, S32, void **,S32); | 43 | void (*mCallback)(void *, S32, void **, S32, LLExtStat); |
44 | char mRemoteFilename[LL_MAX_PATH]; /* Flawfinder : ignore */ | 44 | char mRemoteFilename[LL_MAX_PATH]; /* Flawfinder : ignore */ |
45 | ELLPath mRemotePath; | 45 | ELLPath mRemotePath; |
46 | BOOL mDeleteRemoteOnCompletion; | 46 | BOOL mDeleteRemoteOnCompletion; |
@@ -65,7 +65,7 @@ class LLXfer_Mem : public LLXfer | |||
65 | ELLPath remote_path, | 65 | ELLPath remote_path, |
66 | const LLHost& remote_host, | 66 | const LLHost& remote_host, |
67 | BOOL delete_remote_on_completion, | 67 | BOOL delete_remote_on_completion, |
68 | void (*callback)(void*,S32,void**,S32), | 68 | void (*callback)(void*,S32,void**,S32,LLExtStat), |
69 | void** user_data); | 69 | void** user_data); |
70 | virtual S32 startDownload(); | 70 | virtual S32 startDownload(); |
71 | 71 | ||
@@ -79,3 +79,4 @@ class LLXfer_Mem : public LLXfer | |||
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
82 | |||
diff --git a/linden/indra/llmessage/llxfer_vfile.cpp b/linden/indra/llmessage/llxfer_vfile.cpp index 0d0d5fe..54b9683 100644 --- a/linden/indra/llmessage/llxfer_vfile.cpp +++ b/linden/indra/llmessage/llxfer_vfile.cpp | |||
@@ -98,7 +98,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id, | |||
98 | const LLUUID& remote_id, | 98 | const LLUUID& remote_id, |
99 | LLAssetType::EType type, | 99 | LLAssetType::EType type, |
100 | const LLHost& remote_host, | 100 | const LLHost& remote_host, |
101 | void (*callback)(void**,S32), | 101 | void (*callback)(void**,S32,LLExtStat), |
102 | void** user_data) | 102 | void** user_data) |
103 | { | 103 | { |
104 | S32 retval = 0; // presume success | 104 | S32 retval = 0; // presume success |
diff --git a/linden/indra/llmessage/llxfer_vfile.h b/linden/indra/llmessage/llxfer_vfile.h index e71a0e8..1362749 100644 --- a/linden/indra/llmessage/llxfer_vfile.h +++ b/linden/indra/llmessage/llxfer_vfile.h | |||
@@ -65,7 +65,7 @@ class LLXfer_VFile : public LLXfer | |||
65 | const LLUUID &remote_id, | 65 | const LLUUID &remote_id, |
66 | const LLAssetType::EType type, | 66 | const LLAssetType::EType type, |
67 | const LLHost &remote_host, | 67 | const LLHost &remote_host, |
68 | void (*callback)(void **,S32), | 68 | void (*callback)(void **,S32,LLExtStat), |
69 | void **user_data); | 69 | void **user_data); |
70 | virtual S32 startDownload(); | 70 | virtual S32 startDownload(); |
71 | 71 | ||
@@ -92,3 +92,4 @@ class LLXfer_VFile : public LLXfer | |||
92 | 92 | ||
93 | 93 | ||
94 | 94 | ||
95 | |||
diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp index 7758a32..b9a2c3e 100644 --- a/linden/indra/llmessage/llxfermanager.cpp +++ b/linden/indra/llmessage/llxfermanager.cpp | |||
@@ -396,7 +396,7 @@ void LLXferManager::requestFile(const char* local_filename, | |||
396 | ELLPath remote_path, | 396 | ELLPath remote_path, |
397 | const LLHost& remote_host, | 397 | const LLHost& remote_host, |
398 | BOOL delete_remote_on_completion, | 398 | BOOL delete_remote_on_completion, |
399 | void (*callback)(void**,S32), | 399 | void (*callback)(void**,S32,LLExtStat), |
400 | void** user_data, | 400 | void** user_data, |
401 | BOOL is_priority, | 401 | BOOL is_priority, |
402 | BOOL use_big_packets) | 402 | BOOL use_big_packets) |
@@ -453,7 +453,7 @@ void LLXferManager::requestFile(const char* remote_filename, | |||
453 | ELLPath remote_path, | 453 | ELLPath remote_path, |
454 | const LLHost& remote_host, | 454 | const LLHost& remote_host, |
455 | BOOL delete_remote_on_completion, | 455 | BOOL delete_remote_on_completion, |
456 | void (*callback)(void*,S32,void**,S32), | 456 | void (*callback)(void*,S32,void**,S32,LLExtStat), |
457 | void** user_data, | 457 | void** user_data, |
458 | BOOL is_priority) | 458 | BOOL is_priority) |
459 | { | 459 | { |
@@ -481,7 +481,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id, | |||
481 | const LLUUID& remote_id, | 481 | const LLUUID& remote_id, |
482 | LLAssetType::EType type, LLVFS* vfs, | 482 | LLAssetType::EType type, LLVFS* vfs, |
483 | const LLHost& remote_host, | 483 | const LLHost& remote_host, |
484 | void (*callback)(void**, S32), | 484 | void (*callback)(void**,S32,LLExtStat), |
485 | void** user_data, | 485 | void** user_data, |
486 | BOOL is_priority) | 486 | BOOL is_priority) |
487 | { | 487 | { |
@@ -1151,3 +1151,4 @@ void process_abort_xfer(LLMessageSystem *mesgsys, void **user_data) | |||
1151 | 1151 | ||
1152 | 1152 | ||
1153 | 1153 | ||
1154 | |||
diff --git a/linden/indra/llmessage/llxfermanager.h b/linden/indra/llmessage/llxfermanager.h index 7b529ad..62969d9 100644 --- a/linden/indra/llmessage/llxfermanager.h +++ b/linden/indra/llmessage/llxfermanager.h | |||
@@ -145,7 +145,7 @@ class LLXferManager | |||
145 | ELLPath remote_path, | 145 | ELLPath remote_path, |
146 | const LLHost& remote_host, | 146 | const LLHost& remote_host, |
147 | BOOL delete_remote_on_completion, | 147 | BOOL delete_remote_on_completion, |
148 | void (*callback)(void**,S32), void** user_data, | 148 | void (*callback)(void**,S32,LLExtStat), void** user_data, |
149 | BOOL is_priority = FALSE, | 149 | BOOL is_priority = FALSE, |
150 | BOOL use_big_packets = FALSE); | 150 | BOOL use_big_packets = FALSE); |
151 | 151 | ||
@@ -154,7 +154,7 @@ class LLXferManager | |||
154 | ELLPath remote_path, | 154 | ELLPath remote_path, |
155 | const LLHost &remote_host, | 155 | const LLHost &remote_host, |
156 | BOOL delete_remote_on_completion, | 156 | BOOL delete_remote_on_completion, |
157 | void (*callback)(void*, S32, void**, S32), | 157 | void (*callback)(void*, S32, void**, S32, LLExtStat), |
158 | void** user_data, | 158 | void** user_data, |
159 | BOOL is_priority = FALSE); | 159 | BOOL is_priority = FALSE); |
160 | 160 | ||
@@ -163,7 +163,7 @@ class LLXferManager | |||
163 | virtual void requestVFile(const LLUUID &local_id, const LLUUID& remote_id, | 163 | virtual void requestVFile(const LLUUID &local_id, const LLUUID& remote_id, |
164 | LLAssetType::EType type, LLVFS* vfs, | 164 | LLAssetType::EType type, LLVFS* vfs, |
165 | const LLHost& remote_host, | 165 | const LLHost& remote_host, |
166 | void (*callback)(void**, S32), void** user_data, | 166 | void (*callback)(void**,S32,LLExtStat), void** user_data, |
167 | BOOL is_priority = FALSE); | 167 | BOOL is_priority = FALSE); |
168 | 168 | ||
169 | /* | 169 | /* |
@@ -205,3 +205,4 @@ void process_abort_xfer (LLMessageSystem *mesgsys, void **user_data); | |||
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | 207 | ||
208 | |||
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index a9d5dd3..70b8166 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp | |||
@@ -2134,7 +2134,7 @@ void LLMessageSystem::dispatch( | |||
2134 | } | 2134 | } |
2135 | // enable this for output of message names | 2135 | // enable this for output of message names |
2136 | //llinfos << "< \"" << msg_name << "\"" << llendl; | 2136 | //llinfos << "< \"" << msg_name << "\"" << llendl; |
2137 | //lldebugs << "data: " << LLSDXMLStreamer(message) << llendl; | 2137 | //lldebugs << "data: " << LLSDNotationStreamer(message) << llendl; |
2138 | 2138 | ||
2139 | handler->post(responsep, context, message); | 2139 | handler->post(responsep, context, message); |
2140 | } | 2140 | } |
diff --git a/linden/indra/llmessage/message_prehash.cpp b/linden/indra/llmessage/message_prehash.cpp index fbe5c33..ce532e1 100644 --- a/linden/indra/llmessage/message_prehash.cpp +++ b/linden/indra/llmessage/message_prehash.cpp | |||
@@ -305,6 +305,7 @@ char * _PREHASH_LogFailedMoneyTransaction; | |||
305 | char * _PREHASH_ViewerStartAuction; | 305 | char * _PREHASH_ViewerStartAuction; |
306 | char * _PREHASH_StartAuction; | 306 | char * _PREHASH_StartAuction; |
307 | char * _PREHASH_DuplicateFlags; | 307 | char * _PREHASH_DuplicateFlags; |
308 | char * _PREHASH_RegionInfo2; | ||
308 | char * _PREHASH_TextColor; | 309 | char * _PREHASH_TextColor; |
309 | char * _PREHASH_SlaveID; | 310 | char * _PREHASH_SlaveID; |
310 | char * _PREHASH_Charter; | 311 | char * _PREHASH_Charter; |
@@ -670,9 +671,9 @@ char * _PREHASH_PreyAgent; | |||
670 | char * _PREHASH_SimStats; | 671 | char * _PREHASH_SimStats; |
671 | char * _PREHASH_LogoutReply; | 672 | char * _PREHASH_LogoutReply; |
672 | char * _PREHASH_FeatureDisabled; | 673 | char * _PREHASH_FeatureDisabled; |
674 | char * _PREHASH_PhysicalAvatarEventList; | ||
673 | char * _PREHASH_ObjectLocalID; | 675 | char * _PREHASH_ObjectLocalID; |
674 | char * _PREHASH_Dropped; | 676 | char * _PREHASH_Dropped; |
675 | char * _PREHASH_PhysicalAvatarEventList; | ||
676 | char * _PREHASH_WebProfilesDisabled; | 677 | char * _PREHASH_WebProfilesDisabled; |
677 | char * _PREHASH_Destination; | 678 | char * _PREHASH_Destination; |
678 | char * _PREHASH_MasterID; | 679 | char * _PREHASH_MasterID; |
@@ -1637,6 +1638,7 @@ void init_prehash_data() | |||
1637 | _PREHASH_ViewerStartAuction = gMessageStringTable.getString("ViewerStartAuction"); | 1638 | _PREHASH_ViewerStartAuction = gMessageStringTable.getString("ViewerStartAuction"); |
1638 | _PREHASH_StartAuction = gMessageStringTable.getString("StartAuction"); | 1639 | _PREHASH_StartAuction = gMessageStringTable.getString("StartAuction"); |
1639 | _PREHASH_DuplicateFlags = gMessageStringTable.getString("DuplicateFlags"); | 1640 | _PREHASH_DuplicateFlags = gMessageStringTable.getString("DuplicateFlags"); |
1641 | _PREHASH_RegionInfo2 = gMessageStringTable.getString("RegionInfo2"); | ||
1640 | _PREHASH_TextColor = gMessageStringTable.getString("TextColor"); | 1642 | _PREHASH_TextColor = gMessageStringTable.getString("TextColor"); |
1641 | _PREHASH_SlaveID = gMessageStringTable.getString("SlaveID"); | 1643 | _PREHASH_SlaveID = gMessageStringTable.getString("SlaveID"); |
1642 | _PREHASH_Charter = gMessageStringTable.getString("Charter"); | 1644 | _PREHASH_Charter = gMessageStringTable.getString("Charter"); |
@@ -2002,9 +2004,9 @@ void init_prehash_data() | |||
2002 | _PREHASH_SimStats = gMessageStringTable.getString("SimStats"); | 2004 | _PREHASH_SimStats = gMessageStringTable.getString("SimStats"); |
2003 | _PREHASH_LogoutReply = gMessageStringTable.getString("LogoutReply"); | 2005 | _PREHASH_LogoutReply = gMessageStringTable.getString("LogoutReply"); |
2004 | _PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled"); | 2006 | _PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled"); |
2007 | _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList"); | ||
2005 | _PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID"); | 2008 | _PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID"); |
2006 | _PREHASH_Dropped = gMessageStringTable.getString("Dropped"); | 2009 | _PREHASH_Dropped = gMessageStringTable.getString("Dropped"); |
2007 | _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList"); | ||
2008 | _PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled"); | 2010 | _PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled"); |
2009 | _PREHASH_Destination = gMessageStringTable.getString("Destination"); | 2011 | _PREHASH_Destination = gMessageStringTable.getString("Destination"); |
2010 | _PREHASH_MasterID = gMessageStringTable.getString("MasterID"); | 2012 | _PREHASH_MasterID = gMessageStringTable.getString("MasterID"); |
diff --git a/linden/indra/llmessage/message_prehash.h b/linden/indra/llmessage/message_prehash.h index b75edca..672cd14 100644 --- a/linden/indra/llmessage/message_prehash.h +++ b/linden/indra/llmessage/message_prehash.h | |||
@@ -305,6 +305,7 @@ extern char * _PREHASH_LogFailedMoneyTransaction; | |||
305 | extern char * _PREHASH_ViewerStartAuction; | 305 | extern char * _PREHASH_ViewerStartAuction; |
306 | extern char * _PREHASH_StartAuction; | 306 | extern char * _PREHASH_StartAuction; |
307 | extern char * _PREHASH_DuplicateFlags; | 307 | extern char * _PREHASH_DuplicateFlags; |
308 | extern char * _PREHASH_RegionInfo2; | ||
308 | extern char * _PREHASH_TextColor; | 309 | extern char * _PREHASH_TextColor; |
309 | extern char * _PREHASH_SlaveID; | 310 | extern char * _PREHASH_SlaveID; |
310 | extern char * _PREHASH_Charter; | 311 | extern char * _PREHASH_Charter; |
@@ -670,9 +671,9 @@ extern char * _PREHASH_PreyAgent; | |||
670 | extern char * _PREHASH_SimStats; | 671 | extern char * _PREHASH_SimStats; |
671 | extern char * _PREHASH_LogoutReply; | 672 | extern char * _PREHASH_LogoutReply; |
672 | extern char * _PREHASH_FeatureDisabled; | 673 | extern char * _PREHASH_FeatureDisabled; |
674 | extern char * _PREHASH_PhysicalAvatarEventList; | ||
673 | extern char * _PREHASH_ObjectLocalID; | 675 | extern char * _PREHASH_ObjectLocalID; |
674 | extern char * _PREHASH_Dropped; | 676 | extern char * _PREHASH_Dropped; |
675 | extern char * _PREHASH_PhysicalAvatarEventList; | ||
676 | extern char * _PREHASH_WebProfilesDisabled; | 677 | extern char * _PREHASH_WebProfilesDisabled; |
677 | extern char * _PREHASH_Destination; | 678 | extern char * _PREHASH_Destination; |
678 | extern char * _PREHASH_MasterID; | 679 | extern char * _PREHASH_MasterID; |
diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp index 4f329f2..73ecd96 100644 --- a/linden/indra/llprimitive/lltextureentry.cpp +++ b/linden/indra/llprimitive/lltextureentry.cpp | |||
@@ -109,7 +109,8 @@ bool LLTextureEntry::operator!=(const LLTextureEntry &rhs) const | |||
109 | if (mRotation != rhs.mRotation) return(true); | 109 | if (mRotation != rhs.mRotation) return(true); |
110 | if (mColor != rhs.mColor) return (true); | 110 | if (mColor != rhs.mColor) return (true); |
111 | if (mBump != rhs.mBump) return (true); | 111 | if (mBump != rhs.mBump) return (true); |
112 | if (mMediaFlags != rhs.mMediaFlags) return true; | 112 | if (mMediaFlags != rhs.mMediaFlags) return (true); |
113 | if (mGlow != rhs.mGlow) return (true); | ||
113 | return(false); | 114 | return(false); |
114 | } | 115 | } |
115 | 116 | ||
@@ -124,6 +125,7 @@ bool LLTextureEntry::operator==(const LLTextureEntry &rhs) const | |||
124 | if (mColor != rhs.mColor) return (false); | 125 | if (mColor != rhs.mColor) return (false); |
125 | if (mBump != rhs.mBump) return (false); | 126 | if (mBump != rhs.mBump) return (false); |
126 | if (mMediaFlags != rhs.mMediaFlags) return false; | 127 | if (mMediaFlags != rhs.mMediaFlags) return false; |
128 | if (mGlow != rhs.mGlow) return false; | ||
127 | return(true); | 129 | return(true); |
128 | } | 130 | } |
129 | 131 | ||
@@ -141,7 +143,8 @@ LLSD LLTextureEntry::asLLSD() const | |||
141 | sd["bump"] = getBumpShiny(); | 143 | sd["bump"] = getBumpShiny(); |
142 | sd["fullbright"] = getFullbright(); | 144 | sd["fullbright"] = getFullbright(); |
143 | sd["media_flags"] = getMediaTexGen(); | 145 | sd["media_flags"] = getMediaTexGen(); |
144 | 146 | sd["glow"] = getGlow(); | |
147 | |||
145 | return sd; | 148 | return sd; |
146 | } | 149 | } |
147 | 150 | ||
@@ -190,6 +193,11 @@ bool LLTextureEntry::fromLLSD(LLSD& sd) | |||
190 | { | 193 | { |
191 | setMediaTexGen( sd[w].asInteger() ); | 194 | setMediaTexGen( sd[w].asInteger() ); |
192 | } else goto fail; | 195 | } else goto fail; |
196 | w = "glow"; | ||
197 | if (sd.has(w)) | ||
198 | { | ||
199 | setGlow((F32)sd[w].asReal() ); | ||
200 | } | ||
193 | 201 | ||
194 | return true; | 202 | return true; |
195 | fail: | 203 | fail: |
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index aa50a6e..6ed6885 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp | |||
@@ -89,8 +89,7 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co | |||
89 | mCurGlowStrength(0.f), | 89 | mCurGlowStrength(0.f), |
90 | mNeedsHighlight(FALSE), | 90 | mNeedsHighlight(FALSE), |
91 | mCommitOnReturn(TRUE), | 91 | mCommitOnReturn(TRUE), |
92 | mImagep( NULL ), | 92 | mImagep( NULL ) |
93 | mIsDirty( FALSE ) | ||
94 | { | 93 | { |
95 | mUnselectedLabel = name; | 94 | mUnselectedLabel = name; |
96 | mSelectedLabel = name; | 95 | mSelectedLabel = name; |
@@ -275,8 +274,6 @@ void LLButton::onCommit() | |||
275 | { | 274 | { |
276 | (*mClickedCallback)( mCallbackUserData ); | 275 | (*mClickedCallback)( mCallbackUserData ); |
277 | } | 276 | } |
278 | |||
279 | mIsDirty = TRUE; | ||
280 | } | 277 | } |
281 | 278 | ||
282 | 279 | ||
@@ -291,7 +288,6 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) | |||
291 | (*mClickedCallback)( mCallbackUserData ); | 288 | (*mClickedCallback)( mCallbackUserData ); |
292 | } | 289 | } |
293 | handled = TRUE; | 290 | handled = TRUE; |
294 | mIsDirty = TRUE; | ||
295 | } | 291 | } |
296 | return handled; | 292 | return handled; |
297 | } | 293 | } |
@@ -308,7 +304,6 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) | |||
308 | (*mClickedCallback)( mCallbackUserData ); | 304 | (*mClickedCallback)( mCallbackUserData ); |
309 | } | 305 | } |
310 | handled = TRUE; | 306 | handled = TRUE; |
311 | mIsDirty = TRUE; | ||
312 | } | 307 | } |
313 | } | 308 | } |
314 | return handled; | 309 | return handled; |
@@ -368,9 +363,7 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask) | |||
368 | if (mClickedCallback) | 363 | if (mClickedCallback) |
369 | { | 364 | { |
370 | (*mClickedCallback)( mCallbackUserData ); | 365 | (*mClickedCallback)( mCallbackUserData ); |
371 | } | 366 | } |
372 | |||
373 | mIsDirty = TRUE; | ||
374 | } | 367 | } |
375 | 368 | ||
376 | mMouseDownTimer.stop(); | 369 | mMouseDownTimer.stop(); |
@@ -773,7 +766,6 @@ void LLButton::setToggleState(BOOL b) | |||
773 | void LLButton::setValue(const LLSD& value ) | 766 | void LLButton::setValue(const LLSD& value ) |
774 | { | 767 | { |
775 | mToggleState = value.asBoolean(); | 768 | mToggleState = value.asBoolean(); |
776 | mIsDirty = FALSE; | ||
777 | } | 769 | } |
778 | 770 | ||
779 | LLSD LLButton::getValue() const | 771 | LLSD LLButton::getValue() const |
diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index aedc411..d26011b 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h | |||
@@ -100,8 +100,6 @@ public: | |||
100 | // HACK: "committing" a button is the same as clicking on it. | 100 | // HACK: "committing" a button is the same as clicking on it. |
101 | virtual void onCommit(); | 101 | virtual void onCommit(); |
102 | 102 | ||
103 | virtual BOOL isDirty() { return mIsDirty; }; // Returns TRUE if the user has clicked on the button at all | ||
104 | |||
105 | void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; } | 103 | void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; } |
106 | void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; } | 104 | void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; } |
107 | 105 | ||
@@ -279,8 +277,6 @@ protected: | |||
279 | 277 | ||
280 | LLPointer<LLImageGL> mImagep; | 278 | LLPointer<LLImageGL> mImagep; |
281 | 279 | ||
282 | BOOL mIsDirty; | ||
283 | |||
284 | static LLFrameTimer sFlashingTimer; | 280 | static LLFrameTimer sFlashingTimer; |
285 | }; | 281 | }; |
286 | 282 | ||
diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp index 24cf680..f49e220 100644 --- a/linden/indra/llui/llcheckboxctrl.cpp +++ b/linden/indra/llui/llcheckboxctrl.cpp | |||
@@ -59,7 +59,8 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect, | |||
59 | mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ), | 59 | mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ), |
60 | mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ), | 60 | mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ), |
61 | mRadioStyle( use_radio_style ), | 61 | mRadioStyle( use_radio_style ), |
62 | mInitialValue( initial_value ) | 62 | mInitialValue( initial_value ), |
63 | mSetValue( initial_value ) | ||
63 | { | 64 | { |
64 | if (font) | 65 | if (font) |
65 | { | 66 | { |
@@ -228,7 +229,8 @@ void LLCheckBoxCtrl::draw() | |||
228 | //virtual | 229 | //virtual |
229 | void LLCheckBoxCtrl::setValue(const LLSD& value ) | 230 | void LLCheckBoxCtrl::setValue(const LLSD& value ) |
230 | { | 231 | { |
231 | mButton->setToggleState( value.asBoolean() ); | 232 | mSetValue = value.asBoolean(); |
233 | mButton->setToggleState( mSetValue ); | ||
232 | } | 234 | } |
233 | 235 | ||
234 | //virtual | 236 | //virtual |
@@ -269,16 +271,27 @@ void LLCheckBoxCtrl::setControlName(const LLString& control_name, LLView* contex | |||
269 | 271 | ||
270 | 272 | ||
271 | // virtual Returns TRUE if the user has modified this control. | 273 | // virtual Returns TRUE if the user has modified this control. |
272 | BOOL LLCheckBoxCtrl::isDirty() | 274 | BOOL LLCheckBoxCtrl::isDirty() const |
273 | { | 275 | { |
274 | if ( mButton ) | 276 | if ( mButton ) |
275 | { | 277 | { |
276 | return mButton->isDirty(); | 278 | return (mSetValue != mButton->getToggleState()); |
277 | } | 279 | } |
278 | return FALSE; // Shouldn't get here | 280 | return FALSE; // Shouldn't get here |
279 | } | 281 | } |
280 | 282 | ||
281 | 283 | ||
284 | // virtual Clear dirty state | ||
285 | void LLCheckBoxCtrl::resetDirty() | ||
286 | { | ||
287 | if ( mButton ) | ||
288 | { | ||
289 | mSetValue = mButton->getToggleState(); | ||
290 | } | ||
291 | } | ||
292 | |||
293 | |||
294 | |||
282 | // virtual | 295 | // virtual |
283 | LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const | 296 | LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const |
284 | { | 297 | { |
diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h index 37b1330..6aa7113 100644 --- a/linden/indra/llui/llcheckboxctrl.h +++ b/linden/indra/llui/llcheckboxctrl.h | |||
@@ -110,7 +110,8 @@ public: | |||
110 | 110 | ||
111 | static void onButtonPress(void *userdata); | 111 | static void onButtonPress(void *userdata); |
112 | 112 | ||
113 | virtual BOOL isDirty(); // Returns TRUE if the user has modified this control. | 113 | virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control. |
114 | virtual void resetDirty(); // Clear dirty state | ||
114 | 115 | ||
115 | protected: | 116 | protected: |
116 | // note: value is stored in toggle state of button | 117 | // note: value is stored in toggle state of button |
@@ -120,7 +121,8 @@ protected: | |||
120 | LLColor4 mTextEnabledColor; | 121 | LLColor4 mTextEnabledColor; |
121 | LLColor4 mTextDisabledColor; | 122 | LLColor4 mTextDisabledColor; |
122 | BOOL mRadioStyle; | 123 | BOOL mRadioStyle; |
123 | BOOL mInitialValue; | 124 | BOOL mInitialValue; // Value set in constructor |
125 | BOOL mSetValue; // Value set programmatically | ||
124 | BOOL mKeyboardFocusOnClick; | 126 | BOOL mKeyboardFocusOnClick; |
125 | LLViewBorder* mBorder; | 127 | LLViewBorder* mBorder; |
126 | }; | 128 | }; |
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index 27df619..b71d88f 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -247,6 +247,27 @@ void LLComboBox::onCommit() | |||
247 | LLUICtrl::onCommit(); | 247 | LLUICtrl::onCommit(); |
248 | } | 248 | } |
249 | 249 | ||
250 | // virtual | ||
251 | BOOL LLComboBox::isDirty() const | ||
252 | { | ||
253 | BOOL grubby = FALSE; | ||
254 | if ( mList ) | ||
255 | { | ||
256 | grubby = mList->isDirty(); | ||
257 | } | ||
258 | return grubby; | ||
259 | } | ||
260 | |||
261 | // virtual Clear dirty state | ||
262 | void LLComboBox::resetDirty() | ||
263 | { | ||
264 | if ( mList ) | ||
265 | { | ||
266 | mList->resetDirty(); | ||
267 | } | ||
268 | } | ||
269 | |||
270 | |||
250 | // add item "name" to menu | 271 | // add item "name" to menu |
251 | void LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled) | 272 | void LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled) |
252 | { | 273 | { |
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index d77224a..1589c30 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h | |||
@@ -88,6 +88,8 @@ public: | |||
88 | virtual void clear(); // select nothing | 88 | virtual void clear(); // select nothing |
89 | virtual void onCommit(); | 89 | virtual void onCommit(); |
90 | virtual BOOL acceptsTextInput() const { return mAllowTextEntry; } | 90 | virtual BOOL acceptsTextInput() const { return mAllowTextEntry; } |
91 | virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control. | ||
92 | virtual void resetDirty(); // Clear dirty state | ||
91 | 93 | ||
92 | virtual void setFocus(BOOL b); | 94 | virtual void setFocus(BOOL b); |
93 | 95 | ||
@@ -147,7 +149,7 @@ public: | |||
147 | virtual BOOL getCanSelect() const { return TRUE; } | 149 | virtual BOOL getCanSelect() const { return TRUE; } |
148 | virtual BOOL selectFirstItem() { return setCurrentByIndex(0); } | 150 | virtual BOOL selectFirstItem() { return setCurrentByIndex(0); } |
149 | virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); } | 151 | virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); } |
150 | virtual S32 getFirstSelectedIndex() { return getCurrentIndex(); } | 152 | virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); } |
151 | virtual BOOL setCurrentByID( const LLUUID& id ); | 153 | virtual BOOL setCurrentByID( const LLUUID& id ); |
152 | virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu | 154 | virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu |
153 | virtual BOOL setSelectedByValue(LLSD value, BOOL selected); | 155 | virtual BOOL setSelectedByValue(LLSD value, BOOL selected); |
diff --git a/linden/indra/llui/llctrlselectioninterface.h b/linden/indra/llui/llctrlselectioninterface.h index e21f039..237aa94 100644 --- a/linden/indra/llui/llctrlselectioninterface.h +++ b/linden/indra/llui/llctrlselectioninterface.h | |||
@@ -56,7 +56,7 @@ public: | |||
56 | virtual BOOL selectFirstItem() = 0; | 56 | virtual BOOL selectFirstItem() = 0; |
57 | virtual BOOL selectNthItem( S32 index ) = 0; | 57 | virtual BOOL selectNthItem( S32 index ) = 0; |
58 | 58 | ||
59 | virtual S32 getFirstSelectedIndex() = 0; | 59 | virtual S32 getFirstSelectedIndex() const = 0; |
60 | 60 | ||
61 | // TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function | 61 | // TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function |
62 | virtual BOOL setCurrentByID( const LLUUID& id ) = 0; | 62 | virtual BOOL setCurrentByID( const LLUUID& id ) = 0; |
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index b45661f..77fddfb 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -1252,10 +1252,13 @@ BOOL LLFloater::getEditModeEnabled() | |||
1252 | //static | 1252 | //static |
1253 | void LLFloater::show(LLFloater* floaterp) | 1253 | void LLFloater::show(LLFloater* floaterp) |
1254 | { | 1254 | { |
1255 | if (floaterp) floaterp->open(); | 1255 | if (floaterp) |
1256 | if (floaterp->getHost()) | ||
1257 | { | 1256 | { |
1258 | floaterp->getHost()->open(); | 1257 | floaterp->open(); |
1258 | if (floaterp->getHost()) | ||
1259 | { | ||
1260 | floaterp->getHost()->open(); | ||
1261 | } | ||
1259 | } | 1262 | } |
1260 | } | 1263 | } |
1261 | 1264 | ||
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 98286fa..dca62d7 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -138,6 +138,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, | |||
138 | mSelectionEnd( 0 ), | 138 | mSelectionEnd( 0 ), |
139 | mLastSelectionX(-1), | 139 | mLastSelectionX(-1), |
140 | mLastSelectionY(-1), | 140 | mLastSelectionY(-1), |
141 | mLastSelectionStart(-1), | ||
142 | mLastSelectionEnd(-1), | ||
141 | mPrevalidateFunc( prevalidate_func ), | 143 | mPrevalidateFunc( prevalidate_func ), |
142 | mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ), | 144 | mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ), |
143 | mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ), | 145 | mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ), |
@@ -247,6 +249,19 @@ void LLLineEditor::onCommit() | |||
247 | selectAll(); | 249 | selectAll(); |
248 | } | 250 | } |
249 | 251 | ||
252 | // virtual | ||
253 | BOOL LLLineEditor::isDirty() const | ||
254 | { | ||
255 | return ( mText.getString() != mPrevText ); | ||
256 | } | ||
257 | |||
258 | // virtual | ||
259 | void LLLineEditor::resetDirty() | ||
260 | { | ||
261 | mPrevText = mText.getString(); | ||
262 | } | ||
263 | |||
264 | |||
250 | // line history support | 265 | // line history support |
251 | void LLLineEditor::updateHistory() | 266 | void LLLineEditor::updateHistory() |
252 | { | 267 | { |
@@ -468,8 +483,38 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
468 | } | 483 | } |
469 | else | 484 | else |
470 | { | 485 | { |
471 | // otherwise select everything | 486 | const LLWString& wtext = mText.getWString(); |
472 | selectAll(); | 487 | |
488 | BOOL doSelectAll = TRUE; | ||
489 | |||
490 | // Select the word we're on | ||
491 | if( isPartOfWord( wtext[mCursorPos] ) ) | ||
492 | { | ||
493 | S32 old_selection_start = mLastSelectionStart; | ||
494 | S32 old_selection_end = mLastSelectionEnd; | ||
495 | |||
496 | // Select word the cursor is over | ||
497 | while ((mCursorPos > 0) && isPartOfWord( wtext[mCursorPos-1] )) | ||
498 | { // Find the start of the word | ||
499 | mCursorPos--; | ||
500 | } | ||
501 | startSelection(); | ||
502 | |||
503 | while ((mCursorPos < (S32)wtext.length()) && isPartOfWord( wtext[mCursorPos] ) ) | ||
504 | { // Find the end of the word | ||
505 | mCursorPos++; | ||
506 | } | ||
507 | mSelectionEnd = mCursorPos; | ||
508 | |||
509 | // If nothing changed, then the word was already selected. Select the whole line. | ||
510 | doSelectAll = (old_selection_start == mSelectionStart) && | ||
511 | (old_selection_end == mSelectionEnd); | ||
512 | } | ||
513 | |||
514 | if ( doSelectAll ) | ||
515 | { // Select everything | ||
516 | selectAll(); | ||
517 | } | ||
473 | } | 518 | } |
474 | 519 | ||
475 | // We don't want handleMouseUp() to "finish" the selection (and thereby | 520 | // We don't want handleMouseUp() to "finish" the selection (and thereby |
@@ -496,6 +541,9 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) | |||
496 | } | 541 | } |
497 | else | 542 | else |
498 | { | 543 | { |
544 | mLastSelectionStart = -1; | ||
545 | mLastSelectionStart = -1; | ||
546 | |||
499 | setFocus( TRUE ); | 547 | setFocus( TRUE ); |
500 | 548 | ||
501 | if (mask & MASK_SHIFT) | 549 | if (mask & MASK_SHIFT) |
@@ -539,6 +587,10 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) | |||
539 | } | 587 | } |
540 | else | 588 | else |
541 | { | 589 | { |
590 | // Save selection for word/line selecting on double-click | ||
591 | mLastSelectionStart = mSelectionStart; | ||
592 | mLastSelectionEnd = mSelectionEnd; | ||
593 | |||
542 | // Move cursor and deselect for regular click | 594 | // Move cursor and deselect for regular click |
543 | setCursorAtLocalPos( x ); | 595 | setCursorAtLocalPos( x ); |
544 | deselect(); | 596 | deselect(); |
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index 5ff2de7..04c53b4 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h | |||
@@ -127,7 +127,8 @@ public: | |||
127 | virtual void setRect(const LLRect& rect); | 127 | virtual void setRect(const LLRect& rect); |
128 | virtual BOOL acceptsTextInput() const; | 128 | virtual BOOL acceptsTextInput() const; |
129 | virtual void onCommit(); | 129 | virtual void onCommit(); |
130 | virtual BOOL isDirty() { return ( mText.getString() != mPrevText ); }; // Returns TRUE if the user has changed value at all | 130 | virtual BOOL isDirty() const; // Returns TRUE if the user has changed value at all |
131 | virtual void resetDirty(); // Clear dirty state | ||
131 | 132 | ||
132 | // assumes UTF8 text | 133 | // assumes UTF8 text |
133 | virtual void setValue(const LLSD& value ); | 134 | virtual void setValue(const LLSD& value ); |
@@ -257,6 +258,8 @@ protected: | |||
257 | S32 mSelectionEnd; | 258 | S32 mSelectionEnd; |
258 | S32 mLastSelectionX; | 259 | S32 mLastSelectionX; |
259 | S32 mLastSelectionY; | 260 | S32 mLastSelectionY; |
261 | S32 mLastSelectionStart; | ||
262 | S32 mLastSelectionEnd; | ||
260 | 263 | ||
261 | S32 (*mPrevalidateFunc)(const LLWString &str); | 264 | S32 (*mPrevalidateFunc)(const LLWString &str); |
262 | 265 | ||
diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h index 3dec41d..5b3e4db 100644 --- a/linden/indra/llui/llradiogroup.h +++ b/linden/indra/llui/llradiogroup.h | |||
@@ -115,7 +115,7 @@ public: | |||
115 | /*virtual*/ BOOL getCanSelect() const { return TRUE; } | 115 | /*virtual*/ BOOL getCanSelect() const { return TRUE; } |
116 | /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); } | 116 | /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); } |
117 | /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); } | 117 | /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); } |
118 | /*virtual*/ S32 getFirstSelectedIndex() { return getSelectedIndex(); } | 118 | /*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); } |
119 | /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); | 119 | /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); |
120 | /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu | 120 | /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu |
121 | /*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected); | 121 | /*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected); |
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index 56a6a22..9e1a573 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp | |||
@@ -447,6 +447,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, | |||
447 | mSortColumn(-1), | 447 | mSortColumn(-1), |
448 | mSortAscending(TRUE), | 448 | mSortAscending(TRUE), |
449 | mSorted(TRUE), | 449 | mSorted(TRUE), |
450 | mDirty(FALSE), | ||
451 | mOriginalSelection(-1), | ||
450 | mDrewSelected(FALSE) | 452 | mDrewSelected(FALSE) |
451 | { | 453 | { |
452 | mItemListRect.setOriginAndSize( | 454 | mItemListRect.setOriginAndSize( |
@@ -535,6 +537,7 @@ void LLScrollListCtrl::clearRows() | |||
535 | mScrollLines = 0; | 537 | mScrollLines = 0; |
536 | mLastSelected = NULL; | 538 | mLastSelected = NULL; |
537 | updateMaxContentWidth(NULL); | 539 | updateMaxContentWidth(NULL); |
540 | mDirty = FALSE; | ||
538 | } | 541 | } |
539 | 542 | ||
540 | 543 | ||
@@ -567,10 +570,10 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const | |||
567 | return ret; | 570 | return ret; |
568 | } | 571 | } |
569 | 572 | ||
570 | S32 LLScrollListCtrl::getFirstSelectedIndex() | 573 | S32 LLScrollListCtrl::getFirstSelectedIndex() const |
571 | { | 574 | { |
572 | S32 CurSelectedIndex = 0; | 575 | S32 CurSelectedIndex = 0; |
573 | item_list::iterator iter; | 576 | item_list::const_iterator iter; |
574 | for (iter = mItemList.begin(); iter != mItemList.end(); iter++) | 577 | for (iter = mItemList.begin(); iter != mItemList.end(); iter++) |
575 | { | 578 | { |
576 | LLScrollListItem* item = *iter; | 579 | LLScrollListItem* item = *iter; |
@@ -885,6 +888,7 @@ BOOL LLScrollListCtrl::selectFirstItem() | |||
885 | selectItem(itemp); | 888 | selectItem(itemp); |
886 | } | 889 | } |
887 | success = TRUE; | 890 | success = TRUE; |
891 | mOriginalSelection = 0; | ||
888 | } | 892 | } |
889 | else | 893 | else |
890 | { | 894 | { |
@@ -918,6 +922,7 @@ BOOL LLScrollListCtrl::selectNthItem( S32 target_index ) | |||
918 | { | 922 | { |
919 | selectItem(itemp); | 923 | selectItem(itemp); |
920 | success = TRUE; | 924 | success = TRUE; |
925 | mOriginalSelection = target_index; | ||
921 | } | 926 | } |
922 | } | 927 | } |
923 | else | 928 | else |
@@ -1741,6 +1746,7 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask) | |||
1741 | // always commit when mouse operation is completed inside list | 1746 | // always commit when mouse operation is completed inside list |
1742 | if (mItemListRect.pointInRect(x,y)) | 1747 | if (mItemListRect.pointInRect(x,y)) |
1743 | { | 1748 | { |
1749 | mDirty |= mSelectionChanged; | ||
1744 | mSelectionChanged = FALSE; | 1750 | mSelectionChanged = FALSE; |
1745 | onCommit(); | 1751 | onCommit(); |
1746 | } | 1752 | } |
@@ -2141,6 +2147,7 @@ void LLScrollListCtrl::commitIfChanged() | |||
2141 | { | 2147 | { |
2142 | if (mSelectionChanged) | 2148 | if (mSelectionChanged) |
2143 | { | 2149 | { |
2150 | mDirty = TRUE; | ||
2144 | mSelectionChanged = FALSE; | 2151 | mSelectionChanged = FALSE; |
2145 | onCommit(); | 2152 | onCommit(); |
2146 | } | 2153 | } |
@@ -2999,6 +3006,26 @@ void LLScrollListCtrl::setFocus(BOOL b) | |||
2999 | LLUICtrl::setFocus(b); | 3006 | LLUICtrl::setFocus(b); |
3000 | } | 3007 | } |
3001 | 3008 | ||
3009 | |||
3010 | // virtual | ||
3011 | BOOL LLScrollListCtrl::isDirty() const | ||
3012 | { | ||
3013 | BOOL grubby = mDirty; | ||
3014 | if ( !mAllowMultipleSelection ) | ||
3015 | { | ||
3016 | grubby = (mOriginalSelection != getFirstSelectedIndex()); | ||
3017 | } | ||
3018 | return grubby; | ||
3019 | } | ||
3020 | |||
3021 | // Clear dirty state | ||
3022 | void LLScrollListCtrl::resetDirty() | ||
3023 | { | ||
3024 | mDirty = FALSE; | ||
3025 | mOriginalSelection = getFirstSelectedIndex(); | ||
3026 | } | ||
3027 | |||
3028 | |||
3002 | //virtual | 3029 | //virtual |
3003 | void LLScrollListCtrl::onFocusReceived() | 3030 | void LLScrollListCtrl::onFocusReceived() |
3004 | { | 3031 | { |
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index 809c528..2e4dad5 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h | |||
@@ -460,7 +460,7 @@ public: | |||
460 | LLUUID getStringUUIDSelectedItem(); | 460 | LLUUID getStringUUIDSelectedItem(); |
461 | 461 | ||
462 | LLScrollListItem* getFirstSelected() const; | 462 | LLScrollListItem* getFirstSelected() const; |
463 | virtual S32 getFirstSelectedIndex(); | 463 | virtual S32 getFirstSelectedIndex() const; |
464 | std::vector<LLScrollListItem*> getAllSelected() const; | 464 | std::vector<LLScrollListItem*> getAllSelected() const; |
465 | 465 | ||
466 | LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } | 466 | LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } |
@@ -515,6 +515,9 @@ public: | |||
515 | virtual void onFocusReceived(); | 515 | virtual void onFocusReceived(); |
516 | virtual void onFocusLost(); | 516 | virtual void onFocusLost(); |
517 | 517 | ||
518 | virtual BOOL isDirty() const; | ||
519 | virtual void resetDirty(); // Clear dirty state | ||
520 | |||
518 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); | 521 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
519 | virtual void arrange(S32 max_width, S32 max_height); | 522 | virtual void arrange(S32 max_width, S32 max_height); |
520 | virtual LLRect getRequiredRect(); | 523 | virtual LLRect getRequiredRect(); |
@@ -658,6 +661,9 @@ protected: | |||
658 | std::map<LLString, LLScrollListColumn> mColumns; | 661 | std::map<LLString, LLScrollListColumn> mColumns; |
659 | std::vector<LLScrollListColumn*> mColumnsIndexed; | 662 | std::vector<LLScrollListColumn*> mColumnsIndexed; |
660 | 663 | ||
664 | BOOL mDirty; | ||
665 | S32 mOriginalSelection; | ||
666 | |||
661 | public: | 667 | public: |
662 | // HACK: Did we draw one selected item this frame? | 668 | // HACK: Did we draw one selected item this frame? |
663 | BOOL mDrewSelected; | 669 | BOOL mDrewSelected; |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index f49b2db..552a9c9 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -354,6 +354,8 @@ LLTextEditor::LLTextEditor( | |||
354 | 354 | ||
355 | appendText(default_text, FALSE, FALSE); | 355 | appendText(default_text, FALSE, FALSE); |
356 | 356 | ||
357 | resetDirty(); // Update saved text state | ||
358 | |||
357 | mParseHTML=FALSE; | 359 | mParseHTML=FALSE; |
358 | mHTML=""; | 360 | mHTML=""; |
359 | } | 361 | } |
@@ -529,6 +531,8 @@ void LLTextEditor::setText(const LLString &utf8str) | |||
529 | 531 | ||
530 | updateLineStartList(); | 532 | updateLineStartList(); |
531 | updateScrollFromCursor(); | 533 | updateScrollFromCursor(); |
534 | |||
535 | resetDirty(); | ||
532 | } | 536 | } |
533 | 537 | ||
534 | void LLTextEditor::setWText(const LLWString &wtext) | 538 | void LLTextEditor::setWText(const LLWString &wtext) |
@@ -545,6 +549,8 @@ void LLTextEditor::setWText(const LLWString &wtext) | |||
545 | 549 | ||
546 | updateLineStartList(); | 550 | updateLineStartList(); |
547 | updateScrollFromCursor(); | 551 | updateScrollFromCursor(); |
552 | |||
553 | resetDirty(); | ||
548 | } | 554 | } |
549 | 555 | ||
550 | void LLTextEditor::setValue(const LLSD& value) | 556 | void LLTextEditor::setValue(const LLSD& value) |
@@ -3447,6 +3453,7 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr | |||
3447 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | 3453 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); |
3448 | S32 selection_start = mSelectionStart; | 3454 | S32 selection_start = mSelectionStart; |
3449 | S32 selection_end = mSelectionEnd; | 3455 | S32 selection_end = mSelectionEnd; |
3456 | BOOL was_selecting = mIsSelecting; | ||
3450 | S32 cursor_pos = mCursorPos; | 3457 | S32 cursor_pos = mCursorPos; |
3451 | S32 old_length = getLength(); | 3458 | S32 old_length = getLength(); |
3452 | BOOL cursor_was_at_end = (mCursorPos == old_length); | 3459 | BOOL cursor_was_at_end = (mCursorPos == old_length); |
@@ -3479,17 +3486,23 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr | |||
3479 | updateLineStartList(old_length); | 3486 | updateLineStartList(old_length); |
3480 | 3487 | ||
3481 | // Set the cursor and scroll position | 3488 | // Set the cursor and scroll position |
3482 | // Maintain the scroll position unless the scroll was at the end of the doc | 3489 | // Maintain the scroll position unless the scroll was at the end of the doc (in which |
3483 | // (in which case, move it to the new end of the doc) | 3490 | // case, move it to the new end of the doc) or unless the user was doing actively selecting |
3484 | if( was_scrolled_to_bottom ) | 3491 | if( was_scrolled_to_bottom && !was_selecting ) |
3485 | { | 3492 | { |
3493 | if( selection_start != selection_end ) | ||
3494 | { | ||
3495 | // maintain an existing non-active selection | ||
3496 | mSelectionStart = selection_start; | ||
3497 | mSelectionEnd = selection_end; | ||
3498 | } | ||
3486 | endOfDoc(); | 3499 | endOfDoc(); |
3487 | } | 3500 | } |
3488 | else if( selection_start != selection_end ) | 3501 | else if( selection_start != selection_end ) |
3489 | { | 3502 | { |
3490 | mSelectionStart = selection_start; | 3503 | mSelectionStart = selection_start; |
3491 | |||
3492 | mSelectionEnd = selection_end; | 3504 | mSelectionEnd = selection_end; |
3505 | mIsSelecting = was_selecting; | ||
3493 | setCursorPos(cursor_pos); | 3506 | setCursorPos(cursor_pos); |
3494 | } | 3507 | } |
3495 | else if( cursor_was_at_end ) | 3508 | else if( cursor_was_at_end ) |
@@ -3626,6 +3639,11 @@ BOOL LLTextEditor::tryToRevertToPristineState() | |||
3626 | return isPristine(); // TRUE => success | 3639 | return isPristine(); // TRUE => success |
3627 | } | 3640 | } |
3628 | 3641 | ||
3642 | // virtual Return TRUE if changes have been made | ||
3643 | BOOL LLTextEditor::isDirty() const | ||
3644 | { | ||
3645 | return( mLastCmd != NULL || (mPristineCmd && (mPristineCmd != mLastCmd)) ); | ||
3646 | } | ||
3629 | 3647 | ||
3630 | 3648 | ||
3631 | void LLTextEditor::updateTextRect() | 3649 | void LLTextEditor::updateTextRect() |
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 68c1d4a..4bcfcfc 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h | |||
@@ -109,6 +109,7 @@ public: | |||
109 | virtual void clear(); | 109 | virtual void clear(); |
110 | virtual void setFocus( BOOL b ); | 110 | virtual void setFocus( BOOL b ); |
111 | virtual BOOL acceptsTextInput() const; | 111 | virtual BOOL acceptsTextInput() const; |
112 | virtual BOOL isDirty() const; | ||
112 | 113 | ||
113 | // LLEditMenuHandler interface | 114 | // LLEditMenuHandler interface |
114 | virtual void undo(); | 115 | virtual void undo(); |
diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h index 2060a0d..455a8c0 100644 --- a/linden/indra/llui/lluictrl.h +++ b/linden/indra/llui/lluictrl.h | |||
@@ -149,7 +149,9 @@ public: | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | // Returns TRUE if the user has modified this control. Editable controls should override this. | 151 | // Returns TRUE if the user has modified this control. Editable controls should override this. |
152 | virtual BOOL isDirty() { return FALSE; }; | 152 | virtual BOOL isDirty() const { return FALSE; }; |
153 | // Clear the dirty state | ||
154 | virtual void resetDirty() {}; | ||
153 | 155 | ||
154 | protected: | 156 | protected: |
155 | virtual void onFocusReceived(); | 157 | virtual void onFocusReceived(); |
diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp index d257ce0..db6e20d 100644 --- a/linden/indra/llvfs/lldir_mac.cpp +++ b/linden/indra/llvfs/lldir_mac.cpp | |||
@@ -176,11 +176,7 @@ LLDir_Mac::LLDir_Mac() | |||
176 | FSRefToLLString(&tempRef, mTempDir); | 176 | FSRefToLLString(&tempRef, mTempDir); |
177 | } | 177 | } |
178 | 178 | ||
179 | // Set the working dir to <bundle>/Contents/Resources | 179 | mWorkingDir = getCurPath(); |
180 | (void) chdir(mAppRODataDir.c_str()); | ||
181 | |||
182 | // Canonically, since we set it here... | ||
183 | mWorkingDir = mAppRODataDir; | ||
184 | 180 | ||
185 | CFRelease(executableURLRef); | 181 | CFRelease(executableURLRef); |
186 | executableURLRef = NULL; | 182 | executableURLRef = NULL; |
diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index a05d1b9..89db67b 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp | |||
@@ -892,11 +892,11 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type | |||
892 | { | 892 | { |
893 | llwarns << "Short write" << llendl; | 893 | llwarns << "Short write" << llendl; |
894 | } | 894 | } |
895 | |||
896 | delete[] buffer; | ||
897 | } else { | 895 | } else { |
898 | llwarns << "Short read" << llendl; | 896 | llwarns << "Short read" << llendl; |
899 | } | 897 | } |
898 | |||
899 | delete[] buffer; | ||
900 | } | 900 | } |
901 | } | 901 | } |
902 | 902 | ||
diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp index 07348b7..2310684 100644 --- a/linden/indra/llwindow/llgl.cpp +++ b/linden/indra/llwindow/llgl.cpp | |||
@@ -589,8 +589,8 @@ void LLGLManager::initExtensions() | |||
589 | mHasMipMapGeneration = FALSE; | 589 | mHasMipMapGeneration = FALSE; |
590 | mHasPalettedTextures = FALSE; | 590 | mHasPalettedTextures = FALSE; |
591 | mHasAnisotropic = FALSE; | 591 | mHasAnisotropic = FALSE; |
592 | mHasCubeMap = FALSE; // apparently fatal on Intel 915 & similar | 592 | //mHasCubeMap = FALSE; // apparently fatal on Intel 915 & similar |
593 | mHasOcclusionQuery = FALSE; // source of many ATI system hangs | 593 | //mHasOcclusionQuery = FALSE; // source of many ATI system hangs |
594 | mHasShaderObjects = FALSE; | 594 | mHasShaderObjects = FALSE; |
595 | mHasVertexShader = FALSE; | 595 | mHasVertexShader = FALSE; |
596 | mHasFragmentShader = FALSE; | 596 | mHasFragmentShader = FALSE; |
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index b38d4d1..9756e09 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -113,6 +113,7 @@ BOOL ll_try_gtk_init(void) | |||
113 | if (!tried_gtk_init) | 113 | if (!tried_gtk_init) |
114 | { | 114 | { |
115 | tried_gtk_init = TRUE; | 115 | tried_gtk_init = TRUE; |
116 | if (!g_thread_supported ()) g_thread_init (NULL); | ||
116 | maybe_lock_display(); | 117 | maybe_lock_display(); |
117 | gtk_is_good = gtk_init_check(NULL, NULL); | 118 | gtk_is_good = gtk_init_check(NULL, NULL); |
118 | maybe_unlock_display(); | 119 | maybe_unlock_display(); |
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index 0beffe5..afd7e1a 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/indra/lscript/lscript_compile/indra.l | |||
@@ -227,6 +227,16 @@ extern "C" { int yyerror(const char *fmt, ...); } | |||
227 | "CHANGED_REGION" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); } | 227 | "CHANGED_REGION" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); } |
228 | "CHANGED_TELEPORT" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); } | 228 | "CHANGED_TELEPORT" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); } |
229 | 229 | ||
230 | "OBJECT_UNKOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKOWN_DETAIL; return(INTEGER_CONSTANT); } | ||
231 | "OBJECT_NAME" { count(); yylval.ival = OBJECT_NAME; return(INTEGER_CONSTANT); } | ||
232 | "OBJECT_DESC" { count(); yylval.ival = OBJECT_DESC; return(INTEGER_CONSTANT); } | ||
233 | "OBJECT_POS" { count(); yylval.ival = OBJECT_POS; return(INTEGER_CONSTANT); } | ||
234 | "OBJECT_ROT" { count(); yylval.ival = OBJECT_ROT; return(INTEGER_CONSTANT); } | ||
235 | "OBJECT_VELOCITY" { count(); yylval.ival = OBJECT_VELOCITY; return(INTEGER_CONSTANT); } | ||
236 | "OBJECT_OWNER" { count(); yylval.ival = OBJECT_OWNER; return(INTEGER_CONSTANT); } | ||
237 | "OBJECT_GROUP" { count(); yylval.ival = OBJECT_GROUP; return(INTEGER_CONSTANT); } | ||
238 | "OBJECT_CREATOR" { count(); yylval.ival = OBJECT_CREATOR; return(INTEGER_CONSTANT); } | ||
239 | |||
230 | "TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); } | 240 | "TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); } |
231 | "TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); } | 241 | "TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); } |
232 | "TYPE_STRING" { count(); yylval.ival = LST_STRING; return(INTEGER_CONSTANT); } | 242 | "TYPE_STRING" { count(); yylval.ival = LST_STRING; return(INTEGER_CONSTANT); } |
diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y index 49d0c38..56f40c9 100644 --- a/linden/indra/lscript/lscript_compile/indra.y +++ b/linden/indra/lscript/lscript_compile/indra.y | |||
@@ -53,7 +53,6 @@ | |||
53 | %token QUATERNION | 53 | %token QUATERNION |
54 | %token LIST | 54 | %token LIST |
55 | 55 | ||
56 | %token STATE_DEFAULT | ||
57 | %token STATE | 56 | %token STATE |
58 | %token EVENT | 57 | %token EVENT |
59 | %token JUMP | 58 | %token JUMP |
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp index df679ed..075418d 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp | |||
@@ -8957,8 +8957,12 @@ void LLScriptEventHandler::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi | |||
8957 | { | 8957 | { |
8958 | entrycount = 0; | 8958 | entrycount = 0; |
8959 | mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, mScopeEntry, entrycount, NULL); | 8959 | mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, mScopeEntry, entrycount, NULL); |
8960 | fprintf(fp, "Function Args: %s\n", mScopeEntry->mFunctionArgs.mString); | 8960 | |
8961 | fprintf(fp, "Local List: %s\n", mScopeEntry->mLocals.mString); | 8961 | const char *function_args = mScopeEntry->mFunctionArgs.mString; |
8962 | fprintf(fp, "Function Args: %s\n", function_args?function_args:""); | ||
8963 | |||
8964 | const char *local_list = mScopeEntry->mLocals.mString; | ||
8965 | fprintf(fp, "Local List: %s\n", local_list?local_list:""); | ||
8962 | } | 8966 | } |
8963 | mStackSpace = (S32)count; | 8967 | mStackSpace = (S32)count; |
8964 | break; | 8968 | break; |
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp index c44e1c0..86fdd18 100644 --- a/linden/indra/lscript/lscript_library/lscript_library.cpp +++ b/linden/indra/lscript/lscript_library/lscript_library.cpp | |||
@@ -426,6 +426,8 @@ void LLScriptLibrary::init() | |||
426 | addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL.")); | 426 | addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL.")); |
427 | addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)")); | 427 | addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)")); |
428 | 428 | ||
429 | addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_DETAILS_NAME, _DESCRIPTION, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR.")); | ||
430 | |||
429 | // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only | 431 | // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only |
430 | 432 | ||
431 | // IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST. | 433 | // IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST. |
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index e86b0d2..e622664 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Localized versions of Info.plist keys */ | 1 | /* Localized versions of Info.plist keys */ |
2 | 2 | ||
3 | CFBundleName = "Second Life"; | 3 | CFBundleName = "Second Life"; |
4 | CFBundleShortVersionString = "Second Life version 1.18.2.1"; | 4 | CFBundleShortVersionString = "Second Life version 1.18.3.2"; |
5 | CFBundleGetInfoString = "Second Life version 1.18.2.1, Copyright 2004-2007 Linden Research, Inc."; | 5 | CFBundleGetInfoString = "Second Life version 1.18.3.2, Copyright 2004-2007 Linden Research, Inc."; |
diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index b897a67..f4ac5c6 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist | |||
@@ -32,7 +32,7 @@ | |||
32 | </dict> | 32 | </dict> |
33 | </array> | 33 | </array> |
34 | <key>CFBundleVersion</key> | 34 | <key>CFBundleVersion</key> |
35 | <string>1.18.2.1</string> | 35 | <string>1.18.3.2</string> |
36 | <key>CSResourcesFileMapped</key> | 36 | <key>CSResourcesFileMapped</key> |
37 | <true/> | 37 | <true/> |
38 | </dict> | 38 | </dict> |
diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini index c7f8426..4496ee7 100644 --- a/linden/indra/newview/app_settings/keywords.ini +++ b/linden/indra/newview/app_settings/keywords.ini | |||
@@ -149,6 +149,16 @@ PSYS_SRC_PATTERN_ANGLE | |||
149 | PSYS_SRC_PATTERN_ANGLE_CONE | 149 | PSYS_SRC_PATTERN_ANGLE_CONE |
150 | PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY | 150 | PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY |
151 | 151 | ||
152 | OBJECT_UNKOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type. | ||
153 | OBJECT_NAME Used with llGetObjectDetails to get an object's name. | ||
154 | OBJECT_DESC Used with llGetObjectDetails to get an object's description. | ||
155 | OBJECT_POS Used with llGetObjectDetails to get an object's position. | ||
156 | OBJECT_ROT Used with llGetObjectDetails to get an object's rotation. | ||
157 | OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity. | ||
158 | OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned. | ||
159 | OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key. | ||
160 | OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key. | ||
161 | |||
152 | # some vehicle params | 162 | # some vehicle params |
153 | VEHICLE_TYPE_NONE | 163 | VEHICLE_TYPE_NONE |
154 | VEHICLE_TYPE_SLED | 164 | VEHICLE_TYPE_SLED |
diff --git a/linden/indra/newview/fakevoicesoundsignal.cpp b/linden/indra/newview/fakevoicesoundsignal.cpp index 2a271ad..0cb5c11 100644 --- a/linden/indra/newview/fakevoicesoundsignal.cpp +++ b/linden/indra/newview/fakevoicesoundsignal.cpp | |||
@@ -1,8 +1,32 @@ | |||
1 | //---------------------------------------------------------------------- | 1 | /** |
2 | // Fake Voice Sound Signal | 2 | * @file fakevoicesoundsignal.cpp |
3 | // author: JJ Ventrella | 3 | * @brief Fake Voice Sound Signal |
4 | // THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY | 4 | * author: JJ Ventrella |
5 | //---------------------------------------------------------------------- | 5 | * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY |
6 | * | ||
7 | * Copyright (c) 2000-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 | */ | ||
6 | 30 | ||
7 | #include "llviewerprecompiledheaders.h" | 31 | #include "llviewerprecompiledheaders.h" |
8 | #include "fakevoicesoundsignal.h" | 32 | #include "fakevoicesoundsignal.h" |
diff --git a/linden/indra/newview/fakevoicesoundsignal.h b/linden/indra/newview/fakevoicesoundsignal.h index 9e0132c..a10d9fe 100644 --- a/linden/indra/newview/fakevoicesoundsignal.h +++ b/linden/indra/newview/fakevoicesoundsignal.h | |||
@@ -1,8 +1,32 @@ | |||
1 | //-------------------------------------------------------------------- | 1 | /** |
2 | // Fake Voice Sound Signal | 2 | * @file fakevoicesoundsignal.h |
3 | // author: JJ Ventrella | 3 | * @brief Fake Voice Sound Signal |
4 | // THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY | 4 | * author: JJ Ventrella |
5 | //----------------------------------------------------------------------------- | 5 | * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY |
6 | * | ||
7 | * Copyright (c) 2000-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 | */ | ||
6 | #ifndef FAKE_VOICE_SOUND_SIGNAL_H | 30 | #ifndef FAKE_VOICE_SOUND_SIGNAL_H |
7 | #define FAKE_VOICE_SOUND_SIGNAL_H | 31 | #define FAKE_VOICE_SOUND_SIGNAL_H |
8 | 32 | ||
diff --git a/linden/indra/newview/featuretable.txt b/linden/indra/newview/featuretable.txt index 28b1ddc..f98b42b 100644 --- a/linden/indra/newview/featuretable.txt +++ b/linden/indra/newview/featuretable.txt | |||
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096 | |||
34 | RenderRippleWater 1 1 | 34 | RenderRippleWater 1 1 |
35 | RenderTerrainDetail 1 2 | 35 | RenderTerrainDetail 1 2 |
36 | VertexShaderEnable 1 1 | 36 | VertexShaderEnable 1 1 |
37 | UseOcclusion 1 1 | ||
38 | RenderCubeMap 1 1 | ||
37 | 39 | ||
38 | // | 40 | // |
39 | // Class 0 Hardware (Unknown or just old) | 41 | // Class 0 Hardware (Unknown or just old) |
diff --git a/linden/indra/newview/featuretable_linux.txt b/linden/indra/newview/featuretable_linux.txt index 6c7acfa..f31fc0d 100644 --- a/linden/indra/newview/featuretable_linux.txt +++ b/linden/indra/newview/featuretable_linux.txt | |||
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096 | |||
34 | RenderRippleWater 1 1 | 34 | RenderRippleWater 1 1 |
35 | RenderTerrainDetail 1 2 | 35 | RenderTerrainDetail 1 2 |
36 | VertexShaderEnable 1 1 | 36 | VertexShaderEnable 1 1 |
37 | UseOcclusion 1 1 | ||
38 | RenderCubeMap 1 1 | ||
37 | 39 | ||
38 | // | 40 | // |
39 | // Class 0 Hardware (Unknown or just old) | 41 | // Class 0 Hardware (Unknown or just old) |
@@ -107,6 +109,8 @@ RenderAvatarVP 0 0 | |||
107 | RenderLighting 1 0 | 109 | RenderLighting 1 0 |
108 | RenderParticleCount 1 1024 | 110 | RenderParticleCount 1 1024 |
109 | RenderTerrainDetail 1 0 | 111 | RenderTerrainDetail 1 0 |
112 | RenderCubeMap 0 0 | ||
113 | UseOcclusion 0 0 | ||
110 | 114 | ||
111 | 115 | ||
112 | list low | 116 | list low |
@@ -145,6 +149,7 @@ RenderVBO 1 0 | |||
145 | RenderAniso 1 0 | 149 | RenderAniso 1 0 |
146 | RenderLighting 1 0 | 150 | RenderLighting 1 0 |
147 | RenderTerrainDetail 1 0 | 151 | RenderTerrainDetail 1 0 |
152 | RenderCubeMap 0 0 | ||
148 | 153 | ||
149 | list GeForce2 | 154 | list GeForce2 |
150 | RenderVBO 1 1 | 155 | RenderVBO 1 1 |
@@ -156,6 +161,7 @@ RenderTerrainDetail 1 0 | |||
156 | list GeForce3 | 161 | list GeForce3 |
157 | 162 | ||
158 | list ATI | 163 | list ATI |
164 | UseOcclusion 0 0 | ||
159 | 165 | ||
160 | list Radeon8500 | 166 | list Radeon8500 |
161 | RenderLighting 1 0 | 167 | RenderLighting 1 0 |
diff --git a/linden/indra/newview/featuretable_mac.txt b/linden/indra/newview/featuretable_mac.txt index 2685e3b..fe5ae7a 100644 --- a/linden/indra/newview/featuretable_mac.txt +++ b/linden/indra/newview/featuretable_mac.txt | |||
@@ -35,7 +35,8 @@ RenderParticleCount 1 4096 | |||
35 | RenderRippleWater 1 1 | 35 | RenderRippleWater 1 1 |
36 | RenderTerrainDetail 1 2 | 36 | RenderTerrainDetail 1 2 |
37 | VertexShaderEnable 1 1 | 37 | VertexShaderEnable 1 1 |
38 | 38 | UseOcclusion 1 1 | |
39 | RenderCubeMap 1 1 | ||
39 | 40 | ||
40 | // | 41 | // |
41 | // Class 0 Hardware (Unknown or just old) | 42 | // Class 0 Hardware (Unknown or just old) |
diff --git a/linden/indra/newview/files.lst b/linden/indra/newview/files.lst index a5c348c..52372b3 100644 --- a/linden/indra/newview/files.lst +++ b/linden/indra/newview/files.lst | |||
@@ -97,6 +97,7 @@ newview/llfloaterpermissionsmgr.cpp | |||
97 | newview/llfloaterpostcard.cpp | 97 | newview/llfloaterpostcard.cpp |
98 | newview/llfloaterpreference.cpp | 98 | newview/llfloaterpreference.cpp |
99 | newview/llfloaterproperties.cpp | 99 | newview/llfloaterproperties.cpp |
100 | newview/llfloaterreleasemsg.cpp | ||
100 | newview/llfloaterregioninfo.cpp | 101 | newview/llfloaterregioninfo.cpp |
101 | newview/llfloaterreporter.cpp | 102 | newview/llfloaterreporter.cpp |
102 | newview/llfloatersaveavatar.cpp | 103 | newview/llfloatersaveavatar.cpp |
diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt index 74fbe2c..066990b 100644 --- a/linden/indra/newview/gpu_table.txt +++ b/linden/indra/newview/gpu_table.txt | |||
@@ -25,6 +25,8 @@ ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 2 | |||
25 | ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 | 25 | ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 |
26 | ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1 | 26 | ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1 |
27 | ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 | 27 | ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 |
28 | ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1 | ||
29 | ATI Mobility Radeon .*ATI.*Mobility.* 0 | ||
28 | ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3 | 30 | ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3 |
29 | ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 | 31 | ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 |
30 | ATI FireGL 5xxx .*ATI.*FireGL V5.* 3 | 32 | ATI FireGL 5xxx .*ATI.*FireGL V5.* 3 |
diff --git a/linden/indra/newview/linux_tools/client-readme.txt b/linden/indra/newview/linux_tools/client-readme.txt index e07384c..59ebf67 100644 --- a/linden/indra/newview/linux_tools/client-readme.txt +++ b/linden/indra/newview/linux_tools/client-readme.txt | |||
@@ -97,6 +97,10 @@ you wish. | |||
97 | These are the most commonly-encountered known issues which are specific to | 97 | These are the most commonly-encountered known issues which are specific to |
98 | the Alpha release of the Linux client. | 98 | the Alpha release of the Linux client. |
99 | 99 | ||
100 | * VOICE COMMUNICATION - this is not yet available in the Linux client. | ||
101 | |||
102 | * STREAMING MOVIES - these are currently disabled while we work on some issues. | ||
103 | |||
100 | * VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as | 104 | * VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as |
101 | robust as their counterparts for other operating systems, so some advanced | 105 | robust as their counterparts for other operating systems, so some advanced |
102 | Second Life graphical features have been DISABLED by default to aid | 106 | Second Life graphical features have been DISABLED by default to aid |
diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index d39fc3a..9adc4d3 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh | |||
@@ -43,6 +43,9 @@ export LL_GL_BASICEXT=x | |||
43 | ## - Avoids an often-buggy X feature that doesn't really benefit us anyway. | 43 | ## - Avoids an often-buggy X feature that doesn't really benefit us anyway. |
44 | export SDL_VIDEO_X11_DGAMOUSE=0 | 44 | export SDL_VIDEO_X11_DGAMOUSE=0 |
45 | 45 | ||
46 | ## - Works around a problem with misconfigured 64-bit systems not finding GL | ||
47 | export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri | ||
48 | |||
46 | ## Nothing worth editing below this line. | 49 | ## Nothing worth editing below this line. |
47 | ##------------------------------------------------------------------- | 50 | ##------------------------------------------------------------------- |
48 | 51 | ||
@@ -65,7 +68,12 @@ if [ -n "$LL_TCMALLOC" ]; then | |||
65 | fi | 68 | fi |
66 | fi | 69 | fi |
67 | fi | 70 | fi |
68 | LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat | 71 | |
72 | export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"' | ||
73 | export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin' | ||
74 | export SL_OPT="`cat gridargs.dat` $@" | ||
75 | |||
76 | eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || echo Unclean shutdown. | ||
69 | 77 | ||
70 | echo | 78 | echo |
71 | echo '*********************************************************' | 79 | echo '*********************************************************' |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 3f6ab4f..bf54472 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -5612,7 +5612,7 @@ void LLAgent::teleportCancel() | |||
5612 | sendReliableMessage(); | 5612 | sendReliableMessage(); |
5613 | } | 5613 | } |
5614 | gTeleportDisplay = FALSE; | 5614 | gTeleportDisplay = FALSE; |
5615 | gAgent.setTeleportState( LLAgent::TELEPORT_CANCELLING ); | 5615 | gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); |
5616 | } | 5616 | } |
5617 | 5617 | ||
5618 | 5618 | ||
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 7fb4571..9c53fe1 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -529,8 +529,7 @@ public: | |||
529 | TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond | 529 | TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond |
530 | TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator | 530 | TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator |
531 | TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator | 531 | TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator |
532 | TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches" | 532 | TELEPORT_ARRIVING = 5 // Make the user wait while content "pre-caches" |
533 | TELEPORT_CANCELLING = 6 // used only if user clicks "cancel" button | ||
534 | }; | 533 | }; |
535 | 534 | ||
536 | ETeleportState getTeleportState() const { return mTeleportState; } | 535 | ETeleportState getTeleportState() const { return mTeleportState; } |
diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index 1d6e27d..efe71e1 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp | |||
@@ -95,8 +95,8 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason) | |||
95 | { | 95 | { |
96 | case 400: | 96 | case 400: |
97 | args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName); | 97 | args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName); |
98 | args["[REASON]"] = "Error in upload request. Please contact " | 98 | args["[REASON]"] = "Error in upload request. Please visit " |
99 | "support@lindenlab.com for help fixing this problem."; | 99 | "http://secondlife.com/support for help fixing this problem."; |
100 | gViewerWindow->alertXml("CannotUploadReason", args); | 100 | gViewerWindow->alertXml("CannotUploadReason", args); |
101 | break; | 101 | break; |
102 | case 500: | 102 | case 500: |
diff --git a/linden/indra/newview/llcompilequeue.cpp b/linden/indra/newview/llcompilequeue.cpp index 12b52c4..2bd2f2d 100644 --- a/linden/indra/newview/llcompilequeue.cpp +++ b/linden/indra/newview/llcompilequeue.cpp | |||
@@ -366,7 +366,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object, | |||
366 | // static | 366 | // static |
367 | void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | 367 | void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, |
368 | LLAssetType::EType type, | 368 | LLAssetType::EType type, |
369 | void* user_data, S32 status) | 369 | void* user_data, S32 status, LLExtStat ext_status) |
370 | { | 370 | { |
371 | llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl; | 371 | llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl; |
372 | LLScriptQueueData* data = (LLScriptQueueData*)user_data; | 372 | LLScriptQueueData* data = (LLScriptQueueData*)user_data; |
@@ -449,7 +449,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | |||
449 | } | 449 | } |
450 | 450 | ||
451 | // static | 451 | // static |
452 | void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) | 452 | void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
453 | { | 453 | { |
454 | llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl; | 454 | llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl; |
455 | if (status) | 455 | if (status) |
@@ -462,7 +462,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use | |||
462 | } | 462 | } |
463 | 463 | ||
464 | // static | 464 | // static |
465 | void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) | 465 | void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
466 | { | 466 | { |
467 | llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl; | 467 | llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl; |
468 | LLCompileQueueData* data = (LLCompileQueueData*)user_data; | 468 | LLCompileQueueData* data = (LLCompileQueueData*)user_data; |
diff --git a/linden/indra/newview/llcompilequeue.h b/linden/indra/newview/llcompilequeue.h index c28b92c..cbff4cb 100644 --- a/linden/indra/newview/llcompilequeue.h +++ b/linden/indra/newview/llcompilequeue.h | |||
@@ -133,12 +133,12 @@ protected: | |||
133 | // This is the callback for when each script arrives | 133 | // This is the callback for when each script arrives |
134 | static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | 134 | static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id, |
135 | LLAssetType::EType type, | 135 | LLAssetType::EType type, |
136 | void* user_data, S32 status); | 136 | void* user_data, S32 status, LLExtStat ext_status); |
137 | 137 | ||
138 | static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status); | 138 | static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status); |
139 | static void onSaveBytecodeComplete(const LLUUID& asset_id, | 139 | static void onSaveBytecodeComplete(const LLUUID& asset_id, |
140 | void* user_data, | 140 | void* user_data, |
141 | S32 status); | 141 | S32 status, LLExtStat ext_status); |
142 | 142 | ||
143 | // compile the file given and save it out. | 143 | // compile the file given and save it out. |
144 | void compile(const char* filename, const LLUUID& asset_id); | 144 | void compile(const char* filename, const LLUUID& asset_id); |
diff --git a/linden/indra/newview/llconsole.cpp b/linden/indra/newview/llconsole.cpp index 112f8ab..47d239f 100644 --- a/linden/indra/newview/llconsole.cpp +++ b/linden/indra/newview/llconsole.cpp | |||
@@ -124,7 +124,7 @@ void LLConsole::draw() | |||
124 | // skip lines added more than mLinePersistTime ago | 124 | // skip lines added more than mLinePersistTime ago |
125 | F32 cur_time = mTimer.getElapsedTimeF32(); | 125 | F32 cur_time = mTimer.getElapsedTimeF32(); |
126 | 126 | ||
127 | if( gStartupState != STATE_STARTED ) | 127 | if( LLStartUp::getStartupState() != STATE_STARTED ) |
128 | { | 128 | { |
129 | S32 count = mLines.size(); | 129 | S32 count = mLines.size(); |
130 | S32 i = 0; | 130 | S32 i = 0; |
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index dffaa36..351f437 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp | |||
@@ -49,6 +49,7 @@ | |||
49 | #include "llconsole.h" | 49 | #include "llconsole.h" |
50 | #include "lldrawpoolterrain.h" | 50 | #include "lldrawpoolterrain.h" |
51 | #include "llflexibleobject.h" | 51 | #include "llflexibleobject.h" |
52 | #include "llfeaturemanager.h" | ||
52 | #include "llglslshader.h" | 53 | #include "llglslshader.h" |
53 | #include "llmediaengine.h" | 54 | #include "llmediaengine.h" |
54 | #include "llpanelgeneral.h" | 55 | #include "llpanelgeneral.h" |
@@ -356,7 +357,7 @@ void declare_settings() | |||
356 | gSavedSettings.declareBOOL("ShowPropertyLines", FALSE, "Show line overlay demarking property boundaries"); | 357 | gSavedSettings.declareBOOL("ShowPropertyLines", FALSE, "Show line overlay demarking property boundaries"); |
357 | gSavedSettings.declareBOOL("ShowParcelOwners", FALSE, "", NO_PERSIST); | 358 | gSavedSettings.declareBOOL("ShowParcelOwners", FALSE, "", NO_PERSIST); |
358 | gSavedSettings.declareBOOL("ToolboxAutoMove", FALSE, "[NOT USED]"); | 359 | gSavedSettings.declareBOOL("ToolboxAutoMove", FALSE, "[NOT USED]"); |
359 | gSavedSettings.declareBOOL("ToolboxShowMore", FALSE, "", NO_PERSIST); | 360 | gSavedSettings.declareBOOL("ToolboxShowMore", TRUE, "Whether to show additional build tool controls", TRUE); |
360 | 361 | ||
361 | gSavedSettings.declareRect("ToolboxRect", LLRect(0, 100, 100, 100), "Rectangle for tools window" ); // only care about position | 362 | gSavedSettings.declareRect("ToolboxRect", LLRect(0, 100, 100, 100), "Rectangle for tools window" ); // only care about position |
362 | 363 | ||
@@ -379,7 +380,7 @@ void declare_settings() | |||
379 | 380 | ||
380 | gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window"); | 381 | gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window"); |
381 | 382 | ||
382 | gSavedSettings.declareString("LSLHelpURL", "http://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); | 383 | gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); |
383 | // link for editable wiki (https doesn't seem to work right now with our embedded browser) | 384 | // link for editable wiki (https doesn't seem to work right now with our embedded browser) |
384 | //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); | 385 | //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); |
385 | // Wearable default images | 386 | // Wearable default images |
@@ -846,6 +847,9 @@ void declare_settings() | |||
846 | //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes | 847 | //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes |
847 | gSavedSettings.declareBOOL("ImagePipelineUseHTTP", FALSE, "If TRUE use HTTP GET to fetch textures from the server"); | 848 | gSavedSettings.declareBOOL("ImagePipelineUseHTTP", FALSE, "If TRUE use HTTP GET to fetch textures from the server"); |
848 | 849 | ||
850 | // Image compression | ||
851 | gSavedSettings.declareBOOL("LosslessJ2CUpload", FALSE, "Use lossless compression for small image uploads"); | ||
852 | |||
849 | // Threading | 853 | // Threading |
850 | gSavedSettings.declareBOOL("RunMultipleThreads", FALSE, "If TRUE keep background threads active during render"); | 854 | gSavedSettings.declareBOOL("RunMultipleThreads", FALSE, "If TRUE keep background threads active during render"); |
851 | 855 | ||
@@ -1108,6 +1112,10 @@ void declare_settings() | |||
1108 | 1112 | ||
1109 | // HTML dialog (general purpose) | 1113 | // HTML dialog (general purpose) |
1110 | gSavedSettings.declareRect("HtmlFloaterRect", LLRect(100,460,370,100), "Rectangle for HTML Floater window"); | 1114 | gSavedSettings.declareRect("HtmlFloaterRect", LLRect(100,460,370,100), "Rectangle for HTML Floater window"); |
1115 | |||
1116 | // HTML sim release message floater | ||
1117 | gSavedSettings.declareRect("HtmlReleaseMessage", LLRect(46,520,400,128), "Rectangle for HTML Release Message Floater window"); | ||
1118 | |||
1111 | 1119 | ||
1112 | // HTML help | 1120 | // HTML help |
1113 | gSavedSettings.declareString("HtmlHelpLastPage", "", "Last URL visited via help system"); | 1121 | gSavedSettings.declareString("HtmlHelpLastPage", "", "Last URL visited via help system"); |
@@ -1810,8 +1818,8 @@ class LLUseOcclusionListener: public LLSimpleListener | |||
1810 | { | 1818 | { |
1811 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1819 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1812 | { | 1820 | { |
1813 | LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery && | 1821 | LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery |
1814 | !gUseWireframe); | 1822 | && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe); |
1815 | return true; | 1823 | return true; |
1816 | } | 1824 | } |
1817 | }; | 1825 | }; |
diff --git a/linden/indra/newview/llcubemap.cpp b/linden/indra/newview/llcubemap.cpp index 74af3da..ff8f7c3 100644 --- a/linden/indra/newview/llcubemap.cpp +++ b/linden/indra/newview/llcubemap.cpp | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "llviewerprecompiledheaders.h" | 29 | #include "llviewerprecompiledheaders.h" |
30 | #include "llfeaturemanager.h" | ||
30 | #include "llworkerthread.h" | 31 | #include "llworkerthread.h" |
31 | 32 | ||
32 | #include "llcubemap.h" | 33 | #include "llcubemap.h" |
@@ -65,7 +66,8 @@ void LLCubeMap::initGL() | |||
65 | { | 66 | { |
66 | llassert(gGLManager.mInited); | 67 | llassert(gGLManager.mInited); |
67 | 68 | ||
68 | if (gGLManager.mHasCubeMap) | 69 | if (gGLManager.mHasCubeMap |
70 | && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) | ||
69 | { | 71 | { |
70 | mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; | 72 | mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; |
71 | mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; | 73 | mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; |
@@ -174,7 +176,9 @@ GLuint LLCubeMap::getGLName() | |||
174 | 176 | ||
175 | void LLCubeMap::bind() | 177 | void LLCubeMap::bind() |
176 | { | 178 | { |
177 | if (gGLManager.mHasCubeMap) | 179 | if (gGLManager.mHasCubeMap |
180 | //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap") | ||
181 | ) | ||
178 | { | 182 | { |
179 | // We assume that if they have cube mapping, they have multitexturing. | 183 | // We assume that if they have cube mapping, they have multitexturing. |
180 | glEnable(GL_TEXTURE_CUBE_MAP_ARB); | 184 | glEnable(GL_TEXTURE_CUBE_MAP_ARB); |
@@ -192,7 +196,10 @@ void LLCubeMap::bind() | |||
192 | void LLCubeMap::enable(S32 stage) | 196 | void LLCubeMap::enable(S32 stage) |
193 | { | 197 | { |
194 | mTextureStage = stage; | 198 | mTextureStage = stage; |
195 | if (gGLManager.mHasCubeMap && stage >= 0) | 199 | if (gGLManager.mHasCubeMap && |
200 | stage >= 0 | ||
201 | //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap") | ||
202 | ) | ||
196 | { | 203 | { |
197 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set | 204 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set |
198 | 205 | ||
@@ -209,7 +216,9 @@ void LLCubeMap::enable(S32 stage) | |||
209 | 216 | ||
210 | void LLCubeMap::disable() | 217 | void LLCubeMap::disable() |
211 | { | 218 | { |
212 | if (gGLManager.mHasCubeMap && mTextureStage >= 0) | 219 | if (gGLManager.mHasCubeMap && mTextureStage >= 0 |
220 | //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap") | ||
221 | ) | ||
213 | { | 222 | { |
214 | glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); | 223 | glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); |
215 | glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); | 224 | glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); |
diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp index 0ab5b54..f1feb4a 100644 --- a/linden/indra/newview/lldrawpool.cpp +++ b/linden/indra/newview/lldrawpool.cpp | |||
@@ -469,12 +469,14 @@ LLDrawPool* LLRenderPass::instancePool() | |||
469 | 469 | ||
470 | void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture) | 470 | void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture) |
471 | { | 471 | { |
472 | std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; | 472 | LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type]; |
473 | 473 | ||
474 | for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) | 474 | for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k) |
475 | { | 475 | { |
476 | LLDrawInfo& params = **k; | 476 | LLDrawInfo *pparams = *k; |
477 | pushBatch(params, mask, texture); | 477 | if (pparams) { |
478 | pushBatch(*pparams, mask, texture); | ||
479 | } | ||
478 | } | 480 | } |
479 | } | 481 | } |
480 | 482 | ||
@@ -484,14 +486,15 @@ void LLRenderPass::renderInvisible(U32 mask) | |||
484 | LLGLState::checkClientArrays(mask); | 486 | LLGLState::checkClientArrays(mask); |
485 | #endif | 487 | #endif |
486 | 488 | ||
487 | std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE]; | 489 | LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE]; |
488 | 490 | ||
489 | for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) | 491 | for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i) |
490 | { | 492 | { |
491 | LLDrawInfo& params = **i; | 493 | |
494 | LLDrawInfo *pparams = *i; | ||
495 | if (pparams && pparams->mVertexBuffer.notNull()) { | ||
496 | LLDrawInfo ¶ms = *pparams; | ||
492 | 497 | ||
493 | if (params.mVertexBuffer) | ||
494 | { | ||
495 | params.mVertexBuffer->setBuffer(mask); | 498 | params.mVertexBuffer->setBuffer(mask); |
496 | U32 *indices_pointer = | 499 | U32 *indices_pointer = |
497 | (U32 *) params.mVertexBuffer->getIndicesPointer(); | 500 | (U32 *) params.mVertexBuffer->getIndicesPointer(); |
@@ -509,22 +512,19 @@ void LLRenderPass::renderTexture(U32 type, U32 mask) | |||
509 | LLGLState::checkClientArrays(mask); | 512 | LLGLState::checkClientArrays(mask); |
510 | #endif | 513 | #endif |
511 | 514 | ||
512 | std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type]; | 515 | LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type]; |
513 | 516 | ||
514 | for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) | 517 | for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i) |
515 | { | 518 | { |
516 | LLDrawInfo& params = **i; | 519 | LLDrawInfo* pparams = *i; |
517 | pushBatch(params, mask, TRUE); | 520 | if (pparams) { |
521 | pushBatch(*pparams, mask, TRUE); | ||
522 | } | ||
518 | } | 523 | } |
519 | } | 524 | } |
520 | 525 | ||
521 | void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) | 526 | void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) |
522 | { | 527 | { |
523 | if (params.mVertexBuffer.isNull()) | ||
524 | { | ||
525 | return; | ||
526 | } | ||
527 | |||
528 | if (texture) | 528 | if (texture) |
529 | { | 529 | { |
530 | if (params.mTexture.notNull()) | 530 | if (params.mTexture.notNull()) |
@@ -542,12 +542,15 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) | |||
542 | LLImageGL::unbindTexture(0); | 542 | LLImageGL::unbindTexture(0); |
543 | } | 543 | } |
544 | } | 544 | } |
545 | 545 | ||
546 | params.mVertexBuffer->setBuffer(mask); | 546 | if (params.mVertexBuffer.notNull()) |
547 | U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer(); | 547 | { |
548 | glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount, | 548 | params.mVertexBuffer->setBuffer(mask); |
549 | GL_UNSIGNED_INT, indices_pointer+params.mOffset); | 549 | U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer(); |
550 | gPipeline.mTrianglesDrawn += params.mCount/3; | 550 | glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount, |
551 | GL_UNSIGNED_INT, indices_pointer+params.mOffset); | ||
552 | gPipeline.mTrianglesDrawn += params.mCount/3; | ||
553 | } | ||
551 | 554 | ||
552 | if (params.mTextureMatrix && texture && params.mTexture.notNull()) | 555 | if (params.mTextureMatrix && texture && params.mTexture.notNull()) |
553 | { | 556 | { |
diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp index 8866c1e..a502580 100644 --- a/linden/indra/newview/lldrawpoolalpha.cpp +++ b/linden/indra/newview/lldrawpoolalpha.cpp | |||
@@ -219,9 +219,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask, std::vector<LLSpatialGroup* | |||
219 | last_part = part; | 219 | last_part = part; |
220 | } | 220 | } |
221 | 221 | ||
222 | std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA]; | 222 | LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA]; |
223 | 223 | ||
224 | for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) | 224 | for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k) |
225 | { | 225 | { |
226 | LLDrawInfo& params = **k; | 226 | LLDrawInfo& params = **k; |
227 | 227 | ||
@@ -245,7 +245,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask | |||
245 | { | 245 | { |
246 | BOOL light_enabled = TRUE; | 246 | BOOL light_enabled = TRUE; |
247 | 247 | ||
248 | std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; | 248 | LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type]; |
249 | 249 | ||
250 | U32 prim_type = GL_TRIANGLES; | 250 | U32 prim_type = GL_TRIANGLES; |
251 | 251 | ||
@@ -272,7 +272,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask | |||
272 | glPointSize(width/(view*view)); | 272 | glPointSize(width/(view*view)); |
273 | }*/ | 273 | }*/ |
274 | 274 | ||
275 | for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) | 275 | for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k) |
276 | { | 276 | { |
277 | LLDrawInfo& params = **k; | 277 | LLDrawInfo& params = **k; |
278 | if (texture && params.mTexture.notNull()) | 278 | if (texture && params.mTexture.notNull()) |
diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp index b0b8b02..a78dc94 100644 --- a/linden/indra/newview/lldrawpoolbump.cpp +++ b/linden/indra/newview/lldrawpoolbump.cpp | |||
@@ -350,9 +350,9 @@ void LLDrawPoolBump::renderActive(U32 type, U32 mask, BOOL texture) | |||
350 | 350 | ||
351 | void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE) | 351 | void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE) |
352 | { | 352 | { |
353 | std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; | 353 | LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type]; |
354 | 354 | ||
355 | for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) | 355 | for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k) |
356 | { | 356 | { |
357 | LLDrawInfo& params = **k; | 357 | LLDrawInfo& params = **k; |
358 | if (LLPipeline::sDynamicReflections) | 358 | if (LLPipeline::sDynamicReflections) |
@@ -899,9 +899,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask) | |||
899 | LLGLState::checkClientArrays(mask); | 899 | LLGLState::checkClientArrays(mask); |
900 | #endif | 900 | #endif |
901 | 901 | ||
902 | std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type]; | 902 | LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type]; |
903 | 903 | ||
904 | for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) | 904 | for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i) |
905 | { | 905 | { |
906 | LLDrawInfo& params = **i; | 906 | LLDrawInfo& params = **i; |
907 | 907 | ||
@@ -914,9 +914,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask) | |||
914 | 914 | ||
915 | void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask) | 915 | void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask) |
916 | { | 916 | { |
917 | const std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; | 917 | LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type]; |
918 | 918 | ||
919 | for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) | 919 | for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k) |
920 | { | 920 | { |
921 | LLDrawInfo& params = **k; | 921 | LLDrawInfo& params = **k; |
922 | 922 | ||
diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp index 100eb43..035cb56 100644 --- a/linden/indra/newview/lldrawpoolwater.cpp +++ b/linden/indra/newview/lldrawpoolwater.cpp | |||
@@ -92,8 +92,8 @@ LLDrawPool *LLDrawPoolWater::instancePool() | |||
92 | 92 | ||
93 | void LLDrawPoolWater::prerender() | 93 | void LLDrawPoolWater::prerender() |
94 | { | 94 | { |
95 | mVertexShaderLevel = gSavedSettings.getBOOL("RenderRippleWater") ? | 95 | mVertexShaderLevel = (gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) ? |
96 | LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0; | 96 | LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0; |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
@@ -565,7 +565,7 @@ void LLDrawPoolWater::shade() | |||
565 | LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap(); | 565 | LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap(); |
566 | 566 | ||
567 | gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB); | 567 | gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB); |
568 | skyMap->bind(); | 568 | skyMap->bind(); |
569 | 569 | ||
570 | //bind normal map | 570 | //bind normal map |
571 | S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP); | 571 | S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP); |
diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp index 4944415..57f4def 100644 --- a/linden/indra/newview/lldynamictexture.cpp +++ b/linden/indra/newview/lldynamictexture.cpp | |||
@@ -205,8 +205,6 @@ BOOL LLDynamicTexture::updateAllInstances() | |||
205 | return TRUE; | 205 | return TRUE; |
206 | } | 206 | } |
207 | 207 | ||
208 | BOOL started = FALSE; | ||
209 | |||
210 | BOOL result = FALSE; | 208 | BOOL result = FALSE; |
211 | for( S32 order = 0; order < ORDER_COUNT; order++ ) | 209 | for( S32 order = 0; order < ORDER_COUNT; order++ ) |
212 | { | 210 | { |
@@ -215,29 +213,22 @@ BOOL LLDynamicTexture::updateAllInstances() | |||
215 | dynamicTexture = LLDynamicTexture::sInstances[order].getNextData()) | 213 | dynamicTexture = LLDynamicTexture::sInstances[order].getNextData()) |
216 | { | 214 | { |
217 | if (dynamicTexture->needsRender()) | 215 | if (dynamicTexture->needsRender()) |
218 | { | 216 | { |
219 | if (!started) | 217 | dynamicTexture->preRender(); // Must be called outside of startRender() |
220 | { | 218 | |
221 | started = TRUE; | 219 | LLVertexBuffer::startRender(); |
222 | LLVertexBuffer::startRender(); | ||
223 | } | ||
224 | |||
225 | dynamicTexture->preRender(); | ||
226 | if (dynamicTexture->render()) | 220 | if (dynamicTexture->render()) |
227 | { | 221 | { |
228 | result = TRUE; | 222 | result = TRUE; |
229 | sNumRenders++; | 223 | sNumRenders++; |
230 | } | 224 | } |
225 | LLVertexBuffer::stopRender(); | ||
226 | |||
231 | dynamicTexture->postRender(result); | 227 | dynamicTexture->postRender(result); |
232 | } | 228 | } |
233 | } | 229 | } |
234 | } | 230 | } |
235 | 231 | ||
236 | if (started) | ||
237 | { | ||
238 | LLVertexBuffer::stopRender(); | ||
239 | } | ||
240 | |||
241 | return result; | 232 | return result; |
242 | } | 233 | } |
243 | 234 | ||
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 8bcbc1e..93450b4 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp | |||
@@ -402,7 +402,7 @@ void LLFeatureManager::cleanupFeatureTables() | |||
402 | 402 | ||
403 | void LLFeatureManager::initCPUFeatureMasks() | 403 | void LLFeatureManager::initCPUFeatureMasks() |
404 | { | 404 | { |
405 | if (gSysMemory.getPhysicalMemory() <= 256*1024*1024) | 405 | if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024) |
406 | { | 406 | { |
407 | maskFeatures("RAM256MB"); | 407 | maskFeatures("RAM256MB"); |
408 | } | 408 | } |
@@ -494,7 +494,7 @@ extern LLOSInfo gSysOS; | |||
494 | 494 | ||
495 | void LLFeatureManager::applyRecommendedFeatures() | 495 | void LLFeatureManager::applyRecommendedFeatures() |
496 | { | 496 | { |
497 | // see featuretable.txt | 497 | // see featuretable.txt / featuretable_linux.txt / featuretable_mac.txt |
498 | 498 | ||
499 | llinfos << "Applying Recommended Features" << llendl; | 499 | llinfos << "Applying Recommended Features" << llendl; |
500 | #ifndef LL_RELEASE_FOR_DOWNLOAD | 500 | #ifndef LL_RELEASE_FOR_DOWNLOAD |
@@ -544,6 +544,10 @@ void LLFeatureManager::applyRecommendedFeatures() | |||
544 | // RippleWater | 544 | // RippleWater |
545 | BOOL ripple = getRecommendedLevel("RenderRippleWater"); | 545 | BOOL ripple = getRecommendedLevel("RenderRippleWater"); |
546 | gSavedSettings.setBOOL("RenderRippleWater", ripple); | 546 | gSavedSettings.setBOOL("RenderRippleWater", ripple); |
547 | |||
548 | // Occlusion Culling | ||
549 | BOOL occlusion = getRecommendedLevel("UseOcclusion"); | ||
550 | gSavedSettings.setBOOL("UseOcclusion", occlusion); | ||
547 | 551 | ||
548 | // Vertex Shaders | 552 | // Vertex Shaders |
549 | S32 shaders = getRecommendedLevel("VertexShaderEnable"); | 553 | S32 shaders = getRecommendedLevel("VertexShaderEnable"); |
diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp index 836cfdc..454b40f 100644 --- a/linden/indra/newview/llflexibleobject.cpp +++ b/linden/indra/newview/llflexibleobject.cpp | |||
@@ -643,6 +643,15 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) | |||
643 | volume->updateRelativeXform(); | 643 | volume->updateRelativeXform(); |
644 | doFlexibleUpdate(); | 644 | doFlexibleUpdate(); |
645 | 645 | ||
646 | // Object may have been rotated, which means it needs a rebuild. See SL-47220 | ||
647 | BOOL rotated = FALSE; | ||
648 | LLQuaternion cur_rotation = getFrameRotation(); | ||
649 | if ( cur_rotation != mLastFrameRotation ) | ||
650 | { | ||
651 | mLastFrameRotation = cur_rotation; | ||
652 | rotated = TRUE; | ||
653 | } | ||
654 | |||
646 | if (volume->mLODChanged || volume->mFaceMappingChanged || | 655 | if (volume->mLODChanged || volume->mFaceMappingChanged || |
647 | volume->mVolumeChanged) | 656 | volume->mVolumeChanged) |
648 | { | 657 | { |
@@ -650,7 +659,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) | |||
650 | volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); | 659 | volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); |
651 | } | 660 | } |
652 | 661 | ||
653 | if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged) | 662 | if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged || rotated) |
654 | { | 663 | { |
655 | doFlexibleRebuild(); | 664 | doFlexibleRebuild(); |
656 | volume->genBBoxes(isVolumeGlobal()); | 665 | volume->genBBoxes(isVolumeGlobal()); |
diff --git a/linden/indra/newview/llflexibleobject.h b/linden/indra/newview/llflexibleobject.h index f3da5bb..df2e4ac 100644 --- a/linden/indra/newview/llflexibleobject.h +++ b/linden/indra/newview/llflexibleobject.h | |||
@@ -117,7 +117,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface | |||
117 | LLVector3 mAnchorPosition; | 117 | LLVector3 mAnchorPosition; |
118 | LLVector3 mParentPosition; | 118 | LLVector3 mParentPosition; |
119 | LLQuaternion mParentRotation; | 119 | LLQuaternion mParentRotation; |
120 | LLQuaternion mInitialAxisRotation; | 120 | LLQuaternion mLastFrameRotation; |
121 | LLQuaternion mLastSegmentRotation; | 121 | LLQuaternion mLastSegmentRotation; |
122 | BOOL mInitialized; | 122 | BOOL mInitialized; |
123 | BOOL mUpdated; | 123 | BOOL mUpdated; |
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index cc3bb08..b259455 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "llagent.h" | 41 | #include "llagent.h" |
42 | #include "llviewerstats.h" | 42 | #include "llviewerstats.h" |
43 | #include "llviewerregion.h" | 43 | #include "llviewerregion.h" |
44 | #include "llversion.h" | 44 | #include "llversionviewer.h" |
45 | #include "llviewerbuild.h" | 45 | #include "llviewerbuild.h" |
46 | #include "llvieweruictrlfactory.h" | 46 | #include "llvieweruictrlfactory.h" |
47 | #include "viewer.h" // for gViewerDigest | 47 | #include "viewer.h" // for gViewerDigest |
@@ -109,7 +109,9 @@ LLFloaterAbout::LLFloaterAbout() | |||
109 | support.append(" ("); | 109 | support.append(" ("); |
110 | gAgent.getRegion()->getHost().getString(buffer, MAX_STRING); | 110 | gAgent.getRegion()->getHost().getString(buffer, MAX_STRING); |
111 | support.append(buffer); | 111 | support.append(buffer); |
112 | support.append(")\n\n"); | 112 | support.append(")\n"); |
113 | support.append(gLastVersionChannel); | ||
114 | support.append("\n\n"); | ||
113 | } | 115 | } |
114 | 116 | ||
115 | // CPU | 117 | // CPU |
@@ -117,9 +119,8 @@ LLFloaterAbout::LLFloaterAbout() | |||
117 | support.append( gSysCPU.getCPUString() ); | 119 | support.append( gSysCPU.getCPUString() ); |
118 | support.append("\n"); | 120 | support.append("\n"); |
119 | 121 | ||
120 | U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024; | 122 | U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; |
121 | // For some reason, the reported amount of memory is always wrong by one meg | 123 | // Moved hack adjustment to Windows memory size into llsys.cpp |
122 | memory++; | ||
123 | 124 | ||
124 | LLString mem_text = llformat("Memory: %u MB\n", memory ); | 125 | LLString mem_text = llformat("Memory: %u MB\n", memory ); |
125 | support.append(mem_text); | 126 | support.append(mem_text); |
@@ -165,8 +166,15 @@ LLFloaterAbout::LLFloaterAbout() | |||
165 | 166 | ||
166 | // Fix views | 167 | // Fix views |
167 | childDisable("credits_editor"); | 168 | childDisable("credits_editor"); |
168 | childDisable("support_editor"); | 169 | |
169 | childSetText("support_editor", support); | 170 | LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true); |
171 | if (support_widget) | ||
172 | { | ||
173 | support_widget->setEnabled( FALSE ); | ||
174 | support_widget->setTakesFocus( TRUE ); | ||
175 | support_widget->setText( support ); | ||
176 | support_widget->setHandleEditKeysDirectly( TRUE ); | ||
177 | } | ||
170 | 178 | ||
171 | center(); | 179 | center(); |
172 | 180 | ||
diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h index c536fb5..68cd3d5 100644 --- a/linden/indra/newview/llfloateranimpreview.h +++ b/linden/indra/newview/llfloateranimpreview.h | |||
@@ -102,7 +102,7 @@ public: | |||
102 | static void onSaveComplete(const LLUUID& asset_uuid, | 102 | static void onSaveComplete(const LLUUID& asset_uuid, |
103 | LLAssetType::EType type, | 103 | LLAssetType::EType type, |
104 | void* user_data, | 104 | void* user_data, |
105 | S32 status); | 105 | S32 status, LLExtStat ext_status); |
106 | protected: | 106 | protected: |
107 | void draw(); | 107 | void draw(); |
108 | void resetMotion(); | 108 | void resetMotion(); |
diff --git a/linden/indra/newview/llfloaterauction.cpp b/linden/indra/newview/llfloaterauction.cpp index 49da8ba..e024bde 100644 --- a/linden/indra/newview/llfloaterauction.cpp +++ b/linden/indra/newview/llfloaterauction.cpp | |||
@@ -55,9 +55,9 @@ | |||
55 | ///---------------------------------------------------------------------------- | 55 | ///---------------------------------------------------------------------------- |
56 | 56 | ||
57 | void auction_j2c_upload_done(const LLUUID& asset_id, | 57 | void auction_j2c_upload_done(const LLUUID& asset_id, |
58 | void* user_data, S32 status); | 58 | void* user_data, S32 status, LLExtStat ext_status); |
59 | void auction_tga_upload_done(const LLUUID& asset_id, | 59 | void auction_tga_upload_done(const LLUUID& asset_id, |
60 | void* user_data, S32 status); | 60 | void* user_data, S32 status, LLExtStat ext_status); |
61 | 61 | ||
62 | ///---------------------------------------------------------------------------- | 62 | ///---------------------------------------------------------------------------- |
63 | /// Class llfloaterauction | 63 | /// Class llfloaterauction |
@@ -258,7 +258,7 @@ void LLFloaterAuction::onClickOK(void* data) | |||
258 | /// Local function definitions | 258 | /// Local function definitions |
259 | ///---------------------------------------------------------------------------- | 259 | ///---------------------------------------------------------------------------- |
260 | 260 | ||
261 | void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) | 261 | void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
262 | { | 262 | { |
263 | LLString* name = (LLString*)(user_data); | 263 | LLString* name = (LLString*)(user_data); |
264 | llinfos << "Upload of asset '" << *name << "' " << asset_id | 264 | llinfos << "Upload of asset '" << *name << "' " << asset_id |
@@ -279,7 +279,7 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status | |||
279 | } | 279 | } |
280 | } | 280 | } |
281 | 281 | ||
282 | void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) | 282 | void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
283 | { | 283 | { |
284 | LLString* name = (LLString*)(user_data); | 284 | LLString* name = (LLString*)(user_data); |
285 | llinfos << "Upload of asset '" << *name << "' " << asset_id | 285 | llinfos << "Upload of asset '" << *name << "' " << asset_id |
diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp index 3bb2462..16c15b0 100644 --- a/linden/indra/newview/llfloateravatarpicker.cpp +++ b/linden/indra/newview/llfloateravatarpicker.cpp | |||
@@ -197,29 +197,33 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | // static callback for inventory picker (select from calling cards) | ||
200 | void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) | 201 | void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) |
201 | { | 202 | { |
202 | LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data; | 203 | LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data; |
203 | if (!self) | 204 | if (self) |
204 | { | 205 | { |
205 | return; | 206 | self->doSelectionChange( items, user_action, data ); |
206 | } | 207 | } |
208 | } | ||
207 | 209 | ||
208 | self->mAvatarIDs.clear(); | 210 | // Callback for inventory picker (select from calling cards) |
209 | self->mAvatarNames.clear(); | 211 | void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) |
210 | 212 | { | |
211 | // if we have calling cards, disable select button until | 213 | if (!mListNames) |
212 | // the inventory picks a valid calling card | ||
213 | if (!items.empty()) | ||
214 | { | 214 | { |
215 | self->childSetEnabled("Select", FALSE); | 215 | return; |
216 | } | 216 | } |
217 | 217 | ||
218 | if (!self->mListNames) | 218 | std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected(); |
219 | { | 219 | if ( search_items.size() == 0 ) |
220 | return; | 220 | { // Nothing selected in the search results |
221 | mAvatarIDs.clear(); | ||
222 | mAvatarNames.clear(); | ||
223 | childSetEnabled("Select", FALSE); | ||
221 | } | 224 | } |
222 | 225 | ||
226 | BOOL first_calling_card = TRUE; | ||
223 | std::deque<LLFolderViewItem*>::const_iterator item_it; | 227 | std::deque<LLFolderViewItem*>::const_iterator item_it; |
224 | for (item_it = items.begin(); item_it != items.end(); ++item_it) | 228 | for (item_it = items.begin(); item_it != items.end(); ++item_it) |
225 | { | 229 | { |
@@ -230,10 +234,18 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem* | |||
230 | 234 | ||
231 | if (item) | 235 | if (item) |
232 | { | 236 | { |
233 | self->mAvatarIDs.push_back(item->getCreatorUUID()); | 237 | if ( first_calling_card ) |
234 | self->mAvatarNames.push_back(listenerp->getName()); | 238 | { // Have a calling card selected, so clear anything from the search panel |
235 | self->childSetEnabled("Select", TRUE); | 239 | first_calling_card = FALSE; |
236 | self->mListNames->deselectAllItems(); | 240 | mAvatarIDs.clear(); |
241 | mAvatarNames.clear(); | ||
242 | mListNames->deselectAllItems(); | ||
243 | } | ||
244 | |||
245 | // Add calling card info to the selected avatars | ||
246 | mAvatarIDs.push_back(item->getCreatorUUID()); | ||
247 | mAvatarNames.push_back(listenerp->getName()); | ||
248 | childSetEnabled("Select", TRUE); | ||
237 | } | 249 | } |
238 | } | 250 | } |
239 | } | 251 | } |
diff --git a/linden/indra/newview/llfloateravatarpicker.h b/linden/indra/newview/llfloateravatarpicker.h index 9089c9a..f9326ad 100644 --- a/linden/indra/newview/llfloateravatarpicker.h +++ b/linden/indra/newview/llfloateravatarpicker.h | |||
@@ -64,6 +64,8 @@ protected: | |||
64 | static void onBtnAdd(void* userdata); | 64 | static void onBtnAdd(void* userdata); |
65 | static void onBtnClose(void* userdata); | 65 | static void onBtnClose(void* userdata); |
66 | static void onList(LLUICtrl* ctrl, void* userdata); | 66 | static void onList(LLUICtrl* ctrl, void* userdata); |
67 | |||
68 | void doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); | ||
67 | static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); | 69 | static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); |
68 | 70 | ||
69 | void find(); | 71 | void find(); |
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp index 41bd8d7..3c5c9a5 100644 --- a/linden/indra/newview/llfloatercustomize.cpp +++ b/linden/indra/newview/llfloatercustomize.cpp | |||
@@ -379,6 +379,7 @@ public: | |||
379 | 379 | ||
380 | virtual BOOL postBuild(); | 380 | virtual BOOL postBuild(); |
381 | virtual void draw(); | 381 | virtual void draw(); |
382 | virtual BOOL isDirty() const; // LLUICtrl | ||
382 | 383 | ||
383 | void addSubpart(const LLString& name, ESubpart id, LLSubpart* part ); | 384 | void addSubpart(const LLString& name, ESubpart id, LLSubpart* part ); |
384 | void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture ); | 385 | void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture ); |
@@ -395,7 +396,6 @@ public: | |||
395 | void setWearable(LLWearable* wearable, U32 perm_mask, BOOL is_complete); | 396 | void setWearable(LLWearable* wearable, U32 perm_mask, BOOL is_complete); |
396 | 397 | ||
397 | void addVisualParamToUndoBuffer( S32 param_id, F32 current_weight ); | 398 | void addVisualParamToUndoBuffer( S32 param_id, F32 current_weight ); |
398 | BOOL isDirty(); | ||
399 | 399 | ||
400 | void setUIPermissions(U32 perm_mask, BOOL is_complete); | 400 | void setUIPermissions(U32 perm_mask, BOOL is_complete); |
401 | 401 | ||
@@ -558,6 +558,7 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart ) | |||
558 | sorted_params.insert(vt); | 558 | sorted_params.insert(vt); |
559 | } | 559 | } |
560 | gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); | 560 | gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); |
561 | gFloaterCustomize->updateScrollingPanelUI(); | ||
561 | 562 | ||
562 | 563 | ||
563 | // Update the camera | 564 | // Update the camera |
@@ -1030,7 +1031,7 @@ void LLPanelEditWearable::setVisible(BOOL visible) | |||
1030 | } | 1031 | } |
1031 | } | 1032 | } |
1032 | 1033 | ||
1033 | BOOL LLPanelEditWearable::isDirty() | 1034 | BOOL LLPanelEditWearable::isDirty() const |
1034 | { | 1035 | { |
1035 | LLWearable* wearable = gAgent.getWearable( mType ); | 1036 | LLWearable* wearable = gAgent.getWearable( mType ); |
1036 | if( !wearable ) | 1037 | if( !wearable ) |
@@ -2148,7 +2149,7 @@ void LLFloaterCustomize::draw() | |||
2148 | } | 2149 | } |
2149 | } | 2150 | } |
2150 | 2151 | ||
2151 | BOOL LLFloaterCustomize::isDirty() | 2152 | BOOL LLFloaterCustomize::isDirty() const |
2152 | { | 2153 | { |
2153 | for(S32 i = 0; i < WT_COUNT; i++) | 2154 | for(S32 i = 0; i < WT_COUNT; i++) |
2154 | { | 2155 | { |
diff --git a/linden/indra/newview/llfloatercustomize.h b/linden/indra/newview/llfloatercustomize.h index 6eccdcc..a24dc39 100644 --- a/linden/indra/newview/llfloatercustomize.h +++ b/linden/indra/newview/llfloatercustomize.h | |||
@@ -95,7 +95,7 @@ public: | |||
95 | //const char* getWearableDescription( EWearableType type ); | 95 | //const char* getWearableDescription( EWearableType type ); |
96 | LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; } | 96 | LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; } |
97 | 97 | ||
98 | BOOL isDirty(); | 98 | virtual BOOL isDirty() const; |
99 | 99 | ||
100 | void askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata ); | 100 | void askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata ); |
101 | 101 | ||
diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp index 3a05715..2e54166 100644 --- a/linden/indra/newview/llfloaterdirectory.cpp +++ b/linden/indra/newview/llfloaterdirectory.cpp | |||
@@ -209,7 +209,8 @@ void* LLFloaterDirectory::createClassifiedDetail(void* userdata) | |||
209 | void* LLFloaterDirectory::createPanelAvatar(void* data) | 209 | void* LLFloaterDirectory::createPanelAvatar(void* data) |
210 | { | 210 | { |
211 | LLFloaterDirectory* self = (LLFloaterDirectory*)data; | 211 | LLFloaterDirectory* self = (LLFloaterDirectory*)data; |
212 | self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(), TRUE); // allow edit self | 212 | self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(), |
213 | FALSE); // disallow editing in search context (SL-48632) | ||
213 | self->mPanelAvatarp->setVisible(FALSE); | 214 | self->mPanelAvatarp->setVisible(FALSE); |
214 | return self->mPanelAvatarp; | 215 | return self->mPanelAvatarp; |
215 | 216 | ||
diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index 78447e9..67803e1 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp | |||
@@ -93,12 +93,13 @@ LLPanelFriends::~LLPanelFriends() | |||
93 | delete mObserver; | 93 | delete mObserver; |
94 | } | 94 | } |
95 | 95 | ||
96 | void LLPanelFriends::tick() | 96 | BOOL LLPanelFriends::tick() |
97 | { | 97 | { |
98 | mEventTimer.stop(); | 98 | mEventTimer.stop(); |
99 | mPeriod = 1000000; | 99 | mPeriod = 1000000; |
100 | mAllowRightsChange = TRUE; | 100 | mAllowRightsChange = TRUE; |
101 | updateFriends(LLFriendObserver::ADD); | 101 | updateFriends(LLFriendObserver::ADD); |
102 | return FALSE; | ||
102 | } | 103 | } |
103 | 104 | ||
104 | void LLPanelFriends::updateFriends(U32 changed_mask) | 105 | void LLPanelFriends::updateFriends(U32 changed_mask) |
diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h index 0b6646d..cf7451f 100644 --- a/linden/indra/newview/llfloaterfriends.h +++ b/linden/indra/newview/llfloaterfriends.h | |||
@@ -57,7 +57,7 @@ public: | |||
57 | * current instantiation of this floater. There is only once since | 57 | * current instantiation of this floater. There is only once since |
58 | * you can currently only look at your local friends. | 58 | * you can currently only look at your local friends. |
59 | */ | 59 | */ |
60 | virtual void tick(); | 60 | virtual BOOL tick(); |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * @brief This method is called in response to the LLAvatarTracker | 63 | * @brief This method is called in response to the LLAvatarTracker |
diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp index 7376bba..b858003 100644 --- a/linden/indra/newview/llfloatergodtools.cpp +++ b/linden/indra/newview/llfloatergodtools.cpp | |||
@@ -1419,7 +1419,7 @@ void LLPanelRequestTools::onClickRequest(void* data) | |||
1419 | } | 1419 | } |
1420 | } | 1420 | } |
1421 | 1421 | ||
1422 | void terrain_download_done(void** data, S32 status) | 1422 | void terrain_download_done(void** data, S32 status, LLExtStat ext_status) |
1423 | { | 1423 | { |
1424 | LLNotifyBox::showXml("TerrainDownloaded"); | 1424 | LLNotifyBox::showXml("TerrainDownloaded"); |
1425 | } | 1425 | } |
diff --git a/linden/indra/newview/llfloatergroupinfo.cpp b/linden/indra/newview/llfloatergroupinfo.cpp index 3e8eae5..6187692 100644 --- a/linden/indra/newview/llfloatergroupinfo.cpp +++ b/linden/indra/newview/llfloatergroupinfo.cpp | |||
@@ -109,7 +109,7 @@ void LLFloaterGroupInfo::closeGroup(const LLUUID& group_id) | |||
109 | { | 109 | { |
110 | fgi->mPanelGroupp->close(); | 110 | fgi->mPanelGroupp->close(); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | // static | 115 | // static |
@@ -125,9 +125,9 @@ void LLFloaterGroupInfo::refreshGroup(const LLUUID& group_id) | |||
125 | if (fgi) | 125 | if (fgi) |
126 | { | 126 | { |
127 | if (fgi->mPanelGroupp) | 127 | if (fgi->mPanelGroupp) |
128 | { | 128 | { |
129 | fgi->mPanelGroupp->refreshData(); | 129 | fgi->mPanelGroupp->refreshData(); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
@@ -190,9 +190,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject, | |||
190 | { | 190 | { |
191 | // We need to clean up that inventory offer. | 191 | // We need to clean up that inventory offer. |
192 | if (inventory_offer) | 192 | if (inventory_offer) |
193 | { | 193 | { |
194 | inventory_offer_callback( IOR_DECLINE , inventory_offer); | 194 | inventory_offer_callback( IOR_DECLINE , inventory_offer); |
195 | } | 195 | } |
196 | return; | 196 | return; |
197 | } | 197 | } |
198 | 198 | ||
@@ -202,9 +202,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject, | |||
202 | { | 202 | { |
203 | // We need to clean up that inventory offer. | 203 | // We need to clean up that inventory offer. |
204 | if (inventory_offer) | 204 | if (inventory_offer) |
205 | { | 205 | { |
206 | inventory_offer_callback( IOR_DECLINE , inventory_offer); | 206 | inventory_offer_callback( IOR_DECLINE , inventory_offer); |
207 | } | 207 | } |
208 | return; | 208 | return; |
209 | } | 209 | } |
210 | 210 | ||
diff --git a/linden/indra/newview/llfloatergroupinvite.cpp b/linden/indra/newview/llfloatergroupinvite.cpp index a6d81ec..3ff95dc 100644 --- a/linden/indra/newview/llfloatergroupinvite.cpp +++ b/linden/indra/newview/llfloatergroupinvite.cpp | |||
@@ -107,7 +107,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite() | |||
107 | } | 107 | } |
108 | 108 | ||
109 | // static | 109 | // static |
110 | void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id) | 110 | void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids) |
111 | { | 111 | { |
112 | // Make sure group_id isn't null | 112 | // Make sure group_id isn't null |
113 | if (group_id.isNull()) | 113 | if (group_id.isNull()) |
@@ -131,6 +131,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id) | |||
131 | 131 | ||
132 | fgi->mImpl->mInvitePanelp->clear(); | 132 | fgi->mImpl->mInvitePanelp->clear(); |
133 | } | 133 | } |
134 | |||
135 | if (agent_ids != NULL) | ||
136 | { | ||
137 | fgi->mImpl->mInvitePanelp->addUsers(*agent_ids); | ||
138 | } | ||
134 | 139 | ||
135 | fgi->center(); | 140 | fgi->center(); |
136 | fgi->open(); /*Flawfinder: ignore*/ | 141 | fgi->open(); /*Flawfinder: ignore*/ |
diff --git a/linden/indra/newview/llfloatergroupinvite.h b/linden/indra/newview/llfloatergroupinvite.h index c61adee..3ad0bf2 100644 --- a/linden/indra/newview/llfloatergroupinvite.h +++ b/linden/indra/newview/llfloatergroupinvite.h | |||
@@ -39,7 +39,7 @@ class LLFloaterGroupInvite | |||
39 | public: | 39 | public: |
40 | virtual ~LLFloaterGroupInvite(); | 40 | virtual ~LLFloaterGroupInvite(); |
41 | 41 | ||
42 | static void showForGroup(const LLUUID &group_id); | 42 | static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL); |
43 | 43 | ||
44 | protected: | 44 | protected: |
45 | LLFloaterGroupInvite(const std::string& name, | 45 | LLFloaterGroupInvite(const std::string& name, |
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index 74526e1..5a442be 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "llfloatergroups.h" | 38 | #include "llfloatergroups.h" |
39 | 39 | ||
40 | #include "message.h" | 40 | #include "message.h" |
41 | #include "roles_constants.h" | ||
41 | 42 | ||
42 | #include "llagent.h" | 43 | #include "llagent.h" |
43 | #include "llbutton.h" | 44 | #include "llbutton.h" |
@@ -56,7 +57,7 @@ | |||
56 | std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; | 57 | std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; |
57 | 58 | ||
58 | // helper functions | 59 | // helper functions |
59 | void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id); | 60 | void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS); |
60 | 61 | ||
61 | ///---------------------------------------------------------------------------- | 62 | ///---------------------------------------------------------------------------- |
62 | /// Class LLFloaterGroupPicker | 63 | /// Class LLFloaterGroupPicker |
@@ -83,7 +84,8 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed) | |||
83 | 84 | ||
84 | LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) : | 85 | LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) : |
85 | mSelectCallback(NULL), | 86 | mSelectCallback(NULL), |
86 | mCallbackUserdata(NULL) | 87 | mCallbackUserdata(NULL), |
88 | mPowersMask(GP_ALL_POWERS) | ||
87 | { | 89 | { |
88 | mID = seed.asUUID(); | 90 | mID = seed.asUUID(); |
89 | sInstances.insert(std::make_pair(mID, this)); | 91 | sInstances.insert(std::make_pair(mID, this)); |
@@ -101,9 +103,16 @@ void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*), | |||
101 | mCallbackUserdata = userdata; | 103 | mCallbackUserdata = userdata; |
102 | } | 104 | } |
103 | 105 | ||
106 | void LLFloaterGroupPicker::setPowersMask(U64 powers_mask) | ||
107 | { | ||
108 | mPowersMask = powers_mask; | ||
109 | postBuild(); | ||
110 | } | ||
111 | |||
112 | |||
104 | BOOL LLFloaterGroupPicker::postBuild() | 113 | BOOL LLFloaterGroupPicker::postBuild() |
105 | { | 114 | { |
106 | init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID()); | 115 | init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID(), mPowersMask); |
107 | 116 | ||
108 | childSetAction("OK", onBtnOK, this); | 117 | childSetAction("OK", onBtnOK, this); |
109 | 118 | ||
@@ -414,7 +423,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata) | |||
414 | if(self) self->enableButtons(); | 423 | if(self) self->enableButtons(); |
415 | } | 424 | } |
416 | 425 | ||
417 | void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id) | 426 | void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask) |
418 | { | 427 | { |
419 | S32 count = gAgent.mGroups.count(); | 428 | S32 count = gAgent.mGroups.count(); |
420 | LLUUID id; | 429 | LLUUID id; |
@@ -427,20 +436,22 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id) | |||
427 | { | 436 | { |
428 | id = gAgent.mGroups.get(i).mID; | 437 | id = gAgent.mGroups.get(i).mID; |
429 | LLGroupData* group_datap = &gAgent.mGroups.get(i); | 438 | LLGroupData* group_datap = &gAgent.mGroups.get(i); |
430 | LLString style = "NORMAL"; | 439 | if ((group_datap->mPowers & powers_mask) != 0) { |
431 | if(highlight_id == id) | 440 | LLString style = "NORMAL"; |
432 | { | 441 | if(highlight_id == id) |
433 | style = "BOLD"; | 442 | { |
443 | style = "BOLD"; | ||
444 | } | ||
445 | |||
446 | LLSD element; | ||
447 | element["id"] = id; | ||
448 | element["columns"][0]["column"] = "name"; | ||
449 | element["columns"][0]["value"] = group_datap->mName; | ||
450 | element["columns"][0]["font"] = "SANSSERIF"; | ||
451 | element["columns"][0]["font-style"] = style; | ||
452 | |||
453 | group_list->addElement(element, ADD_SORTED); | ||
434 | } | 454 | } |
435 | |||
436 | LLSD element; | ||
437 | element["id"] = id; | ||
438 | element["columns"][0]["column"] = "name"; | ||
439 | element["columns"][0]["value"] = group_datap->mName; | ||
440 | element["columns"][0]["font"] = "SANSSERIF"; | ||
441 | element["columns"][0]["font-style"] = style; | ||
442 | |||
443 | group_list->addElement(element, ADD_SORTED); | ||
444 | } | 455 | } |
445 | 456 | ||
446 | // add "none" to list at top | 457 | // add "none" to list at top |
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h index ed5b8b2..496a9fb 100644 --- a/linden/indra/newview/llfloatergroups.h +++ b/linden/indra/newview/llfloatergroups.h | |||
@@ -57,6 +57,7 @@ public: | |||
57 | ~LLFloaterGroupPicker(); | 57 | ~LLFloaterGroupPicker(); |
58 | void setSelectCallback( void (*callback)(LLUUID, void*), | 58 | void setSelectCallback( void (*callback)(LLUUID, void*), |
59 | void* userdata); | 59 | void* userdata); |
60 | void setPowersMask(U64 powers_mask); | ||
60 | BOOL postBuild(); | 61 | BOOL postBuild(); |
61 | 62 | ||
62 | protected: | 63 | protected: |
@@ -69,6 +70,7 @@ protected: | |||
69 | 70 | ||
70 | protected: | 71 | protected: |
71 | LLUUID mID; | 72 | LLUUID mID; |
73 | U64 mPowersMask; | ||
72 | void (*mSelectCallback)(LLUUID id, void* userdata); | 74 | void (*mSelectCallback)(LLUUID id, void* userdata); |
73 | void* mCallbackUserdata; | 75 | void* mCallbackUserdata; |
74 | 76 | ||
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 0a91563..554555d 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "pipeline.h" | 50 | #include "pipeline.h" |
51 | #include "viewer.h" | 51 | #include "viewer.h" |
52 | #include "llvieweruictrlfactory.h" | 52 | #include "llvieweruictrlfactory.h" |
53 | #include "llviewerimagelist.h" | ||
53 | 54 | ||
54 | //static | 55 | //static |
55 | S32 LLFloaterImagePreview::sUploadAmount = 10; | 56 | S32 LLFloaterImagePreview::sUploadAmount = 10; |
@@ -57,9 +58,10 @@ S32 LLFloaterImagePreview::sUploadAmount = 10; | |||
57 | const S32 PREVIEW_BORDER_WIDTH = 2; | 58 | const S32 PREVIEW_BORDER_WIDTH = 2; |
58 | const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; | 59 | const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; |
59 | const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; | 60 | const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; |
60 | const S32 PREF_BUTTON_HEIGHT = 16; | 61 | const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; |
61 | const S32 PREVIEW_TEXTURE_HEIGHT = 300; | 62 | const S32 PREVIEW_TEXTURE_HEIGHT = 300; |
62 | 63 | ||
64 | |||
63 | //----------------------------------------------------------------------------- | 65 | //----------------------------------------------------------------------------- |
64 | // LLFloaterImagePreview() | 66 | // LLFloaterImagePreview() |
65 | //----------------------------------------------------------------------------- | 67 | //----------------------------------------------------------------------------- |
@@ -106,6 +108,10 @@ BOOL LLFloaterImagePreview::postBuild() | |||
106 | 108 | ||
107 | mSculptedPreview = new LLImagePreviewSculpted(256, 256); | 109 | mSculptedPreview = new LLImagePreviewSculpted(256, 256); |
108 | mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); | 110 | mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); |
111 | |||
112 | if ((mRawImagep->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) && | ||
113 | (mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF)) | ||
114 | childEnable("lossless_check"); | ||
109 | } | 115 | } |
110 | else | 116 | else |
111 | { | 117 | { |
@@ -763,6 +769,7 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami | |||
763 | 769 | ||
764 | LLVolumeParams volume_params; | 770 | LLVolumeParams volume_params; |
765 | volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE); | 771 | volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE); |
772 | volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE); | ||
766 | mVolume = new LLVolume(volume_params, (F32) MAX_LOD); | 773 | mVolume = new LLVolume(volume_params, (F32) MAX_LOD); |
767 | 774 | ||
768 | /* | 775 | /* |
diff --git a/linden/indra/newview/llfloaterimport.cpp b/linden/indra/newview/llfloaterimport.cpp index f30f69d..7340c49 100644 --- a/linden/indra/newview/llfloaterimport.cpp +++ b/linden/indra/newview/llfloaterimport.cpp | |||
@@ -510,7 +510,7 @@ void LLFloaterImport::finishImport(ImportAssetInfo *info) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | // static | 512 | // static |
513 | void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result) | 513 | void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) |
514 | { | 514 | { |
515 | llinfos << "LLFloaterImport: Finished uploading image." << llendl; | 515 | llinfos << "LLFloaterImport: Finished uploading image." << llendl; |
516 | LLResourceData *resource_data = (LLResourceData*)user_data; | 516 | LLResourceData *resource_data = (LLResourceData*)user_data; |
diff --git a/linden/indra/newview/llfloaterimport.h b/linden/indra/newview/llfloaterimport.h index 518ddc4..9ac005f 100644 --- a/linden/indra/newview/llfloaterimport.h +++ b/linden/indra/newview/llfloaterimport.h | |||
@@ -100,7 +100,7 @@ protected: | |||
100 | static void onBtnOK(void*); | 100 | static void onBtnOK(void*); |
101 | static void onBtnCancel(void*); | 101 | static void onBtnCancel(void*); |
102 | 102 | ||
103 | static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result); | 103 | static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status); |
104 | static void finishImport(ImportAssetInfo *fp); | 104 | static void finishImport(ImportAssetInfo *fp); |
105 | 105 | ||
106 | void draw(); | 106 | void draw(); |
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index c926afa..f494251 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp | |||
@@ -55,10 +55,10 @@ LLFloaterInspect::~LLFloaterInspect(void) | |||
55 | { | 55 | { |
56 | if(gToolMgr->getBaseTool() == gToolInspect) | 56 | if(gToolMgr->getBaseTool() == gToolInspect) |
57 | { | 57 | { |
58 | select_tool(gToolNull); | 58 | gToolMgr->clearTransientTool(); |
59 | } | 59 | } |
60 | // Switch back to basic toolset | 60 | // Switch back to basic toolset |
61 | gToolMgr->setCurrentToolset(gBasicToolset); | 61 | gToolMgr->setCurrentToolset(gBasicToolset); |
62 | } | 62 | } |
63 | else | 63 | else |
64 | { | 64 | { |
@@ -85,7 +85,7 @@ void LLFloaterInspect::show(void* ignored) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | sInstance->open(); | 87 | sInstance->open(); |
88 | select_tool(gToolInspect); | 88 | gToolMgr->setTransientTool(gToolInspect); |
89 | gSelectMgr->setForceSelection(forcesel); // restore previouis value | 89 | gSelectMgr->setForceSelection(forcesel); // restore previouis value |
90 | 90 | ||
91 | sInstance->mObjectSelection = gSelectMgr->getSelection(); | 91 | sInstance->mObjectSelection = gSelectMgr->getSelection(); |
@@ -256,7 +256,7 @@ void LLFloaterInspect::refresh() | |||
256 | 256 | ||
257 | void LLFloaterInspect::onFocusReceived() | 257 | void LLFloaterInspect::onFocusReceived() |
258 | { | 258 | { |
259 | select_tool(gToolInspect); | 259 | gToolMgr->setTransientTool(gToolInspect); |
260 | } | 260 | } |
261 | 261 | ||
262 | void LLFloaterInspect::dirty() | 262 | void LLFloaterInspect::dirty() |
diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index 24344bf..94ff5ed 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp | |||
@@ -291,7 +291,7 @@ void LLFloaterPostcard::onClickPublishHelp(void* data) | |||
291 | } | 291 | } |
292 | 292 | ||
293 | // static | 293 | // static |
294 | void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result) // StoreAssetData callback (fixed) | 294 | void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) |
295 | { | 295 | { |
296 | LLFloaterPostcard *self = (LLFloaterPostcard *)user_data; | 296 | LLFloaterPostcard *self = (LLFloaterPostcard *)user_data; |
297 | 297 | ||
diff --git a/linden/indra/newview/llfloaterpostcard.h b/linden/indra/newview/llfloaterpostcard.h index 33a5e92..2c5327e 100644 --- a/linden/indra/newview/llfloaterpostcard.h +++ b/linden/indra/newview/llfloaterpostcard.h | |||
@@ -58,7 +58,7 @@ public: | |||
58 | 58 | ||
59 | static void uploadCallback(const LLUUID& asset_id, | 59 | static void uploadCallback(const LLUUID& asset_id, |
60 | void *user_data, | 60 | void *user_data, |
61 | S32 result); | 61 | S32 result, LLExtStat ext_status); |
62 | 62 | ||
63 | static void updateUserInfo(const char *email); | 63 | static void updateUserInfo(const char *email); |
64 | 64 | ||
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 571bcac..f7c05b5 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp | |||
@@ -1483,13 +1483,15 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) | |||
1483 | LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); | 1483 | LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); |
1484 | if (!list) return; | 1484 | if (!list) return; |
1485 | if (list->getItemCount() >= ESTATE_MAX_MANAGERS) | 1485 | if (list->getItemCount() >= ESTATE_MAX_MANAGERS) |
1486 | { | 1486 | { // Tell user they can't add more managers |
1487 | LLString::format_map_t args; | 1487 | LLString::format_map_t args; |
1488 | args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS); | 1488 | args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS); |
1489 | gViewerWindow->alertXml("MaxManagersOnRegion", args); | 1489 | gViewerWindow->alertXml("MaxManagersOnRegion", args); |
1490 | return; | ||
1491 | } | 1490 | } |
1492 | accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd"); | 1491 | else |
1492 | { // Go pick managers to add | ||
1493 | accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd"); | ||
1494 | } | ||
1493 | } | 1495 | } |
1494 | 1496 | ||
1495 | // static | 1497 | // static |
@@ -1995,7 +1997,7 @@ BOOL LLPanelEstateInfo::postBuild() | |||
1995 | if (manager_name_list) | 1997 | if (manager_name_list) |
1996 | { | 1998 | { |
1997 | manager_name_list->setCommitOnSelectionChange(TRUE); | 1999 | manager_name_list->setCommitOnSelectionChange(TRUE); |
1998 | manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS); | 2000 | manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue |
1999 | } | 2001 | } |
2000 | 2002 | ||
2001 | childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); | 2003 | childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); |
@@ -2562,7 +2564,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp) | |||
2562 | void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, | 2564 | void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, |
2563 | const LLUUID& asset_uuid, | 2565 | const LLUUID& asset_uuid, |
2564 | LLAssetType::EType type, | 2566 | LLAssetType::EType type, |
2565 | void* user_data, S32 status) | 2567 | void* user_data, S32 status, LLExtStat ext_status) |
2566 | { | 2568 | { |
2567 | llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; | 2569 | llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; |
2568 | LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; | 2570 | LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; |
@@ -2973,9 +2975,13 @@ bool LLDispatchSetEstateAccess::operator()( | |||
2973 | LLNameListCtrl* estate_manager_name_list = | 2975 | LLNameListCtrl* estate_manager_name_list = |
2974 | LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list"); | 2976 | LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list"); |
2975 | if (estate_manager_name_list) | 2977 | if (estate_manager_name_list) |
2976 | { | 2978 | { |
2977 | estate_manager_name_list->deleteAllItems(); | 2979 | estate_manager_name_list->deleteAllItems(); // Clear existing entries |
2978 | for (S32 i = 0; i < num_estate_managers && i < ESTATE_MAX_MANAGERS; i++) | 2980 | |
2981 | // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't | ||
2982 | // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused, | ||
2983 | // and they can still remove them. | ||
2984 | for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++) | ||
2979 | { | 2985 | { |
2980 | LLUUID id; | 2986 | LLUUID id; |
2981 | memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ | 2987 | memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ |
diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h index cd550ff..6c53a7d 100644 --- a/linden/indra/newview/llfloaterregioninfo.h +++ b/linden/indra/newview/llfloaterregioninfo.h | |||
@@ -369,7 +369,7 @@ public: | |||
369 | static void onLoadComplete(LLVFS *vfs, | 369 | static void onLoadComplete(LLVFS *vfs, |
370 | const LLUUID& asset_uuid, | 370 | const LLUUID& asset_uuid, |
371 | LLAssetType::EType type, | 371 | LLAssetType::EType type, |
372 | void* user_data, S32 status); | 372 | void* user_data, S32 status, LLExtStat ext_status); |
373 | 373 | ||
374 | // Accessor functions | 374 | // Accessor functions |
375 | static void updateCovenantText(const std::string& string, const LLUUID& asset_id); | 375 | static void updateCovenantText(const std::string& string, const LLUUID& asset_id); |
diff --git a/linden/indra/newview/llfloaterreleasemsg.cpp b/linden/indra/newview/llfloaterreleasemsg.cpp new file mode 100644 index 0000000..50df25a --- /dev/null +++ b/linden/indra/newview/llfloaterreleasemsg.cpp | |||
@@ -0,0 +1,152 @@ | |||
1 | /** | ||
2 | * @file llfloaterreleasemsg.cpp | ||
3 | * @brief In-world HTML dialog | ||
4 | * | ||
5 | * Copyright (c) 2005-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
29 | #include "llviewerprecompiledheaders.h" | ||
30 | |||
31 | #include "llvieweruictrlfactory.h" | ||
32 | #include "llviewerwindow.h" | ||
33 | #include "llviewercontrol.h" | ||
34 | #include "llfloaterreleasemsg.h" | ||
35 | #include "llagent.h" | ||
36 | #include "llviewerregion.h" | ||
37 | |||
38 | extern LLAgent gAgent; | ||
39 | extern LLString gLastVersionChannel; | ||
40 | |||
41 | LLFloaterReleaseMsg* LLFloaterReleaseMsg::sInstance = 0; | ||
42 | |||
43 | |||
44 | //////////////////////////////////////////////////////////////////////////////// | ||
45 | // | ||
46 | LLFloaterReleaseMsg* LLFloaterReleaseMsg::getInstance() | ||
47 | { | ||
48 | if ( ! sInstance ) | ||
49 | sInstance = new LLFloaterReleaseMsg; | ||
50 | |||
51 | return sInstance; | ||
52 | } | ||
53 | |||
54 | //////////////////////////////////////////////////////////////////////////////// | ||
55 | // | ||
56 | LLFloaterReleaseMsg::LLFloaterReleaseMsg() | ||
57 | : LLFloater( "Release Message Floater" ) | ||
58 | |||
59 | #if LL_LIBXUL_ENABLED | ||
60 | , | ||
61 | mWebBrowser( 0 ) | ||
62 | #endif // LL_LIBXUL_ENABLED | ||
63 | { | ||
64 | // create floater from its XML definition | ||
65 | gUICtrlFactory->buildFloater( this, "floater_sim_release_message.xml" ); | ||
66 | |||
67 | mTitleBase = getTitle(); | ||
68 | |||
69 | // reposition floater from saved settings | ||
70 | LLRect rect = gSavedSettings.getRect( "HtmlReleaseMessage" ); | ||
71 | reshape( rect.getWidth(), rect.getHeight(), FALSE ); | ||
72 | setRect( rect ); | ||
73 | |||
74 | #if LL_LIBXUL_ENABLED | ||
75 | mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "release_message_floater_browser" ); | ||
76 | if ( mWebBrowser ) | ||
77 | { | ||
78 | // observe browser events | ||
79 | mWebBrowser->addObserver( this ); | ||
80 | |||
81 | // make links open in external browser | ||
82 | mWebBrowser->setOpenInExternalBrowser( true ); | ||
83 | |||
84 | // don't automatically open secondlife links since we want to catch | ||
85 | // special ones that do other stuff (like open F1 Help) | ||
86 | //mWebBrowser->setOpenSecondLifeLinksInMap( false ); | ||
87 | } | ||
88 | #endif // LL_LIBXUL_ENABLED | ||
89 | |||
90 | childSetAction("close_btn", onClickClose, this); | ||
91 | setDefaultBtn("close_btn"); | ||
92 | } | ||
93 | |||
94 | //////////////////////////////////////////////////////////////////////////////// | ||
95 | // | ||
96 | LLFloaterReleaseMsg::~LLFloaterReleaseMsg() | ||
97 | { | ||
98 | #if LL_LIBXUL_ENABLED | ||
99 | // stop observing browser events | ||
100 | if ( mWebBrowser ) | ||
101 | mWebBrowser->remObserver( this ); | ||
102 | #endif // LL_LIBXUL_ENABLED | ||
103 | |||
104 | // save position of floater | ||
105 | gSavedSettings.setRect( "HtmlReleaseMessage", mRect ); | ||
106 | |||
107 | sInstance = 0; | ||
108 | } | ||
109 | |||
110 | //////////////////////////////////////////////////////////////////////////////// | ||
111 | // | ||
112 | void LLFloaterReleaseMsg::show() | ||
113 | { | ||
114 | |||
115 | std::string url = gAgent.getRegion()->getCapability("ServerReleaseNotes"); | ||
116 | |||
117 | if (url.empty()) return; | ||
118 | |||
119 | llinfos << "Release message url: " << url << llendl; | ||
120 | |||
121 | if (!sInstance) | ||
122 | { | ||
123 | sInstance = new LLFloaterReleaseMsg(); | ||
124 | sInstance->center(); | ||
125 | } | ||
126 | |||
127 | sInstance->setTitle(sInstance->mTitleBase + " " + gLastVersionChannel); | ||
128 | sInstance->open(); | ||
129 | |||
130 | #if LL_LIBXUL_ENABLED | ||
131 | // navigate to the URL | ||
132 | if ( sInstance->mWebBrowser ) | ||
133 | sInstance->mWebBrowser->navigateTo( url ); | ||
134 | #endif // LL_LIBXUL_ENABLED | ||
135 | |||
136 | // make floater appear | ||
137 | sInstance->setVisibleAndFrontmost(); | ||
138 | |||
139 | sInstance->draw(); | ||
140 | } | ||
141 | |||
142 | |||
143 | //////////////////////////////////////////////////////////////////////////////// | ||
144 | // | ||
145 | void LLFloaterReleaseMsg::onClickClose( void* data ) | ||
146 | { | ||
147 | LLFloaterReleaseMsg* self = ( LLFloaterReleaseMsg* )data; | ||
148 | |||
149 | self->setVisible( false ); | ||
150 | } | ||
151 | |||
152 | |||
diff --git a/linden/indra/newview/llfloaterreleasemsg.h b/linden/indra/newview/llfloaterreleasemsg.h new file mode 100644 index 0000000..026b9da --- /dev/null +++ b/linden/indra/newview/llfloaterreleasemsg.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /** | ||
2 | * @file LLFloaterReleaseMsg.h | ||
3 | * | ||
4 | * Copyright (c) 2005-2007, Linden Research, Inc. | ||
5 | * | ||
6 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLFLOATERRELMSG_H | ||
29 | #define LL_LLFLOATERRELMSG_H | ||
30 | |||
31 | #include "llwebbrowserctrl.h" | ||
32 | #include "llfloater.h" | ||
33 | |||
34 | class LLFloaterReleaseMsg : | ||
35 | public LLFloater, | ||
36 | public LLWebBrowserCtrlObserver | ||
37 | { | ||
38 | public: | ||
39 | static LLFloaterReleaseMsg* getInstance(); | ||
40 | virtual ~LLFloaterReleaseMsg(); | ||
41 | |||
42 | static void show(); | ||
43 | static void onClickClose( void* data ); | ||
44 | |||
45 | static LLFloaterReleaseMsg* sInstance; | ||
46 | LLString mTitleBase; | ||
47 | private: | ||
48 | LLFloaterReleaseMsg(); | ||
49 | #if LL_LIBXUL_ENABLED | ||
50 | LLWebBrowserCtrl* mWebBrowser; | ||
51 | #endif // LL_LIBXUL_ENABLED | ||
52 | LLButton* mCloseButton; | ||
53 | }; | ||
54 | |||
55 | #endif | ||
diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp index 7e6bf4d..f37f8a0 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "llinventory.h" | 41 | #include "llinventory.h" |
42 | #include "llstring.h" | 42 | #include "llstring.h" |
43 | #include "llsys.h" | 43 | #include "llsys.h" |
44 | #include "llversion.h" | 44 | #include "llversionviewer.h" |
45 | #include "message.h" | 45 | #include "message.h" |
46 | #include "v3math.h" | 46 | #include "v3math.h" |
47 | 47 | ||
@@ -930,7 +930,7 @@ void LLFloaterReporter::uploadImage() | |||
930 | 930 | ||
931 | 931 | ||
932 | // static | 932 | // static |
933 | void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result) // StoreAssetData callback (fixed) | 933 | void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) |
934 | { | 934 | { |
935 | LLUploadDialog::modalUploadFinished(); | 935 | LLUploadDialog::modalUploadFinished(); |
936 | 936 | ||
diff --git a/linden/indra/newview/llfloaterreporter.h b/linden/indra/newview/llfloaterreporter.h index 9cb8557..32fff6b 100644 --- a/linden/indra/newview/llfloaterreporter.h +++ b/linden/indra/newview/llfloaterreporter.h | |||
@@ -94,7 +94,7 @@ public: | |||
94 | static void onClickObjPicker (void *userdata); | 94 | static void onClickObjPicker (void *userdata); |
95 | static void onClickSelectAbuser (void *userdata); | 95 | static void onClickSelectAbuser (void *userdata); |
96 | static void closePickTool (void *userdata); | 96 | static void closePickTool (void *userdata); |
97 | static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result); | 97 | static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status); |
98 | static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); | 98 | static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); |
99 | static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); | 99 | static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); |
100 | 100 | ||
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 8b104a3..7cb92ff 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp | |||
@@ -678,15 +678,17 @@ void LLSnapshotLivePreview::saveTexture() | |||
678 | LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE); | 678 | LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE); |
679 | std::string pos_string; | 679 | std::string pos_string; |
680 | gAgent.buildLocationString(pos_string); | 680 | gAgent.buildLocationString(pos_string); |
681 | std::string who_took_it; | ||
682 | gAgent.buildFullname(who_took_it); | ||
681 | upload_new_resource(tid, // tid | 683 | upload_new_resource(tid, // tid |
682 | LLAssetType::AT_TEXTURE, | 684 | LLAssetType::AT_TEXTURE, |
683 | "Snapshot", | 685 | "Snapshot : " + pos_string, |
684 | pos_string, | 686 | "Taken by " + who_took_it + " at " + pos_string, |
685 | 0, | 687 | 0, |
686 | LLAssetType::AT_SNAPSHOT_CATEGORY, | 688 | LLAssetType::AT_SNAPSHOT_CATEGORY, |
687 | LLInventoryType::IT_SNAPSHOT, | 689 | LLInventoryType::IT_SNAPSHOT, |
688 | PERM_ALL, | 690 | PERM_ALL, |
689 | "Snapshot"); | 691 | "Snapshot : " + pos_string); |
690 | } | 692 | } |
691 | else | 693 | else |
692 | { | 694 | { |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index df5d488..4aa817e 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -400,13 +400,18 @@ LLFloaterTools::LLFloaterTools() | |||
400 | mSmallHeight = mLargeHeight; | 400 | mSmallHeight = mLargeHeight; |
401 | if (mTab) mSmallHeight -= mTab->getRect().getHeight(); | 401 | if (mTab) mSmallHeight -= mTab->getRect().getHeight(); |
402 | 402 | ||
403 | gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially | 403 | // force a toggle initially. seems to be needed to correctly initialize |
404 | showMore(FALSE); | 404 | // both "more" and "less" cases. it also seems to be important to begin |
405 | // with the user's preference first so that it's initial position will | ||
406 | // be correct (SL-51192) -MG | ||
407 | BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference | ||
408 | gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below | ||
409 | showMore( !show_more ); // does the toggle | ||
410 | showMore( show_more ); // reset the real user's preference | ||
405 | } | 411 | } |
406 | 412 | ||
407 | LLFloaterTools::~LLFloaterTools() | 413 | LLFloaterTools::~LLFloaterTools() |
408 | { | 414 | { |
409 | showMore(FALSE); | ||
410 | // children automatically deleted | 415 | // children automatically deleted |
411 | } | 416 | } |
412 | 417 | ||
@@ -777,23 +782,20 @@ void LLFloaterTools::showMore(BOOL show_more) | |||
777 | { | 782 | { |
778 | reshape( mRect.getWidth(), mLargeHeight, TRUE); | 783 | reshape( mRect.getWidth(), mLargeHeight, TRUE); |
779 | translate( 0, mSmallHeight - mLargeHeight ); | 784 | translate( 0, mSmallHeight - mLargeHeight ); |
780 | childSetVisible("button less", true); | ||
781 | childSetVisible("button more", false); | ||
782 | } | 785 | } |
783 | else | 786 | else |
784 | { | 787 | { |
785 | reshape( mRect.getWidth(), mSmallHeight, TRUE); | 788 | reshape( mRect.getWidth(), mSmallHeight, TRUE); |
786 | translate( 0, mLargeHeight - mSmallHeight ); | 789 | translate( 0, mLargeHeight - mSmallHeight ); |
787 | childSetVisible("button less", false); | ||
788 | childSetVisible("button more", true); | ||
789 | } | 790 | } |
791 | childSetVisible("button less", show_more); | ||
792 | childSetVisible("button more", !show_more); | ||
790 | } | 793 | } |
791 | 794 | ||
792 | void LLFloaterTools::showPanel(EInfoPanel panel) | 795 | void LLFloaterTools::showPanel(EInfoPanel panel) |
793 | { | 796 | { |
794 | llassert(panel >= 0 && panel < PANEL_COUNT); | 797 | llassert(panel >= 0 && panel < PANEL_COUNT); |
795 | mTab->selectTabByName(PANEL_NAMES[panel]); | 798 | mTab->selectTabByName(PANEL_NAMES[panel]); |
796 | showMore(TRUE); | ||
797 | } | 799 | } |
798 | 800 | ||
799 | void click_show_more(void *userdata) | 801 | void click_show_more(void *userdata) |
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index 3ea8c49..93aa3df 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp | |||
@@ -267,7 +267,17 @@ void LLFloaterTOS::onContinue( void* userdata ) | |||
267 | { | 267 | { |
268 | gAcceptCriticalMessage = TRUE; | 268 | gAcceptCriticalMessage = TRUE; |
269 | } | 269 | } |
270 | gStartupState++; | 270 | |
271 | // Testing TOS dialog | ||
272 | #if ! LL_RELEASE_FOR_DOWNLOAD | ||
273 | if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT ) | ||
274 | { | ||
275 | LLStartUp::setStartupState( STATE_LOGIN_SHOW ); | ||
276 | } | ||
277 | else | ||
278 | #endif | ||
279 | |||
280 | LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication | ||
271 | self->close(); // destroys this object | 281 | self->close(); // destroys this object |
272 | } | 282 | } |
273 | 283 | ||
@@ -277,7 +287,7 @@ void LLFloaterTOS::onCancel( void* userdata ) | |||
277 | LLFloaterTOS* self = (LLFloaterTOS*) userdata; | 287 | LLFloaterTOS* self = (LLFloaterTOS*) userdata; |
278 | llinfos << "User disagrees with TOS." << llendl; | 288 | llinfos << "User disagrees with TOS." << llendl; |
279 | gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done); | 289 | gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done); |
280 | gStartupState = STATE_LOGIN_SHOW; | 290 | LLStartUp::setStartupState( STATE_LOGIN_SHOW ); |
281 | self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS | 291 | self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS |
282 | self->close(); // destroys this object | 292 | self->close(); // destroys this object |
283 | } | 293 | } |
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index ccd252b..237563f 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp | |||
@@ -1242,6 +1242,14 @@ void LLFloaterWorldMap::onLocationCommit( void* userdata ) | |||
1242 | 1242 | ||
1243 | LLString str = self->childGetValue("location").asString(); | 1243 | LLString str = self->childGetValue("location").asString(); |
1244 | 1244 | ||
1245 | // Trim any leading and trailing spaces in the search target | ||
1246 | LLString saved_str = str; | ||
1247 | LLString::trim( str ); | ||
1248 | if ( str != saved_str ) | ||
1249 | { // Set the value in the UI if any spaces were removed | ||
1250 | self->childSetValue("location", str); | ||
1251 | } | ||
1252 | |||
1245 | LLString::toLower(str); | 1253 | LLString::toLower(str); |
1246 | gFloaterWorldMap->mCompletingRegionName = str; | 1254 | gFloaterWorldMap->mCompletingRegionName = str; |
1247 | gWorldMap->mIsTrackingCommit = TRUE; | 1255 | gWorldMap->mIsTrackingCommit = TRUE; |
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index f3c6ace..3a58be9 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp | |||
@@ -2528,6 +2528,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico | |||
2528 | mShowSelectionContext(FALSE), | 2528 | mShowSelectionContext(FALSE), |
2529 | mShowSingleSelection(FALSE), | 2529 | mShowSingleSelection(FALSE), |
2530 | mArrangeGeneration(0), | 2530 | mArrangeGeneration(0), |
2531 | mUserData(NULL), | ||
2531 | mSelectCallback(NULL), | 2532 | mSelectCallback(NULL), |
2532 | mSelectionChanged(FALSE), | 2533 | mSelectionChanged(FALSE), |
2533 | mMinWidth(0), | 2534 | mMinWidth(0), |
@@ -4254,73 +4255,89 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id) | |||
4254 | return NULL; | 4255 | return NULL; |
4255 | } | 4256 | } |
4256 | 4257 | ||
4257 | //static | 4258 | |
4258 | void LLFolderView::idle(void* user_data) | 4259 | // Main idle routine |
4260 | void LLFolderView::doIdle() | ||
4259 | { | 4261 | { |
4260 | LLFastTimer t2(LLFastTimer::FTM_INVENTORY); | 4262 | LLFastTimer t2(LLFastTimer::FTM_INVENTORY); |
4261 | LLFolderView* self = (LLFolderView*)user_data; | ||
4262 | 4263 | ||
4263 | BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); | 4264 | BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); |
4264 | if (debug_filters != self->getDebugFilters()) | 4265 | if (debug_filters != getDebugFilters()) |
4265 | { | 4266 | { |
4266 | self->mDebugFilters = debug_filters; | 4267 | mDebugFilters = debug_filters; |
4267 | self->arrangeAll(); | 4268 | arrangeAll(); |
4268 | } | 4269 | } |
4269 | 4270 | ||
4270 | self->mFilter.clearModified(); | 4271 | mFilter.clearModified(); |
4271 | BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() && | 4272 | BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter.getCurrentGeneration() && |
4272 | self->mFilter.isNotDefault(); | 4273 | mFilter.isNotDefault(); |
4273 | self->mNeedsAutoSelect = filter_modified_and_active && | 4274 | mNeedsAutoSelect = filter_modified_and_active && |
4274 | !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture()); | 4275 | !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture()); |
4275 | 4276 | ||
4276 | // filter to determine visiblity before arranging | 4277 | // filter to determine visiblity before arranging |
4277 | self->filterFromRoot(); | 4278 | filterFromRoot(); |
4278 | 4279 | ||
4279 | // automatically show matching items, and select first one | 4280 | // automatically show matching items, and select first one |
4280 | // do this every frame until user puts keyboard focus into the inventory window | 4281 | // do this every frame until user puts keyboard focus into the inventory window |
4281 | // signaling the end of the automatic update | 4282 | // signaling the end of the automatic update |
4282 | // only do this when mNeedsFilter is set, meaning filtered items have | 4283 | // only do this when mNeedsFilter is set, meaning filtered items have |
4283 | // potentially changed | 4284 | // potentially changed |
4284 | if (self->mNeedsAutoSelect) | 4285 | if (mNeedsAutoSelect) |
4285 | { | 4286 | { |
4286 | LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT); | 4287 | LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT); |
4287 | // select new item only if a filtered item not currently selected | 4288 | // select new item only if a filtered item not currently selected |
4288 | LLFolderViewItem* selected_itemp = self->mSelectedItems.empty() ? NULL : self->mSelectedItems.back(); | 4289 | LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); |
4289 | if ((!selected_itemp || !selected_itemp->getFiltered()) && !self->mAutoSelectOverride) | 4290 | if ((!selected_itemp || !selected_itemp->getFiltered()) && !mAutoSelectOverride) |
4290 | { | 4291 | { |
4291 | // select first filtered item | 4292 | // select first filtered item |
4292 | LLSelectFirstFilteredItem filter; | 4293 | LLSelectFirstFilteredItem filter; |
4293 | self->applyFunctorRecursively(filter); | 4294 | applyFunctorRecursively(filter); |
4294 | } | 4295 | } |
4295 | self->scrollToShowSelection(); | 4296 | scrollToShowSelection(); |
4296 | } | 4297 | } |
4297 | 4298 | ||
4298 | self->sanitizeSelection(); | 4299 | BOOL is_visible = isInVisibleChain(); |
4299 | 4300 | ||
4300 | if( self->needsArrange() && self->isInVisibleChain()) | 4301 | if ( is_visible ) |
4301 | { | 4302 | { |
4302 | self->arrangeFromRoot(); | 4303 | sanitizeSelection(); |
4304 | if( needsArrange() ) | ||
4305 | { | ||
4306 | arrangeFromRoot(); | ||
4307 | } | ||
4303 | } | 4308 | } |
4304 | 4309 | ||
4305 | if (self->mSelectedItems.size() && self->mNeedsScroll) | 4310 | if (mSelectedItems.size() && mNeedsScroll) |
4306 | { | 4311 | { |
4307 | self->scrollToShowItem(self->mSelectedItems.back()); | 4312 | scrollToShowItem(mSelectedItems.back()); |
4308 | // continue scrolling until animated layout change is done | 4313 | // continue scrolling until animated layout change is done |
4309 | if (self->getCompletedFilterGeneration() >= self->mFilter.getMinRequiredGeneration() && | 4314 | if (getCompletedFilterGeneration() >= mFilter.getMinRequiredGeneration() && |
4310 | (!self->needsArrange() || !self->isInVisibleChain())) | 4315 | (!needsArrange() || !is_visible)) |
4311 | { | 4316 | { |
4312 | self->mNeedsScroll = FALSE; | 4317 | mNeedsScroll = FALSE; |
4313 | } | 4318 | } |
4314 | } | 4319 | } |
4315 | 4320 | ||
4316 | if (self->mSelectionChanged && self->mSelectCallback) | 4321 | if (mSelectionChanged && mSelectCallback) |
4317 | { | 4322 | { |
4318 | //RN: we use keyboard focus as a proxy for user-explicit actions | 4323 | //RN: we use keyboard focus as a proxy for user-explicit actions |
4319 | self->mSelectCallback(self->mSelectedItems, gFocusMgr.childHasKeyboardFocus(self), self->mUserData); | 4324 | mSelectCallback(mSelectedItems, gFocusMgr.childHasKeyboardFocus(this), mUserData); |
4320 | } | 4325 | } |
4321 | self->mSelectionChanged = FALSE; | 4326 | mSelectionChanged = FALSE; |
4322 | } | 4327 | } |
4323 | 4328 | ||
4329 | |||
4330 | //static | ||
4331 | void LLFolderView::idle(void* user_data) | ||
4332 | { | ||
4333 | LLFolderView* self = (LLFolderView*)user_data; | ||
4334 | if ( self ) | ||
4335 | { // Do the real idle | ||
4336 | self->doIdle(); | ||
4337 | } | ||
4338 | } | ||
4339 | |||
4340 | |||
4324 | void LLFolderView::dumpSelectionInformation() | 4341 | void LLFolderView::dumpSelectionInformation() |
4325 | { | 4342 | { |
4326 | llinfos << "LLFolderView::dumpSelectionInformation()" << llendl; | 4343 | llinfos << "LLFolderView::dumpSelectionInformation()" << llendl; |
diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index 9482b96..9336ec3 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h | |||
@@ -859,7 +859,8 @@ public: | |||
859 | void removeItemID(const LLUUID& id); | 859 | void removeItemID(const LLUUID& id); |
860 | LLFolderViewItem* getItemByID(const LLUUID& id); | 860 | LLFolderViewItem* getItemByID(const LLUUID& id); |
861 | 861 | ||
862 | static void idle(void* user_data); | 862 | void doIdle(); // Real idle routine |
863 | static void idle(void* user_data); // static glue to doIdle() | ||
863 | 864 | ||
864 | BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } | 865 | BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } |
865 | BOOL needsAutoRename() { return mNeedsAutoRename; } | 866 | BOOL needsAutoRename() { return mNeedsAutoRename; } |
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp index bf3c057..9b8f2c8 100644 --- a/linden/indra/newview/llgesturemgr.cpp +++ b/linden/indra/newview/llgesturemgr.cpp | |||
@@ -897,7 +897,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) | |||
897 | void LLGestureManager::onLoadComplete(LLVFS *vfs, | 897 | void LLGestureManager::onLoadComplete(LLVFS *vfs, |
898 | const LLUUID& asset_uuid, | 898 | const LLUUID& asset_uuid, |
899 | LLAssetType::EType type, | 899 | LLAssetType::EType type, |
900 | void* user_data, S32 status) | 900 | void* user_data, S32 status, LLExtStat ext_status) |
901 | { | 901 | { |
902 | LLLoadInfo* info = (LLLoadInfo*)user_data; | 902 | LLLoadInfo* info = (LLLoadInfo*)user_data; |
903 | 903 | ||
diff --git a/linden/indra/newview/llgesturemgr.h b/linden/indra/newview/llgesturemgr.h index 29aecf3..92b484a 100644 --- a/linden/indra/newview/llgesturemgr.h +++ b/linden/indra/newview/llgesturemgr.h | |||
@@ -132,7 +132,7 @@ protected: | |||
132 | static void onLoadComplete(LLVFS *vfs, | 132 | static void onLoadComplete(LLVFS *vfs, |
133 | const LLUUID& asset_uuid, | 133 | const LLUUID& asset_uuid, |
134 | LLAssetType::EType type, | 134 | LLAssetType::EType type, |
135 | void* user_data, S32 status); | 135 | void* user_data, S32 status, LLExtStat ext_status); |
136 | 136 | ||
137 | public: | 137 | public: |
138 | BOOL mValid; | 138 | BOOL mValid; |
diff --git a/linden/indra/newview/llglslshader.cpp b/linden/indra/newview/llglslshader.cpp index cc440c4..0a7ec4a 100644 --- a/linden/indra/newview/llglslshader.cpp +++ b/linden/indra/newview/llglslshader.cpp | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "llviewerprecompiledheaders.h" | 29 | #include "llviewerprecompiledheaders.h" |
30 | 30 | ||
31 | #include "llviewerwindow.h" | 31 | #include "llviewerwindow.h" |
32 | #include "llfeaturemanager.h" | ||
32 | #include "llglslshader.h" | 33 | #include "llglslshader.h" |
33 | #include "llviewercontrol.h" | 34 | #include "llviewercontrol.h" |
34 | #include "pipeline.h" | 35 | #include "pipeline.h" |
@@ -412,7 +413,7 @@ void LLShaderMgr::setShaders() | |||
412 | 413 | ||
413 | if (gGLManager.mHasFramebufferObject) | 414 | if (gGLManager.mHasFramebufferObject) |
414 | { | 415 | { |
415 | LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections"); | 416 | LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"); |
416 | LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow"); | 417 | LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow"); |
417 | } | 418 | } |
418 | else | 419 | else |
@@ -471,7 +472,7 @@ void LLShaderMgr::setShaders() | |||
471 | loadShadersAvatar(); | 472 | loadShadersAvatar(); |
472 | 473 | ||
473 | // Load shaders to correct levels | 474 | // Load shaders to correct levels |
474 | if (!gSavedSettings.getBOOL("RenderRippleWater")) | 475 | if (!(gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))) |
475 | { | 476 | { |
476 | if (gSavedSettings.getBOOL("RenderGlow")) | 477 | if (gSavedSettings.getBOOL("RenderGlow")) |
477 | { | 478 | { |
diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index aa84e3d..95d4dbf 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp | |||
@@ -226,7 +226,7 @@ LLGroupNotifyBox::LLGroupNotifyBox(const char* subject, | |||
226 | text->setCursor(0,0); | 226 | text->setCursor(0,0); |
227 | text->setEnabled(FALSE); | 227 | text->setEnabled(FALSE); |
228 | text->setWordWrap(TRUE); | 228 | text->setWordWrap(TRUE); |
229 | text->setTakesFocus(FALSE); | 229 | text->setTakesFocus(TRUE); // Allow focus so text can be copied. Since it's not enabled, it will be read-only |
230 | text->setTabToNextField(TRUE); | 230 | text->setTabToNextField(TRUE); |
231 | text->setMouseOpaque(TRUE); | 231 | text->setMouseOpaque(TRUE); |
232 | text->setBorderVisible(TRUE); | 232 | text->setBorderVisible(TRUE); |
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index da0ec60..6922f29 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp | |||
@@ -39,6 +39,10 @@ | |||
39 | #include "llselectmgr.h" | 39 | #include "llselectmgr.h" |
40 | #include "llglheaders.h" | 40 | #include "llglheaders.h" |
41 | 41 | ||
42 | |||
43 | #include "llxmltree.h" | ||
44 | |||
45 | |||
42 | BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; | 46 | BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; |
43 | 47 | ||
44 | // packet layout | 48 | // packet layout |
@@ -54,69 +58,179 @@ const F32 MAX_SENDS_PER_SEC = 4.f; | |||
54 | const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f; | 58 | const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f; |
55 | const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f; | 59 | const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f; |
56 | 60 | ||
57 | // timeouts | 61 | |
58 | // can't use actual F32_MAX, because we add this to the current frametime | 62 | // can't use actual F32_MAX, because we add this to the current frametime |
59 | const F32 MAX_TIMEOUT = F32_MAX / 2.f; | 63 | const F32 MAX_TIMEOUT = F32_MAX / 2.f; |
60 | 64 | ||
61 | const F32 LOOKAT_TIMEOUTS[LOOKAT_NUM_TARGETS] = | 65 | /** |
66 | * Simple data class holding values for a particular type of attention. | ||
67 | */ | ||
68 | class LLAttention | ||
62 | { | 69 | { |
63 | MAX_TIMEOUT, //LOOKAT_TARGET_NONE | 70 | public: |
64 | 3.f, //LOOKAT_TARGET_IDLE | 71 | LLAttention(){} |
65 | 4.f, //LOOKAT_TARGET_AUTO_LISTEN | 72 | LLAttention(F32 timeout, F32 priority, char *name, LLColor3 color) : |
66 | 2.f, //LOOKAT_TARGET_FREELOOK | 73 | mTimeout(timeout), mPriority(priority), mName(name), mColor(color) |
67 | 4.f, //LOOKAT_TARGET_RESPOND | 74 | { |
68 | 1.f, //LOOKAT_TARGET_HOVER | 75 | } |
69 | MAX_TIMEOUT, //LOOKAT_TARGET_CONVERSATION | 76 | F32 mTimeout, mPriority; |
70 | MAX_TIMEOUT, //LOOKAT_TARGET_SELECT | 77 | LLString mName; |
71 | MAX_TIMEOUT, //LOOKAT_TARGET_FOCUS | 78 | LLColor3 mColor; |
72 | MAX_TIMEOUT, //LOOKAT_TARGET_MOUSELOOK | ||
73 | 0.f, //LOOKAT_TARGET_CLEAR | ||
74 | }; | 79 | }; |
75 | 80 | ||
76 | const S32 LOOKAT_PRIORITIES[LOOKAT_NUM_TARGETS] = | 81 | /** |
82 | * Simple data class holding a list of attentions, one for every type. | ||
83 | */ | ||
84 | class LLAttentionSet | ||
77 | { | 85 | { |
78 | 0, //LOOKAT_TARGET_NONE | 86 | public: |
79 | 1, //LOOKAT_TARGET_IDLE | 87 | LLAttentionSet(const LLAttention attentions[]) |
80 | 3, //LOOKAT_TARGET_AUTO_LISTEN | 88 | { |
81 | 2, //LOOKAT_TARGET_FREELOOK | 89 | for(int i=0; i<LOOKAT_NUM_TARGETS; i++) |
82 | 3, //LOOKAT_TARGET_RESPOND | 90 | { |
83 | 4, //LOOKAT_TARGET_HOVER | 91 | mAttentions[i] = attentions[i]; |
84 | 5, //LOOKAT_TARGET_CONVERSATION | 92 | } |
85 | 6, //LOOKAT_TARGET_SELECT | 93 | } |
86 | 6, //LOOKAT_TARGET_FOCUS | 94 | LLAttention mAttentions[LOOKAT_NUM_TARGETS]; |
87 | 7, //LOOKAT_TARGET_MOUSELOOK | 95 | LLAttention& operator[](int idx) { return mAttentions[idx]; } |
88 | 8, //LOOKAT_TARGET_CLEAR | ||
89 | }; | 96 | }; |
90 | 97 | ||
91 | const char *LOOKAT_STRINGS[] = | 98 | // Default attribute set data. |
99 | // Used to initialize the global attribute set objects, one of which will be | ||
100 | // refered to by the hud object at any given time. | ||
101 | // Note that the values below are only the default values and that any or all of them | ||
102 | // can be overwritten with customizing data from the XML file. The actual values below | ||
103 | // are those that will give exactly the same look-at behavior as before the ability | ||
104 | // to customize was added. - MG | ||
105 | static const | ||
106 | LLAttention | ||
107 | BOY_ATTS[] = { // default set of masculine attentions | ||
108 | LLAttention(MAX_TIMEOUT, 0, "None", LLColor3(0.3f, 0.3f, 0.3f)), // LOOKAT_TARGET_NONE | ||
109 | LLAttention(3.f, 1, "Idle", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_IDLE | ||
110 | LLAttention(4.f, 3, "AutoListen", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_AUTO_LISTEN | ||
111 | LLAttention(2.f, 2, "FreeLook", LLColor3(0.5f, 0.5f, 0.9f)), // LOOKAT_TARGET_FREELOOK | ||
112 | LLAttention(4.f, 3, "Respond", LLColor3(0.0f, 0.0f, 0.0f)), // LOOKAT_TARGET_RESPOND | ||
113 | LLAttention(1.f, 4, "Hover", LLColor3(0.5f, 0.9f, 0.5f)), // LOOKAT_TARGET_HOVER | ||
114 | LLAttention(MAX_TIMEOUT, 0, "Conversation", LLColor3(0.1f, 0.1f, 0.5f)), // LOOKAT_TARGET_CONVERSATION | ||
115 | LLAttention(MAX_TIMEOUT, 6, "Select", LLColor3(0.9f, 0.5f, 0.5f)), // LOOKAT_TARGET_SELECT | ||
116 | LLAttention(MAX_TIMEOUT, 6, "Focus", LLColor3(0.9f, 0.5f, 0.9f)), // LOOKAT_TARGET_FOCUS | ||
117 | LLAttention(MAX_TIMEOUT, 7, "Mouselook", LLColor3(0.9f, 0.9f, 0.5f)), // LOOKAT_TARGET_MOUSELOOK | ||
118 | LLAttention(0.f, 8, "Clear", LLColor3(1.0f, 1.0f, 1.0f)), // LOOKAT_TARGET_CLEAR | ||
119 | }, | ||
120 | GIRL_ATTS[] = { // default set of feminine attentions | ||
121 | LLAttention(MAX_TIMEOUT, 0, "None", LLColor3(0.3f, 0.3f, 0.3f)), // LOOKAT_TARGET_NONE | ||
122 | LLAttention(3.f, 1, "Idle", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_IDLE | ||
123 | LLAttention(4.f, 3, "AutoListen", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_AUTO_LISTEN | ||
124 | LLAttention(2.f, 2, "FreeLook", LLColor3(0.5f, 0.5f, 0.9f)), // LOOKAT_TARGET_FREELOOK | ||
125 | LLAttention(4.f, 3, "Respond", LLColor3(0.0f, 0.0f, 0.0f)), // LOOKAT_TARGET_RESPOND | ||
126 | LLAttention(1.f, 4, "Hover", LLColor3(0.5f, 0.9f, 0.5f)), // LOOKAT_TARGET_HOVER | ||
127 | LLAttention(MAX_TIMEOUT, 0, "Conversation", LLColor3(0.1f, 0.1f, 0.5f)), // LOOKAT_TARGET_CONVERSATION | ||
128 | LLAttention(MAX_TIMEOUT, 6, "Select", LLColor3(0.9f, 0.5f, 0.5f)), // LOOKAT_TARGET_SELECT | ||
129 | LLAttention(MAX_TIMEOUT, 6, "Focus", LLColor3(0.9f, 0.5f, 0.9f)), // LOOKAT_TARGET_FOCUS | ||
130 | LLAttention(MAX_TIMEOUT, 7, "Mouselook", LLColor3(0.9f, 0.9f, 0.5f)), // LOOKAT_TARGET_MOUSELOOK | ||
131 | LLAttention(0.f, 8, "Clear", LLColor3(1.0f, 1.0f, 1.0f)), // LOOKAT_TARGET_CLEAR | ||
132 | }; | ||
133 | |||
134 | static LLAttentionSet | ||
135 | gBoyAttentions(BOY_ATTS), | ||
136 | gGirlAttentions(GIRL_ATTS); | ||
137 | |||
138 | |||
139 | static BOOL loadGender(LLXmlTreeNode* gender) | ||
92 | { | 140 | { |
93 | "None", //LOOKAT_TARGET_NONE | 141 | if( !gender) |
94 | "Idle", //LOOKAT_TARGET_IDLE | 142 | { |
95 | "AutoListen", //LOOKAT_TARGET_AUTO_LISTEN | 143 | return FALSE; |
96 | "FreeLook", //LOOKAT_TARGET_FREELOOK | 144 | } |
97 | "Respond", //LOOKAT_TARGET_RESPOND | 145 | LLString str; |
98 | "Hover", //LOOKAT_TARGET_HOVER | 146 | gender->getAttributeString("name", str); |
99 | "Conversation", //LOOKAT_TARGET_CONVERSATION | 147 | LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions; |
100 | "Select", //LOOKAT_TARGET_SELECT | 148 | for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" ); |
101 | "Focus", //LOOKAT_TARGET_FOCUS | 149 | attention_node; |
102 | "Mouselook", //LOOKAT_TARGET_MOUSELOOK | 150 | attention_node = gender->getNextNamedChild()) |
103 | "Clear", //LOOKAT_TARGET_CLEAR | 151 | { |
104 | }; | 152 | attention_node->getAttributeString("attention", str); |
153 | LLAttention* attention; | ||
154 | if (str == "idle") attention = &attentions[LOOKAT_TARGET_IDLE]; | ||
155 | else if(str == "auto_listen") attention = &attentions[LOOKAT_TARGET_AUTO_LISTEN]; | ||
156 | else if(str == "freelook") attention = &attentions[LOOKAT_TARGET_FREELOOK]; | ||
157 | else if(str == "respond") attention = &attentions[LOOKAT_TARGET_RESPOND]; | ||
158 | else if(str == "hover") attention = &attentions[LOOKAT_TARGET_HOVER]; | ||
159 | else if(str == "conversation") attention = &attentions[LOOKAT_TARGET_CONVERSATION]; | ||
160 | else if(str == "select") attention = &attentions[LOOKAT_TARGET_SELECT]; | ||
161 | else if(str == "focus") attention = &attentions[LOOKAT_TARGET_FOCUS]; | ||
162 | else if(str == "mouselook") attention = &attentions[LOOKAT_TARGET_MOUSELOOK]; | ||
163 | else return FALSE; | ||
164 | |||
165 | F32 priority, timeout; | ||
166 | attention_node->getAttributeF32("priority", priority); | ||
167 | attention_node->getAttributeF32("timeout", timeout); | ||
168 | if(timeout < 0) timeout = MAX_TIMEOUT; | ||
169 | attention->mPriority = priority; | ||
170 | attention->mTimeout = timeout; | ||
171 | } | ||
172 | return TRUE; | ||
173 | } | ||
105 | 174 | ||
106 | const LLColor3 LOOKAT_COLORS[LOOKAT_NUM_TARGETS] = | 175 | static BOOL loadAttentions() |
107 | { | 176 | { |
108 | LLColor3(0.3f, 0.3f, 0.3f), //LOOKAT_TARGET_NONE | 177 | static BOOL first_time = TRUE; |
109 | LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_IDLE | 178 | if( ! first_time) |
110 | LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_AUTO_LISTEN | 179 | { |
111 | LLColor3(0.5f, 0.5f, 0.9f), //LOOKAT_TARGET_FREELOOK | 180 | return TRUE; // maybe not ideal but otherwise it can continue to fail forever. |
112 | LLColor3(0.f, 0.f, 0.f), //LOOKAT_TARGET_RESPOND | 181 | } |
113 | LLColor3(0.5f, 0.9f, 0.5f), //LOOKAT_TARGET_HOVER | 182 | first_time = FALSE; |
114 | LLColor3(0.1f, 0.1f, 0.5f), //LOOKAT_TARGET_CONVERSATION | 183 | |
115 | LLColor3(0.9f, 0.5f, 0.5f), //LOOKAT_TARGET_SELECT | 184 | char filename[MAX_PATH]; /*Flawfinder: ignore*/ |
116 | LLColor3(0.9f, 0.5f, 0.9f), //LOOKAT_TARGET_FOCUS | 185 | strncpy(filename,gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml").c_str(), sizeof(filename) -1); /*Flawfinder: ignore*/ |
117 | LLColor3(0.9f, 0.9f, 0.5f), //LOOKAT_TARGET_MOUSELOOK | 186 | filename[sizeof(filename) -1] = '\0'; |
118 | LLColor3(1.f, 1.f, 1.f), //LOOKAT_TARGET_CLEAR | 187 | LLXmlTree xml_tree; |
119 | }; | 188 | BOOL success = xml_tree.parseFile( filename, FALSE ); |
189 | if( !success ) | ||
190 | { | ||
191 | return FALSE; | ||
192 | } | ||
193 | LLXmlTreeNode* root = xml_tree.getRoot(); | ||
194 | if( !root ) | ||
195 | { | ||
196 | return FALSE; | ||
197 | } | ||
198 | |||
199 | //------------------------------------------------------------------------- | ||
200 | // <linden_attentions version="1.0"> (root) | ||
201 | //------------------------------------------------------------------------- | ||
202 | if( !root->hasName( "linden_attentions" ) ) | ||
203 | { | ||
204 | llwarns << "Invalid linden_attentions file header: " << filename << llendl; | ||
205 | return FALSE; | ||
206 | } | ||
207 | |||
208 | LLString version; | ||
209 | static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); | ||
210 | if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) | ||
211 | { | ||
212 | llwarns << "Invalid linden_attentions file version: " << version << llendl; | ||
213 | return FALSE; | ||
214 | } | ||
215 | |||
216 | //------------------------------------------------------------------------- | ||
217 | // <gender> | ||
218 | //------------------------------------------------------------------------- | ||
219 | for (LLXmlTreeNode* child = root->getChildByName( "gender" ); | ||
220 | child; | ||
221 | child = root->getNextNamedChild()) | ||
222 | { | ||
223 | if( !loadGender( child ) ) | ||
224 | { | ||
225 | return FALSE; | ||
226 | } | ||
227 | } | ||
228 | |||
229 | return TRUE; | ||
230 | } | ||
231 | |||
232 | |||
233 | |||
120 | 234 | ||
121 | //----------------------------------------------------------------------------- | 235 | //----------------------------------------------------------------------------- |
122 | // LLHUDEffectLookAt() | 236 | // LLHUDEffectLookAt() |
@@ -127,6 +241,10 @@ LLHUDEffectLookAt::LLHUDEffectLookAt(const U8 type) : | |||
127 | mLastSendTime(0.f) | 241 | mLastSendTime(0.f) |
128 | { | 242 | { |
129 | clearLookAtTarget(); | 243 | clearLookAtTarget(); |
244 | // parse the default sets | ||
245 | loadAttentions(); | ||
246 | // initialize current attention set. switches when avatar sex changes. | ||
247 | mAttentions = &gGirlAttentions; | ||
130 | } | 248 | } |
131 | 249 | ||
132 | //----------------------------------------------------------------------------- | 250 | //----------------------------------------------------------------------------- |
@@ -280,7 +398,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec | |||
280 | llassert(target_type < LOOKAT_NUM_TARGETS); | 398 | llassert(target_type < LOOKAT_NUM_TARGETS); |
281 | 399 | ||
282 | // must be same or higher priority than existing effect | 400 | // must be same or higher priority than existing effect |
283 | if (LOOKAT_PRIORITIES[target_type] < LOOKAT_PRIORITIES[mTargetType]) | 401 | if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority) |
284 | { | 402 | { |
285 | return FALSE; | 403 | return FALSE; |
286 | } | 404 | } |
@@ -288,8 +406,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec | |||
288 | F32 current_time = mTimer.getElapsedTimeF32(); | 406 | F32 current_time = mTimer.getElapsedTimeF32(); |
289 | 407 | ||
290 | // type of lookat behavior or target object has changed | 408 | // type of lookat behavior or target object has changed |
291 | BOOL lookAtChanged = (target_type != mTargetType) || | 409 | BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject); |
292 | (object != mTargetObject); | ||
293 | 410 | ||
294 | // lookat position has moved a certain amount and we haven't just sent an update | 411 | // lookat position has moved a certain amount and we haven't just sent an update |
295 | lookAtChanged = lookAtChanged || (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) && | 412 | lookAtChanged = lookAtChanged || (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) && |
@@ -298,7 +415,8 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec | |||
298 | if (lookAtChanged) | 415 | if (lookAtChanged) |
299 | { | 416 | { |
300 | mLastSentOffsetGlobal = position; | 417 | mLastSentOffsetGlobal = position; |
301 | setDuration(LOOKAT_TIMEOUTS[target_type]); | 418 | F32 timeout = (*mAttentions)[target_type].mTimeout; |
419 | setDuration(timeout); | ||
302 | setNeedsSendToSim(TRUE); | 420 | setNeedsSendToSim(TRUE); |
303 | } | 421 | } |
304 | 422 | ||
@@ -379,7 +497,7 @@ void LLHUDEffectLookAt::render() | |||
379 | glScalef(0.3f, 0.3f, 0.3f); | 497 | glScalef(0.3f, 0.3f, 0.3f); |
380 | glBegin(GL_LINES); | 498 | glBegin(GL_LINES); |
381 | { | 499 | { |
382 | LLColor3 color = LOOKAT_COLORS[mTargetType]; | 500 | LLColor3 color = (*mAttentions)[mTargetType].mColor; |
383 | glColor3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); | 501 | glColor3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); |
384 | glVertex3f(-1.f, 0.f, 0.f); | 502 | glVertex3f(-1.f, 0.f, 0.f); |
385 | glVertex3f(1.f, 0.f, 0.f); | 503 | glVertex3f(1.f, 0.f, 0.f); |
@@ -412,6 +530,13 @@ void LLHUDEffectLookAt::update() | |||
412 | return; | 530 | return; |
413 | } | 531 | } |
414 | 532 | ||
533 | // make sure the proper set of avatar attention are currently being used. | ||
534 | LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject; | ||
535 | // for now the first cut will just switch on sex. future development could adjust | ||
536 | // timeouts according to avatar age and/or other features. | ||
537 | mAttentions = (source_avatar->getSex() == SEX_MALE) ? &gBoyAttentions : &gGirlAttentions; | ||
538 | //printf("updated to %s\n", (source_avatar->getSex() == SEX_MALE) ? "male" : "female"); | ||
539 | |||
415 | F32 time = mTimer.getElapsedTimeF32(); | 540 | F32 time = mTimer.getElapsedTimeF32(); |
416 | 541 | ||
417 | // clear out the effect if time is up | 542 | // clear out the effect if time is up |
@@ -438,7 +563,7 @@ void LLHUDEffectLookAt::update() | |||
438 | 563 | ||
439 | if (sDebugLookAt) | 564 | if (sDebugLookAt) |
440 | { | 565 | { |
441 | ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText(LOOKAT_STRINGS[mTargetType]); | 566 | ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText((*mAttentions)[mTargetType].mName); |
442 | } | 567 | } |
443 | } | 568 | } |
444 | 569 | ||
diff --git a/linden/indra/newview/llhudeffectlookat.h b/linden/indra/newview/llhudeffectlookat.h index 8fa1ac2..fdb3432 100644 --- a/linden/indra/newview/llhudeffectlookat.h +++ b/linden/indra/newview/llhudeffectlookat.h | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | class LLViewerObject; | 35 | class LLViewerObject; |
36 | class LLVOAvatar; | 36 | class LLVOAvatar; |
37 | class LLAttentionSet; | ||
37 | 38 | ||
38 | typedef enum e_lookat_type | 39 | typedef enum e_lookat_type |
39 | { | 40 | { |
@@ -43,7 +44,7 @@ typedef enum e_lookat_type | |||
43 | LOOKAT_TARGET_FREELOOK, | 44 | LOOKAT_TARGET_FREELOOK, |
44 | LOOKAT_TARGET_RESPOND, | 45 | LOOKAT_TARGET_RESPOND, |
45 | LOOKAT_TARGET_HOVER, | 46 | LOOKAT_TARGET_HOVER, |
46 | LOOKAT_TARGET_CONVERSATION, // conversation mode deprecated | 47 | LOOKAT_TARGET_CONVERSATION, |
47 | LOOKAT_TARGET_SELECT, | 48 | LOOKAT_TARGET_SELECT, |
48 | LOOKAT_TARGET_FOCUS, | 49 | LOOKAT_TARGET_FOCUS, |
49 | LOOKAT_TARGET_MOUSELOOK, | 50 | LOOKAT_TARGET_MOUSELOOK, |
@@ -91,6 +92,7 @@ private: | |||
91 | LLFrameTimer mTimer; | 92 | LLFrameTimer mTimer; |
92 | LLVector3 mTargetPos; | 93 | LLVector3 mTargetPos; |
93 | F32 mLastSendTime; | 94 | F32 mLastSendTime; |
95 | LLAttentionSet* mAttentions; | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | #endif // LL_LLHUDEFFECTLOOKAT_H | 98 | #endif // LL_LLHUDEFFECTLOOKAT_H |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index fd7d98e..f8baf46 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -88,10 +88,14 @@ | |||
88 | void inc_busy_count() | 88 | void inc_busy_count() |
89 | { | 89 | { |
90 | // gViewerWindow->getWindow()->incBusyCount(); | 90 | // gViewerWindow->getWindow()->incBusyCount(); |
91 | // check balance of these calls if this code is changed to ever actually | ||
92 | // *do* something! | ||
91 | } | 93 | } |
92 | void dec_busy_count() | 94 | void dec_busy_count() |
93 | { | 95 | { |
94 | // gViewerWindow->getWindow()->decBusyCount(); | 96 | // gViewerWindow->getWindow()->decBusyCount(); |
97 | // check balance of these calls if this code is changed to ever actually | ||
98 | // *do* something! | ||
95 | } | 99 | } |
96 | 100 | ||
97 | // Function declarations | 101 | // Function declarations |
@@ -906,7 +910,7 @@ BOOL LLItemBridge::removeItem() | |||
906 | return FALSE; | 910 | return FALSE; |
907 | } | 911 | } |
908 | // move it to the trash | 912 | // move it to the trash |
909 | LLPreview::hide(mUUID); | 913 | LLPreview::hide(mUUID, TRUE); |
910 | LLInventoryModel* model = mInventoryPanel->getModel(); | 914 | LLInventoryModel* model = mInventoryPanel->getModel(); |
911 | if(!model) return FALSE; | 915 | if(!model) return FALSE; |
912 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); | 916 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); |
@@ -1365,6 +1369,17 @@ protected: | |||
1365 | 1369 | ||
1366 | void LLRightClickInventoryFetchDescendentsObserver::done() | 1370 | void LLRightClickInventoryFetchDescendentsObserver::done() |
1367 | { | 1371 | { |
1372 | // Avoid passing a NULL-ref as mCompleteFolders.front() down to | ||
1373 | // gInventory.collectDescendents() | ||
1374 | if( mCompleteFolders.empty() ) | ||
1375 | { | ||
1376 | llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; | ||
1377 | dec_busy_count(); | ||
1378 | gInventory.removeObserver(this); | ||
1379 | delete this; | ||
1380 | return; | ||
1381 | } | ||
1382 | |||
1368 | // What we do here is get the complete information on the items in | 1383 | // What we do here is get the complete information on the items in |
1369 | // the library, and set up an observer that will wait for that to | 1384 | // the library, and set up an observer that will wait for that to |
1370 | // happen. | 1385 | // happen. |
@@ -1375,7 +1390,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done() | |||
1375 | item_array, | 1390 | item_array, |
1376 | LLInventoryModel::EXCLUDE_TRASH); | 1391 | LLInventoryModel::EXCLUDE_TRASH); |
1377 | S32 count = item_array.count(); | 1392 | S32 count = item_array.count(); |
1378 | #if 0 | 1393 | #if 0 // HACK/TODO: Why? |
1379 | // This early causes a giant menu to get produced, and doesn't seem to be needed. | 1394 | // This early causes a giant menu to get produced, and doesn't seem to be needed. |
1380 | if(!count) | 1395 | if(!count) |
1381 | { | 1396 | { |
@@ -2919,7 +2934,6 @@ void LLGestureBridge::openItem() | |||
2919 | BOOL LLGestureBridge::removeItem() | 2934 | BOOL LLGestureBridge::removeItem() |
2920 | { | 2935 | { |
2921 | // Force close the preview window, if it exists | 2936 | // Force close the preview window, if it exists |
2922 | LLPreview::hide(mUUID); | ||
2923 | gGestureManager.deactivateGesture(mUUID); | 2937 | gGestureManager.deactivateGesture(mUUID); |
2924 | return LLItemBridge::removeItem(); | 2938 | return LLItemBridge::removeItem(); |
2925 | } | 2939 | } |
@@ -3458,13 +3472,27 @@ public: | |||
3458 | { | 3472 | { |
3459 | /* | 3473 | /* |
3460 | * Do nothing. We only care about the destructor | 3474 | * Do nothing. We only care about the destructor |
3475 | * | ||
3476 | * The reason for this is that this callback is used in a hack where the | ||
3477 | * same callback is given to dozens of items, and the destructor is called | ||
3478 | * after the last item has fired the event and dereferenced it -- if all | ||
3479 | * the events actually fire! | ||
3461 | */ | 3480 | */ |
3462 | } | 3481 | } |
3463 | 3482 | ||
3464 | protected: | 3483 | protected: |
3465 | ~LLWearInventoryCategoryCallback() | 3484 | ~LLWearInventoryCategoryCallback() |
3466 | { | 3485 | { |
3467 | wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend); | 3486 | // Is the destructor called by ordinary dereference, or because the app's shutting down? |
3487 | // If the inventory callback manager goes away, we're shutting down, no longer want the callback. | ||
3488 | if( LLInventoryCallbackManager::is_instantiated() ) | ||
3489 | { | ||
3490 | wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend); | ||
3491 | } | ||
3492 | else | ||
3493 | { | ||
3494 | llwarns << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl; | ||
3495 | } | ||
3468 | } | 3496 | } |
3469 | 3497 | ||
3470 | private: | 3498 | private: |
@@ -4214,8 +4242,17 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
4214 | items.push_back("Restore Item"); | 4242 | items.push_back("Restore Item"); |
4215 | } | 4243 | } |
4216 | else | 4244 | else |
4217 | { | 4245 | { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere |
4218 | BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM); | 4246 | BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM); |
4247 | |||
4248 | // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976 | ||
4249 | LLViewerInventoryItem* item = getItem(); | ||
4250 | if( !no_open && item ) | ||
4251 | { | ||
4252 | no_open = (item->getType() == LLAssetType::AT_CLOTHING) || | ||
4253 | (item->getType() == LLAssetType::AT_BODYPART); | ||
4254 | } | ||
4255 | |||
4219 | if (!no_open) | 4256 | if (!no_open) |
4220 | { | 4257 | { |
4221 | items.push_back("Open"); | 4258 | items.push_back("Open"); |
@@ -4242,7 +4279,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
4242 | LLWearableBridge::canEditOnAvatar, | 4279 | LLWearableBridge::canEditOnAvatar, |
4243 | (void*)this));*/ | 4280 | (void*)this));*/ |
4244 | 4281 | ||
4245 | LLViewerInventoryItem* item = getItem(); | ||
4246 | if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) | 4282 | if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) |
4247 | { | 4283 | { |
4248 | items.push_back("Take Off"); | 4284 | items.push_back("Take Off"); |
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 112c071..8b7809d 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -1367,12 +1367,12 @@ void LLInventoryPanel::modelChanged(U32 mask) | |||
1367 | if(view) | 1367 | if(view) |
1368 | { | 1368 | { |
1369 | // request refresh on this item (also flags for filtering) | 1369 | // request refresh on this item (also flags for filtering) |
1370 | view->refresh(); | ||
1371 | bridge = (LLInvFVBridge*)view->getListener(); | 1370 | bridge = (LLInvFVBridge*)view->getListener(); |
1372 | if(bridge) | 1371 | if(bridge) |
1373 | { | 1372 | { // Clear the display name first, so it gets properly re-built during refresh() |
1374 | bridge->clearDisplayName(); | 1373 | bridge->clearDisplayName(); |
1375 | } | 1374 | } |
1375 | view->refresh(); | ||
1376 | } | 1376 | } |
1377 | } | 1377 | } |
1378 | } | 1378 | } |
diff --git a/linden/indra/newview/lllandmarklist.cpp b/linden/indra/newview/lllandmarklist.cpp index a0ad1ce..7633be4 100644 --- a/linden/indra/newview/lllandmarklist.cpp +++ b/linden/indra/newview/lllandmarklist.cpp | |||
@@ -77,7 +77,8 @@ void LLLandmarkList::processGetAssetReply( | |||
77 | const LLUUID& uuid, | 77 | const LLUUID& uuid, |
78 | LLAssetType::EType type, | 78 | LLAssetType::EType type, |
79 | void* user_data, | 79 | void* user_data, |
80 | S32 status) | 80 | S32 status, |
81 | LLExtStat ext_status ) | ||
81 | { | 82 | { |
82 | if( status == 0 ) | 83 | if( status == 0 ) |
83 | { | 84 | { |
diff --git a/linden/indra/newview/lllandmarklist.h b/linden/indra/newview/lllandmarklist.h index 50ccfb6..1d69158 100644 --- a/linden/indra/newview/lllandmarklist.h +++ b/linden/indra/newview/lllandmarklist.h | |||
@@ -55,7 +55,8 @@ public: | |||
55 | const LLUUID& uuid, | 55 | const LLUUID& uuid, |
56 | LLAssetType::EType type, | 56 | LLAssetType::EType type, |
57 | void* user_data, | 57 | void* user_data, |
58 | S32 status); | 58 | S32 status, |
59 | LLExtStat ext_status ); | ||
59 | 60 | ||
60 | protected: | 61 | protected: |
61 | typedef std::map<LLUUID, LLLandmark*> landmark_list_t; | 62 | typedef std::map<LLUUID, LLLandmark*> landmark_list_t; |
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index a7312fc..e405dc4 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp | |||
@@ -349,7 +349,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) | |||
349 | if (!selected_object) | 349 | if (!selected_object) |
350 | { | 350 | { |
351 | // somehow we lost the object! | 351 | // somehow we lost the object! |
352 | llwarns << "Translate manip lost the object" << llendl; | 352 | llwarns << "Translate manip lost the object, no selected object" << llendl; |
353 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); | 353 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); |
354 | return TRUE; | 354 | return TRUE; |
355 | } | 355 | } |
@@ -367,9 +367,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) | |||
367 | if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) | 367 | if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) |
368 | { | 368 | { |
369 | LLCoordGL mouse_pos; | 369 | LLCoordGL mouse_pos; |
370 | gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos); | 370 | if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos)) |
371 | 371 | { | |
372 | if (gSavedSettings.getBOOL("SnapToMouseCursor")) | 372 | // mouse_pos may be nonsense |
373 | llwarns << "Failed to project object center to screen" << llendl; | ||
374 | } | ||
375 | else if (gSavedSettings.getBOOL("SnapToMouseCursor")) | ||
373 | { | 376 | { |
374 | LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY); | 377 | LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY); |
375 | x = mouse_pos.mX; | 378 | x = mouse_pos.mX; |
@@ -480,7 +483,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) | |||
480 | if (!selectNode) | 483 | if (!selectNode) |
481 | { | 484 | { |
482 | // somehow we lost the object! | 485 | // somehow we lost the object! |
483 | llwarns << "Translate manip lost the object" << llendl; | 486 | llwarns << "Translate manip lost the object, no selectNode" << llendl; |
484 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); | 487 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); |
485 | return TRUE; | 488 | return TRUE; |
486 | } | 489 | } |
@@ -489,7 +492,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) | |||
489 | if (!object) | 492 | if (!object) |
490 | { | 493 | { |
491 | // somehow we lost the object! | 494 | // somehow we lost the object! |
492 | llwarns << "Translate manip lost the object" << llendl; | 495 | llwarns << "Translate manip lost the object, no object in selectNode" << llendl; |
493 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); | 496 | gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); |
494 | return TRUE; | 497 | return TRUE; |
495 | } | 498 | } |
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp index b5764c5..024123e 100644 --- a/linden/indra/newview/llmutelist.cpp +++ b/linden/indra/newview/llmutelist.cpp | |||
@@ -192,7 +192,7 @@ BOOL LLMuteList::isLinden(const LLString& name) const | |||
192 | BOOL LLMuteList::add(const LLMute& mute, U32 flags) | 192 | BOOL LLMuteList::add(const LLMute& mute, U32 flags) |
193 | { | 193 | { |
194 | // Can't mute text from Lindens | 194 | // Can't mute text from Lindens |
195 | if ((mute.mType == LLMute::AGENT || mute.mType == LLMute::BY_NAME) | 195 | if ((mute.mType == LLMute::AGENT) |
196 | && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) | 196 | && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) |
197 | { | 197 | { |
198 | gViewerWindow->alertXml("MuteLinden"); | 198 | gViewerWindow->alertXml("MuteLinden"); |
@@ -613,7 +613,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**) | |||
613 | gMuteListp->loadFromFile(filename); | 613 | gMuteListp->loadFromFile(filename); |
614 | } | 614 | } |
615 | 615 | ||
616 | void LLMuteList::onFileMuteList(void** user_data, S32 error_code) | 616 | void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status) |
617 | { | 617 | { |
618 | llinfos << "LLMuteList::processMuteListFile()" << llendl; | 618 | llinfos << "LLMuteList::processMuteListFile()" << llendl; |
619 | if (!gMuteListp) return; | 619 | if (!gMuteListp) return; |
diff --git a/linden/indra/newview/llmutelist.h b/linden/indra/newview/llmutelist.h index 4624bfd..63bee60 100644 --- a/linden/indra/newview/llmutelist.h +++ b/linden/indra/newview/llmutelist.h | |||
@@ -123,7 +123,7 @@ private: | |||
123 | static void processMuteListUpdate(LLMessageSystem* msg, void**); | 123 | static void processMuteListUpdate(LLMessageSystem* msg, void**); |
124 | static void processUseCachedMuteList(LLMessageSystem* msg, void**); | 124 | static void processUseCachedMuteList(LLMessageSystem* msg, void**); |
125 | 125 | ||
126 | static void onFileMuteList(void** user_data, S32 code); | 126 | static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status); |
127 | 127 | ||
128 | private: | 128 | private: |
129 | struct compare_by_name | 129 | struct compare_by_name |
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index 4f5c64b..7c206bb 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -552,12 +552,13 @@ void LLNotifyBox::close() | |||
552 | } | 552 | } |
553 | 553 | ||
554 | /*virtual*/ | 554 | /*virtual*/ |
555 | void LLNotifyBox::tick() | 555 | BOOL LLNotifyBox::tick() |
556 | { | 556 | { |
557 | if (mIsTip) | 557 | if (mIsTip) |
558 | { | 558 | { |
559 | close(); | 559 | close(); |
560 | } | 560 | } |
561 | return FALSE; | ||
561 | } | 562 | } |
562 | 563 | ||
563 | void LLNotifyBox::setVisible(BOOL visible) | 564 | void LLNotifyBox::setVisible(BOOL visible) |
diff --git a/linden/indra/newview/llnotify.h b/linden/indra/newview/llnotify.h index ad9b24a..b08634d 100644 --- a/linden/indra/newview/llnotify.h +++ b/linden/indra/newview/llnotify.h | |||
@@ -86,7 +86,7 @@ protected: | |||
86 | 86 | ||
87 | // Animate as sliding onto the screen. | 87 | // Animate as sliding onto the screen. |
88 | /*virtual*/ void draw(); | 88 | /*virtual*/ void draw(); |
89 | /*virtual*/ void tick(); | 89 | /*virtual*/ BOOL tick(); |
90 | 90 | ||
91 | void moveToBack(); | 91 | void moveToBack(); |
92 | 92 | ||
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index f7ef441..5f7bb6e 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp | |||
@@ -269,7 +269,7 @@ void LLPanelClassified::apply() | |||
269 | { | 269 | { |
270 | // Apply is used for automatically saving results, so only | 270 | // Apply is used for automatically saving results, so only |
271 | // do that if there is a difference, and this is a save not create. | 271 | // do that if there is a difference, and this is a save not create. |
272 | if (mDirty && mPaidFor) | 272 | if (checkDirty() && mPaidFor) |
273 | { | 273 | { |
274 | sendClassifiedInfoUpdate(); | 274 | sendClassifiedInfoUpdate(); |
275 | } | 275 | } |
@@ -313,7 +313,8 @@ void LLPanelClassified::saveCallback(S32 option, void* data) | |||
313 | 313 | ||
314 | BOOL LLPanelClassified::canClose() | 314 | BOOL LLPanelClassified::canClose() |
315 | { | 315 | { |
316 | if (mForceClose || !mDirty) return TRUE; | 316 | if (mForceClose || !checkDirty()) |
317 | return TRUE; | ||
317 | 318 | ||
318 | LLString::format_map_t args; | 319 | LLString::format_map_t args; |
319 | args["[NAME]"] = mNameEditor->getText(); | 320 | args["[NAME]"] = mNameEditor->getText(); |
@@ -676,7 +677,7 @@ void LLPanelClassified::refresh() | |||
676 | mSetBtn->setVisible(is_self); | 677 | mSetBtn->setVisible(is_self); |
677 | mSetBtn->setEnabled(is_self); | 678 | mSetBtn->setEnabled(is_self); |
678 | 679 | ||
679 | mUpdateBtn->setEnabled(is_self && mDirty); | 680 | mUpdateBtn->setEnabled(is_self && checkDirty()); |
680 | mUpdateBtn->setVisible(is_self); | 681 | mUpdateBtn->setVisible(is_self); |
681 | } | 682 | } |
682 | } | 683 | } |
@@ -736,29 +737,44 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo | |||
736 | 737 | ||
737 | } | 738 | } |
738 | 739 | ||
739 | // static | ||
740 | void LLPanelClassified::callbackConfirmPublish(S32 option, void* data) | ||
741 | { | ||
742 | LLPanelClassified* self = (LLPanelClassified*)data; | ||
743 | 740 | ||
741 | // invoked from callbackConfirmPublish | ||
742 | void LLPanelClassified::confirmPublish(S32 option) | ||
743 | { | ||
744 | // Option 0 = publish | 744 | // Option 0 = publish |
745 | if (option != 0) return; | 745 | if (option != 0) return; |
746 | 746 | ||
747 | self->sendClassifiedInfoUpdate(); | 747 | sendClassifiedInfoUpdate(); |
748 | 748 | ||
749 | // Big hack - assume that top picks are always in a browser, | 749 | // Big hack - assume that top picks are always in a browser, |
750 | // and non-finder-classifieds are always in a tab container. | 750 | // and non-finder-classifieds are always in a tab container. |
751 | if (self->mInFinder) | 751 | if (mInFinder) |
752 | { | 752 | { |
753 | // TODO: enable this | 753 | // TODO: enable this |
754 | //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)self->getParent(); | 754 | //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)getParent(); |
755 | //panel->renameClassified(self->mClassifiedID, self->mNameEditor->getText().c_str()); | 755 | //panel->renameClassified(mClassifiedID, mNameEditor->getText().c_str()); |
756 | } | 756 | } |
757 | else | 757 | else |
758 | { | 758 | { |
759 | LLTabContainerVertical* tab = (LLTabContainerVertical*)self->getParent(); | 759 | LLTabContainerVertical* tab = (LLTabContainerVertical*)getParent(); |
760 | tab->setCurrentTabName(self->mNameEditor->getText()); | 760 | tab->setCurrentTabName(mNameEditor->getText()); |
761 | } | 761 | } |
762 | |||
763 | // Tell all the widgets to reset their dirty state since the ad was just saved | ||
764 | mSnapshotCtrl->resetDirty(); | ||
765 | mNameEditor->resetDirty(); | ||
766 | mDescEditor->resetDirty(); | ||
767 | mLocationEditor->resetDirty(); | ||
768 | mCategoryCombo->resetDirty(); | ||
769 | mMatureCheck->resetDirty(); | ||
770 | mAutoRenewCheck->resetDirty(); | ||
771 | } | ||
772 | |||
773 | // static | ||
774 | void LLPanelClassified::callbackConfirmPublish(S32 option, void* data) | ||
775 | { | ||
776 | LLPanelClassified* self = (LLPanelClassified*)data; | ||
777 | self->confirmPublish(option); | ||
762 | } | 778 | } |
763 | 779 | ||
764 | // static | 780 | // static |
@@ -831,13 +847,27 @@ void LLPanelClassified::onClickSet(void* data) | |||
831 | } | 847 | } |
832 | 848 | ||
833 | 849 | ||
850 | BOOL LLPanelClassified::checkDirty() | ||
851 | { | ||
852 | mDirty = FALSE; | ||
853 | if ( mSnapshotCtrl ) mDirty |= mSnapshotCtrl->isDirty(); | ||
854 | if ( mNameEditor ) mDirty |= mNameEditor->isDirty(); | ||
855 | if ( mDescEditor ) mDirty |= mDescEditor->isDirty(); | ||
856 | if ( mLocationEditor ) mDirty |= mLocationEditor->isDirty(); | ||
857 | if ( mCategoryCombo ) mDirty |= mCategoryCombo->isDirty(); | ||
858 | if ( mMatureCheck ) mDirty |= mMatureCheck->isDirty(); | ||
859 | if ( mAutoRenewCheck ) mDirty |= mAutoRenewCheck->isDirty(); | ||
860 | |||
861 | return mDirty; | ||
862 | } | ||
863 | |||
834 | // static | 864 | // static |
835 | void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) | 865 | void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) |
836 | { | 866 | { |
837 | LLPanelClassified* self = (LLPanelClassified*)data; | 867 | LLPanelClassified* self = (LLPanelClassified*)data; |
838 | if (self) | 868 | if (self) |
839 | { | 869 | { |
840 | self->mDirty = true; | 870 | self->checkDirty(); |
841 | } | 871 | } |
842 | } | 872 | } |
843 | 873 | ||
@@ -845,7 +875,6 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) | |||
845 | void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) | 875 | void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) |
846 | { | 876 | { |
847 | // allow the data to be saved | 877 | // allow the data to be saved |
848 | // Dave/Simon TODO: replace this with better isDirty() functionality | ||
849 | onCommitAny(ctrl, data); | 878 | onCommitAny(ctrl, data); |
850 | } | 879 | } |
851 | 880 | ||
diff --git a/linden/indra/newview/llpanelclassified.h b/linden/indra/newview/llpanelclassified.h index 6f5e370..ec2d0b6 100644 --- a/linden/indra/newview/llpanelclassified.h +++ b/linden/indra/newview/llpanelclassified.h | |||
@@ -91,6 +91,7 @@ public: | |||
91 | 91 | ||
92 | void sendClassifiedInfoRequest(); | 92 | void sendClassifiedInfoRequest(); |
93 | void sendClassifiedInfoUpdate(); | 93 | void sendClassifiedInfoUpdate(); |
94 | void confirmPublish(S32 option); | ||
94 | 95 | ||
95 | static void processClassifiedInfoReply(LLMessageSystem* msg, void**); | 96 | static void processClassifiedInfoReply(LLMessageSystem* msg, void**); |
96 | 97 | ||
@@ -110,10 +111,11 @@ protected: | |||
110 | static void onCommitAny(LLUICtrl* ctrl, void* data); | 111 | static void onCommitAny(LLUICtrl* ctrl, void* data); |
111 | 112 | ||
112 | void sendClassifiedClickMessage(const char* type); | 113 | void sendClassifiedClickMessage(const char* type); |
114 | BOOL checkDirty(); // Update and return mDirty | ||
113 | 115 | ||
114 | protected: | 116 | protected: |
115 | BOOL mInFinder; | 117 | BOOL mInFinder; |
116 | bool mDirty; | 118 | BOOL mDirty; |
117 | bool mForceClose; | 119 | bool mForceClose; |
118 | LLUUID mClassifiedID; | 120 | LLUUID mClassifiedID; |
119 | LLUUID mRequestedID; | 121 | LLUUID mRequestedID; |
@@ -134,7 +136,6 @@ protected: | |||
134 | // Values the user may change | 136 | // Values the user may change |
135 | LLTextureCtrl* mSnapshotCtrl; | 137 | LLTextureCtrl* mSnapshotCtrl; |
136 | LLLineEditor* mNameEditor; | 138 | LLLineEditor* mNameEditor; |
137 | LLLineEditor* mDateEditor; | ||
138 | LLTextEditor* mDescEditor; | 139 | LLTextEditor* mDescEditor; |
139 | LLLineEditor* mLocationEditor; | 140 | LLLineEditor* mLocationEditor; |
140 | LLComboBox* mCategoryCombo; | 141 | LLComboBox* mCategoryCombo; |
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index c4fa1dc..4a03900 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp | |||
@@ -322,7 +322,7 @@ void LLPanelDisplay::applyResolution() | |||
322 | // change fullscreen resolution or switch in/out of windowed mode | 322 | // change fullscreen resolution or switch in/out of windowed mode |
323 | BOOL result; | 323 | BOOL result; |
324 | 324 | ||
325 | BOOL logged_in = (gStartupState >= STATE_STARTED); | 325 | BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED); |
326 | if (fullscreen) | 326 | if (fullscreen) |
327 | { | 327 | { |
328 | result = gViewerWindow->changeDisplaySettings(TRUE, | 328 | result = gViewerWindow->changeDisplaySettings(TRUE, |
@@ -526,7 +526,7 @@ void LLPanelDisplay2::apply() | |||
526 | LLImageGL::sGlobalUseAnisotropic = childGetValue("ani"); | 526 | LLImageGL::sGlobalUseAnisotropic = childGetValue("ani"); |
527 | if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) | 527 | if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) |
528 | { | 528 | { |
529 | BOOL logged_in = (gStartupState >= STATE_STARTED); | 529 | BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED); |
530 | gViewerWindow->restartDisplay(logged_in); | 530 | gViewerWindow->restartDisplay(logged_in); |
531 | } | 531 | } |
532 | 532 | ||
@@ -655,9 +655,13 @@ void LLPanelDisplay3::refresh() | |||
655 | void LLPanelDisplay3::refreshEnabledState() | 655 | void LLPanelDisplay3::refreshEnabledState() |
656 | { | 656 | { |
657 | // Ripple Water | 657 | // Ripple Water |
658 | bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2); | 658 | bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2) && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"); |
659 | mCtrlRippleWater->setEnabled(ripple ? TRUE : FALSE); | 659 | mCtrlRippleWater->setEnabled(ripple ? TRUE : FALSE); |
660 | 660 | ||
661 | // Bump & Shiny | ||
662 | bool bumpshiny = gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap") && gFeatureManagerp->isFeatureAvailable("RenderObjectBump"); | ||
663 | mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE); | ||
664 | |||
661 | // Avatar Mode | 665 | // Avatar Mode |
662 | S32 max_avatar_shader = LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_AVATAR); | 666 | S32 max_avatar_shader = LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_AVATAR); |
663 | mCtrlAvatarVP->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); | 667 | mCtrlAvatarVP->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); |
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index 0888cad..8d30f09 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp | |||
@@ -70,7 +70,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name, | |||
70 | mFounderName(NULL), | 70 | mFounderName(NULL), |
71 | mInsignia(NULL), | 71 | mInsignia(NULL), |
72 | mEditCharter(NULL), | 72 | mEditCharter(NULL), |
73 | mEditName(NULL), | ||
74 | mBtnJoinGroup(NULL), | 73 | mBtnJoinGroup(NULL), |
75 | mListVisibleMembers(NULL), | 74 | mListVisibleMembers(NULL), |
76 | mCtrlShowInGroupList(NULL), | 75 | mCtrlShowInGroupList(NULL), |
@@ -256,7 +255,7 @@ BOOL LLPanelGroupGeneral::postBuild() | |||
256 | void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data) | 255 | void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data) |
257 | { | 256 | { |
258 | LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; | 257 | LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; |
259 | self->mChanged = TRUE; | 258 | self->updateChanged(); |
260 | self->notifyObservers(); | 259 | self->notifyObservers(); |
261 | } | 260 | } |
262 | 261 | ||
@@ -811,3 +810,22 @@ void LLPanelGroupGeneral::updateMembers() | |||
811 | mListVisibleMembers->setEnabled(FALSE); | 810 | mListVisibleMembers->setEnabled(FALSE); |
812 | } | 811 | } |
813 | } | 812 | } |
813 | |||
814 | |||
815 | void LLPanelGroupGeneral::updateChanged() | ||
816 | { | ||
817 | mChanged = FALSE; | ||
818 | if ( mGroupNameEditor ) | ||
819 | mChanged = mGroupNameEditor->isDirty(); | ||
820 | if ( mGroupName ) | ||
821 | mChanged |= mGroupName->isDirty(); | ||
822 | if ( mFounderName ) | ||
823 | mChanged |= mFounderName->isDirty(); | ||
824 | if ( mInsignia ) | ||
825 | mChanged |= mInsignia->isDirty(); | ||
826 | if ( mEditCharter ) | ||
827 | mChanged |= mEditCharter->isDirty(); | ||
828 | // if ( mCtrlReceiveNotices ) // "Receive group notices" is different, see onReceiveNotices() | ||
829 | // mChanged |= mCtrlReceiveNotices->isDirty(); | ||
830 | } | ||
831 | |||
diff --git a/linden/indra/newview/llpanelgroupgeneral.h b/linden/indra/newview/llpanelgroupgeneral.h index 22990a9..a8615b2 100644 --- a/linden/indra/newview/llpanelgroupgeneral.h +++ b/linden/indra/newview/llpanelgroupgeneral.h | |||
@@ -74,6 +74,7 @@ private: | |||
74 | static void joinDlgCB(S32 which, void *userdata); | 74 | static void joinDlgCB(S32 which, void *userdata); |
75 | 75 | ||
76 | void updateMembers(); | 76 | void updateMembers(); |
77 | void updateChanged(); | ||
77 | 78 | ||
78 | BOOL mPendingMemberUpdate; | 79 | BOOL mPendingMemberUpdate; |
79 | BOOL mChanged; | 80 | BOOL mChanged; |
@@ -88,7 +89,6 @@ private: | |||
88 | LLNameBox *mFounderName; | 89 | LLNameBox *mFounderName; |
89 | LLTextureCtrl *mInsignia; | 90 | LLTextureCtrl *mInsignia; |
90 | LLTextEditor *mEditCharter; | 91 | LLTextEditor *mEditCharter; |
91 | LLLineEditor *mEditName; | ||
92 | LLButton *mBtnJoinGroup; | 92 | LLButton *mBtnJoinGroup; |
93 | LLButton *mBtnInfo; | 93 | LLButton *mBtnInfo; |
94 | 94 | ||
diff --git a/linden/indra/newview/llpanelgroupinvite.cpp b/linden/indra/newview/llpanelgroupinvite.cpp index 7e5429f..4078c6d 100644 --- a/linden/indra/newview/llpanelgroupinvite.cpp +++ b/linden/indra/newview/llpanelgroupinvite.cpp | |||
@@ -36,6 +36,9 @@ | |||
36 | #include "llgroupmgr.h" | 36 | #include "llgroupmgr.h" |
37 | #include "llnamelistctrl.h" | 37 | #include "llnamelistctrl.h" |
38 | #include "llspinctrl.h" | 38 | #include "llspinctrl.h" |
39 | #include "lltextbox.h" | ||
40 | #include "llviewerobject.h" | ||
41 | #include "llviewerobjectlist.h" | ||
39 | #include "llvieweruictrlfactory.h" | 42 | #include "llvieweruictrlfactory.h" |
40 | 43 | ||
41 | class LLPanelGroupInvite::impl | 44 | class LLPanelGroupInvite::impl |
@@ -65,7 +68,9 @@ public: | |||
65 | 68 | ||
66 | LLNameListCtrl *mInvitees; | 69 | LLNameListCtrl *mInvitees; |
67 | LLComboBox *mRoleNames; | 70 | LLComboBox *mRoleNames; |
68 | LLButton *mRemoveButton; | 71 | LLButton *mOKButton; |
72 | LLButton *mRemoveButton; | ||
73 | LLTextBox *mGroupName; | ||
69 | 74 | ||
70 | void (*mCloseCallback)(void* data); | 75 | void (*mCloseCallback)(void* data); |
71 | 76 | ||
@@ -308,6 +313,8 @@ LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name, | |||
308 | : LLPanel(name) | 313 | : LLPanel(name) |
309 | { | 314 | { |
310 | mImplementation = new impl(group_id); | 315 | mImplementation = new impl(group_id); |
316 | mPendingUpdate = FALSE; | ||
317 | mStoreSelected = LLUUID::null; | ||
311 | 318 | ||
312 | std::string panel_def_file; | 319 | std::string panel_def_file; |
313 | 320 | ||
@@ -329,29 +336,132 @@ void LLPanelGroupInvite::setCloseCallback(void (*close_callback)(void*), | |||
329 | 336 | ||
330 | void LLPanelGroupInvite::clear() | 337 | void LLPanelGroupInvite::clear() |
331 | { | 338 | { |
339 | mStoreSelected = LLUUID::null; | ||
332 | mImplementation->mInvitees->deleteAllItems(); | 340 | mImplementation->mInvitees->deleteAllItems(); |
333 | mImplementation->mRoleNames->clear(); | 341 | mImplementation->mRoleNames->clear(); |
334 | mImplementation->mRoleNames->removeall(); | 342 | mImplementation->mRoleNames->removeall(); |
343 | mImplementation->mOKButton->setEnabled(FALSE); | ||
335 | } | 344 | } |
336 | 345 | ||
346 | void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) | ||
347 | { | ||
348 | std::vector<std::string> names; | ||
349 | for (S32 i = 0; i < (S32)agent_ids.size(); i++) | ||
350 | { | ||
351 | LLUUID agent_id = agent_ids[i]; | ||
352 | LLViewerObject* dest = gObjectList.findObject(agent_id); | ||
353 | if(dest && dest->isAvatar()) | ||
354 | { | ||
355 | LLString fullname; | ||
356 | LLString::format_map_t args; | ||
357 | LLNameValue* nvfirst = dest->getNVPair("FirstName"); | ||
358 | LLNameValue* nvlast = dest->getNVPair("LastName"); | ||
359 | if(nvfirst && nvlast) | ||
360 | { | ||
361 | args["[FIRST]"] = nvfirst->getString(); | ||
362 | args["[LAST]"] = nvlast->getString(); | ||
363 | fullname = nvfirst->getString(); | ||
364 | fullname += " "; | ||
365 | fullname += nvlast->getString(); | ||
366 | } | ||
367 | if (!fullname.empty()) | ||
368 | { | ||
369 | names.push_back(fullname); | ||
370 | } | ||
371 | else | ||
372 | { | ||
373 | llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl; | ||
374 | names.push_back("(Unknown)"); | ||
375 | } | ||
376 | } | ||
377 | } | ||
378 | mImplementation->addUsers(names, agent_ids); | ||
379 | } | ||
380 | |||
381 | void LLPanelGroupInvite::draw() | ||
382 | { | ||
383 | LLPanel::draw(); | ||
384 | if (mPendingUpdate) | ||
385 | { | ||
386 | updateLists(); | ||
387 | } | ||
388 | } | ||
389 | |||
337 | void LLPanelGroupInvite::update() | 390 | void LLPanelGroupInvite::update() |
338 | { | 391 | { |
392 | mPendingUpdate = FALSE; | ||
393 | if (mImplementation->mGroupName) | ||
394 | { | ||
395 | mImplementation->mGroupName->setText("(loading...)"); | ||
396 | } | ||
397 | if ( mImplementation->mRoleNames ) | ||
398 | { | ||
399 | mStoreSelected = mImplementation->mRoleNames->getCurrentID(); | ||
400 | mImplementation->mRoleNames->clear(); | ||
401 | mImplementation->mRoleNames->removeall(); | ||
402 | mImplementation->mRoleNames->add("(loading...)", LLUUID::null, ADD_BOTTOM); | ||
403 | mImplementation->mRoleNames->setCurrentByID(LLUUID::null); | ||
404 | } | ||
405 | |||
406 | updateLists(); | ||
407 | } | ||
408 | |||
409 | void LLPanelGroupInvite::updateLists() | ||
410 | { | ||
339 | LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID); | 411 | LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID); |
412 | BOOL waiting = FALSE; | ||
340 | 413 | ||
341 | if (!gdatap || !gdatap->isRoleDataComplete()) | 414 | if (gdatap) |
415 | { | ||
416 | if (gdatap->isGroupPropertiesDataComplete()) | ||
417 | { | ||
418 | if (mImplementation->mGroupName) | ||
419 | { | ||
420 | mImplementation->mGroupName->setText(gdatap->mName); | ||
421 | } | ||
422 | } | ||
423 | else | ||
424 | { | ||
425 | waiting = TRUE; | ||
426 | } | ||
427 | if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete()) | ||
428 | { | ||
429 | if ( mImplementation->mRoleNames ) | ||
430 | { | ||
431 | mImplementation->mRoleNames->clear(); | ||
432 | mImplementation->mRoleNames->removeall(); | ||
433 | |||
434 | //add the role names and select the everybody role by default | ||
435 | mImplementation->addRoleNames(gdatap); | ||
436 | mImplementation->mRoleNames->setCurrentByID(mStoreSelected); | ||
437 | } | ||
438 | } | ||
439 | else | ||
440 | { | ||
441 | waiting = TRUE; | ||
442 | } | ||
443 | } | ||
444 | else | ||
342 | { | 445 | { |
343 | gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID); | 446 | waiting = TRUE; |
344 | } | 447 | } |
448 | |||
449 | if (waiting) | ||
450 | { | ||
451 | if (!mPendingUpdate) | ||
452 | { | ||
453 | gGroupMgr->sendGroupPropertiesRequest(mImplementation->mGroupID); | ||
454 | gGroupMgr->sendGroupMembersRequest(mImplementation->mGroupID); | ||
455 | gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID); | ||
456 | } | ||
457 | mPendingUpdate = TRUE; | ||
458 | } | ||
345 | else | 459 | else |
346 | { | 460 | { |
347 | if ( mImplementation->mRoleNames ) | 461 | mPendingUpdate = FALSE; |
462 | if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount()) | ||
348 | { | 463 | { |
349 | mImplementation->mRoleNames->clear(); | 464 | mImplementation->mOKButton->setEnabled(TRUE); |
350 | mImplementation->mRoleNames->removeall(); | ||
351 | |||
352 | //add the role names and select the everybody role by default | ||
353 | mImplementation->addRoleNames(gdatap); | ||
354 | mImplementation->mRoleNames->setCurrentByID(LLUUID::null); | ||
355 | } | 465 | } |
356 | } | 466 | } |
357 | } | 467 | } |
@@ -362,6 +472,7 @@ BOOL LLPanelGroupInvite::postBuild() | |||
362 | 472 | ||
363 | mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name", | 473 | mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name", |
364 | recurse); | 474 | recurse); |
475 | mImplementation->mGroupName = (LLTextBox*) getChildByName("group_name_text", recurse); | ||
365 | mImplementation->mInvitees = | 476 | mImplementation->mInvitees = |
366 | (LLNameListCtrl*) getChildByName("invitee_list", recurse); | 477 | (LLNameListCtrl*) getChildByName("invitee_list", recurse); |
367 | if ( mImplementation->mInvitees ) | 478 | if ( mImplementation->mInvitees ) |
@@ -390,12 +501,15 @@ BOOL LLPanelGroupInvite::postBuild() | |||
390 | mImplementation->mRemoveButton->setEnabled(FALSE); | 501 | mImplementation->mRemoveButton->setEnabled(FALSE); |
391 | } | 502 | } |
392 | 503 | ||
393 | button = (LLButton*) getChildByName("ok_button", recurse); | 504 | mImplementation->mOKButton = |
394 | if ( button ) | 505 | (LLButton*) getChildByName("ok_button", recurse); |
395 | { | 506 | if ( mImplementation->mOKButton ) |
396 | button->setClickedCallback(impl::callbackClickOK); | 507 | { |
397 | button->setCallbackUserData(mImplementation); | 508 | mImplementation->mOKButton-> |
398 | } | 509 | setClickedCallback(impl::callbackClickOK); |
510 | mImplementation->mOKButton->setCallbackUserData(mImplementation); | ||
511 | mImplementation->mOKButton->setEnabled(FALSE); | ||
512 | } | ||
399 | 513 | ||
400 | button = (LLButton*) getChildByName("cancel_button", recurse); | 514 | button = (LLButton*) getChildByName("cancel_button", recurse); |
401 | if ( button ) | 515 | if ( button ) |
diff --git a/linden/indra/newview/llpanelgroupinvite.h b/linden/indra/newview/llpanelgroupinvite.h index 260b091..40e9701 100644 --- a/linden/indra/newview/llpanelgroupinvite.h +++ b/linden/indra/newview/llpanelgroupinvite.h | |||
@@ -37,16 +37,22 @@ class LLPanelGroupInvite | |||
37 | public: | 37 | public: |
38 | LLPanelGroupInvite(const std::string& name, const LLUUID& group_id); | 38 | LLPanelGroupInvite(const std::string& name, const LLUUID& group_id); |
39 | ~LLPanelGroupInvite(); | 39 | ~LLPanelGroupInvite(); |
40 | 40 | ||
41 | void addUsers(std::vector<LLUUID>& agent_ids); | ||
41 | void clear(); | 42 | void clear(); |
42 | void update(); | 43 | void update(); |
43 | 44 | ||
44 | void setCloseCallback(void (*close_callback)(void*), void* data); | 45 | void setCloseCallback(void (*close_callback)(void*), void* data); |
45 | 46 | ||
47 | virtual void draw(); | ||
46 | virtual BOOL postBuild(); | 48 | virtual BOOL postBuild(); |
47 | protected: | 49 | protected: |
48 | class impl; | 50 | class impl; |
49 | impl* mImplementation; | 51 | impl* mImplementation; |
52 | |||
53 | BOOL mPendingUpdate; | ||
54 | LLUUID mStoreSelected; | ||
55 | void updateLists(); | ||
50 | }; | 56 | }; |
51 | 57 | ||
52 | #endif | 58 | #endif |
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 7a0482b..2df1097 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "llmd5.h" | 36 | #include "llmd5.h" |
37 | #include "llsecondlifeurls.h" | 37 | #include "llsecondlifeurls.h" |
38 | #include "llwindow.h" // shell_open() | 38 | #include "llwindow.h" // shell_open() |
39 | #include "llversion.h" | 39 | #include "llversionviewer.h" |
40 | #include "v4color.h" | 40 | #include "v4color.h" |
41 | 41 | ||
42 | #include "llbutton.h" | 42 | #include "llbutton.h" |
@@ -139,6 +139,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
139 | { | 139 | { |
140 | llwarns << "Duplicate instance of login view deleted" << llendl; | 140 | llwarns << "Duplicate instance of login view deleted" << llendl; |
141 | delete LLPanelLogin::sInstance; | 141 | delete LLPanelLogin::sInstance; |
142 | |||
143 | // Don't leave bad pointer in gFocusMgr | ||
144 | gFocusMgr.setDefaultKeyboardFocus(NULL); | ||
142 | } | 145 | } |
143 | 146 | ||
144 | LLPanelLogin::sInstance = this; | 147 | LLPanelLogin::sInstance = this; |
@@ -525,9 +528,10 @@ void LLPanelLogin::show(const LLRect &rect, | |||
525 | { | 528 | { |
526 | // Grab focus and move cursor to first enabled control | 529 | // Grab focus and move cursor to first enabled control |
527 | sInstance->setFocus(TRUE); | 530 | sInstance->setFocus(TRUE); |
528 | // make sure that focus always goes here | ||
529 | gFocusMgr.setDefaultKeyboardFocus(sInstance); | ||
530 | } | 531 | } |
532 | |||
533 | // Make sure that focus always goes here (and use the latest sInstance that was just created) | ||
534 | gFocusMgr.setDefaultKeyboardFocus(sInstance); | ||
531 | } | 535 | } |
532 | 536 | ||
533 | // static | 537 | // static |
@@ -608,35 +612,40 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString & | |||
608 | } | 612 | } |
609 | 613 | ||
610 | 614 | ||
611 | // static | 615 | // static. Return TRUE if user made a choice from the popup |
612 | void LLPanelLogin::getServer(LLString &server, S32 &domain_name) | 616 | BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) |
613 | { | 617 | { |
618 | BOOL user_picked = FALSE; | ||
614 | if (!sInstance) | 619 | if (!sInstance) |
615 | { | 620 | { |
616 | llwarns << "Attempted getServer with no login view shown" << llendl; | 621 | llwarns << "Attempted getServer with no login view shown" << llendl; |
617 | return; | ||
618 | } | 622 | } |
619 | 623 | else | |
620 | LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); | ||
621 | if (combo) | ||
622 | { | 624 | { |
623 | LLSD combo_val = combo->getValue(); | 625 | LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); |
624 | if (LLSD::TypeInteger == combo_val.type()) | 626 | if (combo) |
625 | { | 627 | { |
626 | domain_name = combo->getValue().asInteger(); | 628 | LLSD combo_val = combo->getValue(); |
629 | if (LLSD::TypeInteger == combo_val.type()) | ||
630 | { | ||
631 | domain_name = combo->getValue().asInteger(); | ||
627 | 632 | ||
628 | if ((S32)USERSERVER_OTHER == domain_name) | 633 | if ((S32)USERSERVER_OTHER == domain_name) |
634 | { | ||
635 | server = gUserServerName; | ||
636 | } | ||
637 | } | ||
638 | else | ||
629 | { | 639 | { |
630 | server = gUserServerName; | 640 | // no valid selection, return other |
641 | domain_name = (S32)USERSERVER_OTHER; | ||
642 | server = combo_val.asString(); | ||
631 | } | 643 | } |
632 | } | 644 | user_picked = combo->isDirty(); |
633 | else | ||
634 | { | ||
635 | // no valid selection, return other | ||
636 | domain_name = (S32)USERSERVER_OTHER; | ||
637 | server = combo_val.asString(); | ||
638 | } | 645 | } |
639 | } | 646 | } |
647 | |||
648 | return user_picked; | ||
640 | } | 649 | } |
641 | 650 | ||
642 | // static | 651 | // static |
diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h index 05590d3..7faf0d8 100644 --- a/linden/indra/newview/llpanellogin.h +++ b/linden/indra/newview/llpanellogin.h | |||
@@ -69,7 +69,7 @@ public: | |||
69 | static void getFields(LLString &firstname, LLString &lastname, | 69 | static void getFields(LLString &firstname, LLString &lastname, |
70 | LLString &password, BOOL &remember); | 70 | LLString &password, BOOL &remember); |
71 | 71 | ||
72 | static void getServer(LLString &server, S32& domain_name); | 72 | static BOOL getServer(LLString &server, S32& domain_name); |
73 | static void getLocation(LLString &location); | 73 | static void getLocation(LLString &location); |
74 | 74 | ||
75 | static void close(); | 75 | static void close(); |
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 3e7be68..a8411df 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp | |||
@@ -286,6 +286,10 @@ BOOL LLPanelObject::postBuild() | |||
286 | } | 286 | } |
287 | } | 287 | } |
288 | 288 | ||
289 | mLabelSculptType = gUICtrlFactory->getTextBoxByName(this, "label sculpt type"); | ||
290 | mCtrlSculptType = gUICtrlFactory->getComboBoxByName(this, "sculpt type control"); | ||
291 | childSetCommitCallback("sculpt type control", onCommitSculptType, this); | ||
292 | |||
289 | 293 | ||
290 | // Start with everyone disabled | 294 | // Start with everyone disabled |
291 | clearCtrls(); | 295 | clearCtrls(); |
@@ -1035,7 +1039,10 @@ void LLPanelObject::getState( ) | |||
1035 | mLabelRevolutions->setVisible( revolutions_visible ); | 1039 | mLabelRevolutions->setVisible( revolutions_visible ); |
1036 | mSpinRevolutions ->setVisible( revolutions_visible ); | 1040 | mSpinRevolutions ->setVisible( revolutions_visible ); |
1037 | 1041 | ||
1038 | mCtrlSculptTexture->setVisible( sculpt_texture_visible ); | 1042 | bool sculpt_type_visible = FALSE; // currently not visible - for LSL setting only |
1043 | mCtrlSculptTexture->setVisible(sculpt_texture_visible); | ||
1044 | mLabelSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible); | ||
1045 | mCtrlSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible); | ||
1039 | 1046 | ||
1040 | 1047 | ||
1041 | // sculpt texture | 1048 | // sculpt texture |
@@ -1045,21 +1052,39 @@ void LLPanelObject::getState( ) | |||
1045 | LLUUID id; | 1052 | LLUUID id; |
1046 | LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); | 1053 | LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); |
1047 | 1054 | ||
1048 | LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); | 1055 | |
1049 | if((mTextureCtrl) && (sculpt_params)) | 1056 | if (sculpt_params) // if we have a legal sculpt param block for this object: |
1050 | { | 1057 | { |
1051 | mTextureCtrl->setTentative(FALSE); | ||
1052 | mTextureCtrl->setEnabled(editable); | ||
1053 | if (editable) | ||
1054 | mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture()); | ||
1055 | else | ||
1056 | mTextureCtrl->setImageAssetID(LLUUID::null); | ||
1057 | |||
1058 | |||
1059 | if (mObject != objectp) // we've just selected a new object, so save for undo | 1058 | if (mObject != objectp) // we've just selected a new object, so save for undo |
1059 | { | ||
1060 | mSculptTextureRevert = sculpt_params->getSculptTexture(); | 1060 | mSculptTextureRevert = sculpt_params->getSculptTexture(); |
1061 | } | 1061 | mSculptTypeRevert = sculpt_params->getSculptType(); |
1062 | } | ||
1063 | |||
1064 | LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); | ||
1065 | if(mTextureCtrl) | ||
1066 | { | ||
1067 | mTextureCtrl->setTentative(FALSE); | ||
1068 | mTextureCtrl->setEnabled(editable); | ||
1069 | if (editable) | ||
1070 | mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture()); | ||
1071 | else | ||
1072 | mTextureCtrl->setImageAssetID(LLUUID::null); | ||
1073 | } | ||
1074 | |||
1075 | if (mCtrlSculptType) | ||
1076 | { | ||
1077 | mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType()); | ||
1078 | mCtrlSculptType->setEnabled(editable); | ||
1079 | } | ||
1062 | 1080 | ||
1081 | if (mLabelSculptType) | ||
1082 | { | ||
1083 | mLabelSculptType->setEnabled(TRUE); | ||
1084 | } | ||
1085 | |||
1086 | |||
1087 | } | ||
1063 | } | 1088 | } |
1064 | 1089 | ||
1065 | 1090 | ||
@@ -1194,7 +1219,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) | |||
1194 | self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); | 1219 | self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); |
1195 | LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); | 1220 | LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); |
1196 | if (sculpt_params) | 1221 | if (sculpt_params) |
1197 | volume_params.setSculptID(sculpt_params->getSculptTexture(), 0); | 1222 | volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType()); |
1198 | } | 1223 | } |
1199 | else | 1224 | else |
1200 | { | 1225 | { |
@@ -1648,13 +1673,16 @@ void LLPanelObject::sendPosition() | |||
1648 | 1673 | ||
1649 | void LLPanelObject::sendSculpt() | 1674 | void LLPanelObject::sendSculpt() |
1650 | { | 1675 | { |
1651 | LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(this,"sculpt texture control"); | 1676 | if (mObject.isNull()) |
1652 | if(!mTextureCtrl) | ||
1653 | return; | 1677 | return; |
1654 | 1678 | ||
1655 | LLSculptParams sculpt_params; | 1679 | LLSculptParams sculpt_params; |
1656 | sculpt_params.setSculptTexture(mTextureCtrl->getImageAssetID()); | 1680 | |
1657 | sculpt_params.setSculptType(LL_SCULPT_TYPE_SPHERE); | 1681 | if (mCtrlSculptTexture) |
1682 | sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID()); | ||
1683 | |||
1684 | if (mCtrlSculptType) | ||
1685 | sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex()); | ||
1658 | 1686 | ||
1659 | mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); | 1687 | mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); |
1660 | } | 1688 | } |
@@ -1863,7 +1891,9 @@ void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata) | |||
1863 | LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control"); | 1891 | LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control"); |
1864 | 1892 | ||
1865 | if (mTextureCtrl) | 1893 | if (mTextureCtrl) |
1894 | { | ||
1866 | self->mSculptTextureRevert = mTextureCtrl->getImageAssetID(); | 1895 | self->mSculptTextureRevert = mTextureCtrl->getImageAssetID(); |
1896 | } | ||
1867 | 1897 | ||
1868 | self->sendSculpt(); | 1898 | self->sendSculpt(); |
1869 | } | 1899 | } |
@@ -1890,7 +1920,6 @@ BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdat | |||
1890 | mTextureCtrl->setImageAssetID(asset); | 1920 | mTextureCtrl->setImageAssetID(asset); |
1891 | self->mSculptTextureRevert = asset; | 1921 | self->mSculptTextureRevert = asset; |
1892 | } | 1922 | } |
1893 | |||
1894 | 1923 | ||
1895 | return TRUE; | 1924 | return TRUE; |
1896 | } | 1925 | } |
@@ -1909,3 +1938,11 @@ void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata) | |||
1909 | 1938 | ||
1910 | self->sendSculpt(); | 1939 | self->sendSculpt(); |
1911 | } | 1940 | } |
1941 | |||
1942 | // static | ||
1943 | void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata) | ||
1944 | { | ||
1945 | LLPanelObject* self = (LLPanelObject*) userdata; | ||
1946 | |||
1947 | self->sendSculpt(); | ||
1948 | } | ||
diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h index c734b38..ac0b96c 100644 --- a/linden/indra/newview/llpanelobject.h +++ b/linden/indra/newview/llpanelobject.h | |||
@@ -77,7 +77,9 @@ public: | |||
77 | static void onCommitSculpt( LLUICtrl* ctrl, void* userdata); | 77 | static void onCommitSculpt( LLUICtrl* ctrl, void* userdata); |
78 | static void onCancelSculpt( LLUICtrl* ctrl, void* userdata); | 78 | static void onCancelSculpt( LLUICtrl* ctrl, void* userdata); |
79 | static void onSelectSculpt( LLUICtrl* ctrl, void* userdata); | 79 | static void onSelectSculpt( LLUICtrl* ctrl, void* userdata); |
80 | static BOOL onDropSculpt(LLUICtrl* ctrl, LLInventoryItem* item, void* ud); | 80 | static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud); |
81 | static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); | ||
82 | |||
81 | 83 | ||
82 | protected: | 84 | protected: |
83 | void getState(); | 85 | void getState(); |
@@ -163,6 +165,8 @@ protected: | |||
163 | LLCheckBoxCtrl *mCheckCastShadows; | 165 | LLCheckBoxCtrl *mCheckCastShadows; |
164 | 166 | ||
165 | LLTextureCtrl *mCtrlSculptTexture; | 167 | LLTextureCtrl *mCtrlSculptTexture; |
168 | LLTextBox *mLabelSculptType; | ||
169 | LLComboBox *mCtrlSculptType; | ||
166 | 170 | ||
167 | LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed | 171 | LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed |
168 | BOOL mIsPhysical; // to avoid sending "physical" when not changed | 172 | BOOL mIsPhysical; // to avoid sending "physical" when not changed |
@@ -172,6 +176,7 @@ protected: | |||
172 | S32 mSelectedType; // So we know what selected type we last were | 176 | S32 mSelectedType; // So we know what selected type we last were |
173 | 177 | ||
174 | LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel | 178 | LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel |
179 | U8 mSculptTypeRevert; // so we can revert the sculpt type on cancel | ||
175 | 180 | ||
176 | LLPointer<LLViewerObject> mObject; | 181 | LLPointer<LLViewerObject> mObject; |
177 | LLPointer<LLViewerObject> mRootObject; | 182 | LLPointer<LLViewerObject> mRootObject; |
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 738c340..fad1742 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp | |||
@@ -155,7 +155,7 @@ BOOL LLPrefsIMImpl::postBuild() | |||
155 | childSetText("log_path_string", mLogPath); | 155 | childSetText("log_path_string", mLogPath); |
156 | childSetValue("log_instant_messages", mLogInstantMessages); | 156 | childSetValue("log_instant_messages", mLogInstantMessages); |
157 | childSetValue("log_chat", mLogChat); | 157 | childSetValue("log_chat", mLogChat); |
158 | childSetValue("log_show_history", mIMLogTimestamp); | 158 | childSetValue("log_show_history", mLogShowHistory); |
159 | childSetValue("log_instant_messages_timestamp", mIMLogTimestamp); | 159 | childSetValue("log_instant_messages_timestamp", mIMLogTimestamp); |
160 | childSetValue("log_chat_timestamp", mLogChatTimestamp); | 160 | childSetValue("log_chat_timestamp", mLogChatTimestamp); |
161 | childSetValue("log_chat_IM", mLogIMChat); | 161 | childSetValue("log_chat_IM", mLogIMChat); |
diff --git a/linden/indra/newview/llprefsvoice.h b/linden/indra/newview/llprefsvoice.h index e6b861d..4e48fd7 100644 --- a/linden/indra/newview/llprefsvoice.h +++ b/linden/indra/newview/llprefsvoice.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llprefsvoice.h | 2 | * @file llprefsvoice.h |
3 | * @brief Voice chat preferences panel | 3 | * @brief Voice chat preferences panel |
4 | * | 4 | * |
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | 5 | * Copyright (c) 2003-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | 7 | * Second Life Viewer Source Code |
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -23,18 +23,18 @@ | |||
23 | * | 23 | * |
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef LLPREFSVOICE_H | 29 | #ifndef LLPREFSVOICE_H |
30 | #define LLPREFSVOICE_H | 30 | #define LLPREFSVOICE_H |
31 | 31 | ||
32 | #include "llpanel.h" | 32 | #include "llpanel.h" |
33 | 33 | ||
34 | class LLFloaterDeviceSettings; | 34 | class LLFloaterDeviceSettings; |
35 | 35 | ||
36 | class LLPrefsVoiceLogic | 36 | class LLPrefsVoiceLogic |
37 | { | 37 | { |
38 | public: | 38 | public: |
39 | LLPrefsVoiceLogic(LLPanel* panelp); | 39 | LLPrefsVoiceLogic(LLPanel* panelp); |
40 | virtual ~LLPrefsVoiceLogic(){}; | 40 | virtual ~LLPrefsVoiceLogic(){}; |
@@ -51,8 +51,8 @@ protected: | |||
51 | 51 | ||
52 | static void onClickSetKey(void* user_data); | 52 | static void onClickSetKey(void* user_data); |
53 | static void onClickSetMiddleMouse(void* user_data); | 53 | static void onClickSetMiddleMouse(void* user_data); |
54 | static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data); | 54 | static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data); |
55 | static void onClickLaunchWizard(void* user_data); | 55 | static void onClickLaunchWizard(void* user_data); |
56 | 56 | ||
57 | BOOL mEnableVoice; | 57 | BOOL mEnableVoice; |
58 | BOOL mVoiceCallsFriendsOnly; | 58 | BOOL mVoiceCallsFriendsOnly; |
@@ -60,28 +60,28 @@ protected: | |||
60 | std::string mModifier; | 60 | std::string mModifier; |
61 | BOOL mPushToTalkToggle; | 61 | BOOL mPushToTalkToggle; |
62 | S32 mEarLocation; | 62 | S32 mEarLocation; |
63 | LLCtrlSelectionInterface *mCtrlEarLocation; | 63 | LLCtrlSelectionInterface *mCtrlEarLocation; |
64 | 64 | ||
65 | BOOL mEatNextSetKeyClick; | 65 | BOOL mEatNextSetKeyClick; |
66 | 66 | ||
67 | LLPanel* mPanel; | 67 | LLPanel* mPanel; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | class LLPrefsVoice : public LLPanel | 70 | class LLPrefsVoice : public LLPanel |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | LLPrefsVoice(); | 73 | LLPrefsVoice(); |
74 | ~LLPrefsVoice(); | 74 | ~LLPrefsVoice(); |
75 | 75 | ||
76 | /*virtual*/ void draw(); | 76 | /*virtual*/ void draw(); |
77 | void apply(); | 77 | void apply(); |
78 | void cancel(); | 78 | void cancel(); |
79 | 79 | ||
80 | protected: | 80 | protected: |
81 | static void onClickDeviceSettingsBtn(void* user_data); | 81 | static void onClickDeviceSettingsBtn(void* user_data); |
82 | 82 | ||
83 | LLPrefsVoiceLogic* mLogic; | 83 | LLPrefsVoiceLogic* mLogic; |
84 | LLFloaterDeviceSettings* mDeviceSettings; | 84 | LLFloaterDeviceSettings* mDeviceSettings; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | #endif // LLPREFSVOICE_H | 87 | #endif // LLPREFSVOICE_H |
diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp index 751a90f..4993852 100644 --- a/linden/indra/newview/llpreview.cpp +++ b/linden/indra/newview/llpreview.cpp | |||
@@ -300,12 +300,18 @@ bool LLPreview::save( const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemp | |||
300 | } | 300 | } |
301 | 301 | ||
302 | // static | 302 | // static |
303 | void LLPreview::hide(const LLUUID& item_uuid) | 303 | void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ ) |
304 | { | 304 | { |
305 | preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid); | 305 | preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid); |
306 | if(found_it != LLPreview::sInstances.end()) | 306 | if(found_it != LLPreview::sInstances.end()) |
307 | { | 307 | { |
308 | LLPreview* instance = found_it->second; | 308 | LLPreview* instance = found_it->second; |
309 | |||
310 | if ( no_saving ) | ||
311 | { | ||
312 | instance->mForceClose = TRUE; | ||
313 | } | ||
314 | |||
309 | instance->close(); | 315 | instance->close(); |
310 | } | 316 | } |
311 | } | 317 | } |
diff --git a/linden/indra/newview/llpreview.h b/linden/indra/newview/llpreview.h index 0369227..dcf7fbb 100644 --- a/linden/indra/newview/llpreview.h +++ b/linden/indra/newview/llpreview.h | |||
@@ -81,7 +81,7 @@ public: | |||
81 | 81 | ||
82 | static LLPreview* find(const LLUUID& item_uuid); | 82 | static LLPreview* find(const LLUUID& item_uuid); |
83 | static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE ); | 83 | static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE ); |
84 | static void hide(const LLUUID& item_uuid); | 84 | static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE ); |
85 | static void rename(const LLUUID& item_uuid, const std::string& new_name); | 85 | static void rename(const LLUUID& item_uuid, const std::string& new_name); |
86 | static bool save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr); | 86 | static bool save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr); |
87 | 87 | ||
diff --git a/linden/indra/newview/llpreviewgesture.cpp b/linden/indra/newview/llpreviewgesture.cpp index 23e6aa5..1afa523 100644 --- a/linden/indra/newview/llpreviewgesture.cpp +++ b/linden/indra/newview/llpreviewgesture.cpp | |||
@@ -266,7 +266,8 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, | |||
266 | // virtual | 266 | // virtual |
267 | BOOL LLPreviewGesture::canClose() | 267 | BOOL LLPreviewGesture::canClose() |
268 | { | 268 | { |
269 | if(!mDirty) | 269 | |
270 | if(!mDirty || mForceClose) | ||
270 | { | 271 | { |
271 | return TRUE; | 272 | return TRUE; |
272 | } | 273 | } |
@@ -884,7 +885,7 @@ void LLPreviewGesture::loadAsset() | |||
884 | void LLPreviewGesture::onLoadComplete(LLVFS *vfs, | 885 | void LLPreviewGesture::onLoadComplete(LLVFS *vfs, |
885 | const LLUUID& asset_uuid, | 886 | const LLUUID& asset_uuid, |
886 | LLAssetType::EType type, | 887 | LLAssetType::EType type, |
887 | void* user_data, S32 status) | 888 | void* user_data, S32 status, LLExtStat ext_status) |
888 | { | 889 | { |
889 | LLUUID* item_idp = (LLUUID*)user_data; | 890 | LLUUID* item_idp = (LLUUID*)user_data; |
890 | LLPreview* preview = LLPreview::find(*item_idp); | 891 | LLPreview* preview = LLPreview::find(*item_idp); |
@@ -1180,7 +1181,7 @@ void LLPreviewGesture::saveIfNeeded() | |||
1180 | // TODO: This is very similar to LLPreviewNotecard::onSaveComplete. | 1181 | // TODO: This is very similar to LLPreviewNotecard::onSaveComplete. |
1181 | // Could merge code. | 1182 | // Could merge code. |
1182 | // static | 1183 | // static |
1183 | void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 1184 | void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
1184 | { | 1185 | { |
1185 | LLSaveInfo* info = (LLSaveInfo*)user_data; | 1186 | LLSaveInfo* info = (LLSaveInfo*)user_data; |
1186 | if (info && (status == 0)) | 1187 | if (info && (status == 0)) |
diff --git a/linden/indra/newview/llpreviewgesture.h b/linden/indra/newview/llpreviewgesture.h index e0ccffd..a7abb7e 100644 --- a/linden/indra/newview/llpreviewgesture.h +++ b/linden/indra/newview/llpreviewgesture.h | |||
@@ -87,7 +87,7 @@ protected: | |||
87 | static void onLoadComplete(LLVFS *vfs, | 87 | static void onLoadComplete(LLVFS *vfs, |
88 | const LLUUID& asset_uuid, | 88 | const LLUUID& asset_uuid, |
89 | LLAssetType::EType type, | 89 | LLAssetType::EType type, |
90 | void* user_data, S32 status); | 90 | void* user_data, S32 status, LLExtStat ext_status); |
91 | 91 | ||
92 | void loadUIFromGesture(LLMultiGesture* gesture); | 92 | void loadUIFromGesture(LLMultiGesture* gesture); |
93 | 93 | ||
@@ -95,7 +95,7 @@ protected: | |||
95 | 95 | ||
96 | static void onSaveComplete(const LLUUID& asset_uuid, | 96 | static void onSaveComplete(const LLUUID& asset_uuid, |
97 | void* user_data, | 97 | void* user_data, |
98 | S32 status); | 98 | S32 status, LLExtStat ext_status); |
99 | 99 | ||
100 | static void handleSaveChangesDialog(S32 option, void* userdata); | 100 | static void handleSaveChangesDialog(S32 option, void* userdata); |
101 | 101 | ||
diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp index 5943b3e..ce37d64 100644 --- a/linden/indra/newview/llpreviewnotecard.cpp +++ b/linden/indra/newview/llpreviewnotecard.cpp | |||
@@ -349,7 +349,7 @@ void LLPreviewNotecard::loadAsset() | |||
349 | void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, | 349 | void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, |
350 | const LLUUID& asset_uuid, | 350 | const LLUUID& asset_uuid, |
351 | LLAssetType::EType type, | 351 | LLAssetType::EType type, |
352 | void* user_data, S32 status) | 352 | void* user_data, S32 status, LLExtStat ext_status) |
353 | { | 353 | { |
354 | llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl; | 354 | llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl; |
355 | LLUUID* item_id = (LLUUID*)user_data; | 355 | LLUUID* item_id = (LLUUID*)user_data; |
@@ -537,7 +537,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) | |||
537 | } | 537 | } |
538 | 538 | ||
539 | // static | 539 | // static |
540 | void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 540 | void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
541 | { | 541 | { |
542 | LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data; | 542 | LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data; |
543 | if(info && (0 == status)) | 543 | if(info && (0 == status)) |
diff --git a/linden/indra/newview/llpreviewnotecard.h b/linden/indra/newview/llpreviewnotecard.h index 715abac..6a52b1f 100644 --- a/linden/indra/newview/llpreviewnotecard.h +++ b/linden/indra/newview/llpreviewnotecard.h | |||
@@ -89,13 +89,13 @@ protected: | |||
89 | static void onLoadComplete(LLVFS *vfs, | 89 | static void onLoadComplete(LLVFS *vfs, |
90 | const LLUUID& asset_uuid, | 90 | const LLUUID& asset_uuid, |
91 | LLAssetType::EType type, | 91 | LLAssetType::EType type, |
92 | void* user_data, S32 status); | 92 | void* user_data, S32 status, LLExtStat ext_status); |
93 | 93 | ||
94 | static void onClickSave(void* data); | 94 | static void onClickSave(void* data); |
95 | 95 | ||
96 | static void onSaveComplete(const LLUUID& asset_uuid, | 96 | static void onSaveComplete(const LLUUID& asset_uuid, |
97 | void* user_data, | 97 | void* user_data, |
98 | S32 status); | 98 | S32 status, LLExtStat ext_status); |
99 | 99 | ||
100 | static void handleSaveChangesDialog(S32 option, void* userdata); | 100 | static void handleSaveChangesDialog(S32 option, void* userdata); |
101 | 101 | ||
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index a2ea141..cce672b 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp | |||
@@ -291,6 +291,7 @@ LLScriptEdCore::LLScriptEdCore( | |||
291 | const LLViewHandle& floater_handle, | 291 | const LLViewHandle& floater_handle, |
292 | void (*load_callback)(void*), | 292 | void (*load_callback)(void*), |
293 | void (*save_callback)(void*, BOOL), | 293 | void (*save_callback)(void*, BOOL), |
294 | void (*search_replace_callback) (void* userdata), | ||
294 | void* userdata, | 295 | void* userdata, |
295 | S32 bottom_pad) | 296 | S32 bottom_pad) |
296 | : | 297 | : |
@@ -300,6 +301,7 @@ LLScriptEdCore::LLScriptEdCore( | |||
300 | mEditor( NULL ), | 301 | mEditor( NULL ), |
301 | mLoadCallback( load_callback ), | 302 | mLoadCallback( load_callback ), |
302 | mSaveCallback( save_callback ), | 303 | mSaveCallback( save_callback ), |
304 | mSearchReplaceCallback( search_replace_callback ), | ||
303 | mUserdata( userdata ), | 305 | mUserdata( userdata ), |
304 | mForceClose( FALSE ), | 306 | mForceClose( FALSE ), |
305 | mLastHelpToken(NULL), | 307 | mLastHelpToken(NULL), |
@@ -1028,7 +1030,9 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | |||
1028 | { | 1030 | { |
1029 | if(getVisible() && getEnabled()) | 1031 | if(getVisible() && getEnabled()) |
1030 | { | 1032 | { |
1031 | if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) | 1033 | bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS); |
1034 | |||
1035 | if(('S' == key) && just_control) | ||
1032 | { | 1036 | { |
1033 | if(mSaveCallback) | 1037 | if(mSaveCallback) |
1034 | { | 1038 | { |
@@ -1038,6 +1042,16 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | |||
1038 | 1042 | ||
1039 | return TRUE; | 1043 | return TRUE; |
1040 | } | 1044 | } |
1045 | |||
1046 | if(('F' == key) && just_control) | ||
1047 | { | ||
1048 | if(mSearchReplaceCallback) | ||
1049 | { | ||
1050 | mSearchReplaceCallback(mUserdata); | ||
1051 | } | ||
1052 | |||
1053 | return TRUE; | ||
1054 | } | ||
1041 | } | 1055 | } |
1042 | return FALSE; | 1056 | return FALSE; |
1043 | } | 1057 | } |
@@ -1071,6 +1085,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) | |||
1071 | self->mViewHandle, | 1085 | self->mViewHandle, |
1072 | LLPreviewLSL::onLoad, | 1086 | LLPreviewLSL::onLoad, |
1073 | LLPreviewLSL::onSave, | 1087 | LLPreviewLSL::onSave, |
1088 | LLPreviewLSL::onSearchReplace, | ||
1074 | self, | 1089 | self, |
1075 | 0); | 1090 | 0); |
1076 | 1091 | ||
@@ -1220,6 +1235,13 @@ void LLPreviewLSL::open() /*Flawfinder: ignore*/ | |||
1220 | LLFloater::open(); /*Flawfinder: ignore*/ | 1235 | LLFloater::open(); /*Flawfinder: ignore*/ |
1221 | } | 1236 | } |
1222 | 1237 | ||
1238 | void LLPreviewLSL::onSearchReplace(void* userdata) | ||
1239 | { | ||
1240 | LLPreviewLSL* self = (LLPreviewLSL*)userdata; | ||
1241 | LLScriptEdCore* sec = self->mScriptEd; | ||
1242 | LLFloaterScriptSearch::show(sec); | ||
1243 | } | ||
1244 | |||
1223 | // static | 1245 | // static |
1224 | void LLPreviewLSL::onLoad(void* userdata) | 1246 | void LLPreviewLSL::onLoad(void* userdata) |
1225 | { | 1247 | { |
@@ -1386,7 +1408,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, | |||
1386 | 1408 | ||
1387 | 1409 | ||
1388 | // static | 1410 | // static |
1389 | void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 1411 | void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
1390 | { | 1412 | { |
1391 | LLScriptSaveInfo* info = reinterpret_cast<LLScriptSaveInfo*>(user_data); | 1413 | LLScriptSaveInfo* info = reinterpret_cast<LLScriptSaveInfo*>(user_data); |
1392 | if(0 == status) | 1414 | if(0 == status) |
@@ -1435,7 +1457,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 | |||
1435 | } | 1457 | } |
1436 | 1458 | ||
1437 | // static | 1459 | // static |
1438 | void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 1460 | void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
1439 | { | 1461 | { |
1440 | LLUUID* instance_uuid = (LLUUID*)user_data; | 1462 | LLUUID* instance_uuid = (LLUUID*)user_data; |
1441 | LLPreviewLSL* self = NULL; | 1463 | LLPreviewLSL* self = NULL; |
@@ -1474,7 +1496,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d | |||
1474 | 1496 | ||
1475 | // static | 1497 | // static |
1476 | void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, | 1498 | void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, |
1477 | void* user_data, S32 status) | 1499 | void* user_data, S32 status, LLExtStat ext_status) |
1478 | { | 1500 | { |
1479 | lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid | 1501 | lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid |
1480 | << llendl; | 1502 | << llendl; |
@@ -1579,6 +1601,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) | |||
1579 | self->mViewHandle, | 1601 | self->mViewHandle, |
1580 | &LLLiveLSLEditor::onLoad, | 1602 | &LLLiveLSLEditor::onLoad, |
1581 | &LLLiveLSLEditor::onSave, | 1603 | &LLLiveLSLEditor::onSave, |
1604 | &LLLiveLSLEditor::onSearchReplace, | ||
1582 | self, | 1605 | self, |
1583 | 0); | 1606 | 0); |
1584 | 1607 | ||
@@ -1793,7 +1816,7 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new) | |||
1793 | // static | 1816 | // static |
1794 | void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, | 1817 | void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, |
1795 | LLAssetType::EType type, | 1818 | LLAssetType::EType type, |
1796 | void* user_data, S32 status) | 1819 | void* user_data, S32 status, LLExtStat ext_status) |
1797 | { | 1820 | { |
1798 | lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id | 1821 | lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id |
1799 | << llendl; | 1822 | << llendl; |
@@ -1976,6 +1999,15 @@ void LLLiveLSLEditor::draw() | |||
1976 | } | 1999 | } |
1977 | } | 2000 | } |
1978 | 2001 | ||
2002 | |||
2003 | void LLLiveLSLEditor::onSearchReplace(void* userdata) | ||
2004 | { | ||
2005 | LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; | ||
2006 | |||
2007 | LLScriptEdCore* sec = self->mScriptEd; | ||
2008 | LLFloaterScriptSearch::show(sec); | ||
2009 | } | ||
2010 | |||
1979 | struct LLLiveLSLSaveData | 2011 | struct LLLiveLSLSaveData |
1980 | { | 2012 | { |
1981 | LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active); | 2013 | LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active); |
@@ -2189,7 +2221,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, | |||
2189 | runningCheckbox->setEnabled(TRUE); | 2221 | runningCheckbox->setEnabled(TRUE); |
2190 | } | 2222 | } |
2191 | 2223 | ||
2192 | void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 2224 | void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
2193 | { | 2225 | { |
2194 | LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; | 2226 | LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; |
2195 | 2227 | ||
@@ -2219,7 +2251,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da | |||
2219 | } | 2251 | } |
2220 | 2252 | ||
2221 | 2253 | ||
2222 | void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) | 2254 | void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
2223 | { | 2255 | { |
2224 | LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; | 2256 | LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; |
2225 | if(!data) | 2257 | if(!data) |
diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h index 4aadc8b..9cc0e46 100644 --- a/linden/indra/newview/llpreviewscript.h +++ b/linden/indra/newview/llpreviewscript.h | |||
@@ -67,6 +67,7 @@ public: | |||
67 | const LLViewHandle& floater_handle, | 67 | const LLViewHandle& floater_handle, |
68 | void (*load_callback)(void* userdata), | 68 | void (*load_callback)(void* userdata), |
69 | void (*save_callback)(void* userdata, BOOL close_after_save), | 69 | void (*save_callback)(void* userdata, BOOL close_after_save), |
70 | void (*search_replace_callback)(void* userdata), | ||
70 | void* userdata, | 71 | void* userdata, |
71 | S32 bottom_pad = 0); // pad below bottom row of buttons | 72 | S32 bottom_pad = 0); // pad below bottom row of buttons |
72 | ~LLScriptEdCore(); | 73 | ~LLScriptEdCore(); |
@@ -130,6 +131,7 @@ private: | |||
130 | LLTextEditor* mEditor; | 131 | LLTextEditor* mEditor; |
131 | void (*mLoadCallback)(void* userdata); | 132 | void (*mLoadCallback)(void* userdata); |
132 | void (*mSaveCallback)(void* userdata, BOOL close_after_save); | 133 | void (*mSaveCallback)(void* userdata, BOOL close_after_save); |
134 | void (*mSearchReplaceCallback) (void* userdata); | ||
133 | void* mUserdata; | 135 | void* mUserdata; |
134 | LLComboBox *mFunctions; | 136 | LLComboBox *mFunctions; |
135 | BOOL mForceClose; | 137 | BOOL mForceClose; |
@@ -169,14 +171,15 @@ protected: | |||
169 | const LLUUID& item_id, | 171 | const LLUUID& item_id, |
170 | const LLTransactionID& tid); | 172 | const LLTransactionID& tid); |
171 | 173 | ||
174 | static void onSearchReplace(void* userdata); | ||
172 | static void onLoad(void* userdata); | 175 | static void onLoad(void* userdata); |
173 | static void onSave(void* userdata, BOOL close_after_save); | 176 | static void onSave(void* userdata, BOOL close_after_save); |
174 | 177 | ||
175 | static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid, | 178 | static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid, |
176 | LLAssetType::EType type, | 179 | LLAssetType::EType type, |
177 | void* user_data, S32 status); | 180 | void* user_data, S32 status, LLExtStat ext_status); |
178 | static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status); | 181 | static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status); |
179 | static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status); | 182 | static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); |
180 | static LLPreviewLSL* getInstance(const LLUUID& uuid); | 183 | static LLPreviewLSL* getInstance(const LLUUID& uuid); |
181 | 184 | ||
182 | static void* createScriptEdPanel(void* userdata); | 185 | static void* createScriptEdPanel(void* userdata); |
@@ -229,14 +232,15 @@ protected: | |||
229 | const LLTransactionID& tid, | 232 | const LLTransactionID& tid, |
230 | BOOL is_running); | 233 | BOOL is_running); |
231 | 234 | ||
235 | static void onSearchReplace(void* userdata); | ||
232 | static void onLoad(void* userdata); | 236 | static void onLoad(void* userdata); |
233 | static void onSave(void* userdata, BOOL close_after_save); | 237 | static void onSave(void* userdata, BOOL close_after_save); |
234 | 238 | ||
235 | static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, | 239 | static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, |
236 | LLAssetType::EType type, | 240 | LLAssetType::EType type, |
237 | void* user_data, S32 status); | 241 | void* user_data, S32 status, LLExtStat ext_status); |
238 | static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status); | 242 | static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); |
239 | static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status); | 243 | static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); |
240 | static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); | 244 | static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); |
241 | static void onReset(void* userdata); | 245 | static void onReset(void* userdata); |
242 | 246 | ||
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 283b38b..00bb724 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp | |||
@@ -71,7 +71,7 @@ void sg_assert(BOOL expr) | |||
71 | #endif | 71 | #endif |
72 | } | 72 | } |
73 | 73 | ||
74 | #if !LL_RELEASE_FOR_DOWNLOAD | 74 | #if LL_DEBUG |
75 | void validate_drawable(LLDrawable* drawablep) | 75 | void validate_drawable(LLDrawable* drawablep) |
76 | { | 76 | { |
77 | F64 rad = drawablep->getBinRadius(); | 77 | F64 rad = drawablep->getBinRadius(); |
@@ -153,10 +153,6 @@ LLSpatialGroup::~LLSpatialGroup() | |||
153 | 153 | ||
154 | void LLSpatialGroup::clearDrawMap() | 154 | void LLSpatialGroup::clearDrawMap() |
155 | { | 155 | { |
156 | for (LLSpatialGroup::draw_map_t::iterator i = mDrawMap.begin(); i != mDrawMap.end(); ++i) | ||
157 | { | ||
158 | std::for_each(i->second.begin(), i->second.end(), DeletePointer()); | ||
159 | } | ||
160 | mDrawMap.clear(); | 156 | mDrawMap.clear(); |
161 | } | 157 | } |
162 | 158 | ||
@@ -2323,7 +2319,7 @@ void pushVerts(LLSpatialGroup* group, U32 mask) | |||
2323 | 2319 | ||
2324 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) | 2320 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) |
2325 | { | 2321 | { |
2326 | for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) | 2322 | for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j) |
2327 | { | 2323 | { |
2328 | params = *j; | 2324 | params = *j; |
2329 | pushVerts(params, mask); | 2325 | pushVerts(params, mask); |
@@ -2351,7 +2347,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask) | |||
2351 | 2347 | ||
2352 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) | 2348 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) |
2353 | { | 2349 | { |
2354 | for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) | 2350 | for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j) |
2355 | { | 2351 | { |
2356 | params = *j; | 2352 | params = *j; |
2357 | glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f); | 2353 | glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f); |
@@ -2702,8 +2698,8 @@ public: | |||
2702 | 2698 | ||
2703 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) | 2699 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) |
2704 | { | 2700 | { |
2705 | std::vector<LLDrawInfo*>& draw_vec = i->second; | 2701 | LLSpatialGroup::drawmap_elem_t& draw_vec = i->second; |
2706 | for (std::vector<LLDrawInfo*>::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j) | 2702 | for (LLSpatialGroup::drawmap_elem_t::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j) |
2707 | { | 2703 | { |
2708 | LLDrawInfo* draw_info = *j; | 2704 | LLDrawInfo* draw_info = *j; |
2709 | if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM)) | 2705 | if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM)) |
@@ -2889,6 +2885,11 @@ LLDrawInfo::LLDrawInfo(U32 start, U32 end, U32 count, U32 offset, | |||
2889 | { | 2885 | { |
2890 | } | 2886 | } |
2891 | 2887 | ||
2888 | LLDrawInfo::~LLDrawInfo() | ||
2889 | { | ||
2890 | |||
2891 | } | ||
2892 | |||
2892 | LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage) | 2893 | LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage) |
2893 | { | 2894 | { |
2894 | return new LLVertexBuffer(type_mask, usage); | 2895 | return new LLVertexBuffer(type_mask, usage); |
diff --git a/linden/indra/newview/llspatialpartition.h b/linden/indra/newview/llspatialpartition.h index 3046b73..31ec040 100644 --- a/linden/indra/newview/llspatialpartition.h +++ b/linden/indra/newview/llspatialpartition.h | |||
@@ -46,13 +46,17 @@ | |||
46 | class LLSpatialPartition; | 46 | class LLSpatialPartition; |
47 | class LLSpatialBridge; | 47 | class LLSpatialBridge; |
48 | 48 | ||
49 | class LLDrawInfo | 49 | class LLDrawInfo : public LLRefCount |
50 | { | 50 | { |
51 | protected: | ||
52 | ~LLDrawInfo(); | ||
53 | |||
51 | public: | 54 | public: |
52 | LLDrawInfo(U32 start, U32 end, U32 count, U32 offset, | 55 | LLDrawInfo(U32 start, U32 end, U32 count, U32 offset, |
53 | LLViewerImage* image, LLVertexBuffer* buffer, | 56 | LLViewerImage* image, LLVertexBuffer* buffer, |
54 | BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0); | 57 | BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0); |
55 | 58 | ||
59 | |||
56 | LLPointer<LLVertexBuffer> mVertexBuffer; | 60 | LLPointer<LLVertexBuffer> mVertexBuffer; |
57 | LLPointer<LLViewerImage> mTexture; | 61 | LLPointer<LLViewerImage> mTexture; |
58 | LLPointer<LLCubeMap> mReflectionMap; | 62 | LLPointer<LLCubeMap> mReflectionMap; |
@@ -78,18 +82,21 @@ public: | |||
78 | 82 | ||
79 | struct CompareTexturePtr | 83 | struct CompareTexturePtr |
80 | { | 84 | { |
81 | bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs) | 85 | bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs) |
82 | { | 86 | { |
83 | 87 | // sort by pointer, sort NULL down to the end | |
84 | return lhs == NULL || rhs == NULL || lhs->mTexture > rhs->mTexture; | 88 | return lhs.get() != rhs.get() |
89 | && (lhs.isNull() || (rhs.notNull() && lhs->mTexture.get() > rhs->mTexture.get())); | ||
85 | } | 90 | } |
86 | }; | 91 | }; |
87 | 92 | ||
88 | struct CompareBump | 93 | struct CompareBump |
89 | { | 94 | { |
90 | bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs) | 95 | bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs) |
91 | { | 96 | { |
92 | return lhs == NULL || rhs == NULL || lhs->mBump > rhs->mBump; | 97 | // sort by mBump value, sort NULL down to the end |
98 | return lhs.get() != rhs.get() | ||
99 | && (lhs.isNull() || (rhs.notNull() && lhs->mBump > rhs->mBump)); | ||
93 | } | 100 | } |
94 | }; | 101 | }; |
95 | }; | 102 | }; |
@@ -102,7 +109,8 @@ public: | |||
102 | typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t; | 109 | typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t; |
103 | typedef std::set<LLPointer<LLSpatialGroup> > sg_set_t; | 110 | typedef std::set<LLPointer<LLSpatialGroup> > sg_set_t; |
104 | typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t; | 111 | typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t; |
105 | typedef std::map<U32, std::vector<LLDrawInfo*> > draw_map_t; | 112 | typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t; |
113 | typedef std::map<U32, drawmap_elem_t > draw_map_t; | ||
106 | typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > buffer_map_t; | 114 | typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > buffer_map_t; |
107 | 115 | ||
108 | typedef LLOctreeListener<LLDrawable> BaseType; | 116 | typedef LLOctreeListener<LLDrawable> BaseType; |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 7c76634..3f02f6a 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -64,7 +64,7 @@ | |||
64 | #include "llsecondlifeurls.h" | 64 | #include "llsecondlifeurls.h" |
65 | #include "llstring.h" | 65 | #include "llstring.h" |
66 | #include "lluserrelations.h" | 66 | #include "lluserrelations.h" |
67 | #include "llversion.h" | 67 | #include "llversionviewer.h" |
68 | #include "llvfs.h" | 68 | #include "llvfs.h" |
69 | #include "llwindow.h" // for shell_open | 69 | #include "llwindow.h" // for shell_open |
70 | #include "llxorcipher.h" // saved password, MAC address | 70 | #include "llxorcipher.h" // saved password, MAC address |
@@ -216,6 +216,9 @@ LLString gInitialOutfitGender; // "male" or "female" | |||
216 | 216 | ||
217 | static bool gUseCircuitCallbackCalled = false; | 217 | static bool gUseCircuitCallbackCalled = false; |
218 | 218 | ||
219 | S32 LLStartUp::gStartupState = STATE_FIRST; | ||
220 | |||
221 | |||
219 | // | 222 | // |
220 | // local function declaration | 223 | // local function declaration |
221 | // | 224 | // |
@@ -356,7 +359,7 @@ BOOL idle_startup() | |||
356 | gImageList.updateImages(0.01f); | 359 | gImageList.updateImages(0.01f); |
357 | } | 360 | } |
358 | 361 | ||
359 | if (STATE_FIRST == gStartupState) | 362 | if ( STATE_FIRST == LLStartUp::getStartupState() ) |
360 | { | 363 | { |
361 | gViewerWindow->showCursor(); | 364 | gViewerWindow->showCursor(); |
362 | gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); | 365 | gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); |
@@ -565,10 +568,7 @@ BOOL idle_startup() | |||
565 | #endif // LL_LINUX | 568 | #endif // LL_LINUX |
566 | 569 | ||
567 | std::ostringstream codec; | 570 | std::ostringstream codec; |
568 | codec << "[Second Life "; | 571 | codec << "[Second Life " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD << "]"; |
569 | codec << "(" << gChannelName << ")"; | ||
570 | codec << " - " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD; | ||
571 | codec << "]"; | ||
572 | LLMozLib::getInstance()->setBrowserAgentId( codec.str() ); | 572 | LLMozLib::getInstance()->setBrowserAgentId( codec.str() ); |
573 | #endif | 573 | #endif |
574 | 574 | ||
@@ -608,67 +608,49 @@ BOOL idle_startup() | |||
608 | llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl; | 608 | llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl; |
609 | } | 609 | } |
610 | 610 | ||
611 | // Get ready to show the login dialog | 611 | // |
612 | if (!gConnectToSomething) | 612 | // Log on to system |
613 | // | ||
614 | if( !gCmdLineFirstName.empty() | ||
615 | && !gCmdLineLastName.empty() | ||
616 | && !gCmdLinePassword.empty()) | ||
613 | { | 617 | { |
614 | // Don't use a session token, and generate a random user id | 618 | firstname = gCmdLineFirstName; |
615 | gAgentID.generate(); | 619 | lastname = gCmdLineLastName; |
616 | gAgentSessionID = LLUUID::null; | ||
617 | 620 | ||
618 | gStartupState = STATE_WORLD_INIT; | 621 | LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); |
619 | return do_normal_idle; | 622 | char md5pass[33]; /* Flawfinder: ignore */ |
623 | pass.hex_digest(md5pass); | ||
624 | password = md5pass; | ||
625 | |||
626 | remember_password = gSavedSettings.getBOOL("RememberPassword"); | ||
627 | show_connect_box = FALSE; | ||
620 | } | 628 | } |
621 | else if (!gRunLocal) | 629 | else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin")) |
622 | { | 630 | { |
623 | // | 631 | firstname = gSavedSettings.getString("FirstName"); |
624 | // Log on to userserver | 632 | lastname = gSavedSettings.getString("LastName"); |
625 | // | 633 | password = load_password_from_disk(); |
626 | if( !gCmdLineFirstName.empty() | 634 | remember_password = TRUE; |
627 | && !gCmdLineLastName.empty() | 635 | show_connect_box = FALSE; |
628 | && !gCmdLinePassword.empty()) | ||
629 | { | ||
630 | firstname = gCmdLineFirstName; | ||
631 | lastname = gCmdLineLastName; | ||
632 | |||
633 | LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); | ||
634 | char md5pass[33]; /* Flawfinder: ignore */ | ||
635 | pass.hex_digest(md5pass); | ||
636 | password = md5pass; | ||
637 | |||
638 | remember_password = gSavedSettings.getBOOL("RememberPassword"); | ||
639 | show_connect_box = FALSE; | ||
640 | } | ||
641 | else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin")) | ||
642 | { | ||
643 | firstname = gSavedSettings.getString("FirstName"); | ||
644 | lastname = gSavedSettings.getString("LastName"); | ||
645 | password = load_password_from_disk(); | ||
646 | remember_password = TRUE; | ||
647 | show_connect_box = FALSE; | ||
648 | } | ||
649 | else | ||
650 | { | ||
651 | // if not automatically logging in, display login dialog | ||
652 | // until a valid userserver is selected | ||
653 | firstname = gSavedSettings.getString("FirstName"); | ||
654 | lastname = gSavedSettings.getString("LastName"); | ||
655 | password = load_password_from_disk(); | ||
656 | remember_password = gSavedSettings.getBOOL("RememberPassword"); | ||
657 | show_connect_box = TRUE; | ||
658 | } | ||
659 | |||
660 | // Go to the next startup state | ||
661 | gStartupState++; | ||
662 | return do_normal_idle; | ||
663 | } | 636 | } |
664 | else | 637 | else |
665 | { | 638 | { |
666 | gStartupState++; | 639 | // if not automatically logging in, display login dialog |
667 | return do_normal_idle; | 640 | // until a valid userserver is selected |
641 | firstname = gSavedSettings.getString("FirstName"); | ||
642 | lastname = gSavedSettings.getString("LastName"); | ||
643 | password = load_password_from_disk(); | ||
644 | remember_password = gSavedSettings.getBOOL("RememberPassword"); | ||
645 | show_connect_box = TRUE; | ||
668 | } | 646 | } |
647 | |||
648 | // Go to the next startup state | ||
649 | LLStartUp::setStartupState( STATE_LOGIN_SHOW ); | ||
650 | return do_normal_idle; | ||
669 | } | 651 | } |
670 | 652 | ||
671 | if (STATE_LOGIN_SHOW == gStartupState) | 653 | if (STATE_LOGIN_SHOW == LLStartUp::getStartupState()) |
672 | { | 654 | { |
673 | llinfos << "Initializing Window" << llendl; | 655 | llinfos << "Initializing Window" << llendl; |
674 | 656 | ||
@@ -678,45 +660,37 @@ BOOL idle_startup() | |||
678 | 660 | ||
679 | timeout_count = 0; | 661 | timeout_count = 0; |
680 | 662 | ||
681 | if (gConnectToSomething && !gRunLocal) | 663 | if (show_connect_box) |
682 | { | 664 | { |
683 | if (show_connect_box) | 665 | if (gNoRender) |
684 | { | 666 | { |
685 | if (gNoRender) | 667 | llerrs << "Need to autologin or use command line with norender!" << llendl; |
686 | { | 668 | } |
687 | llerrs << "Need to autologin or use command line with norender!" << llendl; | 669 | // Make sure the process dialog doesn't hide things |
688 | } | 670 | gViewerWindow->setShowProgress(FALSE); |
689 | // Make sure the process dialog doesn't hide things | ||
690 | gViewerWindow->setShowProgress(FALSE); | ||
691 | 671 | ||
692 | // Show the login dialog | 672 | // Show the login dialog |
693 | login_show(); | 673 | login_show(); |
694 | 674 | ||
695 | // connect dialog is already shown, so fill in the names | 675 | // connect dialog is already shown, so fill in the names |
696 | LLPanelLogin::setFields( firstname, lastname, password, remember_password ); | 676 | LLPanelLogin::setFields( firstname, lastname, password, remember_password ); |
697 | LLPanelLogin::giveFocus(); | 677 | LLPanelLogin::giveFocus(); |
698 | 678 | ||
699 | gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); | 679 | gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); |
700 | 680 | ||
701 | gStartupState++; | 681 | LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input |
702 | } | ||
703 | else | ||
704 | { | ||
705 | // skip directly to message template verification | ||
706 | gStartupState = STATE_LOGIN_CLEANUP; | ||
707 | } | ||
708 | } | 682 | } |
709 | else | 683 | else |
710 | { | 684 | { |
711 | gMessageSystem->setCircuitProtection(FALSE); | 685 | // skip directly to message template verification |
712 | gStartupState = STATE_LOGIN_CLEANUP; | 686 | LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); |
713 | } | 687 | } |
714 | 688 | ||
715 | timeout.reset(); | 689 | timeout.reset(); |
716 | return do_normal_idle; | 690 | return do_normal_idle; |
717 | } | 691 | } |
718 | 692 | ||
719 | if (STATE_LOGIN_WAIT == gStartupState) | 693 | if (STATE_LOGIN_WAIT == LLStartUp::getStartupState()) |
720 | { | 694 | { |
721 | // Don't do anything. Wait for the login view to call the login_callback, | 695 | // Don't do anything. Wait for the login view to call the login_callback, |
722 | // which will push us to the next state. | 696 | // which will push us to the next state. |
@@ -726,7 +700,7 @@ BOOL idle_startup() | |||
726 | return do_normal_idle; | 700 | return do_normal_idle; |
727 | } | 701 | } |
728 | 702 | ||
729 | if (STATE_LOGIN_CLEANUP == gStartupState) | 703 | if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) |
730 | { | 704 | { |
731 | if (show_connect_box) | 705 | if (show_connect_box) |
732 | { | 706 | { |
@@ -794,7 +768,7 @@ BOOL idle_startup() | |||
794 | { | 768 | { |
795 | LLString server_label; | 769 | LLString server_label; |
796 | S32 domain_name_index; | 770 | S32 domain_name_index; |
797 | LLPanelLogin::getServer( server_label, domain_name_index ); | 771 | BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index ); |
798 | gUserServerChoice = (EUserServerDomain) domain_name_index; | 772 | gUserServerChoice = (EUserServerDomain) domain_name_index; |
799 | gSavedSettings.setS32("ServerChoice", gUserServerChoice); | 773 | gSavedSettings.setS32("ServerChoice", gUserServerChoice); |
800 | if (gUserServerChoice == USERSERVER_OTHER) | 774 | if (gUserServerChoice == USERSERVER_OTHER) |
@@ -802,14 +776,11 @@ BOOL idle_startup() | |||
802 | snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ | 776 | snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ |
803 | } | 777 | } |
804 | 778 | ||
805 | // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with | 779 | if ( user_picked_server ) |
806 | // the control isDirty() functionality tomorrow. | 780 | { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice |
807 | 781 | auth_uris.clear(); | |
808 | //if ( userPickedServer ) | 782 | resetURIs(); |
809 | //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice | 783 | } |
810 | // auth_uris.clear(); | ||
811 | // resetURIs(); | ||
812 | //} | ||
813 | 784 | ||
814 | LLString location; | 785 | LLString location; |
815 | LLPanelLogin::getLocation( location ); | 786 | LLPanelLogin::getLocation( location ); |
@@ -872,18 +843,18 @@ BOOL idle_startup() | |||
872 | init_colors(); | 843 | init_colors(); |
873 | 844 | ||
874 | // skipping over STATE_UPDATE_CHECK because that just waits for input | 845 | // skipping over STATE_UPDATE_CHECK because that just waits for input |
875 | gStartupState = STATE_LOGIN_AUTH_INIT; | 846 | LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); |
876 | 847 | ||
877 | return do_normal_idle; | 848 | return do_normal_idle; |
878 | } | 849 | } |
879 | 850 | ||
880 | if (STATE_UPDATE_CHECK == gStartupState) | 851 | if (STATE_UPDATE_CHECK == LLStartUp::getStartupState()) |
881 | { | 852 | { |
882 | // wait for user to give input via dialog box | 853 | // wait for user to give input via dialog box |
883 | return do_normal_idle; | 854 | return do_normal_idle; |
884 | } | 855 | } |
885 | 856 | ||
886 | if(STATE_LOGIN_AUTH_INIT == gStartupState) | 857 | if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) |
887 | { | 858 | { |
888 | //#define LL_MINIMIAL_REQUESTED_OPTIONS | 859 | //#define LL_MINIMIAL_REQUESTED_OPTIONS |
889 | lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl; | 860 | lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl; |
@@ -930,10 +901,10 @@ BOOL idle_startup() | |||
930 | auth_desc = "Logging in. "; | 901 | auth_desc = "Logging in. "; |
931 | auth_desc += gSecondLife; | 902 | auth_desc += gSecondLife; |
932 | auth_desc += " may appear frozen. Please wait."; | 903 | auth_desc += " may appear frozen. Please wait."; |
933 | ++gStartupState; | 904 | LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); |
934 | } | 905 | } |
935 | 906 | ||
936 | if (STATE_LOGIN_AUTHENTICATE == gStartupState) | 907 | if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState()) |
937 | { | 908 | { |
938 | lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl; | 909 | lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl; |
939 | set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); | 910 | set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); |
@@ -985,11 +956,11 @@ BOOL idle_startup() | |||
985 | // reset globals | 956 | // reset globals |
986 | gAcceptTOS = FALSE; | 957 | gAcceptTOS = FALSE; |
987 | gAcceptCriticalMessage = FALSE; | 958 | gAcceptCriticalMessage = FALSE; |
988 | ++gStartupState; | 959 | LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET ); |
989 | return do_normal_idle; | 960 | return do_normal_idle; |
990 | } | 961 | } |
991 | 962 | ||
992 | if(STATE_LOGIN_NO_DATA_YET == gStartupState) | 963 | if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState()) |
993 | { | 964 | { |
994 | //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl; | 965 | //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl; |
995 | if (!gUserAuthp) | 966 | if (!gUserAuthp) |
@@ -1008,13 +979,13 @@ BOOL idle_startup() | |||
1008 | //llinfos << "waiting..." << llendl; | 979 | //llinfos << "waiting..." << llendl; |
1009 | return do_normal_idle; | 980 | return do_normal_idle; |
1010 | } | 981 | } |
1011 | ++gStartupState; | 982 | LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING ); |
1012 | progress += 0.01f; | 983 | progress += 0.01f; |
1013 | set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); | 984 | set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); |
1014 | return do_normal_idle; | 985 | return do_normal_idle; |
1015 | } | 986 | } |
1016 | 987 | ||
1017 | if(STATE_LOGIN_DOWNLOADING == gStartupState) | 988 | if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState()) |
1018 | { | 989 | { |
1019 | lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl; | 990 | lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl; |
1020 | if (!gUserAuthp) | 991 | if (!gUserAuthp) |
@@ -1033,13 +1004,13 @@ BOOL idle_startup() | |||
1033 | //llinfos << "downloading..." << llendl; | 1004 | //llinfos << "downloading..." << llendl; |
1034 | return do_normal_idle; | 1005 | return do_normal_idle; |
1035 | } | 1006 | } |
1036 | ++gStartupState; | 1007 | LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE ); |
1037 | progress += 0.01f; | 1008 | progress += 0.01f; |
1038 | set_startup_status(progress, "Processing Response...", auth_message.c_str()); | 1009 | set_startup_status(progress, "Processing Response...", auth_message.c_str()); |
1039 | return do_normal_idle; | 1010 | return do_normal_idle; |
1040 | } | 1011 | } |
1041 | 1012 | ||
1042 | if(STATE_LOGIN_PROCESS_RESPONSE == gStartupState) | 1013 | if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) |
1043 | { | 1014 | { |
1044 | lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl; | 1015 | lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl; |
1045 | std::ostringstream emsg; | 1016 | std::ostringstream emsg; |
@@ -1078,7 +1049,7 @@ BOOL idle_startup() | |||
1078 | } | 1049 | } |
1079 | // ignoring the duration & options array for now. | 1050 | // ignoring the duration & options array for now. |
1080 | // Go back to authenticate. | 1051 | // Go back to authenticate. |
1081 | gStartupState = STATE_LOGIN_AUTHENTICATE; | 1052 | LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); |
1082 | return do_normal_idle; | 1053 | return do_normal_idle; |
1083 | } | 1054 | } |
1084 | else | 1055 | else |
@@ -1101,7 +1072,7 @@ BOOL idle_startup() | |||
1101 | if (show_connect_box) | 1072 | if (show_connect_box) |
1102 | { | 1073 | { |
1103 | llinfos << "Need tos agreement" << llendl; | 1074 | llinfos << "Need tos agreement" << llendl; |
1104 | gStartupState = STATE_UPDATE_CHECK; | 1075 | LLStartUp::setStartupState( STATE_UPDATE_CHECK ); |
1105 | LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS, | 1076 | LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS, |
1106 | message_response); | 1077 | message_response); |
1107 | tos_dialog->startModal(); | 1078 | tos_dialog->startModal(); |
@@ -1118,7 +1089,7 @@ BOOL idle_startup() | |||
1118 | if (show_connect_box) | 1089 | if (show_connect_box) |
1119 | { | 1090 | { |
1120 | llinfos << "Need critical message" << llendl; | 1091 | llinfos << "Need critical message" << llendl; |
1121 | gStartupState = STATE_UPDATE_CHECK; | 1092 | LLStartUp::setStartupState( STATE_UPDATE_CHECK ); |
1122 | LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE, | 1093 | LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE, |
1123 | message_response); | 1094 | message_response); |
1124 | tos_dialog->startModal(); | 1095 | tos_dialog->startModal(); |
@@ -1142,7 +1113,7 @@ BOOL idle_startup() | |||
1142 | if (show_connect_box) | 1113 | if (show_connect_box) |
1143 | { | 1114 | { |
1144 | update_app(TRUE, auth_message); | 1115 | update_app(TRUE, auth_message); |
1145 | gStartupState = STATE_UPDATE_CHECK; | 1116 | LLStartUp::setStartupState( STATE_UPDATE_CHECK ); |
1146 | return FALSE; | 1117 | return FALSE; |
1147 | } | 1118 | } |
1148 | else | 1119 | else |
@@ -1157,7 +1128,7 @@ BOOL idle_startup() | |||
1157 | if (show_connect_box) | 1128 | if (show_connect_box) |
1158 | { | 1129 | { |
1159 | update_app(FALSE, auth_message); | 1130 | update_app(FALSE, auth_message); |
1160 | gStartupState = STATE_UPDATE_CHECK; | 1131 | LLStartUp::setStartupState( STATE_UPDATE_CHECK ); |
1161 | gSkipOptionalUpdate = TRUE; | 1132 | gSkipOptionalUpdate = TRUE; |
1162 | return FALSE; | 1133 | return FALSE; |
1163 | } | 1134 | } |
@@ -1180,7 +1151,7 @@ BOOL idle_startup() | |||
1180 | s << "Previous login attempt failed. Logging in, attempt " | 1151 | s << "Previous login attempt failed. Logging in, attempt " |
1181 | << (auth_uri_num + 1) << ". "; | 1152 | << (auth_uri_num + 1) << ". "; |
1182 | auth_desc = s.str(); | 1153 | auth_desc = s.str(); |
1183 | gStartupState = STATE_LOGIN_AUTHENTICATE; | 1154 | LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); |
1184 | auth_uri_num++; | 1155 | auth_uri_num++; |
1185 | return do_normal_idle; | 1156 | return do_normal_idle; |
1186 | } | 1157 | } |
@@ -1410,7 +1381,7 @@ BOOL idle_startup() | |||
1410 | && first_sim.isOk() | 1381 | && first_sim.isOk() |
1411 | && gAgent.mInventoryRootID.notNull()) | 1382 | && gAgent.mInventoryRootID.notNull()) |
1412 | { | 1383 | { |
1413 | ++gStartupState; | 1384 | LLStartUp::setStartupState( STATE_WORLD_INIT ); |
1414 | } | 1385 | } |
1415 | else | 1386 | else |
1416 | { | 1387 | { |
@@ -1454,7 +1425,7 @@ BOOL idle_startup() | |||
1454 | //--------------------------------------------------------------------- | 1425 | //--------------------------------------------------------------------- |
1455 | // World Init | 1426 | // World Init |
1456 | //--------------------------------------------------------------------- | 1427 | //--------------------------------------------------------------------- |
1457 | if (STATE_WORLD_INIT == gStartupState) | 1428 | if (STATE_WORLD_INIT == LLStartUp::getStartupState()) |
1458 | { | 1429 | { |
1459 | set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str()); | 1430 | set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str()); |
1460 | display_startup(); | 1431 | display_startup(); |
@@ -1497,38 +1468,26 @@ BOOL idle_startup() | |||
1497 | // User might have overridden far clip | 1468 | // User might have overridden far clip |
1498 | gWorldp->setLandFarClip( gAgent.mDrawDistance ); | 1469 | gWorldp->setLandFarClip( gAgent.mDrawDistance ); |
1499 | 1470 | ||
1500 | if (!gRunLocal) | 1471 | // Before we create the first region, we need to set the agent's mOriginGlobal |
1501 | { | 1472 | // This is necessary because creating objects before this is set will result in a |
1502 | // Before we create the first region, we need to set the agent's mOriginGlobal | 1473 | // bad mPositionAgent cache. |
1503 | // This is necessary because creating objects before this is set will result in a | ||
1504 | // bad mPositionAgent cache. | ||
1505 | 1474 | ||
1506 | gAgent.initOriginGlobal(from_region_handle(first_sim_handle)); | 1475 | gAgent.initOriginGlobal(from_region_handle(first_sim_handle)); |
1507 | 1476 | ||
1508 | gWorldp->addRegion(first_sim_handle, first_sim); | 1477 | gWorldp->addRegion(first_sim_handle, first_sim); |
1509 | 1478 | ||
1510 | LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle); | 1479 | LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle); |
1511 | llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl; | 1480 | llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl; |
1512 | 1481 | ||
1513 | gStartupState = STATE_SEED_GRANTED_WAIT; | 1482 | LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT ); |
1514 | regionp->setSeedCapability(first_sim_seed_cap); | 1483 | regionp->setSeedCapability(first_sim_seed_cap); |
1515 | 1484 | ||
1516 | // Set agent's initial region to be the one we just created. | 1485 | // Set agent's initial region to be the one we just created. |
1517 | gAgent.setRegion(regionp); | 1486 | gAgent.setRegion(regionp); |
1518 | 1487 | ||
1519 | // Set agent's initial position, which will be read by LLVOAvatar when the avatar | 1488 | // Set agent's initial position, which will be read by LLVOAvatar when the avatar |
1520 | // object is created. I think this must be done after setting the region. JC | 1489 | // object is created. I think this must be done after setting the region. JC |
1521 | gAgent.setPositionAgent(agent_start_position_region); | 1490 | gAgent.setPositionAgent(agent_start_position_region); |
1522 | } | ||
1523 | else | ||
1524 | { | ||
1525 | // With one simulator, assume region is at 0,0, hence has regionHandle 0 | ||
1526 | // VEFFECT: Login | ||
1527 | gWorldp->addRegion(0, gAgentSimHost); | ||
1528 | gAgent.setRegion(gWorldp->getRegionFromHandle(0)); | ||
1529 | |||
1530 | gStartupState = STATE_SEED_CAP_GRANTED; | ||
1531 | } | ||
1532 | 1491 | ||
1533 | display_startup(); | 1492 | display_startup(); |
1534 | return do_normal_idle; | 1493 | return do_normal_idle; |
@@ -1538,7 +1497,7 @@ BOOL idle_startup() | |||
1538 | //--------------------------------------------------------------------- | 1497 | //--------------------------------------------------------------------- |
1539 | // Wait for Seed Cap Grant | 1498 | // Wait for Seed Cap Grant |
1540 | //--------------------------------------------------------------------- | 1499 | //--------------------------------------------------------------------- |
1541 | if(STATE_SEED_GRANTED_WAIT == gStartupState) | 1500 | if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) |
1542 | { | 1501 | { |
1543 | llinfos << "Waiting for seed grant ...." << llendl; | 1502 | llinfos << "Waiting for seed grant ...." << llendl; |
1544 | return do_normal_idle; | 1503 | return do_normal_idle; |
@@ -1549,7 +1508,7 @@ BOOL idle_startup() | |||
1549 | // Seed Capability Granted | 1508 | // Seed Capability Granted |
1550 | // no newMessage calls should happen before this point | 1509 | // no newMessage calls should happen before this point |
1551 | //--------------------------------------------------------------------- | 1510 | //--------------------------------------------------------------------- |
1552 | if (STATE_SEED_CAP_GRANTED == gStartupState) | 1511 | if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState()) |
1553 | { | 1512 | { |
1554 | update_texture_fetch(); | 1513 | update_texture_fetch(); |
1555 | 1514 | ||
@@ -1682,42 +1641,35 @@ BOOL idle_startup() | |||
1682 | // For all images pre-loaded into viewer cache, decode them. | 1641 | // For all images pre-loaded into viewer cache, decode them. |
1683 | // Need to do this AFTER we init the sky | 1642 | // Need to do this AFTER we init the sky |
1684 | gImageList.decodeAllImages(2.f); | 1643 | gImageList.decodeAllImages(2.f); |
1685 | gStartupState++; | 1644 | LLStartUp::setStartupState( STATE_QUICKTIME_INIT ); |
1686 | 1645 | ||
1687 | // JC - Do this as late as possible to increase likelihood Purify | 1646 | // JC - Do this as late as possible to increase likelihood Purify |
1688 | // will run. | 1647 | // will run. |
1689 | if (!gRunLocal) | 1648 | LLMessageSystem* msg = gMessageSystem; |
1649 | if (!msg->mOurCircuitCode) | ||
1690 | { | 1650 | { |
1691 | LLMessageSystem* msg = gMessageSystem; | 1651 | llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl; |
1692 | if (!msg->mOurCircuitCode) | ||
1693 | { | ||
1694 | llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl; | ||
1695 | } | ||
1696 | |||
1697 | gUseCircuitCallbackCalled = FALSE; | ||
1698 | |||
1699 | msg->enableCircuit(first_sim, TRUE); | ||
1700 | // now, use the circuit info to tell simulator about us! | ||
1701 | llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl; | ||
1702 | msg->newMessageFast(_PREHASH_UseCircuitCode); | ||
1703 | msg->nextBlockFast(_PREHASH_CircuitCode); | ||
1704 | msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode); | ||
1705 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
1706 | msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); | ||
1707 | msg->sendReliable( | ||
1708 | first_sim, | ||
1709 | MAX_TIMEOUT_COUNT, | ||
1710 | FALSE, | ||
1711 | TIMEOUT_SECONDS, | ||
1712 | use_circuit_callback, | ||
1713 | NULL); | ||
1714 | } | 1652 | } |
1715 | 1653 | ||
1654 | gUseCircuitCallbackCalled = FALSE; | ||
1655 | |||
1656 | msg->enableCircuit(first_sim, TRUE); | ||
1657 | // now, use the circuit info to tell simulator about us! | ||
1658 | llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl; | ||
1659 | msg->newMessageFast(_PREHASH_UseCircuitCode); | ||
1660 | msg->nextBlockFast(_PREHASH_CircuitCode); | ||
1661 | msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode); | ||
1662 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
1663 | msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); | ||
1664 | msg->sendReliable( | ||
1665 | first_sim, | ||
1666 | MAX_TIMEOUT_COUNT, | ||
1667 | FALSE, | ||
1668 | TIMEOUT_SECONDS, | ||
1669 | use_circuit_callback, | ||
1670 | NULL); | ||
1671 | |||
1716 | timeout.reset(); | 1672 | timeout.reset(); |
1717 | if (!gConnectToSomething) | ||
1718 | { | ||
1719 | gStartupState = STATE_MISC; | ||
1720 | } | ||
1721 | 1673 | ||
1722 | return do_normal_idle; | 1674 | return do_normal_idle; |
1723 | } | 1675 | } |
@@ -1725,7 +1677,7 @@ BOOL idle_startup() | |||
1725 | //--------------------------------------------------------------------- | 1677 | //--------------------------------------------------------------------- |
1726 | // LLMediaEngine Init | 1678 | // LLMediaEngine Init |
1727 | //--------------------------------------------------------------------- | 1679 | //--------------------------------------------------------------------- |
1728 | if (STATE_QUICKTIME_INIT == gStartupState) | 1680 | if (STATE_QUICKTIME_INIT == LLStartUp::getStartupState()) |
1729 | { | 1681 | { |
1730 | if (gViewerWindow) | 1682 | if (gViewerWindow) |
1731 | { | 1683 | { |
@@ -1760,20 +1712,20 @@ BOOL idle_startup() | |||
1760 | } | 1712 | } |
1761 | #endif | 1713 | #endif |
1762 | 1714 | ||
1763 | gStartupState++; | 1715 | LLStartUp::setStartupState( STATE_WORLD_WAIT ); |
1764 | return do_normal_idle; | 1716 | return do_normal_idle; |
1765 | } | 1717 | } |
1766 | 1718 | ||
1767 | //--------------------------------------------------------------------- | 1719 | //--------------------------------------------------------------------- |
1768 | // Agent Send | 1720 | // Agent Send |
1769 | //--------------------------------------------------------------------- | 1721 | //--------------------------------------------------------------------- |
1770 | if(STATE_WORLD_WAIT == gStartupState) | 1722 | if(STATE_WORLD_WAIT == LLStartUp::getStartupState()) |
1771 | { | 1723 | { |
1772 | //llinfos << "Waiting for simulator ack...." << llendl; | 1724 | //llinfos << "Waiting for simulator ack...." << llendl; |
1773 | set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str()); | 1725 | set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str()); |
1774 | if(gGotUseCircuitCodeAck) | 1726 | if(gGotUseCircuitCodeAck) |
1775 | { | 1727 | { |
1776 | ++gStartupState; | 1728 | LLStartUp::setStartupState( STATE_AGENT_SEND ); |
1777 | } | 1729 | } |
1778 | LLMessageSystem* msg = gMessageSystem; | 1730 | LLMessageSystem* msg = gMessageSystem; |
1779 | while (msg->checkAllMessages(gFrameCount, gServicePump)) | 1731 | while (msg->checkAllMessages(gFrameCount, gServicePump)) |
@@ -1786,7 +1738,7 @@ BOOL idle_startup() | |||
1786 | //--------------------------------------------------------------------- | 1738 | //--------------------------------------------------------------------- |
1787 | // Agent Send | 1739 | // Agent Send |
1788 | //--------------------------------------------------------------------- | 1740 | //--------------------------------------------------------------------- |
1789 | if (STATE_AGENT_SEND == gStartupState) | 1741 | if (STATE_AGENT_SEND == LLStartUp::getStartupState()) |
1790 | { | 1742 | { |
1791 | llinfos << "Connecting to region..." << llendl; | 1743 | llinfos << "Connecting to region..." << llendl; |
1792 | set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str()); | 1744 | set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str()); |
@@ -1797,7 +1749,7 @@ BOOL idle_startup() | |||
1797 | _PREHASH_AgentMovementComplete, | 1749 | _PREHASH_AgentMovementComplete, |
1798 | process_agent_movement_complete); | 1750 | process_agent_movement_complete); |
1799 | LLViewerRegion* regionp = gAgent.getRegion(); | 1751 | LLViewerRegion* regionp = gAgent.getRegion(); |
1800 | if(!gRunLocal && regionp) | 1752 | if(regionp) |
1801 | { | 1753 | { |
1802 | send_complete_agent_movement(regionp->getHost()); | 1754 | send_complete_agent_movement(regionp->getHost()); |
1803 | gAssetStorage->setUpstream(regionp->getHost()); | 1755 | gAssetStorage->setUpstream(regionp->getHost()); |
@@ -1805,10 +1757,6 @@ BOOL idle_startup() | |||
1805 | msg->newMessageFast(_PREHASH_EconomyDataRequest); | 1757 | msg->newMessageFast(_PREHASH_EconomyDataRequest); |
1806 | gAgent.sendReliableMessage(); | 1758 | gAgent.sendReliableMessage(); |
1807 | } | 1759 | } |
1808 | else | ||
1809 | { | ||
1810 | gStartupState++; | ||
1811 | } | ||
1812 | 1760 | ||
1813 | // Create login effect | 1761 | // Create login effect |
1814 | // But not on first login, because you can't see your avatar then | 1762 | // But not on first login, because you can't see your avatar then |
@@ -1820,7 +1768,7 @@ BOOL idle_startup() | |||
1820 | gHUDManager->sendEffects(); | 1768 | gHUDManager->sendEffects(); |
1821 | } | 1769 | } |
1822 | 1770 | ||
1823 | gStartupState++; | 1771 | LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT |
1824 | 1772 | ||
1825 | timeout.reset(); | 1773 | timeout.reset(); |
1826 | return do_normal_idle; | 1774 | return do_normal_idle; |
@@ -1829,14 +1777,13 @@ BOOL idle_startup() | |||
1829 | //--------------------------------------------------------------------- | 1777 | //--------------------------------------------------------------------- |
1830 | // Agent Wait | 1778 | // Agent Wait |
1831 | //--------------------------------------------------------------------- | 1779 | //--------------------------------------------------------------------- |
1832 | if (STATE_AGENT_WAIT == gStartupState) | 1780 | if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) |
1833 | { | 1781 | { |
1834 | LLMessageSystem* msg = gMessageSystem; | 1782 | LLMessageSystem* msg = gMessageSystem; |
1835 | while (msg->checkAllMessages(gFrameCount, gServicePump)) | 1783 | while (msg->checkAllMessages(gFrameCount, gServicePump)) |
1836 | { | 1784 | { |
1837 | if (gAgentMovementCompleted) | 1785 | if (gAgentMovementCompleted) |
1838 | { | 1786 | { |
1839 | gStartupState++; | ||
1840 | // Sometimes we have more than one message in the | 1787 | // Sometimes we have more than one message in the |
1841 | // queue. break out of this loop and continue | 1788 | // queue. break out of this loop and continue |
1842 | // processing. If we don't, then this could skip one | 1789 | // processing. If we don't, then this could skip one |
@@ -1850,183 +1797,187 @@ BOOL idle_startup() | |||
1850 | } | 1797 | } |
1851 | } | 1798 | } |
1852 | msg->processAcks(); | 1799 | msg->processAcks(); |
1800 | |||
1801 | if (gAgentMovementCompleted) | ||
1802 | { | ||
1803 | LLStartUp::setStartupState( STATE_INVENTORY_SEND ); | ||
1804 | } | ||
1805 | |||
1853 | return do_normal_idle; | 1806 | return do_normal_idle; |
1854 | } | 1807 | } |
1855 | 1808 | ||
1856 | //--------------------------------------------------------------------- | 1809 | //--------------------------------------------------------------------- |
1857 | // Inventory Send | 1810 | // Inventory Send |
1858 | //--------------------------------------------------------------------- | 1811 | //--------------------------------------------------------------------- |
1859 | if (STATE_INVENTORY_SEND == gStartupState) | 1812 | if (STATE_INVENTORY_SEND == LLStartUp::getStartupState()) |
1860 | { | 1813 | { |
1861 | if (!gUserAuthp) | 1814 | if (!gUserAuthp) |
1862 | { | 1815 | { |
1863 | llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl; | 1816 | llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl; |
1864 | } | 1817 | } |
1865 | 1818 | ||
1866 | if (gConnectToSomething && !gRunLocal) | 1819 | // unpack thin inventory |
1820 | LLUserAuth::options_t options; | ||
1821 | options.clear(); | ||
1822 | //bool dump_buffer = false; | ||
1823 | |||
1824 | if(gUserAuthp->getOptions("inventory-lib-root", options) | ||
1825 | && !options.empty()) | ||
1867 | { | 1826 | { |
1868 | // unpack thin inventory | 1827 | // should only be one |
1869 | LLUserAuth::options_t options; | 1828 | LLUserAuth::response_t::iterator it; |
1870 | options.clear(); | 1829 | it = options[0].find("folder_id"); |
1871 | //bool dump_buffer = false; | 1830 | if(it != options[0].end()) |
1872 | |||
1873 | if(gUserAuthp->getOptions("inventory-lib-root", options) | ||
1874 | && !options.empty()) | ||
1875 | { | 1831 | { |
1876 | // should only be one | 1832 | gInventoryLibraryRoot.set((*it).second.c_str()); |
1877 | LLUserAuth::response_t::iterator it; | ||
1878 | it = options[0].find("folder_id"); | ||
1879 | if(it != options[0].end()) | ||
1880 | { | ||
1881 | gInventoryLibraryRoot.set((*it).second.c_str()); | ||
1882 | } | ||
1883 | } | 1833 | } |
1884 | options.clear(); | 1834 | } |
1885 | if(gUserAuthp->getOptions("inventory-lib-owner", options) | 1835 | options.clear(); |
1886 | && !options.empty()) | 1836 | if(gUserAuthp->getOptions("inventory-lib-owner", options) |
1837 | && !options.empty()) | ||
1838 | { | ||
1839 | // should only be one | ||
1840 | LLUserAuth::response_t::iterator it; | ||
1841 | it = options[0].find("agent_id"); | ||
1842 | if(it != options[0].end()) | ||
1887 | { | 1843 | { |
1888 | // should only be one | 1844 | gInventoryLibraryOwner.set((*it).second.c_str()); |
1889 | LLUserAuth::response_t::iterator it; | ||
1890 | it = options[0].find("agent_id"); | ||
1891 | if(it != options[0].end()) | ||
1892 | { | ||
1893 | gInventoryLibraryOwner.set((*it).second.c_str()); | ||
1894 | } | ||
1895 | } | 1845 | } |
1896 | options.clear(); | 1846 | } |
1897 | if(gUserAuthp->getOptions("inventory-skel-lib", options) | 1847 | options.clear(); |
1898 | && gInventoryLibraryOwner.notNull()) | 1848 | if(gUserAuthp->getOptions("inventory-skel-lib", options) |
1849 | && gInventoryLibraryOwner.notNull()) | ||
1850 | { | ||
1851 | if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner)) | ||
1899 | { | 1852 | { |
1900 | if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner)) | 1853 | llwarns << "Problem loading inventory-skel-lib" << llendl; |
1901 | { | ||
1902 | llwarns << "Problem loading inventory-skel-lib" << llendl; | ||
1903 | } | ||
1904 | } | 1854 | } |
1905 | options.clear(); | 1855 | } |
1906 | if(gUserAuthp->getOptions("inventory-skeleton", options)) | 1856 | options.clear(); |
1857 | if(gUserAuthp->getOptions("inventory-skeleton", options)) | ||
1858 | { | ||
1859 | if(!gInventory.loadSkeleton(options, gAgent.getID())) | ||
1907 | { | 1860 | { |
1908 | if(!gInventory.loadSkeleton(options, gAgent.getID())) | 1861 | llwarns << "Problem loading inventory-skel-targets" |
1909 | { | 1862 | << llendl; |
1910 | llwarns << "Problem loading inventory-skel-targets" | ||
1911 | << llendl; | ||
1912 | } | ||
1913 | } | 1863 | } |
1914 | 1864 | } | |
1915 | options.clear(); | 1865 | |
1916 | if(gUserAuthp->getOptions("buddy-list", options)) | 1866 | options.clear(); |
1917 | { | 1867 | if(gUserAuthp->getOptions("buddy-list", options)) |
1918 | LLUserAuth::options_t::iterator it = options.begin(); | 1868 | { |
1919 | LLUserAuth::options_t::iterator end = options.end(); | 1869 | LLUserAuth::options_t::iterator it = options.begin(); |
1920 | LLAvatarTracker::buddy_map_t list; | 1870 | LLUserAuth::options_t::iterator end = options.end(); |
1921 | LLUUID agent_id; | 1871 | LLAvatarTracker::buddy_map_t list; |
1922 | S32 has_rights = 0, given_rights = 0; | 1872 | LLUUID agent_id; |
1923 | for (; it != end; ++it) | 1873 | S32 has_rights = 0, given_rights = 0; |
1874 | for (; it != end; ++it) | ||
1875 | { | ||
1876 | LLUserAuth::response_t::const_iterator option_it; | ||
1877 | option_it = (*it).find("buddy_id"); | ||
1878 | if(option_it != (*it).end()) | ||
1924 | { | 1879 | { |
1925 | LLUserAuth::response_t::const_iterator option_it; | 1880 | agent_id.set((*option_it).second.c_str()); |
1926 | option_it = (*it).find("buddy_id"); | ||
1927 | if(option_it != (*it).end()) | ||
1928 | { | ||
1929 | agent_id.set((*option_it).second.c_str()); | ||
1930 | } | ||
1931 | option_it = (*it).find("buddy_rights_has"); | ||
1932 | if(option_it != (*it).end()) | ||
1933 | { | ||
1934 | has_rights = atoi((*option_it).second.c_str()); | ||
1935 | } | ||
1936 | option_it = (*it).find("buddy_rights_given"); | ||
1937 | if(option_it != (*it).end()) | ||
1938 | { | ||
1939 | given_rights = atoi((*option_it).second.c_str()); | ||
1940 | } | ||
1941 | list[agent_id] = new LLRelationship(given_rights, has_rights, false); | ||
1942 | } | 1881 | } |
1943 | LLAvatarTracker::instance().addBuddyList(list); | 1882 | option_it = (*it).find("buddy_rights_has"); |
1944 | } | 1883 | if(option_it != (*it).end()) |
1945 | |||
1946 | options.clear(); | ||
1947 | if(gUserAuthp->getOptions("ui-config", options)) | ||
1948 | { | ||
1949 | LLUserAuth::options_t::iterator it = options.begin(); | ||
1950 | LLUserAuth::options_t::iterator end = options.end(); | ||
1951 | for (; it != end; ++it) | ||
1952 | { | 1884 | { |
1953 | LLUserAuth::response_t::const_iterator option_it; | 1885 | has_rights = atoi((*option_it).second.c_str()); |
1954 | option_it = (*it).find("allow_first_life"); | ||
1955 | if(option_it != (*it).end()) | ||
1956 | { | ||
1957 | if (option_it->second == "Y") | ||
1958 | { | ||
1959 | LLPanelAvatar::sAllowFirstLife = TRUE; | ||
1960 | } | ||
1961 | } | ||
1962 | } | 1886 | } |
1963 | } | 1887 | option_it = (*it).find("buddy_rights_given"); |
1964 | 1888 | if(option_it != (*it).end()) | |
1965 | options.clear(); | 1889 | { |
1966 | if(gUserAuthp->getOptions("event_categories", options)) | 1890 | given_rights = atoi((*option_it).second.c_str()); |
1967 | { | 1891 | } |
1968 | LLEventInfo::loadCategories(options); | 1892 | list[agent_id] = new LLRelationship(given_rights, has_rights, false); |
1969 | } | ||
1970 | if(gUserAuthp->getOptions("event_notifications", options)) | ||
1971 | { | ||
1972 | gEventNotifier.load(options); | ||
1973 | } | 1893 | } |
1974 | options.clear(); | 1894 | LLAvatarTracker::instance().addBuddyList(list); |
1975 | if(gUserAuthp->getOptions("classified_categories", options)) | 1895 | } |
1896 | |||
1897 | options.clear(); | ||
1898 | if(gUserAuthp->getOptions("ui-config", options)) | ||
1899 | { | ||
1900 | LLUserAuth::options_t::iterator it = options.begin(); | ||
1901 | LLUserAuth::options_t::iterator end = options.end(); | ||
1902 | for (; it != end; ++it) | ||
1976 | { | 1903 | { |
1977 | LLClassifiedInfo::loadCategories(options); | 1904 | LLUserAuth::response_t::const_iterator option_it; |
1905 | option_it = (*it).find("allow_first_life"); | ||
1906 | if(option_it != (*it).end()) | ||
1907 | { | ||
1908 | if (option_it->second == "Y") | ||
1909 | { | ||
1910 | LLPanelAvatar::sAllowFirstLife = TRUE; | ||
1911 | } | ||
1912 | } | ||
1978 | } | 1913 | } |
1979 | gInventory.buildParentChildMap(); | 1914 | } |
1980 | gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null); | ||
1981 | gInventory.notifyObservers(); | ||
1982 | 1915 | ||
1983 | // set up callbacks | 1916 | options.clear(); |
1984 | LLMessageSystem* msg = gMessageSystem; | 1917 | if(gUserAuthp->getOptions("event_categories", options)) |
1985 | LLInventoryModel::registerCallbacks(msg); | 1918 | { |
1986 | LLAvatarTracker::instance().registerCallbacks(msg); | 1919 | LLEventInfo::loadCategories(options); |
1987 | LLLandmark::registerCallbacks(msg); | 1920 | } |
1988 | 1921 | if(gUserAuthp->getOptions("event_notifications", options)) | |
1989 | // request mute list | 1922 | { |
1990 | gMuteListp->requestFromServer(gAgent.getID()); | 1923 | gEventNotifier.load(options); |
1991 | 1924 | } | |
1992 | // Get L$ and ownership credit information | 1925 | options.clear(); |
1993 | msg->newMessageFast(_PREHASH_MoneyBalanceRequest); | 1926 | if(gUserAuthp->getOptions("classified_categories", options)) |
1994 | msg->nextBlockFast(_PREHASH_AgentData); | 1927 | { |
1995 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | 1928 | LLClassifiedInfo::loadCategories(options); |
1996 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 1929 | } |
1997 | msg->nextBlockFast(_PREHASH_MoneyData); | 1930 | gInventory.buildParentChildMap(); |
1998 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null ); | 1931 | gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null); |
1999 | gAgent.sendReliableMessage(); | 1932 | gInventory.notifyObservers(); |
2000 | 1933 | ||
2001 | // request all group information | 1934 | // set up callbacks |
2002 | // *FIX: This will not do the right thing if the message | 1935 | LLMessageSystem* msg = gMessageSystem; |
2003 | // gets there before the requestuserserverconnection | 1936 | LLInventoryModel::registerCallbacks(msg); |
2004 | // circuit is completed. | 1937 | LLAvatarTracker::instance().registerCallbacks(msg); |
2005 | gAgent.sendAgentDataUpdateRequest(); | 1938 | LLLandmark::registerCallbacks(msg); |
2006 | 1939 | ||
1940 | // request mute list | ||
1941 | gMuteListp->requestFromServer(gAgent.getID()); | ||
2007 | 1942 | ||
2008 | // NOTE: removed as part of user-privacy | 1943 | // Get L$ and ownership credit information |
2009 | // enhancements. this information should be available from | 1944 | msg->newMessageFast(_PREHASH_MoneyBalanceRequest); |
2010 | // login. 2006-10-16 Phoenix. | 1945 | msg->nextBlockFast(_PREHASH_AgentData); |
2011 | // get the users that have been granted modify powers | 1946 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); |
2012 | //msg->newMessageFast(_PREHASH_RequestGrantedProxies); | 1947 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
2013 | //msg->nextBlockFast(_PREHASH_AgentData); | 1948 | msg->nextBlockFast(_PREHASH_MoneyData); |
2014 | //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | 1949 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null ); |
2015 | //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 1950 | gAgent.sendReliableMessage(); |
2016 | //gAgent.sendReliableMessage(); | ||
2017 | 1951 | ||
2018 | BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory"); | 1952 | // request all group information |
1953 | // *FIX: This will not do the right thing if the message | ||
1954 | // gets there before the requestuserserverconnection | ||
1955 | // circuit is completed. | ||
1956 | gAgent.sendAgentDataUpdateRequest(); | ||
2019 | 1957 | ||
2020 | // Create the inventory views | ||
2021 | LLInventoryView::showAgentInventory(); | ||
2022 | 1958 | ||
2023 | // Hide the inventory if it wasn't shown at exit | 1959 | // NOTE: removed as part of user-privacy |
2024 | if(!shown_at_exit) | 1960 | // enhancements. this information should be available from |
2025 | { | 1961 | // login. 2006-10-16 Phoenix. |
2026 | LLInventoryView::toggleVisibility(NULL); | 1962 | // get the users that have been granted modify powers |
2027 | } | 1963 | //msg->newMessageFast(_PREHASH_RequestGrantedProxies); |
1964 | //msg->nextBlockFast(_PREHASH_AgentData); | ||
1965 | //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
1966 | //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
1967 | //gAgent.sendReliableMessage(); | ||
1968 | |||
1969 | BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory"); | ||
1970 | |||
1971 | // Create the inventory views | ||
1972 | LLInventoryView::showAgentInventory(); | ||
1973 | |||
1974 | // Hide the inventory if it wasn't shown at exit | ||
1975 | if(!shown_at_exit) | ||
1976 | { | ||
1977 | LLInventoryView::toggleVisibility(NULL); | ||
2028 | } | 1978 | } |
2029 | gStartupState++; | 1979 | |
1980 | LLStartUp::setStartupState( STATE_MISC ); | ||
2030 | return do_normal_idle; | 1981 | return do_normal_idle; |
2031 | } | 1982 | } |
2032 | 1983 | ||
@@ -2034,14 +1985,8 @@ BOOL idle_startup() | |||
2034 | //--------------------------------------------------------------------- | 1985 | //--------------------------------------------------------------------- |
2035 | // Misc | 1986 | // Misc |
2036 | //--------------------------------------------------------------------- | 1987 | //--------------------------------------------------------------------- |
2037 | if (STATE_MISC == gStartupState) | 1988 | if (STATE_MISC == LLStartUp::getStartupState()) |
2038 | { | 1989 | { |
2039 | // Create a few objects if we don't actually have a world | ||
2040 | if (!gConnectToSomething) | ||
2041 | { | ||
2042 | // could add them here | ||
2043 | } | ||
2044 | |||
2045 | // We have a region, and just did a big inventory download. | 1990 | // We have a region, and just did a big inventory download. |
2046 | // We can estimate the user's connection speed, and set their | 1991 | // We can estimate the user's connection speed, and set their |
2047 | // max bandwidth accordingly. JC | 1992 | // max bandwidth accordingly. JC |
@@ -2060,7 +2005,7 @@ BOOL idle_startup() | |||
2060 | { | 2005 | { |
2061 | llinfos << "Fast network connection, increasing max bandwidth to " | 2006 | llinfos << "Fast network connection, increasing max bandwidth to " |
2062 | << FASTER_RATE_BPS/1024.f | 2007 | << FASTER_RATE_BPS/1024.f |
2063 | << " Kbps" << llendl; | 2008 | << " kbps" << llendl; |
2064 | gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f); | 2009 | gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f); |
2065 | } | 2010 | } |
2066 | else if (rate_bps > FAST_RATE_BPS | 2011 | else if (rate_bps > FAST_RATE_BPS |
@@ -2068,7 +2013,7 @@ BOOL idle_startup() | |||
2068 | { | 2013 | { |
2069 | llinfos << "Fast network connection, increasing max bandwidth to " | 2014 | llinfos << "Fast network connection, increasing max bandwidth to " |
2070 | << FAST_RATE_BPS/1024.f | 2015 | << FAST_RATE_BPS/1024.f |
2071 | << " Kbps" << llendl; | 2016 | << " kbps" << llendl; |
2072 | gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f); | 2017 | gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f); |
2073 | } | 2018 | } |
2074 | } | 2019 | } |
@@ -2220,12 +2165,12 @@ BOOL idle_startup() | |||
2220 | } | 2165 | } |
2221 | } | 2166 | } |
2222 | 2167 | ||
2223 | gStartupState++; | 2168 | LLStartUp::setStartupState( STATE_PRECACHE ); |
2224 | timeout.reset(); | 2169 | timeout.reset(); |
2225 | return do_normal_idle; | 2170 | return do_normal_idle; |
2226 | } | 2171 | } |
2227 | 2172 | ||
2228 | if (STATE_PRECACHE == gStartupState) | 2173 | if (STATE_PRECACHE == LLStartUp::getStartupState()) |
2229 | { | 2174 | { |
2230 | do_normal_idle = TRUE; | 2175 | do_normal_idle = TRUE; |
2231 | 2176 | ||
@@ -2234,7 +2179,7 @@ BOOL idle_startup() | |||
2234 | if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) | 2179 | if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) |
2235 | || (timeout_frac > 3.f)) | 2180 | || (timeout_frac > 3.f)) |
2236 | { | 2181 | { |
2237 | gStartupState++; | 2182 | LLStartUp::setStartupState( STATE_WEARABLES_WAIT ); |
2238 | } | 2183 | } |
2239 | else | 2184 | else |
2240 | { | 2185 | { |
@@ -2246,7 +2191,7 @@ BOOL idle_startup() | |||
2246 | return do_normal_idle; | 2191 | return do_normal_idle; |
2247 | } | 2192 | } |
2248 | 2193 | ||
2249 | if (STATE_WEARABLES_WAIT == gStartupState) | 2194 | if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState()) |
2250 | { | 2195 | { |
2251 | do_normal_idle = TRUE; | 2196 | do_normal_idle = TRUE; |
2252 | 2197 | ||
@@ -2257,13 +2202,13 @@ BOOL idle_startup() | |||
2257 | 2202 | ||
2258 | if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen()) | 2203 | if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen()) |
2259 | { | 2204 | { |
2260 | gStartupState++; | 2205 | LLStartUp::setStartupState( STATE_CLEANUP ); |
2261 | } | 2206 | } |
2262 | else if (wearables_time > MAX_WEARABLES_TIME) | 2207 | else if (wearables_time > MAX_WEARABLES_TIME) |
2263 | { | 2208 | { |
2264 | gViewerWindow->alertXml("ClothingLoading"); | 2209 | gViewerWindow->alertXml("ClothingLoading"); |
2265 | gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); | 2210 | gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); |
2266 | gStartupState++; | 2211 | LLStartUp::setStartupState( STATE_CLEANUP ); |
2267 | } | 2212 | } |
2268 | else | 2213 | else |
2269 | { | 2214 | { |
@@ -2275,7 +2220,7 @@ BOOL idle_startup() | |||
2275 | return do_normal_idle; | 2220 | return do_normal_idle; |
2276 | } | 2221 | } |
2277 | 2222 | ||
2278 | if (STATE_CLEANUP == gStartupState) | 2223 | if (STATE_CLEANUP == LLStartUp::getStartupState()) |
2279 | { | 2224 | { |
2280 | set_startup_status(1.0, "", NULL); | 2225 | set_startup_status(1.0, "", NULL); |
2281 | 2226 | ||
@@ -2347,7 +2292,7 @@ BOOL idle_startup() | |||
2347 | gUserAuthp = NULL; | 2292 | gUserAuthp = NULL; |
2348 | } | 2293 | } |
2349 | 2294 | ||
2350 | gStartupState++; | 2295 | LLStartUp::setStartupState( STATE_STARTED ); |
2351 | 2296 | ||
2352 | // Unmute audio if desired and setup volumes | 2297 | // Unmute audio if desired and setup volumes |
2353 | audio_update_volume(); | 2298 | audio_update_volume(); |
@@ -2361,7 +2306,7 @@ BOOL idle_startup() | |||
2361 | return do_normal_idle; | 2306 | return do_normal_idle; |
2362 | } | 2307 | } |
2363 | 2308 | ||
2364 | llwarns << "Reached end of idle_startup for state " << gStartupState << llendl; | 2309 | llwarns << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << llendl; |
2365 | return do_normal_idle; | 2310 | return do_normal_idle; |
2366 | } | 2311 | } |
2367 | 2312 | ||
@@ -2421,7 +2366,7 @@ void login_callback(S32 option, void *userdata) | |||
2421 | 2366 | ||
2422 | if (CONNECT_OPTION == option) | 2367 | if (CONNECT_OPTION == option) |
2423 | { | 2368 | { |
2424 | gStartupState++; | 2369 | LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); |
2425 | return; | 2370 | return; |
2426 | } | 2371 | } |
2427 | else if (QUIT_OPTION == option) | 2372 | else if (QUIT_OPTION == option) |
@@ -2688,7 +2633,7 @@ void update_dialog_callback(S32 option, void *userdata) | |||
2688 | #if !LL_RELEASE_FOR_DOWNLOAD | 2633 | #if !LL_RELEASE_FOR_DOWNLOAD |
2689 | if (option == 2) | 2634 | if (option == 2) |
2690 | { | 2635 | { |
2691 | gStartupState++; | 2636 | LLStartUp::setStartupState( STATE_WORLD_INIT ); |
2692 | return; | 2637 | return; |
2693 | } | 2638 | } |
2694 | #endif | 2639 | #endif |
@@ -2704,7 +2649,7 @@ void update_dialog_callback(S32 option, void *userdata) | |||
2704 | } | 2649 | } |
2705 | else | 2650 | else |
2706 | { | 2651 | { |
2707 | gStartupState++; | 2652 | LLStartUp::setStartupState( STATE_WORLD_INIT ); |
2708 | } | 2653 | } |
2709 | return; | 2654 | return; |
2710 | } | 2655 | } |
@@ -3089,7 +3034,7 @@ void init_stat_view() | |||
3089 | stat_barp->mDisplayHistory = FALSE; | 3034 | stat_barp->mDisplayHistory = FALSE; |
3090 | 3035 | ||
3091 | stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat)); | 3036 | stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat)); |
3092 | stat_barp->setUnitLabel(" %%"); | 3037 | stat_barp->setUnitLabel(" %"); |
3093 | stat_barp->mMinBar = 0.f; | 3038 | stat_barp->mMinBar = 0.f; |
3094 | stat_barp->mMaxBar = 5.f; | 3039 | stat_barp->mMaxBar = 5.f; |
3095 | stat_barp->mTickSpacing = 1.f; | 3040 | stat_barp->mTickSpacing = 1.f; |
@@ -3109,16 +3054,6 @@ void init_stat_view() | |||
3109 | stat_barp->mPerSec = FALSE; | 3054 | stat_barp->mPerSec = FALSE; |
3110 | stat_barp->mDisplayMean = FALSE; | 3055 | stat_barp->mDisplayMean = FALSE; |
3111 | 3056 | ||
3112 | stat_barp = stat_viewp->addStat("Ping User", &(gViewerStats->mUserserverPingStat)); | ||
3113 | stat_barp->setUnitLabel(" msec"); | ||
3114 | stat_barp->mMinBar = 0.f; | ||
3115 | stat_barp->mMaxBar = 1000.f; | ||
3116 | stat_barp->mTickSpacing = 100.f; | ||
3117 | stat_barp->mLabelSpacing = 200.f; | ||
3118 | stat_barp->mDisplayBar = FALSE; | ||
3119 | stat_barp->mPerSec = FALSE; | ||
3120 | stat_barp->mDisplayMean = FALSE; | ||
3121 | |||
3122 | 3057 | ||
3123 | stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect); | 3058 | stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect); |
3124 | gDebugView->mStatViewp->addChildAtEnd(stat_viewp); | 3059 | gDebugView->mStatViewp->addChildAtEnd(stat_viewp); |
@@ -3740,17 +3675,31 @@ void release_start_screen() | |||
3740 | gStartImageGL = NULL; | 3675 | gStartImageGL = NULL; |
3741 | } | 3676 | } |
3742 | 3677 | ||
3678 | // static | ||
3743 | bool LLStartUp::canGoFullscreen() | 3679 | bool LLStartUp::canGoFullscreen() |
3744 | { | 3680 | { |
3745 | return gStartupState >= STATE_WORLD_INIT; | 3681 | return LLStartUp::getStartupState() >= STATE_WORLD_INIT; |
3746 | } | 3682 | } |
3747 | 3683 | ||
3684 | |||
3685 | // static | ||
3686 | void LLStartUp::setStartupState( S32 state ) | ||
3687 | { | ||
3688 | llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl; | ||
3689 | gStartupState = state; | ||
3690 | } | ||
3691 | |||
3692 | |||
3748 | void reset_login() | 3693 | void reset_login() |
3749 | { | 3694 | { |
3750 | gStartupState = STATE_LOGIN_SHOW; | 3695 | LLStartUp::setStartupState( STATE_LOGIN_SHOW ); |
3751 | 3696 | ||
3752 | if ( gViewerWindow ) | 3697 | if ( gViewerWindow ) |
3753 | { // Hide menus and normal buttons | 3698 | { // Hide menus and normal buttons |
3754 | gViewerWindow->setNormalControlsVisible( FALSE ); | 3699 | gViewerWindow->setNormalControlsVisible( FALSE ); |
3755 | } | 3700 | } |
3701 | |||
3702 | // Hide any other stuff | ||
3703 | if ( gFloaterMap ) | ||
3704 | gFloaterMap->setVisible( FALSE ); | ||
3756 | } | 3705 | } |
diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 718d74d..d9adc62 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h | |||
@@ -42,38 +42,32 @@ extern const char* SCREEN_HOME_FILENAME; | |||
42 | extern const char* SCREEN_LAST_FILENAME; | 42 | extern const char* SCREEN_LAST_FILENAME; |
43 | 43 | ||
44 | enum EStartupState{ | 44 | enum EStartupState{ |
45 | STATE_FIRST, | 45 | STATE_FIRST, // Initial startup |
46 | STATE_LOGIN_SHOW, | 46 | STATE_LOGIN_SHOW, // Show login screen |
47 | STATE_LOGIN_WAIT, | 47 | STATE_LOGIN_WAIT, // Wait for user input at login screen |
48 | STATE_LOGIN_CLEANUP, | 48 | STATE_LOGIN_CLEANUP, // Get rid of login screen and start login |
49 | STATE_UPDATE_CHECK, | 49 | STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc) |
50 | STATE_LOGIN_AUTH_INIT, | 50 | STATE_LOGIN_AUTH_INIT, // Start login to SL servers |
51 | STATE_LOGIN_AUTHENTICATE, | 51 | STATE_LOGIN_AUTHENTICATE, // Do authentication voodoo |
52 | STATE_LOGIN_NO_DATA_YET, | 52 | STATE_LOGIN_NO_DATA_YET, // Waiting for authentication replies to start |
53 | STATE_LOGIN_DOWNLOADING, | 53 | STATE_LOGIN_DOWNLOADING, // Waiting for authentication replies to download |
54 | STATE_LOGIN_PROCESS_RESPONSE, | 54 | STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply |
55 | STATE_WORLD_INIT, | 55 | STATE_WORLD_INIT, // Start building the world |
56 | STATE_SEED_GRANTED_WAIT, | 56 | STATE_SEED_GRANTED_WAIT, // Wait for seed cap grant |
57 | STATE_SEED_CAP_GRANTED, | 57 | STATE_SEED_CAP_GRANTED, // Have seed cap grant |
58 | STATE_QUICKTIME_INIT, | 58 | STATE_QUICKTIME_INIT, // Initialzie QT |
59 | STATE_WORLD_WAIT, | 59 | STATE_WORLD_WAIT, // Waiting for simulator |
60 | STATE_AGENT_SEND, | 60 | STATE_AGENT_SEND, // Connect to a region |
61 | STATE_AGENT_WAIT, | 61 | STATE_AGENT_WAIT, // Wait for region |
62 | STATE_INVENTORY_SEND, | 62 | STATE_INVENTORY_SEND, // Do inventory transfer |
63 | STATE_MISC, | 63 | STATE_MISC, // Do more things (set bandwidth, start audio, save location, etc) |
64 | STATE_PRECACHE, | 64 | STATE_PRECACHE, // Wait a bit for textures to download |
65 | STATE_WEARABLES_WAIT, | 65 | STATE_WEARABLES_WAIT, // Wait for clothing to download |
66 | //STATE_INVENTORY_WAIT, | 66 | STATE_CLEANUP, // Final cleanup |
67 | //STATE_TOS_AGREEMENT_START, | 67 | STATE_STARTED // Up and running in-world |
68 | //STATE_TOS_AGREEMENT_WAIT, | ||
69 | //STATE_CRITICAL_MESSAGE_START, | ||
70 | //STATE_CRITICAL_MESSAGE_WAIT, | ||
71 | STATE_CLEANUP, | ||
72 | STATE_STARTED | ||
73 | }; | 68 | }; |
74 | 69 | ||
75 | // exorted symbol | 70 | // exported symbols |
76 | extern S32 gStartupState; | ||
77 | extern BOOL gAgentMovementCompleted; | 71 | extern BOOL gAgentMovementCompleted; |
78 | extern bool gUseQuickTime; | 72 | extern bool gUseQuickTime; |
79 | extern bool gQuickTimeInitialized; | 73 | extern bool gQuickTimeInitialized; |
@@ -85,6 +79,13 @@ public: | |||
85 | static bool canGoFullscreen(); | 79 | static bool canGoFullscreen(); |
86 | // returns true if we are far enough along in startup to allow | 80 | // returns true if we are far enough along in startup to allow |
87 | // going full screen | 81 | // going full screen |
82 | |||
83 | // Always use this to set gStartupState so changes are logged | ||
84 | static void setStartupState( S32 state ); | ||
85 | static S32 getStartupState() { return gStartupState; }; | ||
86 | |||
87 | protected: | ||
88 | static S32 gStartupState; // Do not set directly, use LLStartup::setStartupState | ||
88 | }; | 89 | }; |
89 | 90 | ||
90 | 91 | ||
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 9d6434f..2471e18 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp | |||
@@ -157,7 +157,7 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect) | |||
157 | LLString text = childGetText("bandwidth_tooltip") + " "; | 157 | LLString text = childGetText("bandwidth_tooltip") + " "; |
158 | LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven | 158 | LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven |
159 | mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str()); | 159 | mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str()); |
160 | mSGBandwidth->setUnits("Kbps"); | 160 | mSGBandwidth->setUnits("kbps"); |
161 | mSGBandwidth->setPrecision(0); | 161 | mSGBandwidth->setPrecision(0); |
162 | addChild(mSGBandwidth); | 162 | addChild(mSGBandwidth); |
163 | x -= SIM_STAT_WIDTH + 2; | 163 | x -= SIM_STAT_WIDTH + 2; |
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp index 2005e39..3b48d8b 100644 --- a/linden/indra/newview/lltexlayer.cpp +++ b/linden/indra/newview/lltexlayer.cpp | |||
@@ -482,7 +482,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data) | |||
482 | 482 | ||
483 | 483 | ||
484 | // static | 484 | // static |
485 | void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed) | 485 | void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result, LLExtStat ext_status) // StoreAssetData callback (not fixed) |
486 | { | 486 | { |
487 | LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; | 487 | LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; |
488 | 488 | ||
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h index 7d517ee..e5bfb79 100644 --- a/linden/indra/newview/lltexlayer.h +++ b/linden/indra/newview/lltexlayer.h | |||
@@ -221,7 +221,7 @@ public: | |||
221 | void readBackAndUpload(U8* baked_bump_data); | 221 | void readBackAndUpload(U8* baked_bump_data); |
222 | static void onTextureUploadComplete( const LLUUID& uuid, | 222 | static void onTextureUploadComplete( const LLUUID& uuid, |
223 | void* userdata, | 223 | void* userdata, |
224 | S32 result); | 224 | S32 result, LLExtStat ext_status); |
225 | static void dumpTotalByteCount(); | 225 | static void dumpTotalByteCount(); |
226 | 226 | ||
227 | private: | 227 | private: |
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index 6602096..9c64bd3 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp | |||
@@ -129,7 +129,7 @@ public: | |||
129 | void setCanApplyImmediately(BOOL b); | 129 | void setCanApplyImmediately(BOOL b); |
130 | 130 | ||
131 | void setDirty( BOOL b ) { mIsDirty = b; } | 131 | void setDirty( BOOL b ) { mIsDirty = b; } |
132 | BOOL isDirty() { return mIsDirty; } | 132 | BOOL isDirty() const { return mIsDirty; } |
133 | void setActive( BOOL active ); | 133 | void setActive( BOOL active ); |
134 | 134 | ||
135 | LLTextureCtrl* getOwner() const { return mOwner; } | 135 | LLTextureCtrl* getOwner() const { return mOwner; } |
@@ -908,7 +908,8 @@ LLTextureCtrl::LLTextureCtrl( | |||
908 | mNonImmediateFilterPermMask( PERM_NONE ), | 908 | mNonImmediateFilterPermMask( PERM_NONE ), |
909 | mCanApplyImmediately( FALSE ), | 909 | mCanApplyImmediately( FALSE ), |
910 | mNeedsRawImageData( FALSE ), | 910 | mNeedsRawImageData( FALSE ), |
911 | mValid( TRUE ) | 911 | mValid( TRUE ), |
912 | mDirty( FALSE ) | ||
912 | { | 913 | { |
913 | mCaption = new LLTextBox( label, | 914 | mCaption = new LLTextBox( label, |
914 | LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), | 915 | LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), |
@@ -1070,6 +1071,18 @@ void LLTextureCtrl::setValid(BOOL valid ) | |||
1070 | } | 1071 | } |
1071 | } | 1072 | } |
1072 | 1073 | ||
1074 | // virtual | ||
1075 | BOOL LLTextureCtrl::isDirty() const | ||
1076 | { | ||
1077 | return mDirty; | ||
1078 | } | ||
1079 | |||
1080 | // virtual | ||
1081 | void LLTextureCtrl::resetDirty() | ||
1082 | { | ||
1083 | mDirty = FALSE; | ||
1084 | } | ||
1085 | |||
1073 | 1086 | ||
1074 | // virtual | 1087 | // virtual |
1075 | void LLTextureCtrl::clear() | 1088 | void LLTextureCtrl::clear() |
@@ -1186,6 +1199,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) | |||
1186 | 1199 | ||
1187 | if( floaterp && mEnabled) | 1200 | if( floaterp && mEnabled) |
1188 | { | 1201 | { |
1202 | mDirty = (op != TEXTURE_CANCEL); | ||
1189 | if( floaterp->isDirty() ) | 1203 | if( floaterp->isDirty() ) |
1190 | { | 1204 | { |
1191 | setTentative( FALSE ); | 1205 | setTentative( FALSE ); |
diff --git a/linden/indra/newview/lltexturectrl.h b/linden/indra/newview/lltexturectrl.h index d8ad4d9..853ca73 100644 --- a/linden/indra/newview/lltexturectrl.h +++ b/linden/indra/newview/lltexturectrl.h | |||
@@ -87,6 +87,9 @@ public: | |||
87 | virtual void setVisible( BOOL visible ); | 87 | virtual void setVisible( BOOL visible ); |
88 | virtual void setEnabled( BOOL enabled ); | 88 | virtual void setEnabled( BOOL enabled ); |
89 | 89 | ||
90 | virtual BOOL isDirty() const; | ||
91 | virtual void resetDirty(); | ||
92 | |||
90 | void setValid(BOOL valid); | 93 | void setValid(BOOL valid); |
91 | 94 | ||
92 | // LLUICtrl interface | 95 | // LLUICtrl interface |
@@ -169,6 +172,7 @@ private: | |||
169 | BOOL mNeedsRawImageData; | 172 | BOOL mNeedsRawImageData; |
170 | LLViewBorder* mBorder; | 173 | LLViewBorder* mBorder; |
171 | BOOL mValid; | 174 | BOOL mValid; |
175 | BOOL mDirty; | ||
172 | }; | 176 | }; |
173 | 177 | ||
174 | // XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp | 178 | // XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp |
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index d6f1f0e..e79121a 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp | |||
@@ -803,9 +803,10 @@ void LLToolGrab::onMouseCaptureLost() | |||
803 | LLVector3 grab_point_agent = mGrabObject->getRenderPosition(); | 803 | LLVector3 grab_point_agent = mGrabObject->getRenderPosition(); |
804 | 804 | ||
805 | LLCoordGL gl_point; | 805 | LLCoordGL gl_point; |
806 | gCamera->projectPosAgentToScreen(grab_point_agent, gl_point); | 806 | if (gCamera->projectPosAgentToScreen(grab_point_agent, gl_point)) |
807 | 807 | { | |
808 | LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY); | 808 | LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY); |
809 | } | ||
809 | } | 810 | } |
810 | else | 811 | else |
811 | { | 812 | { |
diff --git a/linden/indra/newview/lltoolmorph.cpp b/linden/indra/newview/lltoolmorph.cpp index ceb83b5..25d7d2e 100644 --- a/linden/indra/newview/lltoolmorph.cpp +++ b/linden/indra/newview/lltoolmorph.cpp | |||
@@ -153,6 +153,8 @@ void LLVisualParamHint::preRender(BOOL clear_depth) | |||
153 | avatarp->updateComposites(); | 153 | avatarp->updateComposites(); |
154 | avatarp->updateVisualParams(); | 154 | avatarp->updateVisualParams(); |
155 | avatarp->updateGeometry(avatarp->mDrawable); | 155 | avatarp->updateGeometry(avatarp->mDrawable); |
156 | avatarp->updateLOD(); | ||
157 | |||
156 | LLDynamicTexture::preRender(clear_depth); | 158 | LLDynamicTexture::preRender(clear_depth); |
157 | } | 159 | } |
158 | 160 | ||
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 0e3a5fe..0aa7d10 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -551,9 +551,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) | |||
551 | break; | 551 | break; |
552 | } | 552 | } |
553 | } | 553 | } |
554 | |||
555 | mGrabMouseButtonDown = FALSE; | 554 | mGrabMouseButtonDown = FALSE; |
556 | gToolMgr->clearTransientTool(); | 555 | gToolMgr->clearTransientTool(); |
556 | gAgent.setLookAt(LOOKAT_TARGET_CONVERSATION, obj); // maybe look at object/person clicked on | ||
557 | return LLTool::handleMouseUp(x, y, mask); | 557 | return LLTool::handleMouseUp(x, y, mask); |
558 | } | 558 | } |
559 | 559 | ||
diff --git a/linden/indra/newview/lltracker.cpp b/linden/indra/newview/lltracker.cpp index 4125bb6..feb4207 100644 --- a/linden/indra/newview/lltracker.cpp +++ b/linden/indra/newview/lltracker.cpp | |||
@@ -107,15 +107,6 @@ void LLTracker::stopTracking(void* userdata) | |||
107 | // static virtual | 107 | // static virtual |
108 | void LLTracker::drawHUDArrow() | 108 | void LLTracker::drawHUDArrow() |
109 | { | 109 | { |
110 | /* tracking autopilot destination has been disabled | ||
111 | -- 2004.01.09, Leviathan | ||
112 | // Draw dot for autopilot target | ||
113 | if (gAgent.getAutoPilot()) | ||
114 | { | ||
115 | instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor ); | ||
116 | return; | ||
117 | } | ||
118 | */ | ||
119 | switch (getTrackingStatus()) | 110 | switch (getTrackingStatus()) |
120 | { | 111 | { |
121 | case TRACKING_AVATAR: | 112 | case TRACKING_AVATAR: |
@@ -479,7 +470,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global, | |||
479 | if (dist > 0.99f * gCamera->getFar()) | 470 | if (dist > 0.99f * gCamera->getFar()) |
480 | { | 471 | { |
481 | color_frac = 0.4f; | 472 | color_frac = 0.4f; |
482 | // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(gCamera->getFar()/dist)*to_vec; | ||
483 | } | 473 | } |
484 | else | 474 | else |
485 | { | 475 | { |
@@ -504,7 +494,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global, | |||
504 | 494 | ||
505 | draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color); | 495 | draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color); |
506 | 496 | ||
507 | //glScalef(1.f, 1.f, 1000.f); | ||
508 | glColor4fv(fogged_color.mV); | 497 | glColor4fv(fogged_color.mV); |
509 | const U32 BEACON_VERTS = 256; | 498 | const U32 BEACON_VERTS = 256; |
510 | const F32 step = 1024.0f/BEACON_VERTS; | 499 | const F32 step = 1024.0f/BEACON_VERTS; |
@@ -554,24 +543,30 @@ void LLTracker::renderBeacon(LLVector3d pos_global, | |||
554 | glEnd(); | 543 | glEnd(); |
555 | } | 544 | } |
556 | 545 | ||
557 | //gCylinder.render(1000); | ||
558 | glPopMatrix(); | 546 | glPopMatrix(); |
559 | 547 | ||
560 | char text[1024]; /* Flawfinder: ignore */ | 548 | if (!gCamera || to_vec.magVec() > gCamera->getFar()) |
561 | snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */ | 549 | { |
550 | hud_textp->clearString(); | ||
551 | } | ||
552 | else | ||
553 | { | ||
554 | char text[1024]; /* Flawfinder: ignore */ | ||
555 | snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */ | ||
562 | 556 | ||
563 | LLWString wstr; | 557 | LLWString wstr; |
564 | wstr += utf8str_to_wstring(label); | 558 | wstr += utf8str_to_wstring(label); |
565 | wstr += '\n'; | 559 | wstr += '\n'; |
566 | wstr += utf8str_to_wstring(text); | 560 | wstr += utf8str_to_wstring(text); |
567 | 561 | ||
568 | hud_textp->setFont(LLFontGL::sSansSerif); | 562 | hud_textp->setFont(LLFontGL::sSansSerif); |
569 | hud_textp->setZCompare(FALSE); | 563 | hud_textp->setZCompare(FALSE); |
570 | hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); | 564 | hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); |
571 | 565 | ||
572 | hud_textp->setString(wstr); | 566 | hud_textp->setString(wstr); |
573 | hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER); | 567 | hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER); |
574 | hud_textp->setPositionAgent(pos_agent); | 568 | hud_textp->setPositionAgent(pos_agent); |
569 | } | ||
575 | } | 570 | } |
576 | 571 | ||
577 | 572 | ||
@@ -643,6 +638,14 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color) | |||
643 | return; | 638 | return; |
644 | } | 639 | } |
645 | 640 | ||
641 | LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal(); | ||
642 | to_vec.mdV[2] = 0; | ||
643 | |||
644 | if (to_vec.magVec() > gCamera->getFar()) | ||
645 | { //only draw arrow if lateral distance to object is less than view distance. | ||
646 | return; | ||
647 | } | ||
648 | |||
646 | // get position | 649 | // get position |
647 | LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global); | 650 | LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global); |
648 | 651 | ||
diff --git a/linden/indra/newview/lluserauth.cpp b/linden/indra/newview/lluserauth.cpp index f790fe7..6c45b8d 100644 --- a/linden/indra/newview/lluserauth.cpp +++ b/linden/indra/newview/lluserauth.cpp | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <iterator> | 34 | #include <iterator> |
35 | 35 | ||
36 | #include "lldir.h" | 36 | #include "lldir.h" |
37 | #include "llversion.h" | 37 | #include "llversionviewer.h" |
38 | #include "viewer.h" | 38 | #include "viewer.h" |
39 | #include "llviewerbuild.h" | 39 | #include "llviewerbuild.h" |
40 | #include "llviewercontrol.h" | 40 | #include "llviewercontrol.h" |
diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp index d9a5ada..7947700 100644 --- a/linden/indra/newview/llviewerassetstorage.cpp +++ b/linden/indra/newview/llviewerassetstorage.cpp | |||
@@ -88,7 +88,7 @@ void LLViewerAssetStorage::storeAssetData( | |||
88 | delete req; | 88 | delete req; |
89 | if (callback) | 89 | if (callback) |
90 | { | 90 | { |
91 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED); | 91 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_VFS_CORRUPT); |
92 | } | 92 | } |
93 | return; | 93 | return; |
94 | } | 94 | } |
@@ -117,7 +117,7 @@ void LLViewerAssetStorage::storeAssetData( | |||
117 | llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl; | 117 | llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl; |
118 | if (callback) | 118 | if (callback) |
119 | { | 119 | { |
120 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE); | 120 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_VFS_CORRUPT); |
121 | } | 121 | } |
122 | return; | 122 | return; |
123 | } | 123 | } |
@@ -142,7 +142,7 @@ void LLViewerAssetStorage::storeAssetData( | |||
142 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; | 142 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; |
143 | if (callback) | 143 | if (callback) |
144 | { | 144 | { |
145 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE); | 145 | callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE); |
146 | } | 146 | } |
147 | } | 147 | } |
148 | } | 148 | } |
@@ -151,7 +151,7 @@ void LLViewerAssetStorage::storeAssetData( | |||
151 | llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl; | 151 | llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl; |
152 | if (callback) | 152 | if (callback) |
153 | { | 153 | { |
154 | callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE); | 154 | callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | } | 157 | } |
@@ -220,7 +220,7 @@ void LLViewerAssetStorage::storeAssetData( | |||
220 | { | 220 | { |
221 | if (callback) | 221 | if (callback) |
222 | { | 222 | { |
223 | callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE); | 223 | callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE); |
224 | } | 224 | } |
225 | } | 225 | } |
226 | } | 226 | } |
diff --git a/linden/indra/newview/llviewerassetstorage.h b/linden/indra/newview/llviewerassetstorage.h index 46840cb..c49820a 100644 --- a/linden/indra/newview/llviewerassetstorage.h +++ b/linden/indra/newview/llviewerassetstorage.h | |||
@@ -37,8 +37,6 @@ class LLVFile; | |||
37 | class LLViewerAssetStorage : public LLAssetStorage | 37 | class LLViewerAssetStorage : public LLAssetStorage |
38 | { | 38 | { |
39 | public: | 39 | public: |
40 | typedef void (*LLStoreAssetCallback)(const LLUUID &transaction_id, void *user_data, S32 status); | ||
41 | |||
42 | LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, | 40 | LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, |
43 | LLVFS *vfs, const LLHost &upstream_host); | 41 | LLVFS *vfs, const LLHost &upstream_host); |
44 | 42 | ||
diff --git a/linden/indra/newview/llviewerbuild.h b/linden/indra/newview/llviewerbuild.h index 340d353..82a35b0 100644 --- a/linden/indra/newview/llviewerbuild.h +++ b/linden/indra/newview/llviewerbuild.h | |||
@@ -26,8 +26,8 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "llversion.h" | 29 | #include "llversionviewer.h" |
30 | 30 | ||
31 | // Set the build number in indra/llcommon/llversion.h! | 31 | // Set the build number in indra/llcommon/llversionviewer.h! |
32 | 32 | ||
33 | const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; | 33 | const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; |
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index fc288c0..64ad66c 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "lldir.h" | 35 | #include "lldir.h" |
36 | #include "lldynamictexture.h" | 36 | #include "lldynamictexture.h" |
37 | #include "lldrawpoolalpha.h" | 37 | #include "lldrawpoolalpha.h" |
38 | #include "llfeaturemanager.h" | ||
38 | #include "llframestats.h" | 39 | #include "llframestats.h" |
39 | #include "llgl.h" | 40 | #include "llgl.h" |
40 | #include "llglheaders.h" | 41 | #include "llglheaders.h" |
@@ -217,7 +218,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield) | |||
217 | // Bail out if we're in the startup state and don't want to try to | 218 | // Bail out if we're in the startup state and don't want to try to |
218 | // render the world. | 219 | // render the world. |
219 | // | 220 | // |
220 | if (gStartupState < STATE_STARTED) | 221 | if (LLStartUp::getStartupState() < STATE_STARTED) |
221 | { | 222 | { |
222 | display_startup(); | 223 | display_startup(); |
223 | return; | 224 | return; |
@@ -315,12 +316,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield) | |||
315 | } | 316 | } |
316 | break; | 317 | break; |
317 | 318 | ||
318 | case LLAgent::TELEPORT_CANCELLING: | ||
319 | gViewerWindow->setProgressCancelButtonVisible(FALSE, "Cancel"); | ||
320 | gViewerWindow->setProgressPercent( 100.f ); | ||
321 | gViewerWindow->setProgressString("Canceling..."); | ||
322 | break; | ||
323 | |||
324 | case LLAgent::TELEPORT_NONE: | 319 | case LLAgent::TELEPORT_NONE: |
325 | // No teleport in progress | 320 | // No teleport in progress |
326 | gViewerWindow->setShowProgress(FALSE); | 321 | gViewerWindow->setShowProgress(FALSE); |
@@ -430,7 +425,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield) | |||
430 | } | 425 | } |
431 | else | 426 | else |
432 | { | 427 | { |
433 | LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery; | 428 | LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion"); |
434 | } | 429 | } |
435 | 430 | ||
436 | stop_glerror(); | 431 | stop_glerror(); |
diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index e40fb80..f4cd582 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp | |||
@@ -155,9 +155,9 @@ void LLViewerImage::updateClass(const F32 velocity, const F32 angular_velocity) | |||
155 | sMaxTotalTextureMem -= sMaxBoundTextureMem/4; | 155 | sMaxTotalTextureMem -= sMaxBoundTextureMem/4; |
156 | } | 156 | } |
157 | 157 | ||
158 | if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemory() - (U32)min_non_tex_system_mem) | 158 | if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemoryClamped() - (U32)min_non_tex_system_mem) |
159 | { | 159 | { |
160 | sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemory() - min_non_tex_system_mem; | 160 | sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemoryClamped() - min_non_tex_system_mem; |
161 | } | 161 | } |
162 | 162 | ||
163 | if (sBoundTextureMemory >= sMaxBoundTextureMem || | 163 | if (sBoundTextureMemory >= sMaxBoundTextureMem || |
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 2e3b964..890629e 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp | |||
@@ -1142,6 +1142,12 @@ LLPointer<LLImageJ2C> LLViewerImageList::convertToUploadFile(LLPointer<LLImageRa | |||
1142 | raw_image->biasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT); | 1142 | raw_image->biasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT); |
1143 | LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C(); | 1143 | LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C(); |
1144 | compressedImage->setRate(0.f); | 1144 | compressedImage->setRate(0.f); |
1145 | |||
1146 | if (gSavedSettings.getBOOL("LosslessJ2CUpload") && | ||
1147 | (raw_image->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) && | ||
1148 | (raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF)) | ||
1149 | compressedImage->setReversible(TRUE); | ||
1150 | |||
1145 | compressedImage->encode(raw_image); | 1151 | compressedImage->encode(raw_image); |
1146 | 1152 | ||
1147 | return compressedImage; | 1153 | return compressedImage; |
@@ -1170,7 +1176,7 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max) | |||
1170 | } | 1176 | } |
1171 | llwarns << "VRAM amount not detected, defaulting to " << max_vram/(double)(1<<20) << " MB" << llendl; | 1177 | llwarns << "VRAM amount not detected, defaulting to " << max_vram/(double)(1<<20) << " MB" << llendl; |
1172 | } | 1178 | } |
1173 | U32 system_ram = gSysMemory.getPhysicalMemory(); | 1179 | U32 system_ram = gSysMemory.getPhysicalMemoryClamped(); |
1174 | //llinfos << "*** DETECTED " << system_ram/(double)(1<<20) << " MB of system memory." << llendl; // TomY TESTING DNCI | 1180 | //llinfos << "*** DETECTED " << system_ram/(double)(1<<20) << " MB of system memory." << llendl; // TomY TESTING DNCI |
1175 | if (max == -2) | 1181 | if (max == -2) |
1176 | { | 1182 | { |
@@ -1396,7 +1402,7 @@ S32 LLViewerImageList::calcMaxTextureRAM() | |||
1396 | { | 1402 | { |
1397 | // Decide the maximum amount of RAM we should allow the user to allocate to texture cache | 1403 | // Decide the maximum amount of RAM we should allow the user to allocate to texture cache |
1398 | LLMemoryInfo memory_info; | 1404 | LLMemoryInfo memory_info; |
1399 | U32 available_memory = memory_info.getPhysicalMemory(); | 1405 | U32 available_memory = memory_info.getPhysicalMemoryClamped(); |
1400 | 1406 | ||
1401 | clamp_rescale((F32)available_memory, | 1407 | clamp_rescale((F32)available_memory, |
1402 | (F32)(SIXTEEN_MEG * 16), | 1408 | (F32)(SIXTEEN_MEG * 16), |
diff --git a/linden/indra/newview/llviewerimagelist.h b/linden/indra/newview/llviewerimagelist.h index 0a7f8b0..266bcfc 100644 --- a/linden/indra/newview/llviewerimagelist.h +++ b/linden/indra/newview/llviewerimagelist.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #include <list> | 37 | #include <list> |
38 | #include <set> | 38 | #include <set> |
39 | 39 | ||
40 | const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128; | ||
41 | |||
40 | const BOOL MIPMAP_YES = TRUE; | 42 | const BOOL MIPMAP_YES = TRUE; |
41 | const BOOL MIPMAP_NO = FALSE; | 43 | const BOOL MIPMAP_NO = FALSE; |
42 | 44 | ||
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 6372ba8..c9cd52f 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp | |||
@@ -43,6 +43,9 @@ | |||
43 | 43 | ||
44 | #include "llinventoryview.h" | 44 | #include "llinventoryview.h" |
45 | 45 | ||
46 | #include "llviewerregion.h" | ||
47 | #include "llviewerobjectlist.h" | ||
48 | |||
46 | ///---------------------------------------------------------------------------- | 49 | ///---------------------------------------------------------------------------- |
47 | /// Local function declarations, constants, enums, and typedefs | 50 | /// Local function declarations, constants, enums, and typedefs |
48 | ///---------------------------------------------------------------------------- | 51 | ///---------------------------------------------------------------------------- |
@@ -551,13 +554,27 @@ void inventory_reliable_callback(void**, S32 status) | |||
551 | } | 554 | } |
552 | } | 555 | } |
553 | */ | 556 | */ |
557 | LLInventoryCallbackManager *LLInventoryCallbackManager::sInstance = NULL; | ||
558 | |||
554 | LLInventoryCallbackManager::LLInventoryCallbackManager() : | 559 | LLInventoryCallbackManager::LLInventoryCallbackManager() : |
555 | mLastCallback(0) | 560 | mLastCallback(0) |
556 | { | 561 | { |
562 | if( sInstance != NULL ) | ||
563 | { | ||
564 | llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl; | ||
565 | return; | ||
566 | } | ||
567 | sInstance = this; | ||
557 | } | 568 | } |
558 | 569 | ||
559 | LLInventoryCallbackManager::~LLInventoryCallbackManager() | 570 | LLInventoryCallbackManager::~LLInventoryCallbackManager() |
560 | { | 571 | { |
572 | if( sInstance != this ) | ||
573 | { | ||
574 | llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl; | ||
575 | return; | ||
576 | } | ||
577 | sInstance = NULL; | ||
561 | } | 578 | } |
562 | 579 | ||
563 | U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb) | 580 | U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb) |
@@ -701,29 +718,56 @@ void move_inventory_item( | |||
701 | gAgent.sendReliableMessage(); | 718 | gAgent.sendReliableMessage(); |
702 | } | 719 | } |
703 | 720 | ||
704 | void _copy_inventory_from_notecard_hdr(const LLUUID& object_id, const LLUUID& notecard_inv_id) | 721 | class LLCopyInventoryFromNotecardResponder : public LLHTTPClient::Responder |
705 | { | 722 | { |
706 | LLMessageSystem* msg = gMessageSystem; | 723 | public: |
707 | msg->newMessageFast(_PREHASH_CopyInventoryFromNotecard); | 724 | //If we get back a normal response, handle it here |
708 | msg->nextBlock(_PREHASH_AgentData); | 725 | virtual void result(const LLSD& content) |
709 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | 726 | { |
710 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 727 | // What do we do here? |
711 | msg->nextBlock(_PREHASH_NotecardData); | 728 | llinfos << "CopyInventoryFromNotecard request successful." << llendl; |
712 | msg->addUUIDFast(_PREHASH_NotecardItemID, notecard_inv_id); | 729 | } |
713 | msg->addUUIDFast(_PREHASH_ObjectID, object_id); | 730 | |
714 | } | 731 | //If we get back an error (not found, etc...), handle it here |
732 | virtual void error(U32 status, const std::string& reason) | ||
733 | { | ||
734 | llinfos << "LLCopyInventoryFromNotecardResponder::error " | ||
735 | << status << ": " << reason << llendl; | ||
736 | } | ||
737 | }; | ||
715 | 738 | ||
716 | void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src) | 739 | void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id) |
717 | { | 740 | { |
718 | LLMessageSystem* msg = gMessageSystem; | 741 | LLSD body; |
719 | /* | 742 | LLViewerRegion* viewer_region = NULL; |
720 | * I was going to handle multiple inventory items here, but then I realized that | 743 | if(object_id.notNull()) |
721 | * we are only handling one at a time. Perhaps you can only select one at a | 744 | { |
722 | * time from the notecard? | 745 | LLViewerObject* vo = gObjectList.findObject(object_id); |
723 | */ | 746 | if(vo) |
724 | _copy_inventory_from_notecard_hdr(object_id, notecard_inv_id); | 747 | { |
725 | msg->nextBlockFast(_PREHASH_InventoryData); | 748 | viewer_region = vo->getRegion(); |
726 | msg->addUUIDFast(_PREHASH_ItemID, src->getUUID()); | 749 | } |
727 | msg->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(src->getType())); | 750 | } |
728 | gAgent.sendReliableMessage(); | 751 | |
752 | // Fallback to the agents region if for some reason the | ||
753 | // object isn't found in the viewer. | ||
754 | if(!viewer_region) | ||
755 | { | ||
756 | viewer_region = gAgent.getRegion(); | ||
757 | } | ||
758 | |||
759 | if(viewer_region) | ||
760 | { | ||
761 | std::string url = viewer_region->getCapability("CopyInventoryFromNotecard"); | ||
762 | if (!url.empty()) | ||
763 | { | ||
764 | body["notecard-id"] = notecard_inv_id; | ||
765 | body["object-id"] = object_id; | ||
766 | body["item-id"] = src->getUUID(); | ||
767 | body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType()); | ||
768 | body["callback-id"] = (LLSD::Integer)callback_id; | ||
769 | |||
770 | LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder()); | ||
771 | } | ||
772 | } | ||
729 | } | 773 | } |
diff --git a/linden/indra/newview/llviewerinventory.h b/linden/indra/newview/llviewerinventory.h index 513834f..1226a83 100644 --- a/linden/indra/newview/llviewerinventory.h +++ b/linden/indra/newview/llviewerinventory.h | |||
@@ -234,6 +234,9 @@ public: | |||
234 | private: | 234 | private: |
235 | std::map<U32, LLPointer<LLInventoryCallback> > mMap; | 235 | std::map<U32, LLPointer<LLInventoryCallback> > mMap; |
236 | U32 mLastCallback; | 236 | U32 mLastCallback; |
237 | static LLInventoryCallbackManager *sInstance; | ||
238 | public: | ||
239 | static bool is_instantiated() { return sInstance != NULL; } | ||
237 | }; | 240 | }; |
238 | extern LLInventoryCallbackManager gInventoryCallbacks; | 241 | extern LLInventoryCallbackManager gInventoryCallbacks; |
239 | 242 | ||
@@ -269,7 +272,8 @@ void move_inventory_item( | |||
269 | 272 | ||
270 | void copy_inventory_from_notecard(const LLUUID& object_id, | 273 | void copy_inventory_from_notecard(const LLUUID& object_id, |
271 | const LLUUID& notecard_inv_id, | 274 | const LLUUID& notecard_inv_id, |
272 | const LLInventoryItem *src); | 275 | const LLInventoryItem *src, |
276 | U32 callback_id = 0); | ||
273 | 277 | ||
274 | 278 | ||
275 | #endif // LL_LLVIEWERINVENTORY_H | 279 | #endif // LL_LLVIEWERINVENTORY_H |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4ac1da4..0d7a2cd 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "indra_constants.h" | 40 | #include "indra_constants.h" |
41 | #include "llassetstorage.h" | 41 | #include "llassetstorage.h" |
42 | #include "llchat.h" | 42 | #include "llchat.h" |
43 | #include "llfeaturemanager.h" | ||
43 | #include "llfocusmgr.h" | 44 | #include "llfocusmgr.h" |
44 | #include "llfontgl.h" | 45 | #include "llfontgl.h" |
45 | #include "llinstantmessage.h" | 46 | #include "llinstantmessage.h" |
@@ -98,6 +99,7 @@ | |||
98 | #include "llfloatergesture.h" | 99 | #include "llfloatergesture.h" |
99 | #include "llfloatergodtools.h" | 100 | #include "llfloatergodtools.h" |
100 | #include "llfloatergroupinfo.h" | 101 | #include "llfloatergroupinfo.h" |
102 | #include "llfloatergroupinvite.h" | ||
101 | #include "llfloatergroups.h" | 103 | #include "llfloatergroups.h" |
102 | #include "llfloaterhtml.h" | 104 | #include "llfloaterhtml.h" |
103 | #include "llfloaterhtmlhelp.h" | 105 | #include "llfloaterhtmlhelp.h" |
@@ -411,7 +413,7 @@ void toggle_debug_menus(void*); | |||
411 | void toggle_map( void* user_data ); | 413 | void toggle_map( void* user_data ); |
412 | void export_info_callback(LLAssetInfo *info, void **user_data, S32 result); | 414 | void export_info_callback(LLAssetInfo *info, void **user_data, S32 result); |
413 | void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result); | 415 | void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result); |
414 | void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result); | 416 | void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status); |
415 | BOOL menu_check_build_tool( void* user_data ); | 417 | BOOL menu_check_build_tool( void* user_data ); |
416 | void handle_reload_settings(void*); | 418 | void handle_reload_settings(void*); |
417 | void focus_here(void*); | 419 | void focus_here(void*); |
@@ -1226,7 +1228,7 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1226 | 1228 | ||
1227 | LLMenuItemCheckGL* item; | 1229 | LLMenuItemCheckGL* item; |
1228 | item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); | 1230 | item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); |
1229 | item->setEnabled(gGLManager.mHasOcclusionQuery); | 1231 | item->setEnabled(gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion")); |
1230 | menu->append(item); | 1232 | menu->append(item); |
1231 | 1233 | ||
1232 | 1234 | ||
@@ -5100,6 +5102,43 @@ class LLToolsLookAtSelection : public view_listener_t | |||
5100 | } | 5102 | } |
5101 | }; | 5103 | }; |
5102 | 5104 | ||
5105 | void callback_invite_to_group(LLUUID group_id, void *user_data) | ||
5106 | { | ||
5107 | std::vector<LLUUID> agent_ids; | ||
5108 | agent_ids.push_back(*(LLUUID *)user_data); | ||
5109 | |||
5110 | LLFloaterGroupInvite::showForGroup(group_id, &agent_ids); | ||
5111 | } | ||
5112 | |||
5113 | void invite_to_group(const LLUUID& dest_id) | ||
5114 | { | ||
5115 | LLViewerObject* dest = gObjectList.findObject(dest_id); | ||
5116 | if(dest && dest->isAvatar()) | ||
5117 | { | ||
5118 | LLFloaterGroupPicker* widget; | ||
5119 | widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); | ||
5120 | if (widget) | ||
5121 | { | ||
5122 | widget->center(); | ||
5123 | widget->setPowersMask(GP_MEMBER_INVITE); | ||
5124 | widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id); | ||
5125 | } | ||
5126 | } | ||
5127 | } | ||
5128 | |||
5129 | class LLAvatarInviteToGroup : public view_listener_t | ||
5130 | { | ||
5131 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
5132 | { | ||
5133 | LLVOAvatar* avatar = find_avatar_from_object( gViewerWindow->lastObjectHit() ); | ||
5134 | if(avatar) | ||
5135 | { | ||
5136 | invite_to_group(avatar->getID()); | ||
5137 | } | ||
5138 | return true; | ||
5139 | } | ||
5140 | }; | ||
5141 | |||
5103 | class LLAvatarAddFriend : public view_listener_t | 5142 | class LLAvatarAddFriend : public view_listener_t |
5104 | { | 5143 | { |
5105 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5144 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -7434,7 +7473,7 @@ class LLViewToggleRenderType : public view_listener_t | |||
7434 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7473 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7435 | { | 7474 | { |
7436 | LLString type = userdata.asString(); | 7475 | LLString type = userdata.asString(); |
7437 | if (type == "particles") | 7476 | if (type == "hideparticles") |
7438 | { | 7477 | { |
7439 | LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); | 7478 | LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); |
7440 | } | 7479 | } |
@@ -7448,7 +7487,7 @@ class LLViewCheckRenderType : public view_listener_t | |||
7448 | { | 7487 | { |
7449 | LLString type = userdata["data"].asString(); | 7488 | LLString type = userdata["data"].asString(); |
7450 | bool new_value = false; | 7489 | bool new_value = false; |
7451 | if (type == "particles") | 7490 | if (type == "hideparticles") |
7452 | { | 7491 | { |
7453 | new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); | 7492 | new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); |
7454 | } | 7493 | } |
@@ -7750,6 +7789,7 @@ void initialize_menus() | |||
7750 | addMenu(new LLAvatarDebug(), "Avatar.Debug"); | 7789 | addMenu(new LLAvatarDebug(), "Avatar.Debug"); |
7751 | addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); | 7790 | addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); |
7752 | addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); | 7791 | addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); |
7792 | addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); | ||
7753 | addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); | 7793 | addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); |
7754 | addMenu(new LLAvatarEject(), "Avatar.Eject"); | 7794 | addMenu(new LLAvatarEject(), "Avatar.Eject"); |
7755 | addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); | 7795 | addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); |
diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index 4d46a8f..031e6d4 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp | |||
@@ -796,7 +796,7 @@ void upload_new_resource(const LLString& src_filename, std::string name, | |||
796 | } | 796 | } |
797 | } | 797 | } |
798 | 798 | ||
799 | void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result) // StoreAssetData callback (fixed) | 799 | void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed) |
800 | { | 800 | { |
801 | LLResourceData* data = (LLResourceData*)user_data; | 801 | LLResourceData* data = (LLResourceData*)user_data; |
802 | //LLAssetType::EType pref_loc = data->mPreferredLocation; | 802 | //LLAssetType::EType pref_loc = data->mPreferredLocation; |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 6bca17e..8f3cd96 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -84,6 +84,7 @@ | |||
84 | #include "llfloatermute.h" | 84 | #include "llfloatermute.h" |
85 | #include "llfloaterpostcard.h" | 85 | #include "llfloaterpostcard.h" |
86 | #include "llfloaterpreference.h" | 86 | #include "llfloaterpreference.h" |
87 | #include "llfloaterreleasemsg.h" | ||
87 | #include "llfollowcam.h" | 88 | #include "llfollowcam.h" |
88 | #include "llgroupnotify.h" | 89 | #include "llgroupnotify.h" |
89 | #include "llhudeffect.h" | 90 | #include "llhudeffect.h" |
@@ -573,6 +574,15 @@ void join_group_callback(S32 option, void* user_data) | |||
573 | LLJoinGroupData* data = (LLJoinGroupData*)user_data; | 574 | LLJoinGroupData* data = (LLJoinGroupData*)user_data; |
574 | BOOL delete_context_data = TRUE; | 575 | BOOL delete_context_data = TRUE; |
575 | bool accept_invite = false; | 576 | bool accept_invite = false; |
577 | |||
578 | if (option == 2 && data && !data->mGroupID.isNull()) | ||
579 | { | ||
580 | LLFloaterGroupInfo::showFromUUID(data->mGroupID); | ||
581 | LLString::format_map_t args; | ||
582 | args["[MESSAGE]"] = data->mMessage; | ||
583 | LLNotifyBox::showXml("JoinGroup", args, &join_group_callback, data); | ||
584 | return; | ||
585 | } | ||
576 | if(option == 0 && data && !data->mGroupID.isNull()) | 586 | if(option == 0 && data && !data->mGroupID.isNull()) |
577 | { | 587 | { |
578 | // check for promotion or demotion. | 588 | // check for promotion or demotion. |
@@ -763,7 +773,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) | |||
763 | //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl; | 773 | //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl; |
764 | // When downloading the initial inventory we get a lot of new items | 774 | // When downloading the initial inventory we get a lot of new items |
765 | // coming in and can't tell that from spam. JC | 775 | // coming in and can't tell that from spam. JC |
766 | if (gStartupState >= STATE_STARTED | 776 | if (LLStartUp::getStartupState() >= STATE_STARTED |
767 | && throttle_count >= OFFER_THROTTLE_MAX_COUNT) | 777 | && throttle_count >= OFFER_THROTTLE_MAX_COUNT) |
768 | { | 778 | { |
769 | if (!throttle_logged) | 779 | if (!throttle_logged) |
@@ -2162,7 +2172,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2162 | { | 2172 | { |
2163 | is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat) | 2173 | is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat) |
2164 | || gMuteListp->isMuted(owner_id); | 2174 | || gMuteListp->isMuted(owner_id); |
2165 | is_linden = gMuteListp->isLinden(from_name); | 2175 | is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name); |
2166 | } | 2176 | } |
2167 | 2177 | ||
2168 | BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); | 2178 | BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); |
@@ -2319,16 +2329,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2319 | } | 2329 | } |
2320 | 2330 | ||
2321 | // truth table: | 2331 | // truth table: |
2322 | // LINDEN BUSY MUTED OWNED_BY_YOU DISPLAY STORE IN HISTORY | 2332 | // LINDEN BUSY MUTED OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY |
2323 | // F F F F Yes Yes | 2333 | // F F F F * Yes Yes |
2324 | // F F F T Yes Yes | 2334 | // F F F T * Yes Yes |
2325 | // F F T F No No | 2335 | // F F T F * No No |
2326 | // F F T T No No | 2336 | // F F T T * No No |
2327 | // F T F F No Yes | 2337 | // F T F F * No Yes |
2328 | // F T F T Yes Yes | 2338 | // F T F T * Yes Yes |
2329 | // F T T F No No | 2339 | // F T T F * No No |
2330 | // F T T T No No | 2340 | // F T T T * No No |
2331 | // T * * * Yes Yes | 2341 | // T * * * F Yes Yes |
2332 | 2342 | ||
2333 | chat.mMuted = is_muted && !is_linden; | 2343 | chat.mMuted = is_muted && !is_linden; |
2334 | 2344 | ||
@@ -2427,47 +2437,103 @@ public: | |||
2427 | { | 2437 | { |
2428 | LLIsType is_landmark(LLAssetType::AT_LANDMARK); | 2438 | LLIsType is_landmark(LLAssetType::AT_LANDMARK); |
2429 | LLIsType is_card(LLAssetType::AT_CALLINGCARD); | 2439 | LLIsType is_card(LLAssetType::AT_CALLINGCARD); |
2430 | LLInventoryModel::cat_array_t cats; | 2440 | |
2431 | LLInventoryModel::item_array_t items; | 2441 | LLInventoryModel::cat_array_t card_cats; |
2442 | LLInventoryModel::item_array_t card_items; | ||
2443 | LLInventoryModel::cat_array_t land_cats; | ||
2444 | LLInventoryModel::item_array_t land_items; | ||
2445 | |||
2432 | folder_ref_t::iterator it = mCompleteFolders.begin(); | 2446 | folder_ref_t::iterator it = mCompleteFolders.begin(); |
2433 | folder_ref_t::iterator end = mCompleteFolders.end(); | 2447 | folder_ref_t::iterator end = mCompleteFolders.end(); |
2434 | for(; it != end; ++it) | 2448 | for(; it != end; ++it) |
2435 | { | 2449 | { |
2436 | gInventory.collectDescendentsIf( | 2450 | gInventory.collectDescendentsIf( |
2437 | (*it), | 2451 | (*it), |
2438 | cats, | 2452 | land_cats, |
2439 | items, | 2453 | land_items, |
2440 | LLInventoryModel::EXCLUDE_TRASH, | 2454 | LLInventoryModel::EXCLUDE_TRASH, |
2441 | is_landmark); | 2455 | is_landmark); |
2442 | gInventory.collectDescendentsIf( | 2456 | gInventory.collectDescendentsIf( |
2443 | (*it), | 2457 | (*it), |
2444 | cats, | 2458 | card_cats, |
2445 | items, | 2459 | card_items, |
2446 | LLInventoryModel::EXCLUDE_TRASH, | 2460 | LLInventoryModel::EXCLUDE_TRASH, |
2447 | is_card); | 2461 | is_card); |
2448 | } | 2462 | } |
2449 | S32 count = items.count(); | 2463 | LLString::format_map_t args; |
2450 | for(S32 i = 0; i < count; ++i) | 2464 | if ( land_items.count() > 0 ) |
2451 | { | 2465 | { // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory |
2452 | LLString::format_map_t args; | 2466 | S32 random_land = ll_rand( land_items.count() - 1 ); |
2453 | args["[NAME]"] = items[i]->getName(); | 2467 | args["[NAME]"] = land_items[random_land]->getName(); |
2454 | switch(items[i]->getType()) | 2468 | LLNotifyBox::showXml("TeleportToLandmark",args); |
2455 | { | 2469 | } |
2456 | case LLAssetType::AT_LANDMARK: | 2470 | if ( card_items.count() > 0 ) |
2457 | LLNotifyBox::showXml("TeleportToLandmark",args); | 2471 | { // Show notification that they can now contact people. Use a random calling card from the inventory |
2458 | break; | 2472 | S32 random_card = ll_rand( card_items.count() - 1 ); |
2459 | case LLAssetType::AT_CALLINGCARD: | 2473 | args["[NAME]"] = card_items[random_card]->getName(); |
2460 | LLNotifyBox::showXml("TeleportToPerson",args); | 2474 | LLNotifyBox::showXml("TeleportToPerson",args); |
2461 | break; | ||
2462 | default: | ||
2463 | break; | ||
2464 | } | ||
2465 | } | 2475 | } |
2476 | |||
2466 | gInventory.removeObserver(this); | 2477 | gInventory.removeObserver(this); |
2467 | delete this; | 2478 | delete this; |
2468 | } | 2479 | } |
2469 | }; | 2480 | }; |
2470 | 2481 | ||
2482 | |||
2483 | |||
2484 | class LLPostTeleportNotifiers : public LLEventTimer | ||
2485 | { | ||
2486 | public: | ||
2487 | LLPostTeleportNotifiers(); | ||
2488 | virtual ~LLPostTeleportNotifiers(); | ||
2489 | |||
2490 | //function to be called at the supplied frequency | ||
2491 | virtual BOOL tick(); | ||
2492 | }; | ||
2493 | |||
2494 | LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 ) | ||
2495 | { | ||
2496 | }; | ||
2497 | |||
2498 | LLPostTeleportNotifiers::~LLPostTeleportNotifiers() | ||
2499 | { | ||
2500 | } | ||
2501 | |||
2502 | BOOL LLPostTeleportNotifiers::tick() | ||
2503 | { | ||
2504 | BOOL all_done = FALSE; | ||
2505 | if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) | ||
2506 | { | ||
2507 | // get callingcards and landmarks available to the user arriving. | ||
2508 | LLInventoryFetchDescendentsObserver::folder_ref_t folders; | ||
2509 | LLUUID folder_id; | ||
2510 | folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); | ||
2511 | if(folder_id.notNull()) | ||
2512 | folders.push_back(folder_id); | ||
2513 | folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); | ||
2514 | if(folder_id.notNull()) | ||
2515 | folders.push_back(folder_id); | ||
2516 | if(!folders.empty()) | ||
2517 | { | ||
2518 | LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea; | ||
2519 | fetcher->fetchDescendents(folders); | ||
2520 | if(fetcher->isEverythingComplete()) | ||
2521 | { | ||
2522 | fetcher->done(); | ||
2523 | } | ||
2524 | else | ||
2525 | { | ||
2526 | gInventory.addObserver(fetcher); | ||
2527 | } | ||
2528 | } | ||
2529 | all_done = TRUE; | ||
2530 | } | ||
2531 | |||
2532 | return all_done; | ||
2533 | } | ||
2534 | |||
2535 | |||
2536 | |||
2471 | // Teleport notification from the simulator | 2537 | // Teleport notification from the simulator |
2472 | // We're going to pretend to be a new agent | 2538 | // We're going to pretend to be a new agent |
2473 | void process_teleport_finish(LLMessageSystem* msg, void**) | 2539 | void process_teleport_finish(LLMessageSystem* msg, void**) |
@@ -2513,26 +2579,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**) | |||
2513 | { | 2579 | { |
2514 | gAgent.setHomePosRegion(region_handle, pos); | 2580 | gAgent.setHomePosRegion(region_handle, pos); |
2515 | 2581 | ||
2516 | // get callingcards and landmarks available to the user arriving. | 2582 | // Create a timer that will send notices when teleporting is all finished. Since this is |
2517 | LLInventoryFetchDescendentsObserver::folder_ref_t folders; | 2583 | // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked. |
2518 | LLUUID folder_id; | 2584 | new LLPostTeleportNotifiers(); |
2519 | folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); | ||
2520 | if(folder_id.notNull()) folders.push_back(folder_id); | ||
2521 | folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); | ||
2522 | if(folder_id.notNull()) folders.push_back(folder_id); | ||
2523 | if(!folders.empty()) | ||
2524 | { | ||
2525 | LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea; | ||
2526 | fetcher->fetchDescendents(folders); | ||
2527 | if(fetcher->isEverythingComplete()) | ||
2528 | { | ||
2529 | fetcher->done(); | ||
2530 | } | ||
2531 | else | ||
2532 | { | ||
2533 | gInventory.addObserver(fetcher); | ||
2534 | } | ||
2535 | } | ||
2536 | } | 2585 | } |
2537 | 2586 | ||
2538 | LLHost sim_host(sim_ip, sim_port); | 2587 | LLHost sim_host(sim_ip, sim_port); |
@@ -2632,6 +2681,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) | |||
2632 | msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); | 2681 | msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); |
2633 | U64 region_handle; | 2682 | U64 region_handle; |
2634 | msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); | 2683 | msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); |
2684 | |||
2685 | char version_channel_char[MAX_STRING]; | ||
2686 | msg->getString("SimData", "ChannelVersion", MAX_STRING, version_channel_char); | ||
2635 | 2687 | ||
2636 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | 2688 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); |
2637 | if (!avatarp) | 2689 | if (!avatarp) |
@@ -2765,6 +2817,23 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) | |||
2765 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 2817 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
2766 | msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun()); | 2818 | msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun()); |
2767 | gAgent.sendReliableMessage(); | 2819 | gAgent.sendReliableMessage(); |
2820 | |||
2821 | |||
2822 | LLString version_channel = LLString(version_channel_char); | ||
2823 | |||
2824 | if (gLastVersionChannel != version_channel) | ||
2825 | { | ||
2826 | //show release message if not on initial login | ||
2827 | if (!gLastVersionChannel.empty()) | ||
2828 | { | ||
2829 | gLastVersionChannel = version_channel; | ||
2830 | LLFloaterReleaseMsg::show(); | ||
2831 | } | ||
2832 | else { | ||
2833 | gLastVersionChannel = version_channel; | ||
2834 | } | ||
2835 | } | ||
2836 | |||
2768 | } | 2837 | } |
2769 | 2838 | ||
2770 | void process_crossed_region(LLMessageSystem* msg, void**) | 2839 | void process_crossed_region(LLMessageSystem* msg, void**) |
@@ -4006,12 +4075,10 @@ void process_alert_core(const char* buffer, BOOL modal) | |||
4006 | else if( !strcmp( buffer, "Home position set." ) ) | 4075 | else if( !strcmp( buffer, "Home position set." ) ) |
4007 | { | 4076 | { |
4008 | // save the home location image to disk | 4077 | // save the home location image to disk |
4009 | char temp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ | 4078 | LLString snap_filename = gDirUtilp->getLindenUserDir(); |
4010 | strncpy(temp_str, gDirUtilp->getLindenUserDir().c_str(), LL_MAX_PATH -1); /* Flawfinder: ignore */ | 4079 | snap_filename += gDirUtilp->getDirDelimiter(); |
4011 | temp_str[LL_MAX_PATH -1] = '\0'; | 4080 | snap_filename += SCREEN_HOME_FILENAME; |
4012 | strcat(temp_str, "/"); /* Flawfinder: ignore */ | 4081 | gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE); |
4013 | strcat(temp_str,SCREEN_HOME_FILENAME); /* Flawfinder: ignore */ | ||
4014 | gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE); | ||
4015 | } | 4082 | } |
4016 | 4083 | ||
4017 | // Translate system messages here. | 4084 | // Translate system messages here. |
@@ -4562,7 +4629,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**) | |||
4562 | msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason); | 4629 | msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason); |
4563 | 4630 | ||
4564 | LLStringBase<char>::format_map_t args; | 4631 | LLStringBase<char>::format_map_t args; |
4565 | args["[REASON]"] = LLAgent::sTeleportErrorMessages[reason]; | 4632 | LLString big_reason = LLAgent::sTeleportErrorMessages[reason]; |
4633 | if ( big_reason.size() > 0 ) | ||
4634 | { // Substitute verbose reason from the local map | ||
4635 | args["[REASON]"] = big_reason; | ||
4636 | } | ||
4637 | else | ||
4638 | { // Nothing found in the map - use what the server returned | ||
4639 | args["[REASON]"] = reason; | ||
4640 | } | ||
4641 | |||
4566 | gViewerWindow->alertXml("CouldNotTeleportReason", args); | 4642 | gViewerWindow->alertXml("CouldNotTeleportReason", args); |
4567 | 4643 | ||
4568 | if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE ) | 4644 | if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE ) |
@@ -5027,7 +5103,7 @@ void process_load_url(LLMessageSystem* msg, void**) | |||
5027 | } | 5103 | } |
5028 | 5104 | ||
5029 | 5105 | ||
5030 | void callback_download_complete(void** data, S32 result) | 5106 | void callback_download_complete(void** data, S32 result, LLExtStat ext_status) |
5031 | { | 5107 | { |
5032 | LLString* filepath = (LLString*)data; | 5108 | LLString* filepath = (LLString*)data; |
5033 | LLString::format_map_t args; | 5109 | LLString::format_map_t args; |
@@ -5164,7 +5240,7 @@ void callbackCacheEstateOwnerName( | |||
5164 | void onCovenantLoadComplete(LLVFS *vfs, | 5240 | void onCovenantLoadComplete(LLVFS *vfs, |
5165 | const LLUUID& asset_uuid, | 5241 | const LLUUID& asset_uuid, |
5166 | LLAssetType::EType type, | 5242 | LLAssetType::EType type, |
5167 | void* user_data, S32 status) | 5243 | void* user_data, S32 status, LLExtStat ext_status) |
5168 | { | 5244 | { |
5169 | llinfos << "onCovenantLoadComplete()" << llendl; | 5245 | llinfos << "onCovenantLoadComplete()" << llendl; |
5170 | std::string covenant_text; | 5246 | std::string covenant_text; |
diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h index 14f2cda..7042324 100644 --- a/linden/indra/newview/llviewermessage.h +++ b/linden/indra/newview/llviewermessage.h | |||
@@ -180,7 +180,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**); | |||
180 | void onCovenantLoadComplete(LLVFS *vfs, | 180 | void onCovenantLoadComplete(LLVFS *vfs, |
181 | const LLUUID& asset_uuid, | 181 | const LLUUID& asset_uuid, |
182 | LLAssetType::EType type, | 182 | LLAssetType::EType type, |
183 | void* user_data, S32 status); | 183 | void* user_data, S32 status, LLExtStat ext_status); |
184 | void callbackCacheEstateOwnerName( | 184 | void callbackCacheEstateOwnerName( |
185 | const LLUUID& id, | 185 | const LLUUID& id, |
186 | const char* first, | 186 | const char* first, |
@@ -219,3 +219,4 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**); | |||
219 | 219 | ||
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | |||
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index f8095b8..ec81146 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp | |||
@@ -2438,7 +2438,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) | |||
2438 | LLXferManager::HIGH_PRIORITY); | 2438 | LLXferManager::HIGH_PRIORITY); |
2439 | } | 2439 | } |
2440 | 2440 | ||
2441 | void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code) | 2441 | void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status) |
2442 | { | 2442 | { |
2443 | LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data; | 2443 | LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data; |
2444 | LLViewerObject* object = NULL; | 2444 | LLViewerObject* object = NULL; |
diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h index fcb246c..09b1d57 100644 --- a/linden/indra/newview/llviewerobject.h +++ b/linden/indra/newview/llviewerobject.h | |||
@@ -539,7 +539,7 @@ protected: | |||
539 | // inventory functionality | 539 | // inventory functionality |
540 | // | 540 | // |
541 | 541 | ||
542 | static void processTaskInvFile(void** user_data, S32 error_code); | 542 | static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status); |
543 | void loadTaskInvFile(const char* filename); | 543 | void loadTaskInvFile(const char* filename); |
544 | void doInventoryCallback(); | 544 | void doInventoryCallback(); |
545 | 545 | ||
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 9f008a4..f8c20a3 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -654,13 +654,33 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) | |||
654 | 654 | ||
655 | std::vector<LLViewerObject*> kill_list; | 655 | std::vector<LLViewerObject*> kill_list; |
656 | S32 num_active_objects = 0; | 656 | S32 num_active_objects = 0; |
657 | LLViewerObject *objectp = NULL; | ||
657 | 658 | ||
659 | // Make a copy of the list in case something in idleUpdate() messes with it | ||
660 | std::vector<LLViewerObject*> idle_list; | ||
661 | idle_list.reserve( mActiveObjects.size() ); | ||
662 | |||
663 | for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); | ||
664 | active_iter != mActiveObjects.end(); active_iter++) | ||
665 | { | ||
666 | objectp = *active_iter; | ||
667 | if (objectp) | ||
668 | { | ||
669 | idle_list.push_back( objectp ); | ||
670 | } | ||
671 | else | ||
672 | { // There shouldn't be any NULL pointers in the list, but they have caused | ||
673 | // crashes before. This may be idleUpdate() messing with the list. | ||
674 | llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; | ||
675 | } | ||
676 | } | ||
677 | |||
658 | if (gSavedSettings.getBOOL("FreezeTime")) | 678 | if (gSavedSettings.getBOOL("FreezeTime")) |
659 | { | 679 | { |
660 | for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin(); | 680 | for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin(); |
661 | iter != mActiveObjects.end(); iter++) | 681 | iter != idle_list.end(); iter++) |
662 | { | 682 | { |
663 | LLViewerObject *objectp = *iter; | 683 | objectp = *iter; |
664 | if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS || | 684 | if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS || |
665 | objectp->isAvatar()) | 685 | objectp->isAvatar()) |
666 | { | 686 | { |
@@ -670,10 +690,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) | |||
670 | } | 690 | } |
671 | else | 691 | else |
672 | { | 692 | { |
673 | for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin(); | 693 | for (std::vector<LLViewerObject*>::iterator idle_iter = idle_list.begin(); |
674 | iter != mActiveObjects.end(); iter++) | 694 | idle_iter != idle_list.end(); idle_iter++) |
675 | { | 695 | { |
676 | LLViewerObject *objectp = *iter; | 696 | objectp = *idle_iter; |
677 | if (!objectp->idleUpdate(agent, world, frame_time)) | 697 | if (!objectp->idleUpdate(agent, world, frame_time)) |
678 | { | 698 | { |
679 | // If Idle Update returns false, kill object! | 699 | // If Idle Update returns false, kill object! |
@@ -684,10 +704,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) | |||
684 | num_active_objects++; | 704 | num_active_objects++; |
685 | } | 705 | } |
686 | } | 706 | } |
687 | for (std::vector<LLViewerObject*>::iterator iter = kill_list.begin(); | 707 | for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin(); |
688 | iter != kill_list.end(); iter++) | 708 | kill_iter != kill_list.end(); kill_iter++) |
689 | { | 709 | { |
690 | LLViewerObject *objectp = *iter; | 710 | objectp = *kill_iter; |
691 | killObject(objectp); | 711 | killObject(objectp); |
692 | } | 712 | } |
693 | } | 713 | } |
@@ -1099,6 +1119,8 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce | |||
1099 | iter != pick_drawables.end(); iter++) | 1119 | iter != pick_drawables.end(); iter++) |
1100 | { | 1120 | { |
1101 | LLDrawable* drawablep = *iter; | 1121 | LLDrawable* drawablep = *iter; |
1122 | if( !drawablep ) | ||
1123 | continue; | ||
1102 | 1124 | ||
1103 | LLViewerObject* last_objectp = NULL; | 1125 | LLViewerObject* last_objectp = NULL; |
1104 | for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++) | 1126 | for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++) |
diff --git a/linden/indra/newview/llviewerprecompiledheaders.h b/linden/indra/newview/llviewerprecompiledheaders.h index 632fa22..f5a66a7 100644 --- a/linden/indra/newview/llviewerprecompiledheaders.h +++ b/linden/indra/newview/llviewerprecompiledheaders.h | |||
@@ -109,7 +109,7 @@ | |||
109 | #include "llthread.h" | 109 | #include "llthread.h" |
110 | #include "lltimer.h" | 110 | #include "lltimer.h" |
111 | #include "lluuidhashmap.h" | 111 | #include "lluuidhashmap.h" |
112 | //#include "llversion.h" | 112 | //#include "llversionviewer.h" |
113 | //#include "processor.h" | 113 | //#include "processor.h" |
114 | #include "stdenums.h" | 114 | #include "stdenums.h" |
115 | #include "stdtypes.h" | 115 | #include "stdtypes.h" |
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 0a21e45..6378b01 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp | |||
@@ -1207,9 +1207,9 @@ public: | |||
1207 | llinfos << "BaseCapabilitiesComplete::error " | 1207 | llinfos << "BaseCapabilitiesComplete::error " |
1208 | << statusNum << ": " << reason << llendl; | 1208 | << statusNum << ": " << reason << llendl; |
1209 | 1209 | ||
1210 | if (STATE_SEED_GRANTED_WAIT == gStartupState) | 1210 | if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) |
1211 | { | 1211 | { |
1212 | gStartupState = STATE_SEED_CAP_GRANTED; | 1212 | LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); |
1213 | } | 1213 | } |
1214 | } | 1214 | } |
1215 | 1215 | ||
@@ -1223,9 +1223,9 @@ public: | |||
1223 | << iter->first << llendl; | 1223 | << iter->first << llendl; |
1224 | } | 1224 | } |
1225 | 1225 | ||
1226 | if (STATE_SEED_GRANTED_WAIT == gStartupState) | 1226 | if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) |
1227 | { | 1227 | { |
1228 | gStartupState = STATE_SEED_CAP_GRANTED; | 1228 | LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); |
1229 | } | 1229 | } |
1230 | } | 1230 | } |
1231 | 1231 | ||
@@ -1275,6 +1275,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url) | |||
1275 | capabilityNames.append("ParcelVoiceInfoRequest"); | 1275 | capabilityNames.append("ParcelVoiceInfoRequest"); |
1276 | capabilityNames.append("ChatSessionRequest"); | 1276 | capabilityNames.append("ChatSessionRequest"); |
1277 | capabilityNames.append("ProvisionVoiceAccountRequest"); | 1277 | capabilityNames.append("ProvisionVoiceAccountRequest"); |
1278 | capabilityNames.append("ServerReleaseNotes"); | ||
1279 | capabilityNames.append("CopyInventoryFromNotecard"); | ||
1278 | 1280 | ||
1279 | llinfos << "posting to seed " << url << llendl; | 1281 | llinfos << "posting to seed " << url << llendl; |
1280 | 1282 | ||
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 3369125..754132d 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -55,6 +55,68 @@ | |||
55 | 55 | ||
56 | extern BOOL gPacificDaylightTime; | 56 | extern BOOL gPacificDaylightTime; |
57 | 57 | ||
58 | ///---------------------------------------------------------------------------- | ||
59 | /// Class LLEmbeddedNotecardOpener | ||
60 | ///---------------------------------------------------------------------------- | ||
61 | class LLEmbeddedNotecardOpener : public LLInventoryCallback | ||
62 | { | ||
63 | LLViewerTextEditor* mTextEditor; | ||
64 | |||
65 | public: | ||
66 | LLEmbeddedNotecardOpener() | ||
67 | : mTextEditor(NULL) | ||
68 | { | ||
69 | } | ||
70 | |||
71 | void setEditor(LLViewerTextEditor* e) {mTextEditor = e;} | ||
72 | |||
73 | // override | ||
74 | void fire(const LLUUID& inv_item) | ||
75 | { | ||
76 | if(!mTextEditor) | ||
77 | { | ||
78 | // The parent text editor may have vanished by now. | ||
79 | // In that case just quit. | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | LLInventoryItem* item = gInventory.getItem(inv_item); | ||
84 | if(!item) | ||
85 | { | ||
86 | llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl; | ||
87 | } | ||
88 | else | ||
89 | { | ||
90 | // See if we can bring an existing preview to the front | ||
91 | if(!LLPreview::show(item->getUUID(), true)) | ||
92 | { | ||
93 | if(!gSavedSettings.getBOOL("ShowNewInventory")) | ||
94 | { | ||
95 | // There isn't one, so make a new preview | ||
96 | S32 left, top; | ||
97 | gFloaterView->getNewFloaterPosition(&left, &top); | ||
98 | LLRect rect = gSavedSettings.getRect("NotecardEditorRect"); | ||
99 | rect.translate(left - rect.mLeft, top - rect.mTop); | ||
100 | LLPreviewNotecard* preview; | ||
101 | preview = new LLPreviewNotecard("preview notecard", | ||
102 | rect, | ||
103 | LLString("Embedded Note: ") + item->getName(), | ||
104 | item->getUUID(), | ||
105 | LLUUID::null, | ||
106 | item->getAssetUUID(), | ||
107 | true, | ||
108 | (LLViewerInventoryItem*)item); | ||
109 | preview->setSourceID(LLUUID::null); | ||
110 | preview->setFocus(TRUE); | ||
111 | |||
112 | // Force to be entirely onscreen. | ||
113 | gFloaterView->adjustToFitScreen(preview, FALSE); | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | }; | ||
119 | |||
58 | //////////////////////////////////////////////////////////// | 120 | //////////////////////////////////////////////////////////// |
59 | // LLEmbeddedItems | 121 | // LLEmbeddedItems |
60 | // | 122 | // |
@@ -497,14 +559,21 @@ LLViewerTextEditor::LLViewerTextEditor(const LLString& name, | |||
497 | const LLFontGL* font, | 559 | const LLFontGL* font, |
498 | BOOL allow_embedded_items) | 560 | BOOL allow_embedded_items) |
499 | : LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items), | 561 | : LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items), |
500 | mDragItemSaved(FALSE) | 562 | mDragItemSaved(FALSE), |
563 | mInventoryCallback(new LLEmbeddedNotecardOpener) | ||
501 | { | 564 | { |
502 | mEmbeddedItemList = new LLEmbeddedItems(this); | 565 | mEmbeddedItemList = new LLEmbeddedItems(this); |
566 | mInventoryCallback->setEditor(this); | ||
503 | } | 567 | } |
504 | 568 | ||
505 | LLViewerTextEditor::~LLViewerTextEditor() | 569 | LLViewerTextEditor::~LLViewerTextEditor() |
506 | { | 570 | { |
507 | delete mEmbeddedItemList; | 571 | delete mEmbeddedItemList; |
572 | |||
573 | |||
574 | // The inventory callback may still be in use by gInventoryCallbackManager... | ||
575 | // so set its reference to this to null. | ||
576 | mInventoryCallback->setEditor(NULL); | ||
508 | } | 577 | } |
509 | 578 | ||
510 | /////////////////////////////////////////////////////////////////// | 579 | /////////////////////////////////////////////////////////////////// |
@@ -1279,22 +1348,14 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item ) | |||
1279 | open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE); | 1348 | open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE); |
1280 | } | 1349 | } |
1281 | 1350 | ||
1282 | |||
1283 | void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved ) | 1351 | void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved ) |
1284 | { | 1352 | { |
1285 | if (saved) | 1353 | if (saved) |
1286 | { | 1354 | { |
1287 | // Pop-up the notecard floater. | 1355 | // An LLInventoryItem needs to be in an inventory to be opened. |
1288 | // Note: Previously would copy to inventory and rely on autodisplay to view. | 1356 | // This will give the item to the viewer's agent. |
1289 | // Now that autodisplay can be turned off, we need to make this case display always. | 1357 | // The callback will attempt to open it if its not already opened. |
1290 | // besides, there's no point adding to inventory -MG | 1358 | copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback)); |
1291 | open_notecard( | ||
1292 | (LLViewerInventoryItem*)item, | ||
1293 | LLString("Embedded Note: ") + item->getName(), // title | ||
1294 | mObjectID, | ||
1295 | FALSE, // show_keep_discard | ||
1296 | LLUUID::null, // source_id | ||
1297 | TRUE); // take_focus | ||
1298 | } | 1359 | } |
1299 | else | 1360 | else |
1300 | { | 1361 | { |
@@ -1369,11 +1430,11 @@ bool LLViewerTextEditor::importStream(std::istream& str) | |||
1369 | return success; | 1430 | return success; |
1370 | } | 1431 | } |
1371 | 1432 | ||
1372 | void LLViewerTextEditor::copyInventory(LLInventoryItem* item) | 1433 | void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback_id) |
1373 | { | 1434 | { |
1374 | copy_inventory_from_notecard(mObjectID, | 1435 | copy_inventory_from_notecard(mObjectID, |
1375 | mNotecardInventoryID, | 1436 | mNotecardInventoryID, |
1376 | item); | 1437 | item, callback_id); |
1377 | } | 1438 | } |
1378 | 1439 | ||
1379 | bool LLViewerTextEditor::hasEmbeddedInventory() | 1440 | bool LLViewerTextEditor::hasEmbeddedInventory() |
diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h index 1dbc7b6..230ce3e 100644 --- a/linden/indra/newview/llviewertexteditor.h +++ b/linden/indra/newview/llviewertexteditor.h | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | class LLInventoryItem; | 34 | class LLInventoryItem; |
35 | class LLEmbeddedItems; | 35 | class LLEmbeddedItems; |
36 | 36 | class LLEmbeddedNotecardOpener; | |
37 | 37 | ||
38 | // | 38 | // |
39 | // Classes | 39 | // Classes |
@@ -86,7 +86,7 @@ public: | |||
86 | // Appends Second Life time, small font, grey | 86 | // Appends Second Life time, small font, grey |
87 | // If this starts a line, you need to prepend a newline. | 87 | // If this starts a line, you need to prepend a newline. |
88 | 88 | ||
89 | void copyInventory(LLInventoryItem* item); | 89 | void copyInventory(const LLInventoryItem* item, U32 callback_id = 0); |
90 | 90 | ||
91 | // returns true if there is embedded inventory. | 91 | // returns true if there is embedded inventory. |
92 | // *HACK: This is only useful because the notecard verifier may | 92 | // *HACK: This is only useful because the notecard verifier may |
@@ -123,6 +123,8 @@ protected: | |||
123 | 123 | ||
124 | LLUUID mObjectID; | 124 | LLUUID mObjectID; |
125 | LLUUID mNotecardInventoryID; | 125 | LLUUID mNotecardInventoryID; |
126 | |||
127 | LLPointer<LLEmbeddedNotecardOpener> mInventoryCallback; | ||
126 | }; | 128 | }; |
127 | 129 | ||
128 | #endif // LL_VIEWERTEXTEDITOR_H | 130 | #endif // LL_VIEWERTEXTEDITOR_H |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 13a4c41..fb52827 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -1305,7 +1305,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) | |||
1305 | { | 1305 | { |
1306 | if (!gQuit) | 1306 | if (!gQuit) |
1307 | { | 1307 | { |
1308 | if (gStartupState >= STATE_STARTED) | 1308 | if (LLStartUp::getStartupState() >= STATE_STARTED) |
1309 | { | 1309 | { |
1310 | // if we're in world, show a progress bar to hide reloading of textures | 1310 | // if we're in world, show a progress bar to hide reloading of textures |
1311 | llinfos << "Restoring GL during activate" << llendl; | 1311 | llinfos << "Restoring GL during activate" << llendl; |
@@ -2746,27 +2746,11 @@ BOOL LLViewerWindow::handlePerFrameHover() | |||
2746 | 2746 | ||
2747 | gPipeline.sRenderProcessBeacons = FALSE; | 2747 | gPipeline.sRenderProcessBeacons = FALSE; |
2748 | KEY key = gKeyboard->currentKey(); | 2748 | KEY key = gKeyboard->currentKey(); |
2749 | if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || (gFloaterTools && gFloaterTools->getVisible()) || gSavedSettings.getBOOL("BeaconAlwaysOn")) | 2749 | if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || gSavedSettings.getBOOL("BeaconAlwaysOn")) |
2750 | { | 2750 | { |
2751 | gPipeline.sRenderProcessBeacons = TRUE; | 2751 | gPipeline.sRenderProcessBeacons = TRUE; |
2752 | } | 2752 | } |
2753 | 2753 | ||
2754 | /* | ||
2755 | // Show joints while in edit mode and hold down alt key. | ||
2756 | if (gHUDManager) | ||
2757 | { | ||
2758 | BOOL menuOption = gSavedSettings.getBOOL("AltShowsPhysical"); | ||
2759 | if (menuOption | ||
2760 | || (gFloaterTools && gFloaterTools->getVisible())) | ||
2761 | { | ||
2762 | gHUDManager->toggleShowPhysical( mask & MASK_ALT ); | ||
2763 | } | ||
2764 | else | ||
2765 | { | ||
2766 | gHUDManager->toggleShowPhysical( FALSE ); | ||
2767 | } | ||
2768 | } | ||
2769 | */ | ||
2770 | BOOL handled = FALSE; | 2754 | BOOL handled = FALSE; |
2771 | 2755 | ||
2772 | BOOL handled_by_top_ctrl = FALSE; | 2756 | BOOL handled_by_top_ctrl = FALSE; |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3b9e8ea..456adfc 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -1372,6 +1372,7 @@ void LLVOAvatar::initClass() | |||
1372 | if (!skeleton_node) | 1372 | if (!skeleton_node) |
1373 | { | 1373 | { |
1374 | llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl; | 1374 | llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl; |
1375 | return; | ||
1375 | } | 1376 | } |
1376 | 1377 | ||
1377 | LLString skeleton_file_name; | 1378 | LLString skeleton_file_name; |
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 8a0e0dd..9e1c90a 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp | |||
@@ -1339,7 +1339,7 @@ void LLVoiceClient::stateMachine() | |||
1339 | CloseHandle(pinfo.hThread); // stops leaks - nothing else | 1339 | CloseHandle(pinfo.hThread); // stops leaks - nothing else |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | delete args2; | 1342 | delete[] args2; |
1343 | #else // LL_WINDOWS | 1343 | #else // LL_WINDOWS |
1344 | // This should be the same for mac and linux | 1344 | // This should be the same for mac and linux |
1345 | { | 1345 | { |
diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp index fca2226..2c64e46 100644 --- a/linden/indra/newview/llvoicevisualizer.cpp +++ b/linden/indra/newview/llvoicevisualizer.cpp | |||
@@ -1,3 +1,31 @@ | |||
1 | /** | ||
2 | * @file llvoicevisualizer.cpp | ||
3 | * @brief Draws in-world speaking indicators. | ||
4 | * | ||
5 | * Copyright (c) 2000-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
1 | //---------------------------------------------------------------------- | 29 | //---------------------------------------------------------------------- |
2 | // Voice Visualizer | 30 | // Voice Visualizer |
3 | // author: JJ Ventrella | 31 | // author: JJ Ventrella |
diff --git a/linden/indra/newview/llvoicevisualizer.h b/linden/indra/newview/llvoicevisualizer.h index ea53372..9cd0465 100644 --- a/linden/indra/newview/llvoicevisualizer.h +++ b/linden/indra/newview/llvoicevisualizer.h | |||
@@ -1,3 +1,31 @@ | |||
1 | /** | ||
2 | * @file llvoicevisualizer.h | ||
3 | * @brief Draws in-world speaking indicators. | ||
4 | * | ||
5 | * Copyright (c) 2000-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
1 | //-------------------------------------------------------------------- | 29 | //-------------------------------------------------------------------- |
2 | // | 30 | // |
3 | // VOICE VISUALIZER | 31 | // VOICE VISUALIZER |
diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp index 791b4ab..ad65a55 100644 --- a/linden/indra/newview/llvopartgroup.cpp +++ b/linden/indra/newview/llvopartgroup.cpp | |||
@@ -478,7 +478,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) | |||
478 | buffer->getTexCoordStrider(texcoordsp); | 478 | buffer->getTexCoordStrider(texcoordsp); |
479 | buffer->getIndexStrider(indicesp); | 479 | buffer->getIndexStrider(indicesp); |
480 | 480 | ||
481 | std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[mRenderPass]; | 481 | LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass]; |
482 | 482 | ||
483 | for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i) | 483 | for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i) |
484 | { | 484 | { |
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index 442ef23..32a8cac 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "llvosky.h" | 31 | #include "llvosky.h" |
32 | 32 | ||
33 | #include "imageids.h" | 33 | #include "imageids.h" |
34 | #include "llfeaturemanager.h" | ||
34 | #include "llviewercontrol.h" | 35 | #include "llviewercontrol.h" |
35 | #include "llframetimer.h" | 36 | #include "llframetimer.h" |
36 | #include "timing.h" | 37 | #include "timing.h" |
@@ -597,7 +598,7 @@ void LLVOSky::initCubeMap() | |||
597 | { | 598 | { |
598 | mCubeMap->init(images); | 599 | mCubeMap->init(images); |
599 | } | 600 | } |
600 | else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap) | 601 | else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) |
601 | { | 602 | { |
602 | mCubeMap = new LLCubeMap(); | 603 | mCubeMap = new LLCubeMap(); |
603 | mCubeMap->init(images); | 604 | mCubeMap->init(images); |
@@ -634,7 +635,8 @@ void LLVOSky::restoreGL() | |||
634 | 635 | ||
635 | calcBrightnessScaleAndColors(); | 636 | calcBrightnessScaleAndColors(); |
636 | 637 | ||
637 | if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap) | 638 | if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap |
639 | && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) | ||
638 | { | 640 | { |
639 | LLCubeMap* cube_map = getCubeMap(); | 641 | LLCubeMap* cube_map = getCubeMap(); |
640 | 642 | ||
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index a0a83f5..4656eda 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -2086,7 +2086,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, | |||
2086 | } | 2086 | } |
2087 | 2087 | ||
2088 | //add face to drawmap | 2088 | //add face to drawmap |
2089 | std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[type]; | 2089 | LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type]; |
2090 | 2090 | ||
2091 | S32 idx = draw_vec.size()-1; | 2091 | S32 idx = draw_vec.size()-1; |
2092 | 2092 | ||
@@ -2111,7 +2111,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, | |||
2111 | U32 end = start + facep->getGeomCount()-1; | 2111 | U32 end = start + facep->getGeomCount()-1; |
2112 | U32 offset = facep->getIndicesStart(); | 2112 | U32 offset = facep->getIndicesStart(); |
2113 | U32 count = facep->getIndicesCount(); | 2113 | U32 count = facep->getIndicesCount(); |
2114 | LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex, | 2114 | LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex, |
2115 | facep->mVertexBuffer, fullbright, bump); | 2115 | facep->mVertexBuffer, fullbright, bump); |
2116 | draw_info->mVSize = facep->getVirtualSize(); | 2116 | draw_info->mVSize = facep->getVirtualSize(); |
2117 | draw_vec.push_back(draw_info); | 2117 | draw_vec.push_back(draw_info); |
@@ -2151,7 +2151,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, | |||
2151 | U32 end = start + facep->getGeomCount()-1; | 2151 | U32 end = start + facep->getGeomCount()-1; |
2152 | U32 offset = facep->getIndicesStart(); | 2152 | U32 offset = facep->getIndicesStart(); |
2153 | U32 count = facep->getIndicesCount(); | 2153 | U32 count = facep->getIndicesCount(); |
2154 | LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex, | 2154 | LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex, |
2155 | facep->mVertexBuffer, fullbright, bump); | 2155 | facep->mVertexBuffer, fullbright, bump); |
2156 | draw_info->mVSize = facep->getVirtualSize(); | 2156 | draw_info->mVSize = facep->getVirtualSize(); |
2157 | draw_vec.push_back(draw_info); | 2157 | draw_vec.push_back(draw_info); |
diff --git a/linden/indra/newview/llwearable.cpp b/linden/indra/newview/llwearable.cpp index 4dc3080..6db871c 100644 --- a/linden/indra/newview/llwearable.cpp +++ b/linden/indra/newview/llwearable.cpp | |||
@@ -934,7 +934,7 @@ void LLWearable::saveNewAsset() | |||
934 | } | 934 | } |
935 | 935 | ||
936 | // static | 936 | // static |
937 | void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status) // StoreAssetData callback (fixed) | 937 | void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) |
938 | { | 938 | { |
939 | LLWearableSaveData* data = (LLWearableSaveData*)userdata; | 939 | LLWearableSaveData* data = (LLWearableSaveData*)userdata; |
940 | const char* type_name = LLWearable::typeToTypeName(data->mType); | 940 | const char* type_name = LLWearable::typeToTypeName(data->mType); |
@@ -1003,3 +1003,4 @@ void LLWearable::dump() | |||
1003 | } | 1003 | } |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | |||
diff --git a/linden/indra/newview/llwearable.h b/linden/indra/newview/llwearable.h index 1e953f5..41e9ed2 100644 --- a/linden/indra/newview/llwearable.h +++ b/linden/indra/newview/llwearable.h | |||
@@ -108,7 +108,7 @@ public: | |||
108 | static LLAssetType::EType typeToAssetType( EWearableType wearable_type ); | 108 | static LLAssetType::EType typeToAssetType( EWearableType wearable_type ); |
109 | 109 | ||
110 | void saveNewAsset(); | 110 | void saveNewAsset(); |
111 | static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status ); | 111 | static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status ); |
112 | 112 | ||
113 | BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item ); | 113 | BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item ); |
114 | 114 | ||
diff --git a/linden/indra/newview/llwearablelist.cpp b/linden/indra/newview/llwearablelist.cpp index b345ab0..8c56727 100644 --- a/linden/indra/newview/llwearablelist.cpp +++ b/linden/indra/newview/llwearablelist.cpp | |||
@@ -93,7 +93,7 @@ void LLWearableList::getAsset( const LLAssetID& assetID, const LLString& wearabl | |||
93 | } | 93 | } |
94 | 94 | ||
95 | // static | 95 | // static |
96 | void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status ) | 96 | void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status ) |
97 | { | 97 | { |
98 | BOOL success = FALSE; | 98 | BOOL success = FALSE; |
99 | LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; | 99 | LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; |
diff --git a/linden/indra/newview/llwearablelist.h b/linden/indra/newview/llwearablelist.h index 632f5af..3627685 100644 --- a/linden/indra/newview/llwearablelist.h +++ b/linden/indra/newview/llwearablelist.h | |||
@@ -59,7 +59,7 @@ public: | |||
59 | LLWearable* createNewWearable( EWearableType type ); | 59 | LLWearable* createNewWearable( EWearableType type ); |
60 | 60 | ||
61 | // Pseudo-private | 61 | // Pseudo-private |
62 | static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status); | 62 | static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status); |
63 | 63 | ||
64 | protected: | 64 | protected: |
65 | LLPtrSkipMap< const LLUUID, LLWearable* > mList; | 65 | LLPtrSkipMap< const LLUUID, LLWearable* > mList; |
diff --git a/linden/indra/newview/lsl_guide.html b/linden/indra/newview/lsl_guide.html index 33c2499..98b2c4c 100644 --- a/linden/indra/newview/lsl_guide.html +++ b/linden/indra/newview/lsl_guide.html | |||
@@ -3843,6 +3843,7 @@ talk_about_inventory(integer type) | |||
3843 | llSay(0, "No more inventory items"); | 3843 | llSay(0, "No more inventory items"); |
3844 | continue = FALSE; | 3844 | continue = FALSE; |
3845 | } | 3845 | } |
3846 | i++; | ||
3846 | } while(continue); | 3847 | } while(continue); |
3847 | } | 3848 | } |
3848 | </PRE | 3849 | </PRE |
@@ -15055,16 +15056,6 @@ HREF="#AEN5604" | |||
15055 | >. | 15056 | >. |
15056 | If <CODE | 15057 | If <CODE |
15057 | CLASS="parameter" | 15058 | CLASS="parameter" |
15058 | <<<<<<< .working | ||
15059 | ======= | ||
15060 | >linknumber</CODE | ||
15061 | > is <A | ||
15062 | HREF="#AEN5604" | ||
15063 | >LINK_SET</A | ||
15064 | >, set the alpha of | ||
15065 | all objects in the linked set. If <CODE | ||
15066 | CLASS="parameter" | ||
15067 | >>>>>>> .merge-right.r59207 | ||
15068 | >face</CODE | 15059 | >face</CODE |
15069 | > is | 15060 | > is |
15070 | <A | 15061 | <A |
@@ -15116,16 +15107,6 @@ HREF="#AEN5604" | |||
15116 | >. | 15107 | >. |
15117 | If <CODE | 15108 | If <CODE |
15118 | CLASS="parameter" | 15109 | CLASS="parameter" |
15119 | <<<<<<< .working | ||
15120 | ======= | ||
15121 | >linknumber</CODE | ||
15122 | > is <A | ||
15123 | HREF="#AEN5604" | ||
15124 | >LINK_SET</A | ||
15125 | >, set the color of | ||
15126 | all objects in the linked set. If <CODE | ||
15127 | CLASS="parameter" | ||
15128 | >>>>>>> .merge-right.r59207 | ||
15129 | >face</CODE | 15110 | >face</CODE |
15130 | > is | 15111 | > is |
15131 | <A | 15112 | <A |
@@ -15153,7 +15134,6 @@ NAME="AEN3915" | |||
15153 | ><CODE | 15134 | ><CODE |
15154 | ><CODE | 15135 | ><CODE |
15155 | CLASS="FUNCDEF" | 15136 | CLASS="FUNCDEF" |
15156 | <<<<<<< .working | ||
15157 | >llSetLinkPrimitiveParams</CODE | 15137 | >llSetLinkPrimitiveParams</CODE |
15158 | >(integer linknumber, list rules);</CODE | 15138 | >(integer linknumber, list rules);</CODE |
15159 | ></P | 15139 | ></P |
@@ -15253,109 +15233,6 @@ NAME="AEN3950" | |||
15253 | ><CODE | 15233 | ><CODE |
15254 | ><CODE | 15234 | ><CODE |
15255 | CLASS="FUNCDEF" | 15235 | CLASS="FUNCDEF" |
15256 | ======= | ||
15257 | >llSetLinkPrimitiveParams</CODE | ||
15258 | >(integer linknumber, list rules);</CODE | ||
15259 | ></P | ||
15260 | ><P | ||
15261 | ></P | ||
15262 | ></DIV | ||
15263 | ><P | ||
15264 | >Sets the primitive parameters of the linked child | ||
15265 | specified by <CODE | ||
15266 | CLASS="parameter" | ||
15267 | >linknumber</CODE | ||
15268 | >. A value of 0 means | ||
15269 | no link, 1 the root, 2 for first child, etc. If | ||
15270 | <CODE | ||
15271 | CLASS="parameter" | ||
15272 | >linknumber</CODE | ||
15273 | > is <A | ||
15274 | HREF="#AEN5604" | ||
15275 | >LINK_SET</A | ||
15276 | >, set the primitive parameters | ||
15277 | of all objects in the linked set. The <CODE | ||
15278 | CLASS="parameter" | ||
15279 | >rules</CODE | ||
15280 | > | ||
15281 | list is identical to that of | ||
15282 | <A | ||
15283 | HREF="#AEN4008" | ||
15284 | >llSetPrimitiveParams</A | ||
15285 | >.</P | ||
15286 | ></DIV | ||
15287 | ><DIV | ||
15288 | CLASS="section" | ||
15289 | ><HR><H2 | ||
15290 | CLASS="section" | ||
15291 | ><A | ||
15292 | NAME="AEN3929" | ||
15293 | >A.235. llSetLinkTexture</A | ||
15294 | ></H2 | ||
15295 | ><DIV | ||
15296 | CLASS="funcsynopsis" | ||
15297 | ><P | ||
15298 | ></P | ||
15299 | ><A | ||
15300 | NAME="AEN3931" | ||
15301 | ></A | ||
15302 | ><P | ||
15303 | ><CODE | ||
15304 | ><CODE | ||
15305 | CLASS="FUNCDEF" | ||
15306 | >llSetLinkTexture</CODE | ||
15307 | >(integer linknumber, string texture, integer face);</CODE | ||
15308 | ></P | ||
15309 | ><P | ||
15310 | ></P | ||
15311 | ></DIV | ||
15312 | ><P | ||
15313 | >Sets the <CODE | ||
15314 | CLASS="parameter" | ||
15315 | >texture</CODE | ||
15316 | > of the linked child | ||
15317 | specified by <CODE | ||
15318 | CLASS="parameter" | ||
15319 | >linknumber</CODE | ||
15320 | >. A value of 0 means | ||
15321 | no link, 1 the root, 2 for first child, etc. If | ||
15322 | <CODE | ||
15323 | CLASS="parameter" | ||
15324 | >linknumber</CODE | ||
15325 | > is <A | ||
15326 | HREF="#AEN5604" | ||
15327 | >LINK_SET</A | ||
15328 | >, set the texture of | ||
15329 | all objects in the linked set. If <CODE | ||
15330 | CLASS="parameter" | ||
15331 | >face</CODE | ||
15332 | > is | ||
15333 | <A | ||
15334 | HREF="#AEN6061" | ||
15335 | >ALL_SIDES</A | ||
15336 | >, set the texture | ||
15337 | of all faces.</P | ||
15338 | ></DIV | ||
15339 | ><DIV | ||
15340 | CLASS="section" | ||
15341 | ><HR><H2 | ||
15342 | CLASS="section" | ||
15343 | ><A | ||
15344 | NAME="AEN3948" | ||
15345 | >A.236. llSetLocalRot</A | ||
15346 | ></H2 | ||
15347 | ><DIV | ||
15348 | CLASS="funcsynopsis" | ||
15349 | ><P | ||
15350 | ></P | ||
15351 | ><A | ||
15352 | NAME="AEN3950" | ||
15353 | ></A | ||
15354 | ><P | ||
15355 | ><CODE | ||
15356 | ><CODE | ||
15357 | CLASS="FUNCDEF" | ||
15358 | >>>>>>> .merge-right.r59207 | ||
15359 | >llSetLocalRot</CODE | 15236 | >llSetLocalRot</CODE |
15360 | >(rotation rot);</CODE | 15237 | >(rotation rot);</CODE |
15361 | ></P | 15238 | ></P |
diff --git a/linden/indra/newview/macview.xcodeproj/project.pbxproj b/linden/indra/newview/macview.xcodeproj/project.pbxproj index 669833e..0594224 100644 --- a/linden/indra/newview/macview.xcodeproj/project.pbxproj +++ b/linden/indra/newview/macview.xcodeproj/project.pbxproj | |||
@@ -585,6 +585,7 @@ | |||
585 | C1F5D0A50B138AEB00827F1D /* lluserrelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C1F5D0A30B138AEB00827F1D /* lluserrelations.cpp */; }; | 585 | C1F5D0A50B138AEB00827F1D /* lluserrelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C1F5D0A30B138AEB00827F1D /* lluserrelations.cpp */; }; |
586 | C64F673F0AFBED80009732B5 /* lllogchat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F673D0AFBED80009732B5 /* lllogchat.cpp */; }; | 586 | C64F673F0AFBED80009732B5 /* lllogchat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F673D0AFBED80009732B5 /* lllogchat.cpp */; }; |
587 | C64F67420AFBED91009732B5 /* lldirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F67400AFBED91009732B5 /* lldirpicker.cpp */; }; | 587 | C64F67420AFBED91009732B5 /* lldirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F67400AFBED91009732B5 /* lldirpicker.cpp */; }; |
588 | D23289B50C453A3600304FEF /* llfloaterreleasemsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */; }; | ||
588 | D62830DB0B4DC76300F8830F /* llimagej2coj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D62830D80B4DC76300F8830F /* llimagej2coj.cpp */; }; | 589 | D62830DB0B4DC76300F8830F /* llimagej2coj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D62830D80B4DC76300F8830F /* llimagej2coj.cpp */; }; |
589 | D645940C0B3B6D9000FAB68F /* libapr-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE8764E09BEA39600AF6316 /* libapr-1.a */; }; | 590 | D645940C0B3B6D9000FAB68F /* libapr-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE8764E09BEA39600AF6316 /* libapr-1.a */; }; |
590 | D645940D0B3B6D9A00FAB68F /* libaprutil-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6C9A5209C773A000AA1849 /* libaprutil-1.a */; }; | 591 | D645940D0B3B6D9A00FAB68F /* libaprutil-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6C9A5209C773A000AA1849 /* libaprutil-1.a */; }; |
@@ -1132,6 +1133,7 @@ | |||
1132 | 26F52AD8051F61DF00A80050 /* llmenucommands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llmenucommands.cpp; sourceTree = SOURCE_ROOT; }; | 1133 | 26F52AD8051F61DF00A80050 /* llmenucommands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llmenucommands.cpp; sourceTree = SOURCE_ROOT; }; |
1133 | 26F52ADA051F61DF00A80050 /* llhudeffectpointat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectpointat.cpp; sourceTree = SOURCE_ROOT; }; | 1134 | 26F52ADA051F61DF00A80050 /* llhudeffectpointat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectpointat.cpp; sourceTree = SOURCE_ROOT; }; |
1134 | 26F52ADB051F61DF00A80050 /* llhudeffectlookat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectlookat.cpp; sourceTree = SOURCE_ROOT; }; | 1135 | 26F52ADB051F61DF00A80050 /* llhudeffectlookat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectlookat.cpp; sourceTree = SOURCE_ROOT; }; |
1136 | 295542580C3B371500025801 /* llversionviewer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llversionviewer.h; sourceTree = "<group>"; }; | ||
1135 | 299F95BE0ADDE5D000C94EEF /* llviewquery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llviewquery.cpp; sourceTree = "<group>"; }; | 1137 | 299F95BE0ADDE5D000C94EEF /* llviewquery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llviewquery.cpp; sourceTree = "<group>"; }; |
1136 | 299F95BF0ADDE5D000C94EEF /* llviewquery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llviewquery.h; sourceTree = "<group>"; }; | 1138 | 299F95BF0ADDE5D000C94EEF /* llviewquery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llviewquery.h; sourceTree = "<group>"; }; |
1137 | 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelgroupnotices.cpp; sourceTree = SOURCE_ROOT; }; | 1139 | 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelgroupnotices.cpp; sourceTree = SOURCE_ROOT; }; |
@@ -1234,7 +1236,6 @@ | |||
1234 | 61922154074A9B58005E1F34 /* llsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llsys.h; sourceTree = "<group>"; }; | 1236 | 61922154074A9B58005E1F34 /* llsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llsys.h; sourceTree = "<group>"; }; |
1235 | 61922155074A9B58005E1F34 /* lltimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lltimer.h; sourceTree = "<group>"; }; | 1237 | 61922155074A9B58005E1F34 /* lltimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lltimer.h; sourceTree = "<group>"; }; |
1236 | 61922158074A9B58005E1F34 /* lluuidhashmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lluuidhashmap.h; sourceTree = "<group>"; }; | 1238 | 61922158074A9B58005E1F34 /* lluuidhashmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lluuidhashmap.h; sourceTree = "<group>"; }; |
1237 | 61922159074A9B58005E1F34 /* llversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llversion.h; sourceTree = "<group>"; }; | ||
1238 | 6192215B074A9B58005E1F34 /* processor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = processor.h; sourceTree = "<group>"; }; | 1239 | 6192215B074A9B58005E1F34 /* processor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = processor.h; sourceTree = "<group>"; }; |
1239 | 6192215C074A9B58005E1F34 /* stdenums.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdenums.h; sourceTree = "<group>"; }; | 1240 | 6192215C074A9B58005E1F34 /* stdenums.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdenums.h; sourceTree = "<group>"; }; |
1240 | 6192215D074A9B58005E1F34 /* stdtypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdtypes.h; sourceTree = "<group>"; }; | 1241 | 6192215D074A9B58005E1F34 /* stdtypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdtypes.h; sourceTree = "<group>"; }; |
@@ -1632,8 +1633,8 @@ | |||
1632 | 993A3E030B546D47007A0790 /* llvoiceclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llvoiceclient.h; sourceTree = "<group>"; }; | 1633 | 993A3E030B546D47007A0790 /* llvoiceclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llvoiceclient.h; sourceTree = "<group>"; }; |
1633 | 993A3E040B546D47007A0790 /* llvoiceclient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvoiceclient.cpp; sourceTree = "<group>"; }; | 1634 | 993A3E040B546D47007A0790 /* llvoiceclient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvoiceclient.cpp; sourceTree = "<group>"; }; |
1634 | 994ADAE20A8016E500061DFB /* libllmozlib.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libllmozlib.dylib; path = "../../libraries/universal-darwin/lib_release/libllmozlib.dylib"; sourceTree = SOURCE_ROOT; }; | 1635 | 994ADAE20A8016E500061DFB /* libllmozlib.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libllmozlib.dylib; path = "../../libraries/universal-darwin/lib_release/libllmozlib.dylib"; sourceTree = SOURCE_ROOT; }; |
1635 | 9956CAFB0B96679C00F58C6D /* llprefsvoice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llprefsvoice.h; sourceTree = "<group>"; }; | 1636 | 9956CAFB0B96679C00F58C6D /* llprefsvoice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = llprefsvoice.h; sourceTree = "<group>"; }; |
1636 | 9956CAFC0B96679C00F58C6D /* llprefsvoice.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; path = llprefsvoice.cpp; sourceTree = "<group>"; }; | 1637 | 9956CAFC0B96679C00F58C6D /* llprefsvoice.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; lineEnding = 0; path = llprefsvoice.cpp; sourceTree = "<group>"; }; |
1637 | 996209680B864D0E00392531 /* SLVoiceAgent.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; name = SLVoiceAgent.app; path = "vivox-runtime/universal-darwin/SLVoiceAgent.app"; sourceTree = SOURCE_ROOT; }; | 1638 | 996209680B864D0E00392531 /* SLVoiceAgent.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; name = SLVoiceAgent.app; path = "vivox-runtime/universal-darwin/SLVoiceAgent.app"; sourceTree = SOURCE_ROOT; }; |
1638 | 9967E9090B37533F0087BD1B /* libfmodwrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libfmodwrapper.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; | 1639 | 9967E9090B37533F0087BD1B /* libfmodwrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libfmodwrapper.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; |
1639 | 9967E9520B37564D0087BD1B /* fmodwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fmodwrapper.cpp; sourceTree = "<group>"; }; | 1640 | 9967E9520B37564D0087BD1B /* fmodwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fmodwrapper.cpp; sourceTree = "<group>"; }; |
@@ -2012,6 +2013,9 @@ | |||
2012 | C64F673E0AFBED80009732B5 /* lllogchat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lllogchat.h; sourceTree = "<group>"; }; | 2013 | C64F673E0AFBED80009732B5 /* lllogchat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lllogchat.h; sourceTree = "<group>"; }; |
2013 | C64F67400AFBED91009732B5 /* lldirpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldirpicker.cpp; sourceTree = "<group>"; }; | 2014 | C64F67400AFBED91009732B5 /* lldirpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldirpicker.cpp; sourceTree = "<group>"; }; |
2014 | C64F67410AFBED91009732B5 /* lldirpicker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lldirpicker.h; sourceTree = "<group>"; }; | 2015 | C64F67410AFBED91009732B5 /* lldirpicker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lldirpicker.h; sourceTree = "<group>"; }; |
2016 | CB162DB40C6CCCFE00BF83BB /* llextendedstatus.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llextendedstatus.h; sourceTree = "<group>"; }; | ||
2017 | D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfloaterreleasemsg.cpp; sourceTree = "<group>"; }; | ||
2018 | D23289B40C453A3600304FEF /* llfloaterreleasemsg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llfloaterreleasemsg.h; sourceTree = "<group>"; }; | ||
2015 | D62830D80B4DC76300F8830F /* llimagej2coj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llimagej2coj.cpp; sourceTree = "<group>"; }; | 2019 | D62830D80B4DC76300F8830F /* llimagej2coj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llimagej2coj.cpp; sourceTree = "<group>"; }; |
2016 | D62830D90B4DC76300F8830F /* llimagej2coj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llimagej2coj.h; sourceTree = "<group>"; }; | 2020 | D62830D90B4DC76300F8830F /* llimagej2coj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llimagej2coj.h; sourceTree = "<group>"; }; |
2017 | D628315B0B4F3FA100F8830F /* llfont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfont.cpp; sourceTree = "<group>"; }; | 2021 | D628315B0B4F3FA100F8830F /* llfont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfont.cpp; sourceTree = "<group>"; }; |
@@ -2397,6 +2401,8 @@ | |||
2397 | 993A3E040B546D47007A0790 /* llvoiceclient.cpp */, | 2401 | 993A3E040B546D47007A0790 /* llvoiceclient.cpp */, |
2398 | ABD8702D0B3C68630007C63B /* llvoavatar.h */, | 2402 | ABD8702D0B3C68630007C63B /* llvoavatar.h */, |
2399 | AB058FE40B3B74AD003C59D8 /* llvoicevisualizer.h */, | 2403 | AB058FE40B3B74AD003C59D8 /* llvoicevisualizer.h */, |
2404 | D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */, | ||
2405 | D23289B40C453A3600304FEF /* llfloaterreleasemsg.h */, | ||
2400 | 1A0DA5100C3AC07700361F49 /* llviewerjointmesh_vec.cpp */, | 2406 | 1A0DA5100C3AC07700361F49 /* llviewerjointmesh_vec.cpp */, |
2401 | 1A0DA5110C3AC07700361F49 /* llviewerjointmesh_sse2.cpp */, | 2407 | 1A0DA5110C3AC07700361F49 /* llviewerjointmesh_sse2.cpp */, |
2402 | 1A0DA5120C3AC07700361F49 /* llviewerjointmesh_sse.cpp */, | 2408 | 1A0DA5120C3AC07700361F49 /* llviewerjointmesh_sse.cpp */, |
@@ -2791,6 +2797,8 @@ | |||
2791 | 6192211E074A9B57005E1F34 /* llcommon */ = { | 2797 | 6192211E074A9B57005E1F34 /* llcommon */ = { |
2792 | isa = PBXGroup; | 2798 | isa = PBXGroup; |
2793 | children = ( | 2799 | children = ( |
2800 | 295542580C3B371500025801 /* llversionviewer.h */, | ||
2801 | CB162DB40C6CCCFE00BF83BB /* llextendedstatus.h */, | ||
2794 | 1A9897E70B98E2F4005C45D7 /* llbase32.h */, | 2802 | 1A9897E70B98E2F4005C45D7 /* llbase32.h */, |
2795 | 1A9897E80B98E2F4005C45D7 /* llbase32.cpp */, | 2803 | 1A9897E80B98E2F4005C45D7 /* llbase32.cpp */, |
2796 | 1A97C4540B8BCF9C00331A24 /* llliveappconfig.cpp */, | 2804 | 1A97C4540B8BCF9C00331A24 /* llliveappconfig.cpp */, |
@@ -2910,7 +2918,6 @@ | |||
2910 | 61922154074A9B58005E1F34 /* llsys.h */, | 2918 | 61922154074A9B58005E1F34 /* llsys.h */, |
2911 | 61922155074A9B58005E1F34 /* lltimer.h */, | 2919 | 61922155074A9B58005E1F34 /* lltimer.h */, |
2912 | 61922158074A9B58005E1F34 /* lluuidhashmap.h */, | 2920 | 61922158074A9B58005E1F34 /* lluuidhashmap.h */, |
2913 | 61922159074A9B58005E1F34 /* llversion.h */, | ||
2914 | 99321B11081DD26000678159 /* llworkerthread.h */, | 2921 | 99321B11081DD26000678159 /* llworkerthread.h */, |
2915 | 99321B12081DD26000678159 /* llworkerthread.cpp */, | 2922 | 99321B12081DD26000678159 /* llworkerthread.cpp */, |
2916 | 6192215B074A9B58005E1F34 /* processor.h */, | 2923 | 6192215B074A9B58005E1F34 /* processor.h */, |
@@ -4620,6 +4627,7 @@ | |||
4620 | 1A0DA5140C3AC07800361F49 /* llviewerjointmesh_sse2.cpp in Sources */, | 4627 | 1A0DA5140C3AC07800361F49 /* llviewerjointmesh_sse2.cpp in Sources */, |
4621 | 1A0DA5150C3AC07800361F49 /* llviewerjointmesh_sse.cpp in Sources */, | 4628 | 1A0DA5150C3AC07800361F49 /* llviewerjointmesh_sse.cpp in Sources */, |
4622 | 79256EA30C57D6A5000AAFA4 /* llfloatervoicewizard.cpp in Sources */, | 4629 | 79256EA30C57D6A5000AAFA4 /* llfloatervoicewizard.cpp in Sources */, |
4630 | D23289B50C453A3600304FEF /* llfloaterreleasemsg.cpp in Sources */, | ||
4623 | ); | 4631 | ); |
4624 | runOnlyForDeploymentPostprocessing = 0; | 4632 | runOnlyForDeploymentPostprocessing = 0; |
4625 | }; | 4633 | }; |
diff --git a/linden/indra/newview/newview.vcproj b/linden/indra/newview/newview.vcproj index 199083f..1ae7f8b 100644 --- a/linden/indra/newview/newview.vcproj +++ b/linden/indra/newview/newview.vcproj | |||
@@ -577,6 +577,9 @@ | |||
577 | RelativePath=".\llfloaterregioninfo.cpp"> | 577 | RelativePath=".\llfloaterregioninfo.cpp"> |
578 | </File> | 578 | </File> |
579 | <File | 579 | <File |
580 | RelativePath=".\llfloaterreleasemsg.cpp"> | ||
581 | </File> | ||
582 | <File | ||
580 | RelativePath=".\llfloaterreporter.cpp"> | 583 | RelativePath=".\llfloaterreporter.cpp"> |
581 | </File> | 584 | </File> |
582 | <File | 585 | <File |
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 16eaa22..8e42504 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -498,7 +498,7 @@ public: | |||
498 | { | 498 | { |
499 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) | 499 | for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) |
500 | { | 500 | { |
501 | for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) | 501 | for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j) |
502 | { | 502 | { |
503 | LLDrawInfo* params = *j; | 503 | LLDrawInfo* params = *j; |
504 | if (mTextures.find(params->mTexture) != mTextures.end()) | 504 | if (mTextures.find(params->mTexture) != mTextures.end()) |
@@ -1651,10 +1651,10 @@ void LLPipeline::postSort(LLCamera& camera) | |||
1651 | } | 1651 | } |
1652 | for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j) | 1652 | for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j) |
1653 | { | 1653 | { |
1654 | std::vector<LLDrawInfo*>& src_vec = j->second; | 1654 | LLSpatialGroup::drawmap_elem_t& src_vec = j->second; |
1655 | std::vector<LLDrawInfo*>& dest_vec = mRenderMap[j->first]; | 1655 | LLSpatialGroup::drawmap_elem_t& dest_vec = mRenderMap[j->first]; |
1656 | 1656 | ||
1657 | for (std::vector<LLDrawInfo*>::iterator k = src_vec.begin(); k != src_vec.end(); ++k) | 1657 | for (LLSpatialGroup::drawmap_elem_t::iterator k = src_vec.begin(); k != src_vec.end(); ++k) |
1658 | { | 1658 | { |
1659 | dest_vec.push_back(*k); | 1659 | dest_vec.push_back(*k); |
1660 | } | 1660 | } |
diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index 218f920..06bfb73 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h | |||
@@ -393,7 +393,7 @@ public: | |||
393 | LLVector3 mSunDir; | 393 | LLVector3 mSunDir; |
394 | 394 | ||
395 | LLSpatialGroup::sg_vector_t mActiveGroups; | 395 | LLSpatialGroup::sg_vector_t mActiveGroups; |
396 | std::vector<LLDrawInfo*> mRenderMap[LLRenderPass::NUM_RENDER_TYPES]; | 396 | LLSpatialGroup::drawmap_elem_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES]; |
397 | std::vector<LLSpatialGroup* > mAlphaGroups; | 397 | std::vector<LLSpatialGroup* > mAlphaGroups; |
398 | std::vector<LLSpatialGroup* > mAlphaGroupsPostWater; | 398 | std::vector<LLSpatialGroup* > mAlphaGroupsPostWater; |
399 | LLSpatialGroup::sg_vector_t mVisibleGroups; | 399 | LLSpatialGroup::sg_vector_t mVisibleGroups; |
diff --git a/linden/indra/newview/prebuild.bat b/linden/indra/newview/prebuild.bat index 139d810..ee714f5 100755 --- a/linden/indra/newview/prebuild.bat +++ b/linden/indra/newview/prebuild.bat | |||
@@ -1,13 +1,15 @@ | |||
1 | @echo off | 1 | @echo off |
2 | 2 | ||
3 | rem -- Check current message template against the master | 3 | rem -- Check current message template against the master |
4 | "../../scripts/template_verifier.py" --mode="development" | 4 | |
5 | "../../scripts/template_verifier.py" --mode="development" --cache_master | ||
6 | |||
5 | if errorlevel 1 goto BuildFailed | 7 | if errorlevel 1 goto BuildFailed |
6 | goto end | 8 | goto end |
7 | 9 | ||
8 | :BuildFailed | 10 | :BuildFailed |
9 | echo PREBUILD FAILED | 11 | echo PREBUILD FAILED |
10 | exit 1 | 12 | exit 1 |
11 | 13 | ||
12 | :end | 14 | :end |
13 | echo PREBUILD SUCCESSFUL | 15 | echo PREBUILD SUCCESSFUL |
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index 86f8c6d..f4d6a8a 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt | |||
@@ -1,11 +1,98 @@ | |||
1 | Release Notes for Second Life 1.18.2(1) September 19, 2007 | 1 | Release Notes for Second Life 1.18.3(2) August 27, 2007 |
2 | ===================================== | 2 | ===================================== |
3 | |||
4 | Changes: | 3 | Changes: |
5 | * Fix URL handler exploit described here: http://blog.secondlife.com/2007/09/18/second-life-url-handler-exploit/ | 4 | * Altered beacon behavior |
6 | * Update voice components to improve quality and address VWR-1532 | 5 | ** The beacon shaft is always drawn |
7 | * Add name of viewer release channel to embedded browser agent ID string | 6 | ** The arrow is drawn if the lateral distance to the location being tracked is less than your view distance |
7 | ** The text appears if the total distance to the location being tracked is less than your view distance | ||
8 | * Changed Bug Reporting links to http:// instead of https:// | ||
9 | * Build mode no longer automatically turns on beacons | ||
10 | * Removed 'Ping User' in statistics window (was returning 0, as userserver no longer exists) | ||
11 | * Removed 'Open' menu option when clothing is selected (as 'Wear' is available) | ||
12 | * Added minimize button to Inventory | ||
13 | |||
14 | LSL changes: | ||
15 | * Ability to get details about an object by object key: | ||
16 | ** list llGetObjectDetails(key id, list params) | ||
17 | *** id = the key of the object to get info about. | ||
18 | *** params = a list of the object details requested: [OBJECT_NAME, OBJECT_OWNER] | ||
19 | *** returns a list of values in the order requested: [ "Object_Name", <the UUID key of the owner>] | ||
20 | **** OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type. | ||
21 | **** OBJECT_NAME Used with llGetObjectDetails to get an object's name. | ||
22 | **** OBJECT_DESC Used with llGetObjectDetails to get an object's description. | ||
23 | **** OBJECT_POS Used with llGetObjectDetails to get an object's position. | ||
24 | **** OBJECT_ROT Used with llGetObjectDetails to get an object's rotation. | ||
25 | **** OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity. | ||
26 | **** OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned. | ||
27 | **** OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key. | ||
28 | **** OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key. | ||
8 | 29 | ||
30 | Bug fixes: | ||
31 | * Fixed inworld map region search failing if a space is included after the region name | ||
32 | * Fixed Appearance editor preview squares after changing tabs | ||
33 | * Fixed a bug with LODs for sculpted prims | ||
34 | * Fixed flexy causes llTargetOmega child objects to not rotate | ||
35 | * Fixed an incorrect Support link | ||
36 | * Fixed clipboard capture on login screen's config info | ||
37 | * Fixed web browser widget shows up blank when connecting via https | ||
38 | * Fixed doubleclicking text entry fields should select a single word first, then the entire field | ||
39 | * Fixed items renamed from Recent Items not displaying the correct name in All Items | ||
40 | * Fixed physical memory calls with more than 4GB of memory | ||
41 | * Fixed viewer crash by clicking Connect button repeatedly | ||
42 | * Fixed crash in viewer when receiving bad HUD Effects | ||
43 | * Fixed a Linux client crash | ||
44 | * Fixed client on 64-bit Linux systems that cannot find their GL drivers | ||
45 | * Improved Linux client threading | ||
46 | * Improved client performance after closing an inventory folder with a large number of items | ||
47 | * CID-633: Possible string overflow (and generally lame code) | ||
48 | * CID-634: Possible string overflow (and generally lame code) | ||
49 | * CID-639: Possible use of uninitialized mouse co-ordinates | ||
50 | * CID-641: LLToolGrab::onMouseCaptureLost() doesn't check that projectPosAgentToScreen succeeded | ||
51 | * CID-698: LLFloaterTexturePicker::isDirty() is not correctly overriding ancestor | ||
52 | * SVC-300: Spam upon TP out of Help Island Public, per calling card and landmark | ||
53 | * VWR-1079: Group Notice dialog: message text can't be copied and pasted | ||
54 | * VWR-1187: Profile > Classifieds tab shows confirmation dialog when no changes are made | ||
55 | * VWR-1225: Embedded notecards not functioning | ||
56 | * VWR-1230: Text highlighting in Chat History window is cancelled when history scrolls | ||
57 | * VWR-1372: Sculpt prim topology reverts to sphere unexpectedly | ||
58 | * VWR-1398: Appearance editor's previews do not render correctly (1.17.2) | ||
59 | * VWR-1460: Can not see permissions of objects in Buy Contents window when item has long name | ||
60 | * VWR-1564: Viewer crashes when started with the "-local" argument. | ||
61 | * VWR-1566: An attempt to fix the glDrawRangeElements crashes (refcount LLDrawInfo ) | ||
62 | * VWR-1567: Change the default item name for "snapshot to inventory" to something more usefull than "snapshot" | ||
63 | * VWR-1638: confused viewer - displays login and regular menus and buttons | ||
64 | * VWR-1640: login retires cause LLFrameStatView::setup() to seg fault | ||
65 | * VWR-1647: "Show end of last IM conversation" in Preferences/Communication automatically remains checked after OK-ing unchecked | ||
66 | * VWR-1699: Sculpt map preview inaccurate | ||
67 | * VWR-1714: Folders flashing in Inventory window with Filters and 'Always show folders' checked | ||
68 | * VWR-1721: GUI quirk in groups | ||
69 | * VWR-1722: Profiles are editable in two places (including Search browser) | ||
70 | * VWR-1736: Add a Invite to Group option to the Avatar Pie Menu | ||
71 | * VWR-1743: LLFloaterGroups source code inconsistencies | ||
72 | * VWR-1761: Group Invite Suggestion--add 'view group info' to invite dialog box | ||
73 | * VWR-1808: Possible crash in llviewerobjectlist | ||
74 | * VWR-1823: Bad typecast for 64 bit systems, llagent llfloatercustomize | ||
75 | * VWR-1861: Renaming items in inventory folders does not update item sort order | ||
76 | * VWR-1872: An attempt to fix the "empty inventory trash" crashes | ||
77 | * VWR-1880: Modify "Ctrl-F" to call Search/Replace Dialog when invoked inside Script Window | ||
78 | * VWR-1891: Detect a Debian bulid-host, as is done for Fedora | ||
79 | * VWR-1892: Use pkgconfig for more libraries in the standalone build | ||
80 | * VWR-1942: An error in the do-while example of the LSL Scripting Guide could cause infinite looping. | ||
81 | * VWR-1951: Hide Particles is not working from the View > Beacons menu item | ||
82 | * VWR-1968: Possible crash in llmultigesture.cpp | ||
83 | * VWR-1976: Solaris' fprintf segfaults on NULL arguments | ||
84 | * VWR-1987: Segfault on startup if audio doesn't initialize. | ||
85 | * VWR-2036: Build tools floater does not remember its position on restart | ||
86 | * VWR-2144: Client crashes when deleting unsaved gestures | ||
87 | * VWR-2152: Possible crash in llviewerobjectlist | ||
88 | * VWR-240: Cannot input Japanese characters from keyboard on Linux | ||
89 | * VWR-423: Selecting group charter text causes Apply/Ignore/Cancel popup even if the text wasn't changed | ||
90 | * VWR-493: Objects with "Linden" in their name can't be muted | ||
91 | * VWR-493: Statistics bar, Packet Loss: % sign is doubled | ||
92 | * VWR-749: Bandwidth indicator: Kbps, should not have capital k | ||
93 | * VWR-819: Open the "More>>" section of the edit tools by default and persist it across sessions | ||
94 | * VWR-866: Sculpties suffer HORRIBLY from JPEG artifacts | ||
95 | * VWR-942: logRanOffEndOfPacket is too terse when it logs packet data, add some more info | ||
9 | 96 | ||
10 | Release Notes for Second Life 1.18.2(0) August 10, 2007 | 97 | Release Notes for Second Life 1.18.2(0) August 10, 2007 |
11 | ===================================== | 98 | ===================================== |
diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index e5f4f5d..78267b8 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc | |||
@@ -227,8 +227,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur" | |||
227 | // | 227 | // |
228 | 228 | ||
229 | VS_VERSION_INFO VERSIONINFO | 229 | VS_VERSION_INFO VERSIONINFO |
230 | FILEVERSION 1,18,2,1 | 230 | FILEVERSION 1,18,3,2 |
231 | PRODUCTVERSION 1,18,2,1 | 231 | PRODUCTVERSION 1,18,3,2 |
232 | FILEFLAGSMASK 0x3fL | 232 | FILEFLAGSMASK 0x3fL |
233 | #ifdef _DEBUG | 233 | #ifdef _DEBUG |
234 | FILEFLAGS 0x1L | 234 | FILEFLAGS 0x1L |
@@ -245,12 +245,12 @@ BEGIN | |||
245 | BEGIN | 245 | BEGIN |
246 | VALUE "CompanyName", "Linden Lab" | 246 | VALUE "CompanyName", "Linden Lab" |
247 | VALUE "FileDescription", "Second Life" | 247 | VALUE "FileDescription", "Second Life" |
248 | VALUE "FileVersion", "1.18.2.1" | 248 | VALUE "FileVersion", "1.18.3.2" |
249 | VALUE "InternalName", "Second Life" | 249 | VALUE "InternalName", "Second Life" |
250 | VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." | 250 | VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." |
251 | VALUE "OriginalFilename", "SecondLife.exe" | 251 | VALUE "OriginalFilename", "SecondLife.exe" |
252 | VALUE "ProductName", "Second Life" | 252 | VALUE "ProductName", "Second Life" |
253 | VALUE "ProductVersion", "1.18.2.1" | 253 | VALUE "ProductVersion", "1.18.3.2" |
254 | END | 254 | END |
255 | END | 255 | END |
256 | BLOCK "VarFileInfo" | 256 | BLOCK "VarFileInfo" |
diff --git a/linden/indra/newview/secondlife setup build release candidate.bat b/linden/indra/newview/secondlife setup build release candidate.bat new file mode 100644 index 0000000..e2bdbf3 --- /dev/null +++ b/linden/indra/newview/secondlife setup build release candidate.bat | |||
@@ -0,0 +1,4 @@ | |||
1 | @rem Invoke the script which preps then runs the installer. | ||
2 | @rem This batch file is customized per grid. | ||
3 | |||
4 | @"secondlife setup build.bat" --channel="Second Life Release Candidate" | ||
diff --git a/linden/indra/newview/skins/textures/textures.xml b/linden/indra/newview/skins/textures/textures.xml index 1c02ce4..ccf0834 100644 --- a/linden/indra/newview/skins/textures/textures.xml +++ b/linden/indra/newview/skins/textures/textures.xml | |||
@@ -394,6 +394,7 @@ | |||
394 | <oi_hud_mov_3_0.tga value="f5ff1f08-4c92-8606-1854-cc5b9d3e445c"/> | 394 | <oi_hud_mov_3_0.tga value="f5ff1f08-4c92-8606-1854-cc5b9d3e445c"/> |
395 | <oi_hud_mov_1_2.tga value="1e3abeed-e893-c44e-1f9d-5ecc76d21e5d"/> | 395 | <oi_hud_mov_1_2.tga value="1e3abeed-e893-c44e-1f9d-5ecc76d21e5d"/> |
396 | <oi_hud_mov_1_0.tga value="e300fc95-aa94-8e31-c501-ce903cac8b7c"/> | 396 | <oi_hud_mov_1_0.tga value="e300fc95-aa94-8e31-c501-ce903cac8b7c"/> |
397 | <eng_lng_1_0.jpg value="5fcaac05-0677-b208-e715-983ebf01d16f"/> | ||
397 | <circle.tga value="0498c309-5306-43cd-82a2-ae31d096cdef"/> | 398 | <circle.tga value="0498c309-5306-43cd-82a2-ae31d096cdef"/> |
398 | <mute_icon.tga value="37c8e000-6aa2-41ef-8f86-e0c2e60bfa42"/> | 399 | <mute_icon.tga value="37c8e000-6aa2-41ef-8f86-e0c2e60bfa42"/> |
399 | <active_speakers.tga value="c97bdfb5-b0da-4741-877c-7c1553957d30"/> | 400 | <active_speakers.tga value="c97bdfb5-b0da-4741-877c-7c1553957d30"/> |
diff --git a/linden/indra/newview/skins/xui/en-us/alerts.xml b/linden/indra/newview/skins/xui/en-us/alerts.xml index d294ae8..3030b78 100644 --- a/linden/indra/newview/skins/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/xui/en-us/alerts.xml | |||
@@ -3429,6 +3429,11 @@ spaceserver hiccup. | |||
3429 | OK | 3429 | OK |
3430 | </option> | 3430 | </option> |
3431 | </alert> | 3431 | </alert> |
3432 | <alert modal="true" name="ProblemAddingEstateManager"> | ||
3433 | <message name="message"> | ||
3434 | Problems adding a new estate manager. One or more estates may have a full manager list. | ||
3435 | </message> | ||
3436 | </alert> | ||
3432 | <alert modal="true" name="UnableToLoadNotecard"> | 3437 | <alert modal="true" name="UnableToLoadNotecard"> |
3433 | <message name="message"> | 3438 | <message name="message"> |
3434 | Unable to load notecard's asset at this time. | 3439 | Unable to load notecard's asset at this time. |
diff --git a/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml b/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml index 2cea9e7..c54b5de 100644 --- a/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml +++ b/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" |
3 | can_resize="false" height="440" min_height="140" min_width="300" | 3 | can_resize="false" height="463" min_height="140" min_width="300" |
4 | name="Image Preview" title="" width="300"> | 4 | name="Image Preview" title="" width="300"> |
5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="name_label"> | 5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="name_label"> |
6 | Name: | 6 | Name: |
@@ -53,6 +53,10 @@ Unable to read image. | |||
53 | 53 | ||
54 | Try saving image as 24 bit Targa (.tga). | 54 | Try saving image as 24 bit Targa (.tga). |
55 | </text> | 55 | </text> |
56 | <check_box bottom="37" follows="bottom|left" enabled="false" | ||
57 | font="SansSerifSmall" height="16" initial_value="false" | ||
58 | label="Use lossless compression" left="10" | ||
59 | left_delta="2" name="lossless_check" control_name="LosslessJ2CUpload" width="280" /> | ||
56 | <button bottom="10" follows="bottom|right" height="20" label="Cancel" left="182" | 60 | <button bottom="10" follows="bottom|right" height="20" label="Cancel" left="182" |
57 | name="cancel_btn" width="64" /> | 61 | name="cancel_btn" width="64" /> |
58 | <button bottom="10" follows="bottom|left" height="20" label="Upload (L$[AMOUNT])" | 62 | <button bottom="10" follows="bottom|left" height="20" label="Upload (L$[AMOUNT])" |
diff --git a/linden/indra/newview/skins/xui/en-us/floater_inventory.xml b/linden/indra/newview/skins/xui/en-us/floater_inventory.xml index ffed294..3b1cb87 100644 --- a/linden/indra/newview/skins/xui/en-us/floater_inventory.xml +++ b/linden/indra/newview/skins/xui/en-us/floater_inventory.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <floater bottom="-720" can_close="true" can_drag_on_left="false" can_minimize="false" | 1 | <floater bottom="-720" can_close="true" can_drag_on_left="false" can_minimize="true" |
2 | can_resize="true" height="563" hidden="false" left="882" min_height="150" | 2 | can_resize="true" height="563" hidden="false" left="882" min_height="150" |
3 | min_width="240" mouse_opaque="true" name="Inventory" | 3 | min_width="240" mouse_opaque="true" name="Inventory" |
4 | rect_control="FloaterInventoryRect" title="Inventory" width="467"> | 4 | rect_control="FloaterInventoryRect" title="Inventory" width="467"> |
diff --git a/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml b/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml new file mode 100644 index 0000000..5daa44b --- /dev/null +++ b/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | ||
3 | height="500" min_height="300" min_width="300" name="floaterreleasemessage" | ||
4 | title="Entering Region" width="700"> | ||
5 | <button bottom="10" follows="bottom|right" font="SansSerifSmall" height="20" | ||
6 | label="Close" name="close_btn" right="-10" width="50" /> | ||
7 | <web_browser bottom="40" follows="top|left|bottom|right" font="SansSerifSmall" left="15" | ||
8 | name="release_message_floater_browser" right="-15" top="-30" /> | ||
9 | <text hidden="true" name="in-world_help_title">In-World Help</text> | ||
10 | <text hidden="true" name="in-world_help_url"> | ||
11 | http://www.secondlife.com/app/support/inworld.html | ||
12 | </text> | ||
13 | <text hidden="true" name="additional_help_title">Additional Help</text> | ||
14 | <text hidden="true" name="additional_help_url"> | ||
15 | http://www.secondlife.com/app/support/support.html | ||
16 | </text> | ||
17 | </floater> \ No newline at end of file | ||
diff --git a/linden/indra/newview/skins/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/xui/en-us/floater_tools.xml index 305a5ef..edd84cc 100644 --- a/linden/indra/newview/skins/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/xui/en-us/floater_tools.xml | |||
@@ -855,10 +855,35 @@ | |||
855 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" | 855 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" |
856 | hidden="false" increment="0.1" initial_val="1" left_delta="73" max_val="4" | 856 | hidden="false" increment="0.1" initial_val="1" left_delta="73" max_val="4" |
857 | min_val="1" mouse_opaque="true" name="Revolutions" width="68" /> | 857 | min_val="1" mouse_opaque="true" name="Revolutions" width="68" /> |
858 | <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" | 858 | <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" |
859 | default_image_name="Default" follows="left|top" height="141" hidden="false" | 859 | default_image_name="Default" follows="left|top" height="141" hidden="false" |
860 | label="Sculpt Texture" left="121" mouse_opaque="true" name="sculpt texture control" | 860 | label="Sculpt Texture" left="121" mouse_opaque="true" name="sculpt texture control" |
861 | tool_tip="Click to choose a picture" width="141" /> | 861 | tool_tip="Click to choose a picture" width="141" visible="false"/> |
862 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
863 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | ||
864 | font="SansSerifSmall" h_pad="0" align="left" height="10" hidden="false" | ||
865 | left="121" mouse_opaque="true" name="label sculpt type" v_pad="0" width="121" visible="false"> | ||
866 | Stitching type | ||
867 | </text> | ||
868 | <combo_box allow_text_entry="false" bottom_delta="-24" follows="left|top" height="18" | ||
869 | hidden="false" left="121" max_chars="20" mouse_opaque="true" | ||
870 | name="sculpt type control" width="141" visible="false"> | ||
871 | <combo_item name="None" value="None" hidden="false"> | ||
872 | (none) | ||
873 | </combo_item> | ||
874 | <combo_item name="Sphere" value="Sphere"> | ||
875 | Sphere | ||
876 | </combo_item> | ||
877 | <combo_item name="Torus" value="Torus"> | ||
878 | Torus | ||
879 | </combo_item> | ||
880 | <combo_item name="Plane" value="Plane"> | ||
881 | Plane | ||
882 | </combo_item> | ||
883 | <combo_item name="Cylinder" value="Cylinder"> | ||
884 | Cylinder | ||
885 | </combo_item> | ||
886 | </combo_box> | ||
862 | </panel> | 887 | </panel> |
863 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" | 888 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" |
864 | hidden="false" label="Features" left="1" mouse_opaque="false" | 889 | hidden="false" label="Features" left="1" mouse_opaque="false" |
diff --git a/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml b/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml index 91e27b7..b2280e2 100644 --- a/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml +++ b/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml | |||
@@ -28,11 +28,14 @@ | |||
28 | <on_click function="Avatar.Freeze" /> | 28 | <on_click function="Avatar.Freeze" /> |
29 | <on_enable function="Avatar.EnableFreezeEject" /> | 29 | <on_enable function="Avatar.EnableFreezeEject" /> |
30 | </menu_item_call> | 30 | </menu_item_call> |
31 | <menu_item_separator /> | ||
32 | <menu_item_call enabled="false" hidden="false" label="Give Card" mouse_opaque="true" | 31 | <menu_item_call enabled="false" hidden="false" label="Give Card" mouse_opaque="true" |
33 | name="Give Card"> | 32 | name="Give Card"> |
34 | <on_click function="Avatar.GiveCard" /> | 33 | <on_click function="Avatar.GiveCard" /> |
35 | </menu_item_call> | 34 | </menu_item_call> |
35 | <menu_item_call enabled="true" hidden="false" label="Group Invite..." mouse_opaque="true" | ||
36 | name="Invite..."> | ||
37 | <on_click function="Avatar.InviteToGroup" /> | ||
38 | </menu_item_call> | ||
36 | <menu_item_separator /> | 39 | <menu_item_separator /> |
37 | <menu_item_call enabled="false" hidden="false" label="Eject..." mouse_opaque="true" | 40 | <menu_item_call enabled="false" hidden="false" label="Eject..." mouse_opaque="true" |
38 | name="Eject..."> | 41 | name="Eject..."> |
diff --git a/linden/indra/newview/skins/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/xui/en-us/menu_viewer.xml index 4d30c05..d1bcb05 100644 --- a/linden/indra/newview/skins/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/xui/en-us/menu_viewer.xml | |||
@@ -820,19 +820,19 @@ | |||
820 | label="Bug Reporting 101..." left="0" mouse_opaque="true" | 820 | label="Bug Reporting 101..." left="0" mouse_opaque="true" |
821 | name="Bug Reporing 101..." width="166"> | 821 | name="Bug Reporing 101..." width="166"> |
822 | <on_click function="PromptShowURL" | 822 | <on_click function="PromptShowURL" |
823 | userdata="WebLaunchBugReport101,https://wiki.secondlife.com/wiki/Bug_Reporting_101" /> | 823 | userdata="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101" /> |
824 | </menu_item_call> | 824 | </menu_item_call> |
825 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" | 825 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" |
826 | label="Security Issues..." left="0" mouse_opaque="true" | 826 | label="Security Issues..." left="0" mouse_opaque="true" |
827 | name="Security Issues..." width="166"> | 827 | name="Security Issues..." width="166"> |
828 | <on_click function="PromptShowURL" | 828 | <on_click function="PromptShowURL" |
829 | userdata="WebLaunchSecurityIssues,https://wiki.secondlife.com/wiki/Security_issues" /> | 829 | userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues" /> |
830 | </menu_item_call> | 830 | </menu_item_call> |
831 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" | 831 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" |
832 | label="QA Wiki..." left="0" mouse_opaque="true" | 832 | label="QA Wiki..." left="0" mouse_opaque="true" |
833 | name="QA Wiki..." width="166"> | 833 | name="QA Wiki..." width="166"> |
834 | <on_click function="PromptShowURL" | 834 | <on_click function="PromptShowURL" |
835 | userdata="WebLaunchQAWiki,https://wiki.secondlife.com/wiki/QA_Portal" /> | 835 | userdata="WebLaunchQAWiki,http://wiki.secondlife.com/wiki/QA_Portal" /> |
836 | </menu_item_call> | 836 | </menu_item_call> |
837 | <menu_item_separator bottom="-411" enabled="true" height="8" hidden="false" label="-----------" | 837 | <menu_item_separator bottom="-411" enabled="true" height="8" hidden="false" label="-----------" |
838 | left="0" mouse_opaque="true" name="separator7" width="250" /> | 838 | left="0" mouse_opaque="true" name="separator7" width="250" /> |
@@ -840,13 +840,13 @@ | |||
840 | label="Public Issue Tracker..." left="0" mouse_opaque="true" | 840 | label="Public Issue Tracker..." left="0" mouse_opaque="true" |
841 | name="Public Issue Tracker..." width="166"> | 841 | name="Public Issue Tracker..." width="166"> |
842 | <on_click function="PromptShowURL" | 842 | <on_click function="PromptShowURL" |
843 | userdata="WebLaunchPublicIssue,https://jira.secondlife.com" /> | 843 | userdata="WebLaunchPublicIssue,http://jira.secondlife.com" /> |
844 | </menu_item_call> | 844 | </menu_item_call> |
845 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" | 845 | <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" |
846 | label="Public Issue Tracker Help..." left="0" mouse_opaque="true" | 846 | label="Public Issue Tracker Help..." left="0" mouse_opaque="true" |
847 | name="Publc Issue Tracker Help..." width="166"> | 847 | name="Publc Issue Tracker Help..." width="166"> |
848 | <on_click function="PromptShowURL" | 848 | <on_click function="PromptShowURL" |
849 | userdata="WebLaunchPublicIssueHelp,https://wiki.secondlife.com/wiki/Issue_tracker" /> | 849 | userdata="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" /> |
850 | </menu_item_call> | 850 | </menu_item_call> |
851 | </menu> | 851 | </menu> |
852 | </menu> | 852 | </menu> |
diff --git a/linden/indra/newview/skins/xui/en-us/notify.xml b/linden/indra/newview/skins/xui/en-us/notify.xml index b21325e..f4de3f1 100644 --- a/linden/indra/newview/skins/xui/en-us/notify.xml +++ b/linden/indra/newview/skins/xui/en-us/notify.xml | |||
@@ -233,13 +233,13 @@ Please select a single object. | |||
233 | </notify> | 233 | </notify> |
234 | <notify name="TeleportToLandmark" tip="true"> | 234 | <notify name="TeleportToLandmark" tip="true"> |
235 | <message name="message"> | 235 | <message name="message"> |
236 | Now that you have reached the mainland, you can teleport to the location '[NAME]' by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder. | 236 | Now that you have reached the mainland, you can teleport to locations like '[NAME]' by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder. |
237 | Double click on the landmark and click on Teleport to travel there. | 237 | Double click on the landmark and click on Teleport to travel there. |
238 | </message> | 238 | </message> |
239 | </notify> | 239 | </notify> |
240 | <notify name="TeleportToPerson" tip="true"> | 240 | <notify name="TeleportToPerson" tip="true"> |
241 | <message name="message"> | 241 | <message name="message"> |
242 | Now that you have reached the mainland, you can contact the resident '[NAME]' by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder. | 242 | Now that you have reached the mainland, you can contact residents like '[NAME]' by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder. |
243 | Double click on the card, click on Instant Message, and type a message. | 243 | Double click on the card, click on Instant Message, and type a message. |
244 | </message> | 244 | </message> |
245 | </notify> | 245 | </notify> |
@@ -481,6 +481,9 @@ No scripts will run except those belonging to the land owner. | |||
481 | <option name="Decline"> | 481 | <option name="Decline"> |
482 | Decline | 482 | Decline |
483 | </option> | 483 | </option> |
484 | <option name="Info"> | ||
485 | Info | ||
486 | </option> | ||
484 | </notify> | 487 | </notify> |
485 | <notify name="JoinGroupOfficerNoFee" tip="false"> | 488 | <notify name="JoinGroupOfficerNoFee" tip="false"> |
486 | <message name="message"> | 489 | <message name="message"> |
@@ -496,6 +499,9 @@ There is no cost to join this group. | |||
496 | <option name="Decline"> | 499 | <option name="Decline"> |
497 | Decline | 500 | Decline |
498 | </option> | 501 | </option> |
502 | <option name="Info"> | ||
503 | Info | ||
504 | </option> | ||
499 | </notify> | 505 | </notify> |
500 | <notify name="JoinGroupMember" tip="false"> | 506 | <notify name="JoinGroupMember" tip="false"> |
501 | <message name="message"> | 507 | <message name="message"> |
@@ -511,6 +517,9 @@ To join this group, you will have to pay a signup fee of L$[COST] | |||
511 | <option name="Decline"> | 517 | <option name="Decline"> |
512 | Decline | 518 | Decline |
513 | </option> | 519 | </option> |
520 | <option name="Info"> | ||
521 | Info | ||
522 | </option> | ||
514 | </notify> | 523 | </notify> |
515 | <notify name="JoinGroupMemberNoFee" tip="false"> | 524 | <notify name="JoinGroupMemberNoFee" tip="false"> |
516 | <message name="message"> | 525 | <message name="message"> |
@@ -526,6 +535,9 @@ There is no cost to join this group. | |||
526 | <option name="Decline"> | 535 | <option name="Decline"> |
527 | Decline | 536 | Decline |
528 | </option> | 537 | </option> |
538 | <option name="Info"> | ||
539 | Info | ||
540 | </option> | ||
529 | </notify> | 541 | </notify> |
530 | <notify name="OfferTeleport" tip="false"> | 542 | <notify name="OfferTeleport" tip="false"> |
531 | <message name="message"> | 543 | <message name="message"> |
diff --git a/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml b/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml index e369da9..3463880 100644 --- a/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml +++ b/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml | |||
@@ -1,20 +1,29 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <panel border="false" bottom="0" height="380" label="Invite a Member" left="0" | 2 | <panel border="false" bottom="0" height="380" label="Invite a Member" left="0" |
3 | name="invite_panel" select="false" width="210"> | 3 | name="invite_panel" select="false" width="210"> |
4 | <text bottom_delta="-78" height="54" left="7" width="200"> | 4 | <text bottom_delta="-44" follows="left|top" font="SansSerifSmall" height="20" |
5 | left="7" name="group_name_lbl" width="40"> | ||
6 | Group: | ||
7 | </text> | ||
8 | <text bg_readonly_color="clear" bottom_delta="0" follows="left|top" | ||
9 | font="SansSerifSmall" height="20" left="50" name="group_name_text" | ||
10 | text_readonly_color="white" width="150"> | ||
11 | (unknown) | ||
12 | </text> | ||
13 | <text bottom_delta="-50" height="54" left="7" width="200"> | ||
5 | You can select multiple residents to | 14 | You can select multiple residents to |
6 | invite to your group. Click 'Open | 15 | invite to your group. Click 'Open |
7 | Person Chooser' to start. | 16 | Person Chooser' to start. |
8 | </text> | 17 | </text> |
9 | <button bottom_delta="-10" font="SansSerifSmall" halign="center" height="20" | 18 | <button bottom_delta="-12" font="SansSerifSmall" halign="center" height="20" |
10 | label="Open Person Chooser" left="5" name="add_button" tool_tip="" | 19 | label="Open Person Chooser" left="5" name="add_button" tool_tip="" |
11 | width="200" /> | 20 | width="200" /> |
12 | <name_list allow_calling_card_drop="true" background_visible="true" bottom_delta="-193" | 21 | <name_list allow_calling_card_drop="true" background_visible="true" bottom_delta="-183" |
13 | column_padding="0" draw_border="true" fg_disable_color="grey" | 22 | column_padding="0" draw_border="true" fg_disable_color="grey" |
14 | fg_selected_color="black" fg_unselected_color="black" height="189" left="5" | 23 | fg_selected_color="black" fg_unselected_color="black" height="169" left="5" |
15 | multi_select="true" name="invitee_list" | 24 | multi_select="true" name="invitee_list" |
16 | tool_tip="Hold the Ctrl key and click resident names to multi-select." | 25 | tool_tip="Hold the Ctrl key and click resident names to multi-select." |
17 | width="200" /> | 26 | width="200" /> |
18 | <button bottom_delta="-24" font="SansSerifSmall" halign="center" height="20" | 27 | <button bottom_delta="-24" font="SansSerifSmall" halign="center" height="20" |
19 | label="Remove Selected from List" left_delta="0" name="remove_button" | 28 | label="Remove Selected from List" left_delta="0" name="remove_button" |
20 | tool_tip="Removes residents selected above from the invite list." | 29 | tool_tip="Removes residents selected above from the invite list." |
diff --git a/linden/indra/newview/viewer.cpp b/linden/indra/newview/viewer.cpp index 69e98f4..d42872d 100644 --- a/linden/indra/newview/viewer.cpp +++ b/linden/indra/newview/viewer.cpp | |||
@@ -138,7 +138,7 @@ | |||
138 | #include "llmemtype.h" | 138 | #include "llmemtype.h" |
139 | #include "llmd5.h" | 139 | #include "llmd5.h" |
140 | #include "llsecondlifeurls.h" | 140 | #include "llsecondlifeurls.h" |
141 | #include "llversion.h" | 141 | #include "llversionviewer.h" |
142 | #include "llvfile.h" | 142 | #include "llvfile.h" |
143 | #include "llvfs.h" | 143 | #include "llvfs.h" |
144 | #include "llwindow.h" // for shell_open | 144 | #include "llwindow.h" // for shell_open |
@@ -296,8 +296,6 @@ std::string gSerialNumber; | |||
296 | // Application constants | 296 | // Application constants |
297 | ///////////////////////////////////////////////////////////////////////////////// | 297 | ///////////////////////////////////////////////////////////////////////////////// |
298 | 298 | ||
299 | S32 gStartupState = STATE_FIRST; | ||
300 | |||
301 | BOOL gAgentMovementCompleted = FALSE; | 299 | BOOL gAgentMovementCompleted = FALSE; |
302 | BOOL gHaveSavedSnapshot = FALSE; | 300 | BOOL gHaveSavedSnapshot = FALSE; |
303 | 301 | ||
@@ -391,7 +389,6 @@ BOOL gPrintMessagesThisFrame = FALSE; | |||
391 | const char* DEFAULT_SETTINGS_FILE = "settings.xml"; | 389 | const char* DEFAULT_SETTINGS_FILE = "settings.xml"; |
392 | const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; | 390 | const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; |
393 | BOOL gUseWireframe = FALSE; | 391 | BOOL gUseWireframe = FALSE; |
394 | BOOL gRunLocal = FALSE; | ||
395 | LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. | 392 | LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. |
396 | LLPumpIO* gServicePump = NULL; | 393 | LLPumpIO* gServicePump = NULL; |
397 | S32 gNumSessions = 0; | 394 | S32 gNumSessions = 0; |
@@ -468,6 +465,8 @@ BOOL gPacificDaylightTime = FALSE; | |||
468 | U32 gSecondsPerDay = 0; | 465 | U32 gSecondsPerDay = 0; |
469 | U32 gSecondsPerYear = 0; | 466 | U32 gSecondsPerYear = 0; |
470 | 467 | ||
468 | LLString gLastVersionChannel; | ||
469 | |||
471 | // | 470 | // |
472 | // Region/Object globals | 471 | // Region/Object globals |
473 | // | 472 | // |
@@ -513,7 +512,6 @@ static const char USAGE[] = "\n" | |||
513 | " -user <user_server_ip> specify userserver in dotted quad\n" | 512 | " -user <user_server_ip> specify userserver in dotted quad\n" |
514 | #if !LL_RELEASE_FOR_DOWNLOAD | 513 | #if !LL_RELEASE_FOR_DOWNLOAD |
515 | " -sim <simulator_ip> specify the simulator ip address\n" | 514 | " -sim <simulator_ip> specify the simulator ip address\n" |
516 | " -local run without simulator\n" | ||
517 | #endif | 515 | #endif |
518 | " -god log in as god if you have god access\n" | 516 | " -god log in as god if you have god access\n" |
519 | " -purge delete files in cache\n" | 517 | " -purge delete files in cache\n" |
@@ -543,13 +541,12 @@ BOOL gGodConnect = FALSE; | |||
543 | BOOL gUseConsole = TRUE; | 541 | BOOL gUseConsole = TRUE; |
544 | BOOL gUseAudio = TRUE; | 542 | BOOL gUseAudio = TRUE; |
545 | BOOL gUseFMOD = TRUE; | 543 | BOOL gUseFMOD = TRUE; |
546 | BOOL gConnectToSomething = TRUE; | ||
547 | BOOL gLogMessages = FALSE; | 544 | BOOL gLogMessages = FALSE; |
548 | BOOL gRequestInventoryLibrary = TRUE; | 545 | BOOL gRequestInventoryLibrary = TRUE; |
549 | BOOL gAcceptTOS = FALSE; | 546 | BOOL gAcceptTOS = FALSE; |
550 | BOOL gAcceptCriticalMessage = FALSE; | 547 | BOOL gAcceptCriticalMessage = FALSE; |
551 | // this is the channel the viewer uses to check for updates/login | 548 | // this is the channel the viewer uses to check for updates/login |
552 | std::string gChannelName = "Second Life Release"; | 549 | std::string gChannelName = LL_CHANNEL; |
553 | 550 | ||
554 | LLUUID gInventoryLibraryOwner; | 551 | LLUUID gInventoryLibraryOwner; |
555 | LLUUID gInventoryLibraryRoot; | 552 | LLUUID gInventoryLibraryRoot; |
@@ -629,7 +626,7 @@ void main_loop(); | |||
629 | // | 626 | // |
630 | // Callbacks and other stuff that's not directly used in main | 627 | // Callbacks and other stuff that's not directly used in main |
631 | // | 628 | // |
632 | void uuid_table_request_file_callback(void **user_data, S32 result); | 629 | void uuid_table_request_file_callback(void **user_data, S32 result, LLExtStat ext_status); |
633 | void send_stats(); | 630 | void send_stats(); |
634 | 631 | ||
635 | // | 632 | // |
@@ -808,6 +805,11 @@ int main( int argc, char **argv ) | |||
808 | #if LL_SOLARIS && defined(__sparc) | 805 | #if LL_SOLARIS && defined(__sparc) |
809 | asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC | 806 | asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC |
810 | #endif | 807 | #endif |
808 | |||
809 | #if LL_DARWIN | ||
810 | // Set the working dir to <bundle>/Contents/Resources | ||
811 | (void) chdir(gDirUtilp->getAppRODataDir().c_str()); | ||
812 | #endif | ||
811 | 813 | ||
812 | #if 1 | 814 | #if 1 |
813 | // This will eventually be done in LLApp | 815 | // This will eventually be done in LLApp |
@@ -944,6 +946,10 @@ int main( int argc, char **argv ) | |||
944 | // May need to know this early also | 946 | // May need to know this early also |
945 | gDisableVoice = TRUE; | 947 | gDisableVoice = TRUE; |
946 | } | 948 | } |
949 | else if (!strcmp(argv[j], "-url") && (++j < argc)) | ||
950 | { | ||
951 | LLURLSimString::setString(argv[j]); | ||
952 | } | ||
947 | } | 953 | } |
948 | 954 | ||
949 | if (!strcmp(gUserServerName, gUserServerDomainName[USERSERVER_AGNI].mName)) | 955 | if (!strcmp(gUserServerName, gUserServerDomainName[USERSERVER_AGNI].mName)) |
@@ -1347,7 +1353,6 @@ int main( int argc, char **argv ) | |||
1347 | if ( nextLoginLocation.length() ) | 1353 | if ( nextLoginLocation.length() ) |
1348 | { | 1354 | { |
1349 | LLURLSimString::setString( nextLoginLocation.c_str() ); | 1355 | LLURLSimString::setString( nextLoginLocation.c_str() ); |
1350 | gConnectToSomething = TRUE; | ||
1351 | }; | 1356 | }; |
1352 | 1357 | ||
1353 | // Merge with the command line overrides | 1358 | // Merge with the command line overrides |
@@ -1853,7 +1858,7 @@ void main_loop() | |||
1853 | if (gViewerWindow->mWindow->getVisible() | 1858 | if (gViewerWindow->mWindow->getVisible() |
1854 | && gViewerWindow->getActive() | 1859 | && gViewerWindow->getActive() |
1855 | && !gViewerWindow->mWindow->getMinimized() | 1860 | && !gViewerWindow->mWindow->getMinimized() |
1856 | && gStartupState == STATE_STARTED | 1861 | && LLStartUp::getStartupState() == STATE_STARTED |
1857 | && !gViewerWindow->getShowProgress() | 1862 | && !gViewerWindow->getShowProgress() |
1858 | && !gFocusMgr.focusLocked()) | 1863 | && !gFocusMgr.focusLocked()) |
1859 | { | 1864 | { |
@@ -1871,7 +1876,7 @@ void main_loop() | |||
1871 | gServicePump->callback(); | 1876 | gServicePump->callback(); |
1872 | } | 1877 | } |
1873 | 1878 | ||
1874 | if (gDoDisconnect && (gStartupState == STATE_STARTED)) | 1879 | if (gDoDisconnect && (LLStartUp::getStartupState() == STATE_STARTED)) |
1875 | { | 1880 | { |
1876 | save_final_snapshot(NULL); | 1881 | save_final_snapshot(NULL); |
1877 | disconnect_viewer(NULL); | 1882 | disconnect_viewer(NULL); |
@@ -1981,7 +1986,7 @@ void main_loop() | |||
1981 | } | 1986 | } |
1982 | 1987 | ||
1983 | // Save snapshot for next time, if we made it through initialization | 1988 | // Save snapshot for next time, if we made it through initialization |
1984 | if (STATE_STARTED == gStartupState) | 1989 | if (STATE_STARTED == LLStartUp::getStartupState()) |
1985 | { | 1990 | { |
1986 | save_final_snapshot(NULL); | 1991 | save_final_snapshot(NULL); |
1987 | } | 1992 | } |
@@ -2023,7 +2028,7 @@ void process_keystrokes_async() | |||
2023 | if (gViewerWindow->mWindow->getVisible() | 2028 | if (gViewerWindow->mWindow->getVisible() |
2024 | && gViewerWindow->getActive() | 2029 | && gViewerWindow->getActive() |
2025 | && !gViewerWindow->mWindow->getMinimized() | 2030 | && !gViewerWindow->mWindow->getMinimized() |
2026 | && gStartupState == STATE_STARTED | 2031 | && LLStartUp::getStartupState() == STATE_STARTED |
2027 | && !gViewerWindow->getShowProgress() | 2032 | && !gViewerWindow->getShowProgress() |
2028 | && !gFocusMgr.focusLocked()) | 2033 | && !gFocusMgr.focusLocked()) |
2029 | { | 2034 | { |
@@ -2196,7 +2201,7 @@ void write_system_info() | |||
2196 | write_debug(gSysCPU.getCPUString()); | 2201 | write_debug(gSysCPU.getCPUString()); |
2197 | write_debug("\n"); | 2202 | write_debug("\n"); |
2198 | 2203 | ||
2199 | tmp_str = llformat("RAM: %u\n", gSysMemory.getPhysicalMemory()); | 2204 | tmp_str = llformat("RAM: %u KB\n", gSysMemory.getPhysicalMemoryKB()); |
2200 | write_debug(tmp_str.c_str()); | 2205 | write_debug(tmp_str.c_str()); |
2201 | write_debug("OS: "); | 2206 | write_debug("OS: "); |
2202 | write_debug(gSysOS.getOSString().c_str()); | 2207 | write_debug(gSysOS.getOSString().c_str()); |
@@ -2951,7 +2956,6 @@ OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) | |||
2951 | 2956 | ||
2952 | // Parse it and stash in globals. | 2957 | // Parse it and stash in globals. |
2953 | LLURLSimString::setString(buffer); | 2958 | LLURLSimString::setString(buffer); |
2954 | gConnectToSomething = TRUE; | ||
2955 | 2959 | ||
2956 | if(gFloaterWorldMap != NULL) | 2960 | if(gFloaterWorldMap != NULL) |
2957 | { | 2961 | { |
@@ -3192,12 +3196,11 @@ void save_final_snapshot(void*) | |||
3192 | gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch | 3196 | gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch |
3193 | gSavedSettings.setBOOL("ShowParcelOwners", FALSE); | 3197 | gSavedSettings.setBOOL("ShowParcelOwners", FALSE); |
3194 | idle(); | 3198 | idle(); |
3195 | char temp_str[MAX_PATH]; /* Flawfinder: ignore */ | 3199 | |
3196 | strncpy (temp_str,gDirUtilp->getLindenUserDir().c_str(), MAX_PATH -1); /* Flawfinder: ignore */ | 3200 | LLString snap_filename = gDirUtilp->getLindenUserDir(); |
3197 | temp_str[MAX_PATH -1] = '\0'; | 3201 | snap_filename += gDirUtilp->getDirDelimiter(); |
3198 | strcat (temp_str,"/"); /* Flawfinder: ignore */ | 3202 | snap_filename += SCREEN_LAST_FILENAME; |
3199 | strcat (temp_str,SCREEN_LAST_FILENAME); /* Flawfinder: ignore */ | 3203 | gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE); |
3200 | gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE); | ||
3201 | gHaveSavedSnapshot = TRUE; | 3204 | gHaveSavedSnapshot = TRUE; |
3202 | } | 3205 | } |
3203 | } | 3206 | } |
@@ -3239,7 +3242,7 @@ void app_request_quit() | |||
3239 | 3242 | ||
3240 | LLViewerRegion* region = gAgent.getRegion(); | 3243 | LLViewerRegion* region = gAgent.getRegion(); |
3241 | 3244 | ||
3242 | if( (gStartupState < STATE_STARTED) || !region ) | 3245 | if( (LLStartUp::getStartupState() < STATE_STARTED) || !region ) |
3243 | { | 3246 | { |
3244 | // Quit immediately | 3247 | // Quit immediately |
3245 | app_force_quit(NULL); | 3248 | app_force_quit(NULL); |
@@ -3495,7 +3498,7 @@ void idle_network() | |||
3495 | gObjectList.mNumNewObjects = 0; | 3498 | gObjectList.mNumNewObjects = 0; |
3496 | S32 total_decoded = 0; | 3499 | S32 total_decoded = 0; |
3497 | 3500 | ||
3498 | if (!gSavedSettings.getBOOL("SpeedTest") && !gRunLocal) | 3501 | if (!gSavedSettings.getBOOL("SpeedTest")) |
3499 | { | 3502 | { |
3500 | LLFastTimer t(LLFastTimer::FTM_IDLE_NETWORK); // decode | 3503 | LLFastTimer t(LLFastTimer::FTM_IDLE_NETWORK); // decode |
3501 | 3504 | ||
@@ -3663,7 +3666,7 @@ void idle() | |||
3663 | // Special case idle if still starting up | 3666 | // Special case idle if still starting up |
3664 | // | 3667 | // |
3665 | 3668 | ||
3666 | if (gStartupState < STATE_STARTED) | 3669 | if (LLStartUp::getStartupState() < STATE_STARTED) |
3667 | { | 3670 | { |
3668 | // Skip rest if idle startup returns false (essentially, no world yet) | 3671 | // Skip rest if idle startup returns false (essentially, no world yet) |
3669 | if (!idle_startup()) | 3672 | if (!idle_startup()) |
@@ -4004,13 +4007,13 @@ void idle() | |||
4004 | { | 4007 | { |
4005 | gFrameStats.start(LLFrameStats::AUDIO); | 4008 | gFrameStats.start(LLFrameStats::AUDIO); |
4006 | LLFastTimer t(LLFastTimer::FTM_AUDIO_UPDATE); | 4009 | LLFastTimer t(LLFastTimer::FTM_AUDIO_UPDATE); |
4007 | |||
4008 | audio_update_volume(false); | ||
4009 | audio_update_listener(); | ||
4010 | audio_update_wind(false); | ||
4011 | 4010 | ||
4012 | if (gAudiop) | 4011 | if (gAudiop) |
4013 | { | 4012 | { |
4013 | audio_update_volume(false); | ||
4014 | audio_update_listener(); | ||
4015 | audio_update_wind(false); | ||
4016 | |||
4014 | // this line actually commits the changes we've made to source positions, etc. | 4017 | // this line actually commits the changes we've made to source positions, etc. |
4015 | const F32 max_audio_decode_time = 0.002f; // 2 ms decode time | 4018 | const F32 max_audio_decode_time = 0.002f; // 2 ms decode time |
4016 | gAudiop->idle(max_audio_decode_time); | 4019 | gAudiop->idle(max_audio_decode_time); |
@@ -5192,7 +5195,7 @@ void send_stats() | |||
5192 | gMessageSystem->addF32Fast(_PREHASH_Ping, gAvgSimPing); | 5195 | gMessageSystem->addF32Fast(_PREHASH_Ping, gAvgSimPing); |
5193 | gMessageSystem->addF64Fast(_PREHASH_MetersTraveled, gAgent.getDistanceTraveled()); | 5196 | gMessageSystem->addF64Fast(_PREHASH_MetersTraveled, gAgent.getDistanceTraveled()); |
5194 | gMessageSystem->addS32Fast(_PREHASH_RegionsVisited, gAgent.getRegionsVisited()); | 5197 | gMessageSystem->addS32Fast(_PREHASH_RegionsVisited, gAgent.getRegionsVisited()); |
5195 | gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemory()); | 5198 | gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemoryClamped()); |
5196 | gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString()); | 5199 | gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString()); |
5197 | gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUString()); | 5200 | gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUString()); |
5198 | 5201 | ||
@@ -5341,13 +5344,18 @@ int parse_args(int argc, char **argv) | |||
5341 | // Sometimes IP addresses passed in on the command line have leading | 5344 | // Sometimes IP addresses passed in on the command line have leading |
5342 | // or trailing white space. Use LLString to clean that up. | 5345 | // or trailing white space. Use LLString to clean that up. |
5343 | LLString ip_string; | 5346 | LLString ip_string; |
5347 | |||
5344 | S32 j; | 5348 | S32 j; |
5349 | // agent_sim_host holds the settings for connecting to the first simulator. | ||
5345 | 5350 | ||
5346 | for (j = 1; j < argc; j++) | 5351 | for (j = 1; j < argc; j++) |
5347 | { | 5352 | { |
5348 | gArgs += argv[j]; | 5353 | gArgs += argv[j]; |
5349 | gArgs += " "; | 5354 | gArgs += " "; |
5355 | } | ||
5350 | 5356 | ||
5357 | for (j = 1; j < argc; j++) | ||
5358 | { | ||
5351 | LLString argument = argv[j]; | 5359 | LLString argument = argv[j]; |
5352 | if ((!strcmp(argv[j], "-port")) && (++j < argc)) | 5360 | if ((!strcmp(argv[j], "-port")) && (++j < argc)) |
5353 | { | 5361 | { |
@@ -5369,61 +5377,51 @@ int parse_args(int argc, char **argv) | |||
5369 | { | 5377 | { |
5370 | gUserServerChoice = USERSERVER_ADITI; | 5378 | gUserServerChoice = USERSERVER_ADITI; |
5371 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5379 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5372 | gConnectToSomething = TRUE; | ||
5373 | } | 5380 | } |
5374 | else if (!strcmp(argv[j], "--agni")) | 5381 | else if (!strcmp(argv[j], "--agni")) |
5375 | { | 5382 | { |
5376 | gUserServerChoice = USERSERVER_AGNI; | 5383 | gUserServerChoice = USERSERVER_AGNI; |
5377 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5384 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5378 | gConnectToSomething = TRUE; | ||
5379 | } | 5385 | } |
5380 | else if (!strcmp(argv[j], "--dmz")) | 5386 | else if (!strcmp(argv[j], "--dmz")) |
5381 | { | 5387 | { |
5382 | gUserServerChoice = USERSERVER_DMZ; | 5388 | gUserServerChoice = USERSERVER_DMZ; |
5383 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5389 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5384 | gConnectToSomething = TRUE; | ||
5385 | } | 5390 | } |
5386 | else if (!strcmp(argv[j], "--siva")) | 5391 | else if (!strcmp(argv[j], "--siva")) |
5387 | { | 5392 | { |
5388 | gUserServerChoice = USERSERVER_SIVA; | 5393 | gUserServerChoice = USERSERVER_SIVA; |
5389 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5394 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5390 | gConnectToSomething = TRUE; | ||
5391 | } | 5395 | } |
5392 | else if (!strcmp(argv[j], "--shakti")) | 5396 | else if (!strcmp(argv[j], "--shakti")) |
5393 | { | 5397 | { |
5394 | gUserServerChoice = USERSERVER_SHAKTI; | 5398 | gUserServerChoice = USERSERVER_SHAKTI; |
5395 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5399 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5396 | gConnectToSomething = TRUE; | ||
5397 | } | 5400 | } |
5398 | else if (!strcmp(argv[j], "--durga")) | 5401 | else if (!strcmp(argv[j], "--durga")) |
5399 | { | 5402 | { |
5400 | gUserServerChoice = USERSERVER_DURGA; | 5403 | gUserServerChoice = USERSERVER_DURGA; |
5401 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5404 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5402 | gConnectToSomething = TRUE; | ||
5403 | } | 5405 | } |
5404 | else if (!strcmp(argv[j], "--soma")) | 5406 | else if (!strcmp(argv[j], "--soma")) |
5405 | { | 5407 | { |
5406 | gUserServerChoice = USERSERVER_SOMA; | 5408 | gUserServerChoice = USERSERVER_SOMA; |
5407 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ | 5409 | snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ |
5408 | gConnectToSomething = TRUE; | ||
5409 | } | 5410 | } |
5410 | else if (!strcmp(argv[j], "--ganga")) | 5411 | else if (!strcmp(argv[j], "--ganga")) |
5411 | { | 5412 | { |
5412 | gUserServerChoice = USERSERVER_GANGA; | 5413 | gUserServerChoice = USERSERVER_GANGA; |
5413 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); | 5414 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); |
5414 | gConnectToSomething = TRUE; | ||
5415 | } | 5415 | } |
5416 | else if (!strcmp(argv[j], "--vaak")) | 5416 | else if (!strcmp(argv[j], "--vaak")) |
5417 | { | 5417 | { |
5418 | gUserServerChoice = USERSERVER_VAAK; | 5418 | gUserServerChoice = USERSERVER_VAAK; |
5419 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); | 5419 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); |
5420 | gConnectToSomething = TRUE; | ||
5421 | } | 5420 | } |
5422 | else if (!strcmp(argv[j], "--uma")) | 5421 | else if (!strcmp(argv[j], "--uma")) |
5423 | { | 5422 | { |
5424 | gUserServerChoice = USERSERVER_UMA; | 5423 | gUserServerChoice = USERSERVER_UMA; |
5425 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); | 5424 | sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); |
5426 | gConnectToSomething = TRUE; | ||
5427 | } | 5425 | } |
5428 | else if (!strcmp(argv[j], "-user") && (++j < argc)) | 5426 | else if (!strcmp(argv[j], "-user") && (++j < argc)) |
5429 | { | 5427 | { |
@@ -5439,7 +5437,6 @@ int parse_args(int argc, char **argv) | |||
5439 | LLString::trim(ip_string); | 5437 | LLString::trim(ip_string); |
5440 | snprintf(gUserServerName, MAX_STRING, "%s", ip_string.c_str()); /* Flawfinder: ignore */ | 5438 | snprintf(gUserServerName, MAX_STRING, "%s", ip_string.c_str()); /* Flawfinder: ignore */ |
5441 | } | 5439 | } |
5442 | gConnectToSomething = TRUE; | ||
5443 | } | 5440 | } |
5444 | else if (!strcmp(argv[j], "-loginuri") && (++j < argc)) | 5441 | else if (!strcmp(argv[j], "-loginuri") && (++j < argc)) |
5445 | { | 5442 | { |
@@ -5509,11 +5506,6 @@ int parse_args(int argc, char **argv) | |||
5509 | { | 5506 | { |
5510 | purge_cache(); | 5507 | purge_cache(); |
5511 | } | 5508 | } |
5512 | else if (!strcmp(argv[j], "-local")) | ||
5513 | { | ||
5514 | gConnectToSomething = FALSE; | ||
5515 | gRunLocal = TRUE; | ||
5516 | } | ||
5517 | else if(!strcmp(argv[j], "-noinvlib")) | 5509 | else if(!strcmp(argv[j], "-noinvlib")) |
5518 | { | 5510 | { |
5519 | gRequestInventoryLibrary = FALSE; | 5511 | gRequestInventoryLibrary = FALSE; |
@@ -5621,25 +5613,11 @@ int parse_args(int argc, char **argv) | |||
5621 | // so this allows us to parse the URL straight off the command line without a "-url" paramater | 5613 | // so this allows us to parse the URL straight off the command line without a "-url" paramater |
5622 | else if (!argument.compare(0, std::string( "secondlife://" ).length(), std::string("secondlife://"))) | 5614 | else if (!argument.compare(0, std::string( "secondlife://" ).length(), std::string("secondlife://"))) |
5623 | { | 5615 | { |
5624 | // *NOTE: After setting the url, bail. What can happen is | ||
5625 | // that someone can use IE (or potentially other browsers) | ||
5626 | // and do the rough equivalent of command injection and | ||
5627 | // steal passwords. Phoenix. SL-55321 | ||
5628 | LLURLSimString::setString(argv[j]); | 5616 | LLURLSimString::setString(argv[j]); |
5629 | gConnectToSomething = TRUE; | ||
5630 | gArgs += argv[j]; | ||
5631 | return 0; | ||
5632 | } | 5617 | } |
5633 | else if (!strcmp(argv[j], "-url") && (++j < argc)) | 5618 | else if (!strcmp(argv[j], "-url") && (++j < argc)) |
5634 | { | 5619 | { |
5635 | // *NOTE: After setting the url, bail. What can happen is | ||
5636 | // that someone can use IE (or potentially other browsers) | ||
5637 | // and do the rough equivalent of command injection and | ||
5638 | // steal passwords. Phoenix. SL-55321 | ||
5639 | LLURLSimString::setString(argv[j]); | 5620 | LLURLSimString::setString(argv[j]); |
5640 | gConnectToSomething = TRUE; | ||
5641 | gArgs += argv[j]; | ||
5642 | return 0; | ||
5643 | } | 5621 | } |
5644 | else if (!strcmp(argv[j], "-ignorepixeldepth")) | 5622 | else if (!strcmp(argv[j], "-ignorepixeldepth")) |
5645 | { | 5623 | { |
@@ -6024,7 +6002,7 @@ void do_disconnect(const LLString& mesg) | |||
6024 | } | 6002 | } |
6025 | 6003 | ||
6026 | //RN: just quit if we haven't logged in | 6004 | //RN: just quit if we haven't logged in |
6027 | if (gStartupState < STATE_STARTED) | 6005 | if (LLStartUp::getStartupState() < STATE_STARTED) |
6028 | { | 6006 | { |
6029 | finish_disconnect(1, NULL); | 6007 | finish_disconnect(1, NULL); |
6030 | return; | 6008 | return; |
diff --git a/linden/indra/newview/viewer.h b/linden/indra/newview/viewer.h index ef975e7..e6392f5 100644 --- a/linden/indra/newview/viewer.h +++ b/linden/indra/newview/viewer.h | |||
@@ -77,9 +77,7 @@ extern LLMemoryInfo gSysMemory; | |||
77 | extern BOOL gLogMessages; | 77 | extern BOOL gLogMessages; |
78 | extern BOOL gUseAudio; | 78 | extern BOOL gUseAudio; |
79 | extern bool gPreloadImages; | 79 | extern bool gPreloadImages; |
80 | extern BOOL gConnectToSomething; | ||
81 | extern BOOL gGodConnect; | 80 | extern BOOL gGodConnect; |
82 | extern BOOL gRunLocal; | ||
83 | extern LLString gCmdLineFirstName; | 81 | extern LLString gCmdLineFirstName; |
84 | extern LLString gCmdLineLastName; | 82 | extern LLString gCmdLineLastName; |
85 | extern LLString gCmdLinePassword; | 83 | extern LLString gCmdLinePassword; |
@@ -117,6 +115,8 @@ extern U32 gSecondsPerYear; | |||
117 | // currently in daylight savings time? | 115 | // currently in daylight savings time? |
118 | extern BOOL gPacificDaylightTime; | 116 | extern BOOL gPacificDaylightTime; |
119 | 117 | ||
118 | extern LLString gLastVersionChannel; | ||
119 | |||
120 | extern LLVector3 gWindVec; | 120 | extern LLVector3 gWindVec; |
121 | extern LLVector3 gRelativeWindVec; | 121 | extern LLVector3 gRelativeWindVec; |
122 | 122 | ||
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index ecbeda2..3641bcf 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py | |||
@@ -402,8 +402,9 @@ class DarwinManifest(ViewerManifest): | |||
402 | # make sure we don't have stale files laying about | 402 | # make sure we don't have stale files laying about |
403 | self.remove(sparsename, finalname) | 403 | self.remove(sparsename, finalname) |
404 | 404 | ||
405 | self.run_command('hdiutil create "%(sparse)s" -volname "Second Life" -fs HFS+ -type SPARSE -megabytes 300' % { | 405 | self.run_command('hdiutil create "%(sparse)s" -volname "%(channel)s" -fs HFS+ -type SPARSE -megabytes 300' % { |
406 | 'sparse':sparsename}) | 406 | 'sparse':sparsename, |
407 | 'channel':channel_standin}) | ||
407 | 408 | ||
408 | # mount the image and get the name of the mount point and device node | 409 | # mount the image and get the name of the mount point and device node |
409 | hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') | 410 | hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') |
@@ -459,9 +460,12 @@ class LinuxManifest(ViewerManifest): | |||
459 | if(self.args.has_key('installer_name')): | 460 | if(self.args.has_key('installer_name')): |
460 | installer_name = self.args['installer_name'] | 461 | installer_name = self.args['installer_name'] |
461 | else: | 462 | else: |
462 | installer_name = '_'.join(['SecondLife', self.args.get('arch'), '_'.join(self.args['version'])]) | 463 | installer_name = '_'.join('SecondLife_', self.args.get('arch'), *self.args['version']) |
463 | if not self.default_grid(): | 464 | if self.default_channel(): |
464 | installer_name += "_" + grid.upper() | 465 | if not self.default_grid(): |
466 | installer_name += '_' + self.args['grid'].upper() | ||
467 | else: | ||
468 | installer_name += '_' + self.channel_oneword().upper() | ||
465 | 469 | ||
466 | # temporarily move directory tree so that it has the right name in the tarfile | 470 | # temporarily move directory tree so that it has the right name in the tarfile |
467 | self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) | 471 | self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) |
@@ -503,7 +507,7 @@ class Linux_i686Manifest(LinuxManifest): | |||
503 | self.path("libuuid.so", "libuuid.so.1") | 507 | self.path("libuuid.so", "libuuid.so.1") |
504 | self.path("libSDL-1.2.so.0") | 508 | self.path("libSDL-1.2.so.0") |
505 | self.path("libELFIO.so") | 509 | self.path("libELFIO.so") |
506 | #self.path("libresolv.so") - don't bundle | 510 | self.path("libresolv.so", "libresolv.so.2") |
507 | #self.path("libtcmalloc.so.0") - bugged | 511 | #self.path("libtcmalloc.so.0") - bugged |
508 | #self.path("libstacktrace.so.0") - probably bugged | 512 | #self.path("libstacktrace.so.0") - probably bugged |
509 | # self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason | 513 | # self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason |
diff --git a/linden/indra/test/lltemplatemessagebuilder_tut.cpp b/linden/indra/test/lltemplatemessagebuilder_tut.cpp index 5f58660..7aff445 100644 --- a/linden/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/linden/indra/test/lltemplatemessagebuilder_tut.cpp | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "llquaternion.h" | 36 | #include "llquaternion.h" |
37 | #include "lltemplatemessagebuilder.h" | 37 | #include "lltemplatemessagebuilder.h" |
38 | #include "lltemplatemessagereader.h" | 38 | #include "lltemplatemessagereader.h" |
39 | #include "llversion.h" | 39 | #include "llversionserver.h" |
40 | #include "message_prehash.h" | 40 | #include "message_prehash.h" |
41 | #include "u64.h" | 41 | #include "u64.h" |
42 | #include "v3dmath.h" | 42 | #include "v3dmath.h" |
diff --git a/linden/indra/test/message_tut.cpp b/linden/indra/test/message_tut.cpp index 3425315..2a7bf45 100644 --- a/linden/indra/test/message_tut.cpp +++ b/linden/indra/test/message_tut.cpp | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "lltut.h" | 32 | #include "lltut.h" |
33 | 33 | ||
34 | #include "llapr.h" | 34 | #include "llapr.h" |
35 | #include "llversion.h" | 35 | #include "llversionserver.h" |
36 | #include "message.h" | 36 | #include "message.h" |
37 | #include "message_prehash.h" | 37 | #include "message_prehash.h" |
38 | 38 | ||
diff --git a/linden/indra/test/test_llmanifest.py b/linden/indra/test/test_llmanifest.py index 8bfca24..797d5ac 100644 --- a/linden/indra/test/test_llmanifest.py +++ b/linden/indra/test/test_llmanifest.py | |||
@@ -106,9 +106,13 @@ class TestLLManifest(unittest.TestCase): | |||
106 | 106 | ||
107 | def testruncommand(self): | 107 | def testruncommand(self): |
108 | self.assertEqual("Hello\n", self.m.run_command("echo Hello")) | 108 | self.assertEqual("Hello\n", self.m.run_command("echo Hello")) |
109 | def tmp_test(): | 109 | def exit_1_test(): |
110 | self.m.run_command("exit 1") | ||
111 | self.assertRaises(RuntimeError, exit_1_test) | ||
112 | def not_found_test(): | ||
110 | self.m.run_command("test_command_that_should_not_be_found") | 113 | self.m.run_command("test_command_that_should_not_be_found") |
111 | self.assertRaises(RuntimeError, tmp_test) | 114 | self.assertRaises(RuntimeError, not_found_test) |
115 | |||
112 | 116 | ||
113 | def testpathof(self): | 117 | def testpathof(self): |
114 | self.assertEqual(self.m.src_path_of("a"), "src/a") | 118 | self.assertEqual(self.m.src_path_of("a"), "src/a") |