summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.hgtags1
-rw-r--r--autobuild.xml24
-rwxr-xr-xdoc/contributions.txt4
-rw-r--r--indra/cmake/00-Common.cmake8
-rw-r--r--indra/cmake/Variables.cmake14
-rwxr-xr-xindra/lib/python/indra/util/llmanifest.py45
-rw-r--r--indra/llappearance/llavatarappearancedefines.cpp1
-rw-r--r--indra/llcommon/llsdserialize.cpp42
-rw-r--r--indra/llcommon/llstring.h4
-rw-r--r--indra/llcorehttp/tests/test_httprequest.hpp10
-rw-r--r--indra/llimage/llimagepng.cpp4
-rw-r--r--indra/llimage/llpngwrapper.cpp8
-rw-r--r--indra/llimage/llpngwrapper.h2
-rw-r--r--indra/llmessage/lltemplatemessagereader.cpp7
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp9
-rw-r--r--indra/llrender/llglslshader.cpp32
-rw-r--r--indra/llrender/llglslshader.h4
-rw-r--r--indra/llrender/llshadermgr.cpp201
-rw-r--r--indra/llrender/llvertexbuffer.cpp4
-rw-r--r--indra/llui/llaccordionctrltab.cpp5
-rw-r--r--indra/llui/llfolderview.cpp12
-rw-r--r--indra/llui/llfolderview.h12
-rw-r--r--indra/llui/llfolderviewitem.cpp5
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/llnotifications.cpp24
-rw-r--r--indra/llui/llnotifications.h8
-rw-r--r--indra/llui/llnotificationtemplate.h3
-rw-r--r--indra/llui/llscrolllistctrl.cpp15
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/llspinctrl.cpp26
-rw-r--r--indra/llui/llspinctrl.h1
-rw-r--r--indra/llvfs/lldiriterator.cpp4
-rw-r--r--indra/llwindow/lldxhardware.cpp155
-rw-r--r--indra/llwindow/lldxhardware.h2
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp41
-rw-r--r--indra/newview/app_settings/settings.xml6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cofF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl2
-rw-r--r--indra/newview/installers/windows/installer_template.nsi7
-rw-r--r--indra/newview/installers/windows/lang_de.nsibin8420 -> 9850 bytes
-rw-r--r--indra/newview/installers/windows/lang_es.nsibin8458 -> 9872 bytes
-rw-r--r--indra/newview/installers/windows/lang_fr.nsibin8748 -> 10258 bytes
-rw-r--r--indra/newview/installers/windows/lang_it.nsibin8102 -> 9520 bytes
-rw-r--r--indra/newview/installers/windows/lang_ja.nsibin6514 -> 7204 bytes
-rw-r--r--indra/newview/installers/windows/lang_pt-br.nsibin8522 -> 9864 bytes
-rw-r--r--indra/newview/installers/windows/lang_ru.nsibin7898 -> 9188 bytes
-rw-r--r--indra/newview/installers/windows/lang_tr.nsibin8006 -> 9286 bytes
-rw-r--r--indra/newview/installers/windows/lang_zh.nsibin6576 -> 6846 bytes
-rw-r--r--indra/newview/llaisapi.cpp45
-rw-r--r--indra/newview/llappviewer.cpp17
-rw-r--r--indra/newview/llavataractions.cpp12
-rw-r--r--indra/newview/llavataractions.h5
-rw-r--r--indra/newview/llchathistory.cpp266
-rw-r--r--indra/newview/llexpandabletextbox.cpp3
-rw-r--r--indra/newview/llfilepicker.cpp15
-rw-r--r--indra/newview/llfloaterimcontainer.cpp22
-rw-r--r--indra/newview/llfloaterimcontainer.h1
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp10
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp5
-rw-r--r--indra/newview/llfloaterlinkreplace.cpp22
-rw-r--r--indra/newview/llfloaterlinkreplace.h11
-rw-r--r--indra/newview/llfloaterregioninfo.cpp8
-rw-r--r--indra/newview/llfloatertools.cpp16
-rw-r--r--indra/newview/llinventorybridge.cpp46
-rw-r--r--indra/newview/llinventoryfunctions.cpp30
-rw-r--r--indra/newview/llinventoryfunctions.h2
-rw-r--r--indra/newview/llinventorymodel.cpp52
-rw-r--r--indra/newview/llinventorymodel.h3
-rw-r--r--indra/newview/llinventoryobserver.cpp5
-rw-r--r--indra/newview/llinventorypanel.cpp13
-rw-r--r--indra/newview/lllogininstance.cpp47
-rw-r--r--indra/newview/lllogininstance.h3
-rw-r--r--indra/newview/llmeshrepository.cpp7
-rw-r--r--indra/newview/llmutelist.cpp7
-rw-r--r--indra/newview/llnotificationhandler.h2
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp14
-rw-r--r--indra/newview/llnotificationofferhandler.cpp1
-rw-r--r--indra/newview/llnotificationscripthandler.cpp1
-rw-r--r--indra/newview/llnotificationtiphandler.cpp2
-rw-r--r--indra/newview/lloutfitgallery.cpp25
-rw-r--r--indra/newview/lloutfitgallery.h7
-rw-r--r--indra/newview/llpanelclassified.cpp57
-rw-r--r--indra/newview/llpaneleditwearable.cpp72
-rw-r--r--indra/newview/llpanelgroup.h2
-rw-r--r--indra/newview/llpanelgrouproles.cpp46
-rw-r--r--indra/newview/llpanelgrouproles.h1
-rw-r--r--indra/newview/llpanelmaininventory.cpp4
-rw-r--r--indra/newview/llpaneloutfitedit.cpp8
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp1
-rw-r--r--indra/newview/llplacesinventorybridge.cpp2
-rw-r--r--indra/newview/llpreviewscript.cpp1
-rw-r--r--indra/newview/llpreviewtexture.cpp81
-rw-r--r--indra/newview/llpreviewtexture.h1
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp39
-rw-r--r--indra/newview/llsnapshotlivepreview.h1
-rw-r--r--indra/newview/llstartup.cpp4
-rw-r--r--indra/newview/lltoastalertpanel.cpp15
-rw-r--r--indra/newview/lltooldraganddrop.cpp13
-rw-r--r--indra/newview/lltooldraganddrop.h2
-rw-r--r--indra/newview/lltoolgrab.cpp39
-rw-r--r--indra/newview/llviewerinventory.cpp8
-rw-r--r--indra/newview/llviewermedia.cpp29
-rw-r--r--indra/newview/llviewermenufile.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp6
-rw-r--r--indra/newview/llviewertexture.cpp18
-rw-r--r--indra/newview/llviewerwindow.cpp16
-rw-r--r--indra/newview/llviewerwindow.h3
-rw-r--r--indra/newview/llvoavatarself.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_icon.xml44
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml64
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/en/role_actions.xml3
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp2
-rwxr-xr-xindra/newview/viewer_manifest.py23
142 files changed, 1649 insertions, 523 deletions
diff --git a/.hgtags b/.hgtags
index 90a21a647f..9cbb192d43 100755
--- a/.hgtags
+++ b/.hgtags
@@ -528,3 +528,4 @@ cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release
022709ef76a331cac1ba6ef1a6da8a5e9ef63f5a 5.0.4-release
b4d76b5590fdf8bab72c64442353753a527cbc44 5.0.5-release
3e5035dfd8af49bd4c0009f0a76ef46a15991a45 5.0.6-release
+abcab37e1b29414ab8c03af9ca2ab489d809788a 5.0.7-release
diff --git a/autobuild.xml b/autobuild.xml
index d131e78d40..2dd697d626 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -556,9 +556,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>95a6d7d1ff2ffc8679601d9408533663</string>
+ <string>bbdea742f2a89bcd6360e61e01d6be93</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/6185/21567/dullahan-1.1.800_3.3071.1637.gcb6cf75-darwin64-506174.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8207/32592/dullahan-1.1.820_3.3071.1637.gcb6cf75-darwin64-508196.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -568,9 +568,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c14caa52a6ab343c35e6e76af840257f</string>
+ <string>31e11a74e0d3f1e5e4036cb5fea8d944</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/6187/21579/dullahan-1.1.800_3.3071.1634.g9cc59c8-windows-506174.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8209/32599/dullahan-1.1.820_3.3071.1634.g9cc59c8-windows-508196.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -580,16 +580,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>ff4d59eb23011198ccd0aa4f5875bbd1</string>
+ <string>f965d244e7921c06ee79b68a4abcea3b</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/6186/21573/dullahan-1.1.800_3.3071.1634.g9cc59c8-windows64-506174.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8208/32602/dullahan-1.1.820_3.3071.1634.g9cc59c8-windows64-508196.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
- <string>1.1.800_3.3071.1634.g9cc59c8</string>
+ <string>1.1.820_3.3071.1634.g9cc59c8</string>
</map>
<key>elfio</key>
<map>
@@ -3150,9 +3150,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>333a679f0a492e060b4586eaa1a38a56</string>
+ <string>ae5b273314362410bc102bf39d7271b5</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7692/29540/viewer_manager-1.0.507681-darwin64-507681.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8651/36046/viewer_manager-1.0.508640-darwin64-508640.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -3174,9 +3174,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>bf4672af39013418d721327d337ba1a0</string>
+ <string>c7df44464c8fcba2ed6b34b49e0f7500</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7694/29546/viewer_manager-1.0.507681-windows-507681.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8652/36052/viewer_manager-1.0.508640-windows-508640.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -3187,7 +3187,7 @@
<key>source_type</key>
<string>hg</string>
<key>version</key>
- <string>1.0.507681</string>
+ <string>1.0.508640</string>
</map>
<key>vlc-bin</key>
<map>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 5168bcd5fa..f14769610f 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -363,6 +363,7 @@ Cinder Roxley
STORM-2053
STORM-2113
STORM-2127
+ STORM-2144
Clara Young
Coaldust Numbers
VWR-1095
@@ -822,6 +823,8 @@ Kitty Barnett
MAINT-6153
MAINT-6154
MAINT-6568
+ STORM-2149
+ MAINT-7581
Kolor Fall
Komiko Okamoto
Korvel Noh
@@ -1303,6 +1306,7 @@ Sovereign Engineer
MAINT-6218
MAINT-6913
STORM-2143
+ STORM-2148
MAINT-7343
SpacedOut Frye
VWR-34
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index b582b47f15..40fc706a99 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -19,9 +19,7 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables)
# We go to some trouble to set LL_BUILD to the set of relevant compiler flags.
-set(CMAKE_CXX_FLAGS_RELEASE "$ENV{LL_BUILD_RELEASE}")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "$ENV{LL_BUILD_RELWITHDEBINFO}")
-set(CMAKE_CXX_FLAGS_DEBUG "$ENV{LL_BUILD_DEBUG}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
# Given that, all the flags you see added below are flags NOT present in
# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables.
# Before adding new ones here, it's important to ask: can this flag really be
@@ -156,6 +154,10 @@ if (DARWIN)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations")
+ # Ensure that CMAKE_CXX_FLAGS has the correct -g debug information format --
+ # see Variables.cmake.
+ string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}"
+ CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# The viewer code base can now be successfully compiled with -std=c++14. But
# turning that on in the generic viewer-build-variables/variables file would
# potentially require tweaking each of our ~50 third-party library builds.
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index e8698ace68..bd69c49856 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -155,6 +155,20 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
string(REGEX MATCH " -g([^ ]*)" scratch "$ENV{LL_BUILD}")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "${CMAKE_MATCH_1}")
+ # -gdwarf-2 is passed in LL_BUILD according to 00-COMPILE-LINK-RUN.txt.
+ # However, when CMake 3.9.2 sees -gdwarf-2, it silently deletes the whole -g
+ # switch, producing no symbols at all! The same thing happens if we specify
+ # plain -g ourselves, i.e. CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT is
+ # the empty string. Specifying -gdwarf-with-dsym or just -gdwarf drives a
+ # different CMake behavior: it substitutes plain -g. As of 2017-09-19,
+ # viewer-build-variables/variables still passes -gdwarf-2, which is the
+ # no-symbols case. Set -gdwarf, triggering CMake to substitute plain -g --
+ # at least that way we should get symbols, albeit mangled ones. It Would Be
+ # Nice if CMake's behavior could be predicted from a consistent mental
+ # model, instead of only observed experimentally.
+ string(REPLACE "dwarf-2" "dwarf"
+ CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT
+ "${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}")
message(STATUS "CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT = '${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}'")
string(REGEX MATCH "-O([^ ]*)" scratch "$ENV{LL_BUILD}")
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 0a39db2b21..d4e61aedd1 100755
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -43,7 +43,9 @@ import subprocess
class ManifestError(RuntimeError):
"""Use an exception more specific than generic Python RuntimeError"""
- pass
+ def __init__(self, msg):
+ self.msg = msg
+ super(ManifestError, self).__init__(self.msg)
class MissingError(ManifestError):
"""You specified a file that doesn't exist"""
@@ -309,8 +311,11 @@ def main():
continue
if touch:
print 'Creating additional package for "', package_id, '" in ', args['dest']
- wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
- wm.do(*args['actions'])
+ try:
+ wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
+ wm.do(*args['actions'])
+ except Exception as err:
+ sys.exit(str(err))
if touch:
print 'Created additional package ', wm.package_file, ' for ', package_id
faketouch = base_touch_prefix + '/' + package_id + '/' + base_touch_postfix
@@ -449,29 +454,17 @@ class LLManifest(object):
return path
def run_command(self, command):
- """ Runs an external command, and returns the output. Raises
- an exception if the command returns a nonzero status code. For
- debugging/informational purposes, prints out the command's
- output as it is received."""
+ """
+ Runs an external command.
+ Raises ManifestError exception if the command returns a nonzero status.
+ """
print "Running command:", command
sys.stdout.flush()
- child = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
- shell=True)
- lines = []
- while True:
- lines.append(child.stdout.readline())
- if lines[-1] == '':
- break
- else:
- print lines[-1],
- output = ''.join(lines)
- child.stdout.close()
- status = child.wait()
- if status:
- raise ManifestError(
- "Command %s returned non-zero status (%s) \noutput:\n%s"
- % (command, status, output) )
- return output
+ try:
+ subprocess.check_call(command, shell=True)
+ except subprocess.CalledProcessError as err:
+ raise ManifestError( "Command %s returned non-zero status (%s)"
+ % (command, err.returncode) )
def created_path(self, path):
""" Declare that you've created a path in order to
@@ -621,7 +614,7 @@ class LLManifest(object):
if self.includes(src, dst):
try:
os.unlink(dst)
- except OSError, err:
+ except OSError as err:
if err.errno != errno.ENOENT:
raise
@@ -642,7 +635,7 @@ class LLManifest(object):
dstname = os.path.join(dst, name)
try:
self.ccopymumble(srcname, dstname)
- except (IOError, os.error), why:
+ except (IOError, os.error) as why:
errors.append((srcname, dstname, why))
if errors:
raise ManifestError, errors
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index f1c78946a1..b5282d4f6f 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -265,4 +265,3 @@ LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIn
{
return getInstance()->getTexture(index)->mWearableType;
}
-
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 81ba8631c6..3a219eb998 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -2091,7 +2091,18 @@ std::string zip_llsd(LLSD& data)
}
have = CHUNK-strm.avail_out;
- output = (U8*) realloc(output, cur_size+have);
+ U8* new_output = (U8*) realloc(output, cur_size+have);
+ if (new_output == NULL)
+ {
+ LL_WARNS() << "Failed to compress LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ deflateEnd(&strm);
+ if (output)
+ {
+ free(output);
+ }
+ return std::string();
+ }
+ output = new_output;
memcpy(output+cur_size, out, have);
cur_size += have;
}
@@ -2174,7 +2185,19 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
U32 have = CHUNK-strm.avail_out;
- result = (U8*) realloc(result, cur_size + have);
+ U8* new_result = (U8*)realloc(result, cur_size + have);
+ if (new_result == NULL)
+ {
+ LL_WARNS() << "Failed to unzip LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ inflateEnd(&strm);
+ if (result)
+ {
+ free(result);
+ }
+ delete[] in;
+ return false;
+ }
+ result = new_result;
memcpy(result+cur_size, out, have);
cur_size += have;
@@ -2266,7 +2289,20 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
U32 have = CHUNK-strm.avail_out;
- result = (U8*) realloc(result, cur_size + have);
+ U8* new_result = (U8*) realloc(result, cur_size + have);
+ if (new_result == NULL)
+ {
+ LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ inflateEnd(&strm);
+ if (result)
+ {
+ free(result);
+ }
+ delete[] in;
+ valid = false;
+ return NULL;
+ }
+ result = new_result;
memcpy(result+cur_size, out, have);
cur_size += have;
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index a6629bc178..a4a5b393cb 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1325,6 +1325,10 @@ void LLStringUtilBase<T>::removeCRLF(string_type& string)
template<class T>
void LLStringUtilBase<T>::removeWindowsCR(string_type& string)
{
+ if (string.empty())
+ {
+ return;
+ }
const T LF = 10;
const T CR = 13;
diff --git a/indra/llcorehttp/tests/test_httprequest.hpp b/indra/llcorehttp/tests/test_httprequest.hpp
index 45215ee0f4..b450f3502e 100644
--- a/indra/llcorehttp/tests/test_httprequest.hpp
+++ b/indra/llcorehttp/tests/test_httprequest.hpp
@@ -836,7 +836,7 @@ void HttpRequestTestObjectType::test<8>()
ensure("Two handler calls on the way out", 2 == mHandlerCalls);
-#if defined(WIN32)
+#if 0 // defined(WIN32)
// Can only do this memory test on Windows. On other platforms,
// the LL logging system holds on to memory and produces what looks
// like memory leaks...
@@ -947,7 +947,7 @@ void HttpRequestTestObjectType::test<9>()
ensure("Two handler calls on the way out", 2 == mHandlerCalls);
-#if defined(WIN32)
+#if 0 // defined(WIN32)
// Can only do this memory test on Windows. On other platforms,
// the LL logging system holds on to memory and produces what looks
// like memory leaks...
@@ -1183,7 +1183,7 @@ void HttpRequestTestObjectType::test<11>()
ensure("Two handler calls on the way out", 2 == mHandlerCalls);
-#if defined(WIN32)
+#if 0 // defined(WIN32)
// Can only do this memory test on Windows. On other platforms,
// the LL logging system holds on to memory and produces what looks
// like memory leaks...
@@ -1429,7 +1429,7 @@ void HttpRequestTestObjectType::test<13>()
ensure("Two handler calls on the way out", 2 == mHandlerCalls);
-#if defined(WIN32)
+#if 0 // defined(WIN32)
// Can only do this memory test on Windows. On other platforms,
// the LL logging system holds on to memory and produces what looks
// like memory leaks...
@@ -1663,7 +1663,7 @@ void HttpRequestTestObjectType::test<15>()
ensure("Two handler calls on the way out", 2 == mHandlerCalls);
-#if defined(WIN32)
+#if 0 // defined(WIN32)
// Can only do this memory test on Windows. On other platforms,
// the LL logging system holds on to memory and produces what looks
// like memory leaks...
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp
index a299602d79..a4823ed859 100644
--- a/indra/llimage/llimagepng.cpp
+++ b/indra/llimage/llimagepng.cpp
@@ -124,12 +124,12 @@ bool LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
// Temporary buffer to hold the encoded image. Note: the final image
// size should be much smaller due to compression.
- U32 bufferSize = getWidth() * getHeight() * getComponents() + 1024;
+ U32 bufferSize = getWidth() * getHeight() * getComponents() + 8192;
U8* tmpWriteBuffer = new U8[ bufferSize ];
// Delegate actual encoding work to wrapper
LLPngWrapper pngWrapper;
- if (! pngWrapper.writePng(raw_image, tmpWriteBuffer))
+ if (!pngWrapper.writePng(raw_image, tmpWriteBuffer, bufferSize))
{
setLastError(pngWrapper.getErrorMessage());
delete[] tmpWriteBuffer;
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp
index da289ea889..eb70b78a36 100644
--- a/indra/llimage/llpngwrapper.cpp
+++ b/indra/llimage/llpngwrapper.cpp
@@ -112,6 +112,11 @@ void LLPngWrapper::readDataCallback(png_structp png_ptr, png_bytep dest, png_siz
void LLPngWrapper::writeDataCallback(png_structp png_ptr, png_bytep src, png_size_t length)
{
PngDataInfo *dataInfo = (PngDataInfo *) png_get_io_ptr(png_ptr);
+ if (dataInfo->mOffset + length > dataInfo->mDataSize)
+ {
+ png_error(png_ptr, "Data write error. Requested data size exceeds available data size.");
+ return;
+ }
U8 *dest = &dataInfo->mData[dataInfo->mOffset];
memcpy(dest, src, length);
dataInfo->mOffset += static_cast<U32>(length);
@@ -272,7 +277,7 @@ void LLPngWrapper::updateMetaData()
// Method to write raw image into PNG at dest. The raw scanline begins
// at the bottom of the image per SecondLife conventions.
-BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest)
+BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize)
{
try
{
@@ -313,6 +318,7 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest)
PngDataInfo dataPtr;
dataPtr.mData = dest;
dataPtr.mOffset = 0;
+ dataPtr.mDataSize = destSize;
png_set_write_fn(mWritePngPtr, &dataPtr, &writeDataCallback, &writeFlush);
// Setup image params
diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h
index 27d7df3bef..8d42317b0f 100644
--- a/indra/llimage/llpngwrapper.h
+++ b/indra/llimage/llpngwrapper.h
@@ -45,7 +45,7 @@ public:
BOOL isValidPng(U8* src);
BOOL readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL);
- BOOL writePng(const LLImageRaw* rawImage, U8* dst);
+ BOOL writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize);
U32 getFinalSize();
const std::string& getErrorMessage();
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index 406afadd2f..4e0c53c37e 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -499,9 +499,10 @@ BOOL LLTemplateMessageReader::decodeTemplate(
}
else
{
- LL_WARNS() << "Message #" << std::hex << num << std::dec
- << " received but not registered!" << LL_ENDL;
- gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE);
+ // MAINT-7482 - make viewer more tolerant of unknown messages.
+ LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec
+ << " received but not registered!" << LL_ENDL;
+ //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE);
return(FALSE);
}
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index f1b6fe0a12..680017204c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -224,7 +224,14 @@ void LLPluginClassMedia::idle(void)
void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
// clear texture memory to avoid random screen visual fuzz from uninitialized texture data
- memset( addr, 0x00, newsize );
+ if (addr)
+ {
+ memset( addr, 0x00, newsize );
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Failed to get previously created shared memory address: " << mTextureSharedMemoryName << " size: " << mTextureSharedMemorySize << LL_ENDL;
+ }
// We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
// so it may not be worthwhile.
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 79421e6bdc..e7457826a3 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -407,7 +407,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
{
GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels);
LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL;
- if (shaderhandle > 0)
+ if (shaderhandle)
{
attachObject(shaderhandle);
}
@@ -980,7 +980,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode)
void LLGLSLShader::uniform1i(U32 index, GLint x)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -998,7 +998,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
void LLGLSLShader::uniform1f(U32 index, GLfloat x)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1016,7 +1016,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x)
void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1035,7 +1035,7 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1054,7 +1054,7 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1073,7 +1073,7 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat
void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1092,7 +1092,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1111,7 +1111,7 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1130,7 +1130,7 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1149,7 +1149,7 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1168,7 +1168,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1181,7 +1181,7 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1194,7 +1194,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1207,7 +1207,7 @@ void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose,
void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
GLint location = getLocationForIndex(index);
@@ -1221,7 +1221,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
{
GLint ret = -1;
- if (mProgramObject > 0)
+ if (mProgramObject)
{
LLStaticStringTable<GLint>::iterator iter = mUniformMap.find(uniform);
if (iter != mUniformMap.end())
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 75cb6cf757..8e9c29ea4c 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -210,6 +210,8 @@ private:
inline GLint getLocationForIndex(S32 index)
{
+ if (!mProgramObject)
+ return -1;
uniforms_index_t::iterator it = mUniform.find(index);
if (it == mUniform.end())
return -1;
@@ -218,6 +220,8 @@ private:
inline GLint getTexChannelForIndex(S32 index)
{
+ if (!mProgramObject)
+ return -1;
uniforms_index_t::iterator it = mTexture.find(index);
if (it == mTexture.end())
return -1;
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 55f0791174..e721ad93fa 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -575,10 +575,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//we can't have any lines longer than 1024 characters
//or any shaders longer than 4096 lines... deal - DaveP
- GLcharARB buff[1024];
- GLcharARB* text[4096];
- GLuint count = 0;
-
+ GLcharARB buff[1024];
+ GLcharARB *extra_code_text[1024];
+ GLcharARB *shader_code_text[4096 + LL_ARRAY_SIZE(extra_code_text)] = { NULL };
+ GLuint extra_code_count = 0, shader_code_count = 0;
+ BOOST_STATIC_ASSERT(LL_ARRAY_SIZE(extra_code_text) < LL_ARRAY_SIZE(shader_code_text));
+
+
S32 major_version = gGLManager.mGLSLVersionMajor;
S32 minor_version = gGLManager.mGLSLVersionMinor;
@@ -593,20 +596,20 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (minor_version <= 19)
{
- text[count++] = strdup("#version 110\n");
- text[count++] = strdup("#define ATTRIBUTE attribute\n");
- text[count++] = strdup("#define VARYING varying\n");
- text[count++] = strdup("#define VARYING_FLAT varying\n");
+ shader_code_text[shader_code_count++] = strdup("#version 110\n");
+ extra_code_text[extra_code_count++] = strdup("#define ATTRIBUTE attribute\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING varying\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING_FLAT varying\n");
}
else if (minor_version <= 29)
{
//set version to 1.20
- text[count++] = strdup("#version 120\n");
- text[count++] = strdup("#define FXAA_GLSL_120 1\n");
- text[count++] = strdup("#define FXAA_FAST_PIXEL_OFFSET 0\n");
- text[count++] = strdup("#define ATTRIBUTE attribute\n");
- text[count++] = strdup("#define VARYING varying\n");
- text[count++] = strdup("#define VARYING_FLAT varying\n");
+ shader_code_text[shader_code_count++] = strdup("#version 120\n");
+ extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_120 1\n");
+ extra_code_text[extra_code_count++] = strdup("#define FXAA_FAST_PIXEL_OFFSET 0\n");
+ extra_code_text[extra_code_count++] = strdup("#define ATTRIBUTE attribute\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING varying\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING_FLAT varying\n");
}
}
else
@@ -614,44 +617,43 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (major_version < 4)
{
//set version to 1.30
- text[count++] = strdup("#version 130\n");
-
+ shader_code_text[shader_code_count++] = strdup("#version 130\n");
//some implementations of GLSL 1.30 require integer precision be explicitly declared
- text[count++] = strdup("precision mediump int;\n");
- text[count++] = strdup("precision highp float;\n");
+ extra_code_text[extra_code_count++] = strdup("precision mediump int;\n");
+ extra_code_text[extra_code_count++] = strdup("precision highp float;\n");
}
else
{ //set version to 400
- text[count++] = strdup("#version 400\n");
+ shader_code_text[shader_code_count++] = strdup("#version 400\n");
}
- text[count++] = strdup("#define DEFINE_GL_FRAGCOLOR 1\n");
- text[count++] = strdup("#define FXAA_GLSL_130 1\n");
+ extra_code_text[extra_code_count++] = strdup("#define DEFINE_GL_FRAGCOLOR 1\n");
+ extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_130 1\n");
- text[count++] = strdup("#define ATTRIBUTE in\n");
+ extra_code_text[extra_code_count++] = strdup("#define ATTRIBUTE in\n");
if (type == GL_VERTEX_SHADER_ARB)
{ //"varying" state is "out" in a vertex program, "in" in a fragment program
// ("varying" is deprecated after version 1.20)
- text[count++] = strdup("#define VARYING out\n");
- text[count++] = strdup("#define VARYING_FLAT flat out\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING out\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING_FLAT flat out\n");
}
else
{
- text[count++] = strdup("#define VARYING in\n");
- text[count++] = strdup("#define VARYING_FLAT flat in\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING in\n");
+ extra_code_text[extra_code_count++] = strdup("#define VARYING_FLAT flat in\n");
}
//backwards compatibility with legacy texture lookup syntax
- text[count++] = strdup("#define texture2D texture\n");
- text[count++] = strdup("#define textureCube texture\n");
- text[count++] = strdup("#define texture2DLod textureLod\n");
- text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
+ extra_code_text[extra_code_count++] = strdup("#define texture2D texture\n");
+ extra_code_text[extra_code_count++] = strdup("#define textureCube texture\n");
+ extra_code_text[extra_code_count++] = strdup("#define texture2DLod textureLod\n");
+ extra_code_text[extra_code_count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
if (major_version > 1 || minor_version >= 40)
{ //GLSL 1.40 replaces texture2DRect et al with texture
- text[count++] = strdup("#define texture2DRect texture\n");
- text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n");
+ extra_code_text[extra_code_count++] = strdup("#define texture2DRect texture\n");
+ extra_code_text[extra_code_count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n");
}
}
@@ -660,13 +662,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
for (boost::unordered_map<std::string,std::string>::iterator iter = defines->begin(); iter != defines->end(); ++iter)
{
std::string define = "#define " + iter->first + " " + iter->second + "\n";
- text[count++] = (GLcharARB *) strdup(define.c_str());
+ extra_code_text[extra_code_count++] = (GLcharARB *) strdup(define.c_str());
}
}
if( gGLManager.mIsATI )
{
- text[ count++ ] = strdup( "#define IS_AMD_CARD 1\n" );
+ extra_code_text[extra_code_count++] = strdup( "#define IS_AMD_CARD 1\n" );
}
if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB)
@@ -704,28 +706,28 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
*/
- text[count++] = strdup("#define HAS_DIFFUSE_LOOKUP 1\n");
+ extra_code_text[extra_code_count++] = strdup("#define HAS_DIFFUSE_LOOKUP 1\n");
//uniform declartion
for (S32 i = 0; i < texture_index_channels; ++i)
{
std::string decl = llformat("uniform sampler2D tex%d;\n", i);
- text[count++] = strdup(decl.c_str());
+ extra_code_text[extra_code_count++] = strdup(decl.c_str());
}
if (texture_index_channels > 1)
{
- text[count++] = strdup("VARYING_FLAT int vary_texture_index;\n");
+ extra_code_text[extra_code_count++] = strdup("VARYING_FLAT int vary_texture_index;\n");
}
- text[count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
- text[count++] = strdup("{\n");
+ extra_code_text[extra_code_count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
+ extra_code_text[extra_code_count++] = strdup("{\n");
if (texture_index_channels == 1)
{ //don't use flow control, that's silly
- text[count++] = strdup("return texture2D(tex0, texcoord);\n");
- text[count++] = strdup("}\n");
+ extra_code_text[extra_code_count++] = strdup("return texture2D(tex0, texcoord);\n");
+ extra_code_text[extra_code_count++] = strdup("}\n");
}
else if (major_version > 1 || minor_version >= 30)
{ //switches are supported in GLSL 1.30 and later
@@ -734,27 +736,27 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
for (U32 i = 0; i < texture_index_channels; ++i)
{
std::string if_string = llformat("\t%sif (vary_texture_index == %d) { return texture2D(tex%d, texcoord); }\n", i > 0 ? "else " : "", i, i);
- text[count++] = strdup(if_string.c_str());
+ extra_code_text[extra_code_count++] = strdup(if_string.c_str());
}
- text[count++] = strdup("\treturn vec4(1,0,1,1);\n");
- text[count++] = strdup("}\n");
+ extra_code_text[extra_code_count++] = strdup("\treturn vec4(1,0,1,1);\n");
+ extra_code_text[extra_code_count++] = strdup("}\n");
}
else
{
- text[count++] = strdup("\tvec4 ret = vec4(1,0,1,1);\n");
- text[count++] = strdup("\tswitch (vary_texture_index)\n");
- text[count++] = strdup("\t{\n");
+ extra_code_text[extra_code_count++] = strdup("\tvec4 ret = vec4(1,0,1,1);\n");
+ extra_code_text[extra_code_count++] = strdup("\tswitch (vary_texture_index)\n");
+ extra_code_text[extra_code_count++] = strdup("\t{\n");
//switch body
for (S32 i = 0; i < texture_index_channels; ++i)
{
std::string case_str = llformat("\t\tcase %d: return texture2D(tex%d, texcoord);\n", i, i);
- text[count++] = strdup(case_str.c_str());
+ extra_code_text[extra_code_count++] = strdup(case_str.c_str());
}
- text[count++] = strdup("\t}\n");
- text[count++] = strdup("\treturn ret;\n");
- text[count++] = strdup("}\n");
+ extra_code_text[extra_code_count++] = strdup("\t}\n");
+ extra_code_text[extra_code_count++] = strdup("\treturn ret;\n");
+ extra_code_text[extra_code_count++] = strdup("}\n");
}
}
else
@@ -765,14 +767,89 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
else
{
- text[count++] = strdup("#define HAS_DIFFUSE_LOOKUP 0\n");
+ extra_code_text[extra_code_count++] = strdup("#define HAS_DIFFUSE_LOOKUP 0\n");
}
+
//copy file into memory
- while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(text) )
+ enum {
+ flag_write_to_out_of_extra_block_area = 0x01
+ , flag_extra_block_marker_was_found = 0x02
+ };
+
+ unsigned char flags = flag_write_to_out_of_extra_block_area;
+
+ GLuint out_of_extra_block_counter = 0, start_shader_code = shader_code_count, file_lines_count = 0;
+
+ while(NULL != fgets((char *)buff, 1024, file)
+ && shader_code_count < (LL_ARRAY_SIZE(shader_code_text) - LL_ARRAY_SIZE(extra_code_text)))
{
- text[count++] = (GLcharARB *)strdup((char *)buff);
+ file_lines_count++;
+
+ bool extra_block_area_found = NULL != strstr((const char*)buff, "[EXTRA_CODE_HERE]");
+
+ if(extra_block_area_found && !(flag_extra_block_marker_was_found & flags))
+ {
+ if(!(flag_write_to_out_of_extra_block_area & flags))
+ {
+ //shift
+ for(GLuint to = start_shader_code, from = extra_code_count + start_shader_code;
+ from < shader_code_count; ++to, ++from)
+ {
+ shader_code_text[to] = shader_code_text[from];
+ }
+
+ shader_code_count -= extra_code_count;
+ }
+
+ //copy extra code
+ for(GLuint n = 0; n < extra_code_count
+ && shader_code_count < (LL_ARRAY_SIZE(shader_code_text) - LL_ARRAY_SIZE(extra_code_text)); ++n)
+ {
+ shader_code_text[shader_code_count++] = extra_code_text[n];
+ }
+
+ extra_code_count = 0;
+
+ flags &= ~flag_write_to_out_of_extra_block_area;
+ flags |= flag_extra_block_marker_was_found;
+ }
+ else
+ {
+ shader_code_text[shader_code_count] = (GLcharARB *)strdup((char *)buff);
+
+ if(flag_write_to_out_of_extra_block_area & flags)
+ {
+ shader_code_text[extra_code_count + start_shader_code + out_of_extra_block_counter]
+ = shader_code_text[shader_code_count];
+ out_of_extra_block_counter++;
+
+ if(out_of_extra_block_counter == extra_code_count)
+ {
+ shader_code_count += extra_code_count;
+ flags &= ~flag_write_to_out_of_extra_block_area;
+ }
+ }
+
+ ++shader_code_count;
+ }
+ } //while
+
+ if(!(flag_extra_block_marker_was_found & flags))
+ {
+ for(GLuint n = start_shader_code; n < extra_code_count + start_shader_code; ++n)
+ {
+ shader_code_text[n] = extra_code_text[n - start_shader_code];
+ }
+
+ if (file_lines_count < extra_code_count)
+ {
+ shader_code_count += extra_code_count;
+ }
+
+ extra_code_count = 0;
}
+
fclose(file);
//create shader object
@@ -787,7 +864,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
//load source
- glShaderSourceARB(ret, count, (const GLcharARB**) text, NULL);
+ glShaderSourceARB(ret, shader_code_count, (const GLcharARB**) shader_code_text, NULL);
if (gDebugGL)
{
@@ -826,9 +903,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
#if LL_WINDOWS
std::stringstream ostr;
//dump shader source for debugging
- for (GLuint i = 0; i < count; i++)
+ for (GLuint i = 0; i < shader_code_count; i++)
{
- ostr << i << ": " << text[i];
+ ostr << i << ": " << shader_code_text[i];
if (i % 128 == 0)
{ //dump every 128 lines
@@ -843,8 +920,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
#else
std::string str;
- for (GLuint i = 0; i < count; i++) {
- str.append(text[i]);
+ for (GLuint i = 0; i < shader_code_count; i++) {
+ str.append(shader_code_text[i]);
if (i % 128 == 0)
{
@@ -853,7 +930,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
}
#endif
-
+
ret = 0;
}
}
@@ -865,9 +942,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
stop_glerror();
//free memory
- for (GLuint i = 0; i < count; i++)
+ for (GLuint i = 0; i < shader_code_count; i++)
{
- free(text[i]);
+ free(shader_code_text[i]);
}
//successfully loaded, save results
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 3851669360..420cd2d9c4 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1234,7 +1234,7 @@ void LLVertexBuffer::createGLIndices(U32 size)
void LLVertexBuffer::destroyGLBuffer()
{
- if (mGLBuffer)
+ if (mGLBuffer || mMappedData)
{
if (mMappedDataUsingVBOs)
{
@@ -1254,7 +1254,7 @@ void LLVertexBuffer::destroyGLBuffer()
void LLVertexBuffer::destroyGLIndices()
{
- if (mGLIndices)
+ if (mGLIndices || mMappedIndexData)
{
if (mMappedIndexDataUsingVBOs)
{
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index f8ef5289db..eaf1284237 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -823,6 +823,11 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
void LLAccordionCtrlTab::showAndFocusHeader()
{
+ if (!mHeader)
+ {
+ return;
+ }
+
mHeader->setFocus(true);
mHeader->setSelected(mSelectionEnabled);
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index f9664e0658..895753aeae 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -102,6 +102,18 @@ void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder)
void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
{ }
+//---------------------------------------------------------------------------
+
+void LLAllDescendentsPassedFilter::doFolder(LLFolderViewFolder* folder)
+{
+ mAllDescendentsPassedFilter &= (folder) && (folder->passedFilter()) && (folder->descendantsPassedFilter());
+}
+
+void LLAllDescendentsPassedFilter::doItem(LLFolderViewItem* item)
+{
+ mAllDescendentsPassedFilter &= (item) && (item->passedFilter());
+}
+
///----------------------------------------------------------------------------
/// Class LLFolderViewScrollContainer
///----------------------------------------------------------------------------
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index b5deefd653..2926e160d0 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -400,6 +400,18 @@ public:
virtual void doItem(LLFolderViewItem* item);
};
+class LLAllDescendentsPassedFilter : public LLFolderViewFunctor
+{
+public:
+ LLAllDescendentsPassedFilter() : mAllDescendentsPassedFilter(true) {}
+ /*virtual*/ ~LLAllDescendentsPassedFilter() {}
+ /*virtual*/ void doFolder(LLFolderViewFolder* folder);
+ /*virtual*/ void doItem(LLFolderViewItem* item);
+ bool allDescendentsPassedFilter() const { return mAllDescendentsPassedFilter; }
+protected:
+ bool mAllDescendentsPassedFilter;
+};
+
// Flags for buildContextMenu()
const U32 SUPPRESS_OPEN_ITEM = 0x1;
const U32 FIRST_SELECTED_ITEM = 0x2;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 3d618548c4..0510e472c5 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1176,6 +1176,11 @@ BOOL LLFolderViewFolder::needsArrange()
return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
}
+bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation)
+{
+ return getViewModelItem()->descendantsPassedFilter(filter_generation);
+}
+
// Passes selection information on to children and record selection
// information if necessary.
BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 022f814bbc..0d42f726fa 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3331,6 +3331,7 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
if (getHighlightedItem())
{
clearHoverItem();
+ LLMenuGL::setKeyboardMode(FALSE);
}
else
{
@@ -3777,10 +3778,10 @@ BOOL LLMenuHolderGL::hideMenus()
{
return FALSE;
}
+ LLMenuGL::setKeyboardMode(FALSE);
BOOL menu_visible = hasVisibleMenu();
if (menu_visible)
{
- LLMenuGL::setKeyboardMode(FALSE);
// clicked off of menu, hide them all
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 604092d536..7bafd711cb 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -67,7 +67,8 @@ LLNotificationForm::FormIgnore::FormIgnore()
: text("text"),
control("control"),
invert_control("invert_control", false),
- save_option("save_option", false)
+ save_option("save_option", false),
+ session_only("session_only", false)
{}
LLNotificationForm::FormButton::FormButton()
@@ -125,6 +126,7 @@ bool handleIgnoredNotification(const LLSD& payload)
switch(form->getIgnoreType())
{
case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE:
+ case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY:
response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
break;
case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
@@ -197,7 +199,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
if (!p.ignore.save_option)
{
- mIgnore = IGNORE_WITH_DEFAULT_RESPONSE;
+ mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE;
}
else
{
@@ -426,6 +428,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mLogToChat(p.log_to_chat),
mLogToIM(p.log_to_im),
mShowToast(p.show_toast),
+ mFadeToast(p.fade_toast),
mSoundName("")
{
if (p.sound.isProvided()
@@ -942,6 +945,11 @@ bool LLNotification::canShowToast() const
return mTemplatep->mShowToast;
}
+bool LLNotification::canFadeToast() const
+{
+ return mTemplatep->mFadeToast;
+}
+
bool LLNotification::hasFormElements() const
{
return mTemplatep->mForm->getNumElements() != 0;
@@ -1792,6 +1800,18 @@ bool LLNotifications::getIgnoreAllNotifications()
{
return mIgnoreAllNotifications;
}
+
+void LLNotifications::setIgnored(const std::string& name, bool ignored)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ templatep->mForm->setIgnored(ignored);
+}
+
+bool LLNotifications::getIgnored(const std::string& name)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) );
+}
bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 024332ee65..ccdfb90054 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -179,6 +179,7 @@ public:
Optional<bool> save_option;
Optional<std::string> control;
Optional<bool> invert_control;
+ Optional<bool> session_only;
FormIgnore();
};
@@ -232,7 +233,8 @@ public:
typedef enum e_ignore_type
{
IGNORE_NO,
- IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY,
IGNORE_WITH_LAST_RESPONSE,
IGNORE_SHOW_AGAIN
} EIgnoreType;
@@ -558,6 +560,7 @@ public:
bool canLogToChat() const;
bool canLogToIM() const;
bool canShowToast() const;
+ bool canFadeToast() const;
bool hasFormElements() const;
void playSound();
@@ -963,6 +966,9 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
+ void setIgnored(const std::string& name, bool ignored);
+ bool getIgnored(const std::string& name);
+
bool isVisibleByRules(LLNotificationPtr pNotification);
private:
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index bed29254d8..20cbc89ede 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -177,6 +177,7 @@ struct LLNotificationTemplate
Optional<bool> persist,
log_to_im,
show_toast,
+ fade_toast,
log_to_chat,
force_urls_external;
Optional<std::string> functor,
@@ -199,6 +200,7 @@ struct LLNotificationTemplate
Params()
: name("name"),
persist("persist", false),
+ fade_toast("fade_toast", true),
log_to_im("log_to_im", false),
show_toast("show_toast", true),
log_to_chat("log_to_chat", true),
@@ -316,6 +318,7 @@ struct LLNotificationTemplate
bool mLogToChat;
bool mLogToIM;
bool mShowToast;
+ bool mFadeToast;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 0afa8d43f1..7c1f4a4dca 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -345,6 +345,21 @@ S32 LLScrollListCtrl::getItemCount() const
return mItemList.size();
}
+BOOL LLScrollListCtrl::hasSelectedItem() const
+{
+ item_list::iterator iter;
+ for (iter = mItemList.begin(); iter < mItemList.end(); )
+ {
+ LLScrollListItem* itemp = *iter;
+ if (itemp && itemp->getSelected())
+ {
+ return TRUE;
+ }
+ iter++;
+ }
+ return FALSE;
+}
+
// virtual LLScrolListInterface function (was deleteAllItems)
void LLScrollListCtrl::clearRows()
{
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8343750a54..699a8744e1 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -201,6 +201,8 @@ public:
virtual BOOL isSelected(const LLSD& value) const;
+ BOOL hasSelectedItem() const;
+
BOOL handleClick(S32 x, S32 y, MASK mask);
BOOL selectFirstItem();
BOOL selectNthItem( S32 index );
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index d49e216898..f6831c6d5e 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -130,6 +130,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this ));
+ mEditor->setFocusLostCallback( boost::bind(&LLSpinCtrl::onEditorLostFocus, _1, this ));
if (p.allow_digits_only)
{
mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace);
@@ -239,6 +240,31 @@ void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
self->onFocusReceived();
}
+// static
+void LLSpinCtrl::onEditorLostFocus( LLFocusableElement* caller, void *userdata )
+{
+ LLSpinCtrl* self = (LLSpinCtrl*) userdata;
+ llassert( caller == self->mEditor );
+
+ self->onFocusLost();
+
+ std::string text = self->mEditor->getText();
+
+ LLLocale locale(LLLocale::USER_LOCALE);
+ F32 val = (F32)atof(text.c_str());
+
+ F32 saved_val = self->getValueF32();
+ if (saved_val != val && !self->mEditor->isDirty())
+ {
+ // Editor was focused when value update arrived, string
+ // in editor is different from one in spin control.
+ // Since editor is not dirty, it won't commit, so either
+ // attempt to commit value from editor or revert to a more
+ // recent value from spin control
+ self->updateEditor();
+ }
+}
+
void LLSpinCtrl::setValue(const LLSD& value )
{
F32 v = (F32)value.asReal();
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index e34add879d..cab99c35bd 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -93,6 +93,7 @@ public:
void onEditorCommit(const LLSD& data);
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);
+ static void onEditorLostFocus(LLFocusableElement* caller, void *userdata);
static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
void onUpBtn(const LLSD& data);
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index 76296ff877..3eb64e69d9 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -51,7 +51,11 @@ private:
LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
: mIsValid(false)
{
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ fs::path dir_path(utf8str_to_utf16str(dirname));
+#else
fs::path dir_path(dirname);
+#endif
bool is_dir = false;
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index e7afef63f8..d4790f9f29 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -35,6 +35,7 @@
#undef INITGUID
#include <wbemidl.h>
+#include <comdef.h>
#include <boost/tokenizer.hpp>
@@ -206,6 +207,160 @@ HRESULT GetVideoMemoryViaWMI( WCHAR* strInputDeviceID, DWORD* pdwAdapterRam )
return E_FAIL;
}
+//Getting the version of graphics controller driver via WMI
+std::string LLDXHardware::getDriverVersionWMI()
+{
+ std::string mDriverVersion;
+ HRESULT hrCoInitialize = S_OK;
+ HRESULT hres;
+ hrCoInitialize = CoInitialize(0);
+ IWbemLocator *pLoc = NULL;
+
+ hres = CoCreateInstance(
+ CLSID_WbemLocator,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_IWbemLocator, (LPVOID *)&pLoc);
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hres << LL_ENDL;
+ return std::string(); // Program has failed.
+ }
+
+ IWbemServices *pSvc = NULL;
+
+ // Connect to the root\cimv2 namespace with
+ // the current user and obtain pointer pSvc
+ // to make IWbemServices calls.
+ hres = pLoc->ConnectServer(
+ _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace
+ NULL, // User name. NULL = current user
+ NULL, // User password. NULL = current
+ 0, // Locale. NULL indicates current
+ NULL, // Security flags.
+ 0, // Authority (e.g. Kerberos)
+ 0, // Context object
+ &pSvc // pointer to IWbemServices proxy
+ );
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hres << LL_ENDL;
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL;
+
+ // Set security levels on the proxy -------------------------
+ hres = CoSetProxyBlanket(
+ pSvc, // Indicates the proxy to set
+ RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx
+ RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx
+ NULL, // Server principal name
+ RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx
+ RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
+ NULL, // client identity
+ EOAC_NONE // proxy capabilities
+ );
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+ IEnumWbemClassObject* pEnumerator = NULL;
+
+ // Get the data from the query
+ ULONG uReturn = 0;
+ hres = pSvc->ExecQuery(
+ bstr_t("WQL"),
+ bstr_t("SELECT * FROM Win32_VideoController"), //Consider using Availability to filter out disabled controllers
+ WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
+ NULL,
+ &pEnumerator);
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ while (pEnumerator)
+ {
+ IWbemClassObject *pclsObj = NULL;
+ HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
+ &pclsObj, &uReturn);
+
+ if (0 == uReturn)
+ {
+ break; // If quantity less then 1.
+ }
+
+ VARIANT vtProp;
+
+ // Get the value of the Name property
+ hr = pclsObj->Get(L"DriverVersion", 0, &vtProp, 0, 0);
+
+ if (FAILED(hr))
+ {
+ LL_WARNS("AppInit") << "Query for name property failed." << " Error code = 0x" << hr << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ // use characters in the returned driver version
+ BSTR driverVersion(vtProp.bstrVal);
+
+ //convert BSTR to std::string
+ std::wstring ws(driverVersion, SysStringLen(driverVersion));
+ std::string str(ws.begin(), ws.end());
+ LL_INFOS("AppInit") << " DriverVersion : " << str << LL_ENDL;
+
+ if (mDriverVersion.empty())
+ {
+ mDriverVersion = str;
+ }
+ else if (mDriverVersion != str)
+ {
+ LL_WARNS("DriverVersion") << "Different versions of drivers. Version of second driver : " << str << LL_ENDL;
+ }
+
+ VariantClear(&vtProp);
+ pclsObj->Release();
+ }
+
+ // Cleanup
+ // ========
+ if (pSvc)
+ {
+ pSvc->Release();
+ }
+ if (pLoc)
+ {
+ pLoc->Release();
+ }
+ if (pEnumerator)
+ {
+ pEnumerator->Release();
+ }
+ if (SUCCEEDED(hrCoInitialize))
+ {
+ CoUninitialize();
+ }
+ return mDriverVersion;
+}
+
void get_wstring(IDxDiagContainer* containerp, WCHAR* wszPropName, WCHAR* wszPropValue, int outputSize)
{
HRESULT hr;
diff --git a/indra/llwindow/lldxhardware.h b/indra/llwindow/lldxhardware.h
index 61a32bf0fb..cf33db8b37 100644
--- a/indra/llwindow/lldxhardware.h
+++ b/indra/llwindow/lldxhardware.h
@@ -88,6 +88,8 @@ public:
// vram_only TRUE does a "light" probe.
BOOL getInfo(BOOL vram_only);
+ std::string getDriverVersionWMI();
+
S32 getVRAM() const { return mVRAM; }
LLSD getDisplayInfo();
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 796e262d6f..74a0febe3c 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -75,7 +75,7 @@ private:
void authResponse(LLPluginMessage &message);
void keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_data);
- void unicodeInput(LLSD native_key_data);
+ void unicodeInput(std::string event, LLSD native_key_data);
void checkEditState();
void setVolume();
@@ -448,7 +448,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
dullahan::dullahan_settings settings;
settings.accept_language_list = mHostLanguage;
- settings.background_color = 0xffffff;
+ settings.background_color = 0xffffffff;
settings.cache_enabled = true;
settings.cache_path = mCachePath;
settings.cookie_store_path = mCookiePath;
@@ -603,8 +603,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else if (message_name == "text_event")
{
+ std::string event = message_in.getValue("event");
LLSD native_key_data = message_in.getValueLLSD("native_key_data");
- unicodeInput(native_key_data);
+ unicodeInput(event, native_key_data);
}
else if (message_name == "key_event")
{
@@ -742,9 +743,14 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat
U32 event_umodchars = native_key_data["event_umodchars"].asInteger();
bool event_isrepeat = native_key_data["event_isrepeat"].asBoolean();
- mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
- event_keycode, event_chars,
- event_umodchars, event_isrepeat);
+ // adding new code below in unicodeInput means we don't send ascii chars
+ // here too or we get double key presses on a mac.
+ if (((unsigned char)event_chars < 0x20 || (unsigned char)event_chars >= 0x7f ))
+ {
+ mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
+ event_keycode, event_chars,
+ event_umodchars, event_isrepeat);
+ }
#elif LL_WINDOWS
U32 msg = ll_U32_from_sd(native_key_data["msg"]);
U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
@@ -754,12 +760,29 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat
#endif
};
-void MediaPluginCEF::unicodeInput(LLSD native_key_data = LLSD::emptyMap())
+void MediaPluginCEF::unicodeInput(std::string event, LLSD native_key_data = LLSD::emptyMap())
{
#if LL_DARWIN
- // code to send keys here doesn't seem to be required for Darwin - in fact,
- // not having reliable key event type info here means we don't know what to send anyway
+ // i didn't think this code was needed for macOS but without it, the IME
+ // input in japanese (and likely others too) doesn't work correctly.
+ // see maint-7654
+ U32 event_modifiers = native_key_data["event_modifiers"].asInteger();
+ U32 event_keycode = native_key_data["event_keycode"].asInteger();
+ U32 event_chars = native_key_data["event_chars"].asInteger();
+ U32 event_umodchars = native_key_data["event_umodchars"].asInteger();
+ bool event_isrepeat = native_key_data["event_isrepeat"].asBoolean();
+
+ dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP;
+ if (event == "down")
+ {
+ key_event = dullahan::KE_KEY_DOWN;
+ }
+
+ mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
+ event_keycode, event_chars,
+ event_umodchars, event_isrepeat);
#elif LL_WINDOWS
+ event = ""; // not needed here but prevents unused var warning as error
U32 msg = ll_U32_from_sd(native_key_data["msg"]);
U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
U64 lparam = ll_U32_from_sd(native_key_data["l_param"]);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 203044ffec..cb4be8d9fc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13454,9 +13454,9 @@
<key>UpdaterServiceCheckPeriod</key>
<map>
<key>Comment</key>
- <string>Default period between update checking.</string>
+ <string>Obsolete; no longer used.</string>
<key>Persist</key>
- <integer>1</integer>
+ <integer>0</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
@@ -13476,7 +13476,7 @@
<key>UpdaterServicePath</key>
<map>
<key>Comment</key>
- <string>Path on the update server host.</string>
+ <string>Obsolete: no longer used</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 2b5f001873..b9c8f34cb0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#define INDEXED 1
#define NON_INDEXED 2
#define NON_INDEXED_NO_COLOR 3
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
index 5264d6e1b4..cbd8d2ebfc 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
index ccbc3c557c..fef1c5a584 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index a425e5062e..8d48bb016b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
index ed02c4a481..0ffca8515c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index f22b16965c..756e625d07 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index a2b4b3b8c8..226e63cdda 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -26,6 +26,8 @@
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 1a464fec5d..9974f8f31b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index c08e9d361a..3a3e871ade 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -23,16 +23,20 @@
* $/LicenseInfo$
*/
+
+
+//class 1 -- no shadows
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_shader_texture_lod : enable
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
-//class 1 -- no shadows
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
index 62cfa5c316..d0c06cd51f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 106d48bd71..aba4a01754 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index bf362e21a4..f06f8c870b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index 4e2f98aa29..6669947d1b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
index eb5beeef39..058941bfb2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 760d52a9ce..03bdb754b5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -26,6 +26,8 @@
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index f50635a139..f1aec315cc 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -26,6 +26,8 @@
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
index 5ca817aff6..7329efe3f7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
@@ -27,6 +27,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
index c0a5865bef..930255729b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 1c3ad49a21..37dcd3ad34 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_data[3];
#else
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index 0f5eb288fd..36563982ba 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl
index 942c5888e7..cff8d9d50f 100644
--- a/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
index ed803de277..5c088b3a3c 100644
--- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
@@ -23,13 +23,15 @@
* $/LicenseInfo$
*/
+#extension GL_ARB_texture_rectangle : enable
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
-#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
uniform sampler2D glowMap;
uniform sampler2DRect screenMap;
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
index 59520bb99f..a9e7ea1de8 100644
--- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
index 772bb374e8..7614075cfd 100644
--- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 94bd07bec6..b9bb522842 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -26,6 +26,8 @@
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 1022c23f7b..f7832521fa 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 92e1ac95a6..81af1fdc8a 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -26,6 +26,8 @@
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_shader_texture_lod : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 95c09d3238..265da8df99 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -25,6 +25,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index b5ff6404ea..5c6fe30daa 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -24,6 +24,8 @@
#extension GL_ARB_texture_rectangle : enable
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 4ca850e30f..ade808e3e2 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -714,6 +714,13 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInstSuccess
Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch.
+ ;; $EXEDIR is where we find the installer file
+ ;; Put a marker file there so VMP will know we're done
+ ;; and it can delete the download directory next time.
+ ;; http://nsis.sourceforge.net/Write_text_to_a_file
+ FileOpen $9 "$EXEDIR\nsis.winstall" w
+ FileWrite $9 "NSIS done$\n"
+ FileClose $9
Push $R0 # Option value, unused#
StrCmp $SKIP_AUTORUN "true" +2;
# Assumes SetOutPath $INSTDIR
diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi
index 866accae99..2a868acc89 100644
--- a/indra/newview/installers/windows/lang_de.nsi
+++ b/indra/newview/installers/windows/lang_de.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi
index f4f0786332..1ecf254ffb 100644
--- a/indra/newview/installers/windows/lang_es.nsi
+++ b/indra/newview/installers/windows/lang_es.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi
index 1b5dbfc975..bec5835bed 100644
--- a/indra/newview/installers/windows/lang_fr.nsi
+++ b/indra/newview/installers/windows/lang_fr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi
index a456e6e417..1d2e150525 100644
--- a/indra/newview/installers/windows/lang_it.nsi
+++ b/indra/newview/installers/windows/lang_it.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi
index 5b1c5f4ce9..1bd6526670 100644
--- a/indra/newview/installers/windows/lang_ja.nsi
+++ b/indra/newview/installers/windows/lang_ja.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi
index 9ef252d232..87032fec18 100644
--- a/indra/newview/installers/windows/lang_pt-br.nsi
+++ b/indra/newview/installers/windows/lang_pt-br.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi
index d7c728d3e2..019c66123c 100644
--- a/indra/newview/installers/windows/lang_ru.nsi
+++ b/indra/newview/installers/windows/lang_ru.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi
index 97c602f4fc..1c4e2c2f48 100644
--- a/indra/newview/installers/windows/lang_tr.nsi
+++ b/indra/newview/installers/windows/lang_tr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi
index 39c005a683..355e01a333 100644
--- a/indra/newview/installers/windows/lang_zh.nsi
+++ b/indra/newview/installers/windows/lang_zh.nsi
Binary files differ
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 648212177b..ee49125711 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -394,6 +394,40 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
{
status = LLCore::HttpStatus(HTTP_INTERNAL_ERROR, "Malformed response contents");
}
+ else if (status.getType() == 410) //GONE
+ {
+ // Item does not exist or was already deleted from server.
+ // parent folder is out of sync
+ if (type == REMOVECATEGORY)
+ {
+ LLViewerInventoryCategory *cat = gInventory.getCategory(targetId);
+ if (cat)
+ {
+ LL_WARNS("Inventory") << "Purge failed for '" << cat->getName()
+ << "' local version:" << cat->getVersion()
+ << " since folder no longer exists at server. Descendent count: server == " << cat->getDescendentCount()
+ << ", viewer == " << cat->getViewerDescendentCount()
+ << LL_ENDL;
+ gInventory.fetchDescendentsOf(cat->getParentUUID());
+ // Note: don't delete folder here - contained items will be deparented (or deleted)
+ // and since we are clearly out of sync we can't be sure we won't get rid of something we need.
+ // For example folder could have been moved or renamed with items intact, let it fetch first.
+ }
+ }
+ else if (type == REMOVEITEM)
+ {
+ LLViewerInventoryItem *item = gInventory.getItem(targetId);
+ if (item)
+ {
+ LL_WARNS("Inventory") << "Purge failed for '" << item->getName()
+ << "' since item no longer exists at server." << LL_ENDL;
+ gInventory.fetchDescendentsOf(item->getParentUUID());
+ // since item not on the server and exists at viewer, so it needs an update at the least,
+ // so delete it, in worst case item will be refetched with new params.
+ gInventory.onObjectDeletedFromServer(targetId);
+ }
+ }
+ }
LL_WARNS("Inventory") << "Inventory error: " << status.toString() << LL_ENDL;
LL_WARNS("Inventory") << ll_pretty_print_sd(result) << LL_ENDL;
}
@@ -970,7 +1004,16 @@ void AISUpdate::doUpdate()
// inventory COF is maintained on the viewer through calls to
// LLInventoryModel::accountForUpdate when a changing operation
// is performed. This occasionally gets out of sync however.
- cat->setVersion(version);
+ if (version != LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ cat->setVersion(version);
+ }
+ else
+ {
+ // We do not account for update if version is UNKNOWN, so we shouldn't rise version
+ // either or viewer will get stuck on descendants count -1, try to refetch folder instead
+ cat->fetch();
+ }
}
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b6f705f21a..9bab572b68 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -724,7 +724,7 @@ LLAppViewer::LLAppViewer()
// OK to write stuff to logs now, we've now crash reported if necessary
//
- LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
+ LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString(), getOSInfo().getOSStringSimple());
}
LLAppViewer::~LLAppViewer()
@@ -3111,10 +3111,19 @@ LLSD LLAppViewer::getViewerInfo() const
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
#if LL_WINDOWS
- LLSD driver_info = gDXHardware.getDisplayInfo();
- if (driver_info.has("DriverVersion"))
+ std::string drvinfo = gDXHardware.getDriverVersionWMI();
+ if (!drvinfo.empty())
{
- info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
+ info["GRAPHICS_DRIVER_VERSION"] = drvinfo;
+ }
+ else
+ {
+ LL_WARNS("Driver version")<< "Cannot get driver version from getDriverVersionWMI" << LL_ENDL;
+ LLSD driver_info = gDXHardware.getDisplayInfo();
+ if (driver_info.has("DriverVersion"))
+ {
+ info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
+ }
}
#endif
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 219d9da01f..8fe684ad79 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -1005,7 +1005,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
}
// static
-void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
+void LLAvatarActions::toggleMute(const LLUUID& id, U32 flags)
{
LLAvatarName av_name;
LLAvatarNameCache::get(id, &av_name);
@@ -1016,15 +1016,21 @@ void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
LLMute mute(id, av_name.getUserName(), LLMute::AGENT);
if (!is_muted)
{
- mute_list->add(mute, LLMute::flagVoiceChat);
+ mute_list->add(mute, flags);
}
else
{
- mute_list->remove(mute, LLMute::flagVoiceChat);
+ mute_list->remove(mute, flags);
}
}
// static
+void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
+{
+ toggleMute(id, LLMute::flagVoiceChat);
+}
+
+// static
bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
{
// First use LLAvatarTracker::isBuddy()
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 256d44d820..b56d5b0fb9 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -131,6 +131,11 @@ public:
static void toggleBlock(const LLUUID& id);
/**
+ * Mute/unmute avatar.
+ */
+ static void toggleMute(const LLUUID& id, U32 flags);
+
+ /**
* Block/unblock the avatar voice.
*/
static void toggleMuteVoice(const LLUUID& id);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 9798ef3529..a9e8e77a0b 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -38,10 +38,14 @@
#include "llpanel.h"
#include "lluictrlfactory.h"
#include "llscrollcontainer.h"
-#include "llavatariconctrl.h"
-#include "llcallingcard.h" //for LLAvatarTracker
+#include "llagent.h"
#include "llagentdata.h"
#include "llavataractions.h"
+#include "llavatariconctrl.h"
+#include "llcallingcard.h" //for LLAvatarTracker
+#include "llgroupactions.h"
+#include "llgroupmgr.h"
+#include "llspeakers.h" //for LLIMSpeakerMgr
#include "lltrans.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
@@ -49,7 +53,6 @@
#include "llstylemap.h"
#include "llslurl.h"
#include "lllayoutstack.h"
-#include "llagent.h"
#include "llnotificationsutil.h"
#include "lltoastnotifypanel.h"
#include "lltooltip.h"
@@ -61,7 +64,6 @@
#include "llurlaction.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
-#include "llmutelist.h"
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
@@ -187,6 +189,161 @@ public:
return false;
}
+ void banGroupMember(const LLUUID& participant_uuid)
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return;
+ }
+
+ gdatap->banMemberById(participant_uuid);
+ }
+
+ bool canBanInGroup()
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return false;
+ }
+
+ if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ bool canBanGroupMember(const LLUUID& participant_uuid)
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return false;
+ }
+
+ if (gdatap->mPendingBanRequest)
+ {
+ return false;
+ }
+
+ if (gAgentID == getAvatarId())
+ {
+ //Don't ban self
+ return false;
+ }
+
+ if (gdatap->isRoleMemberDataComplete())
+ {
+ if (gdatap->mMembers.size())
+ {
+ LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(participant_uuid);
+ if (mi != gdatap->mMembers.end())
+ {
+ LLGroupMemberData* member_data = (*mi).second;
+ // Is the member an owner?
+ if (member_data && member_data->isInRole(gdatap->mOwnerRole))
+ {
+ return false;
+ }
+
+ if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+ }
+ }
+ }
+
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(participant_uuid).get();
+
+ if (speakerp
+ && gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool isGroupModerator()
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (!speaker_mgr)
+ {
+ LL_WARNS() << "Speaker manager is missing" << LL_ENDL;
+ return false;
+ }
+
+ // Is session a group call/chat?
+ if(gAgent.isInGroup(mSessionID))
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(gAgentID).get();
+
+ // Is agent a moderator?
+ return speakerp && speakerp->mIsModerator;
+ }
+
+ return false;
+ }
+
+ bool canModerate(const std::string& userdata)
+ {
+ // only group moderators can perform actions related to this "enable callback"
+ if (!isGroupModerator() || gAgentID == getAvatarId())
+ {
+ return false;
+ }
+
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (!speaker_mgr)
+ {
+ return false;
+ }
+
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (!speakerp)
+ {
+ return false;
+ }
+
+ bool voice_channel = speakerp->isInVoiceChannel();
+
+ if ("can_moderate_voice" == userdata)
+ {
+ return voice_channel;
+ }
+ else if ("can_mute" == userdata)
+ {
+ return voice_channel && (speakerp->mStatus != LLSpeaker::STATUS_MUTED);
+ }
+ else if ("can_unmute" == userdata)
+ {
+ return speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+ }
+ else if ("can_allow_text_chat" == userdata)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
void onAvatarIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -245,11 +402,36 @@ public:
}
else if(level == "block_unblock")
{
- mute(getAvatarId(), LLMute::flagVoiceChat);
+ LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagVoiceChat);
}
else if(level == "mute_unmute")
{
- mute(getAvatarId(), LLMute::flagTextChat);
+ LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagTextChat);
+ }
+ else if(level == "toggle_allow_text_chat")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ speaker_mgr->toggleAllowTextChat(getAvatarId());
+ }
+ else if(level == "group_mute")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ speaker_mgr->moderateVoiceParticipant(getAvatarId(), false);
+ }
+ }
+ else if(level == "group_unmute")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ speaker_mgr->moderateVoiceParticipant(getAvatarId(), true);
+ }
+ }
+ else if(level == "ban_member")
+ {
+ banGroupMember(getAvatarId());
}
}
@@ -265,24 +447,71 @@ public:
{
return LLMuteList::getInstance()->isMuted(getAvatarId(), LLMute::flagTextChat);
}
+ else if (level == "is_allowed_text_chat")
+ {
+ if (gAgent.isInGroup(mSessionID))
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if(speaker_mgr)
+ {
+ const LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId());
+ if (NULL != speakerp)
+ {
+ return !speakerp->mModeratorMutedText;
+ }
+ }
+ }
+ return false;
+ }
return false;
}
- void mute(const LLUUID& participant_id, U32 flags)
+ bool onAvatarIconContextMenuItemEnabled(const LLSD& userdata)
{
- BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
- LLAvatarName av_name;
- LLAvatarNameCache::get(participant_id, &av_name);
- LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
+ std::string level = userdata.asString();
- if (!is_muted)
+ if (level == "can_allow_text_chat" || level == "can_mute" || level == "can_unmute")
{
- LLMuteList::getInstance()->add(mute, flags);
+ return canModerate(userdata);
}
- else
+ else if (level == "can_ban_member")
{
- LLMuteList::getInstance()->remove(mute, flags);
+ return canBanGroupMember(getAvatarId());
}
+ return false;
+ }
+
+ bool onAvatarIconContextMenuItemVisible(const LLSD& userdata)
+ {
+ std::string level = userdata.asString();
+
+ if (level == "show_mute")
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (speakerp)
+ {
+ return speakerp->isInVoiceChannel() && speakerp->mStatus != LLSpeaker::STATUS_MUTED;
+ }
+ }
+ return false;
+ }
+ else if (level == "show_unmute")
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (speakerp)
+ {
+ return speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+ }
+ }
+ return false;
+ }
+ return false;
}
BOOL postBuild()
@@ -292,6 +521,8 @@ public:
registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
+ registrar_enable.add("AvatarIcon.Enable", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemEnabled, this, _2));
+ registrar_enable.add("AvatarIcon.Visible", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemVisible, this, _2));
registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
@@ -567,9 +798,14 @@ protected:
if(menu)
{
bool is_friend = LLAvatarActions::isFriend(mAvatarID);
+ bool is_group_session = gAgent.isInGroup(mSessionID);
menu->setItemEnabled("Add Friend", !is_friend);
menu->setItemEnabled("Remove Friend", is_friend);
+ menu->setItemVisible("Moderator Options Separator", is_group_session && isGroupModerator());
+ menu->setItemVisible("Moderator Options", is_group_session && isGroupModerator());
+ menu->setItemVisible("Group Ban Separator", is_group_session && canBanInGroup());
+ menu->setItemVisible("BanMember", is_group_session && canBanInGroup());
if(gAgentID == mAvatarID)
{
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 711a87dc99..d657f04457 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -407,6 +407,7 @@ void LLExpandableTextBox::collapseTextBox()
setRect(mCollapsedRect);
updateTextBoxRect();
+ gViewerWindow->removePopup(this);
}
void LLExpandableTextBox::onFocusLost()
@@ -434,8 +435,6 @@ void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent
mExpanded = false;
LLUICtrl::reshape(width, height, called_from_parent);
updateTextBoxRect();
-
- gViewerWindow->removePopup(this);
}
void LLExpandableTextBox::setValue(const LLSD& value)
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index a7236d1778..7e92643b93 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -544,11 +544,18 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
send_agent_pause();
{
// NOTA BENE: hitting the file dialog triggers a window focus event, destroying the selection manager!!
- success = GetSaveFileName(&mOFN);
- if (success)
+ try
{
- std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
- mFiles.push_back(filename);
+ success = GetSaveFileName(&mOFN);
+ if (success)
+ {
+ std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
+ mFiles.push_back(filename);
+ }
+ }
+ catch (...)
+ {
+ LOG_UNHANDLED_EXCEPTION("");
}
gKeyboard->resetKeys();
}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 3522932d03..333765f99f 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1150,11 +1150,11 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
}
else if ("block_unblock" == command)
{
- toggleMute(userID, LLMute::flagVoiceChat);
+ LLAvatarActions::toggleMute(userID, LLMute::flagVoiceChat);
}
else if ("mute_unmute" == command)
{
- toggleMute(userID, LLMute::flagTextChat);
+ LLAvatarActions::toggleMute(userID, LLMute::flagTextChat);
}
else if ("selected" == command || "mute_all" == command || "unmute_all" == command)
{
@@ -2096,24 +2096,6 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
}
}
-void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags)
-{
- BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
-
- LLAvatarName av_name;
- LLAvatarNameCache::get(participant_id, &av_name);
- LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
-
- if (!is_muted)
- {
- LLMuteList::getInstance()->add(mute, flags);
- }
- else
- {
- LLMuteList::getInstance()->remove(mute, flags);
- }
-}
-
void LLFloaterIMContainer::openNearbyChat()
{
// If there's only one conversation in the container and that conversation is the nearby chat
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 60cef83d9a..90fc0c2bdd 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -176,7 +176,6 @@ private:
void moderateVoiceAllParticipants(bool unmute);
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
void toggleAllowTextChat(const LLUUID& participant_uuid);
- void toggleMute(const LLUUID& participant_id, U32 flags);
void banSelectedMember(const LLUUID& participant_uuid);
void openNearbyChat();
bool isParticipantListExpanded();
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 7bf4516d8c..f9efd13608 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -87,6 +87,10 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
{ "/shout" , CHAT_TYPE_SHOUT}
};
+bool cb_do_nothing()
+{
+ return false;
+}
LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
: LLFloaterIMSessionTab(LLSD(LLUUID::null)),
@@ -97,6 +101,12 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
mIsP2PChat = false;
mIsNearbyChat = true;
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+
+ // Required by LLFloaterIMSessionTab::mGearBtn
+ // But nearby floater has no 'per agent' menu items,
+ mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&cb_do_nothing));
+ mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&cb_do_nothing));
+ mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&cb_do_nothing));
}
//static
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 2cd94c592a..3aee08482b 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -46,6 +46,10 @@
const F32 REFRESH_INTERVAL = 1.0f;
+void cb_group_do_nothing()
+{
+}
+
LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
: LLTransientDockableFloater(NULL, false, session_id),
mIsP2PChat(false),
@@ -82,6 +86,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2));
mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2));
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2));
+ mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&cb_group_do_nothing));
}
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index 3f80d6f1a4..10cce3bd22 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -41,16 +41,13 @@ LLFloaterLinkReplace::LLFloaterLinkReplace(const LLSD& key)
mRemainingItems(0),
mSourceUUID(LLUUID::null),
mTargetUUID(LLUUID::null),
- mInstance(NULL),
mBatchSize(gSavedSettings.getU32("LinkReplaceBatchSize"))
{
mEventTimer.stop();
- mInstance = this;
}
LLFloaterLinkReplace::~LLFloaterLinkReplace()
{
- mInstance = NULL;
}
BOOL LLFloaterLinkReplace::postBuild()
@@ -180,11 +177,9 @@ void LLFloaterLinkReplace::onStartClicked()
}
}
-void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id)
{
LL_DEBUGS() << "Inventory link replace:" << LL_NEWLINE
<< " - old_item_id = " << old_item_id.asString() << LL_NEWLINE
@@ -239,20 +234,21 @@ void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
outfit_update_folder = outfit_folder_id;
}
- LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
+ LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, floater_handle, outfit_update_folder));
remove_inventory_object(old_item_id, cb);
}
-void LLFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id)
{
if (outfit_folder_id.notNull())
{
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
}
- if (mInstance)
+ if (!floater_handle.isDead())
{
- decreaseOpenItemCount();
+ floater_handle.get()->decreaseOpenItemCount();
}
}
@@ -324,7 +320,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
LLInventoryObject::const_object_list_t obj_array;
obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item));
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::linkCreatedCallback,
- this,
+ getDerivedHandle<LLFloaterLinkReplace>(),
source_item->getUUID(),
target_item->getUUID(),
needs_wearable_ordering_update,
diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h
index 377dd1d450..dd5c301206 100644
--- a/indra/newview/llfloaterlinkreplace.h
+++ b/indra/newview/llfloaterlinkreplace.h
@@ -98,12 +98,9 @@ private:
void updateFoundLinks();
void processBatch(LLInventoryModel::item_array_t items);
- void linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id);
- void itemRemovedCallback(const LLUUID& outfit_folder_id);
+ static void linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id);
+ static void itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id);
void onSourceItemDrop(const LLUUID& source_item_id);
void onTargetItemDrop(const LLUUID& target_item_id);
@@ -120,8 +117,6 @@ private:
U32 mBatchSize;
LLInventoryModel::item_array_t mRemainingInventoryItems;
-
- LLFloaterLinkReplace* mInstance;
};
#endif // LL_FLOATERLINKREPLACE_H
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index c33dee5fb4..c330c2ae47 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2290,13 +2290,15 @@ BOOL LLPanelEstateInfo::postBuild()
getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this));
+ getChild<LLUICtrl>("externally_visible_radio")->setFocus(TRUE);
+
return LLPanelRegionInfo::postBuild();
}
void LLPanelEstateInfo::refresh()
{
// Disable access restriction controls if they make no sense.
- bool public_access = getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex();
+ bool public_access = ("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
getChildView("Only Allow")->setEnabled(public_access);
getChildView("limit_payment")->setEnabled(public_access);
@@ -2317,7 +2319,7 @@ void LLPanelEstateInfo::refreshFromEstate()
getChild<LLUICtrl>("estate_name")->setValue(estate_info.getName());
setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString());
- getChild<LLRadioGroup>("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0);
+ getChild<LLUICtrl>("externally_visible_radio")->setValue(estate_info.getIsExternallyVisible() ? "estate_public_access" : "estate_restricted_access");
getChild<LLUICtrl>("voice_chat_check")->setValue(estate_info.getAllowVoiceChat());
getChild<LLUICtrl>("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport());
getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous());
@@ -2360,7 +2362,7 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con
// update model
estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore
- estate_info.setIsExternallyVisible(getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex());
+ estate_info.setIsExternallyVisible("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
estate_info.setAllowDirectTeleport(getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean());
estate_info.setDenyAnonymous(getChild<LLUICtrl>("limit_payment")->getValue().asBoolean());
estate_info.setDenyAgeUnverified(getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean());
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index b14b9b7578..2869256d09 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -638,20 +638,20 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
// HACK - highlight buttons for next click
mRadioGroupMove->setVisible(move_visible);
- if (!gGrabBtnSpin &&
- !gGrabBtnVertical &&
- !(mask == MASK_VERTICAL) &&
- !(mask == MASK_SPIN) )
+ if (!(gGrabBtnSpin ||
+ gGrabBtnVertical ||
+ (mask == MASK_VERTICAL) ||
+ (mask == MASK_SPIN)))
{
mRadioGroupMove->setValue("radio move");
}
- else if (gGrabBtnVertical ||
- (mask == MASK_VERTICAL) )
+ else if ((mask == MASK_VERTICAL) ||
+ (gGrabBtnVertical && (mask != MASK_SPIN)))
{
mRadioGroupMove->setValue("radio lift");
}
- else if (gGrabBtnSpin ||
- (mask == MASK_SPIN) )
+ else if ((mask == MASK_SPIN) ||
+ (gGrabBtnSpin && (mask != MASK_VERTICAL)))
{
mRadioGroupMove->setValue("radio spin");
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1b32fc9dfe..2751631a59 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3884,8 +3884,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array;
gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array);
+ LLViewerInventoryCategory *trash = getCategory();
// Enable Empty menu item only when there is something to act upon.
- if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel)
+ // Also don't enable menu if folder isn't fully fetched
+ if ((0 == cat_array->size() && 0 == item_array->size())
+ || is_recent_panel
+ || !trash
+ || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN
+ || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
disabled_items.push_back(std::string("Empty Trash"));
}
@@ -4060,8 +4066,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
// BAP change once we're no longer treating regular categories as ensembles.
- const bool is_ensemble = (type == LLFolderType::FT_NONE ||
- LLFolderType::lookupIsEnsembleType(type));
const bool is_agent_inventory = isAgentInventory();
// Only enable calling-card related options for non-system folders.
@@ -4104,30 +4108,26 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
}
items.push_back(std::string("Replace Outfit"));
-
- if (is_agent_inventory)
+ }
+ if (is_agent_inventory)
+ {
+ items.push_back(std::string("Folder Wearables Separator"));
+ items.push_back(std::string("Remove From Outfit"));
+ if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
{
- items.push_back(std::string("Folder Wearables Separator"));
- if (is_ensemble)
- {
- items.push_back(std::string("Wear As Ensemble"));
- }
- items.push_back(std::string("Remove From Outfit"));
- if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
- {
disabled_items.push_back(std::string("Remove From Outfit"));
- }
- }
- if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
- {
- disabled_items.push_back(std::string("Replace Outfit"));
- }
- if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
- {
- disabled_items.push_back(std::string("Add To Outfit"));
}
- items.push_back(std::string("Outfit Separator"));
}
+ if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Replace Outfit"));
+ }
+ if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Add To Outfit"));
+ }
+ items.push_back(std::string("Outfit Separator"));
+
}
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index bccc654fbf..d282240bfb 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2295,9 +2295,33 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
if ("delete" == action)
{
- LLSD args;
- args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem");
- LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ static bool sDisplayedAtSession = false;
+
+ LLAllDescendentsPassedFilter f;
+ for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
+ {
+ if (LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(*it))
+ {
+ folder->applyFunctorRecursively(f);
+ }
+ }
+ // Fall through to the generic confirmation if the user choose to ignore the specialized one
+ if ( (!f.allDescendentsPassedFilter()) && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
+ {
+ LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ }
+ else
+ {
+ if (!sDisplayedAtSession) // ask for the confirmation at least once per session
+ {
+ LLNotifications::instance().setIgnored("DeleteItems", false);
+ sDisplayedAtSession = true;
+ }
+
+ LLSD args;
+ args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem");
+ LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ }
// Note: marketplace listings will be updated in the callback if delete confirmed
return;
}
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 649db4032d..d454d7e00b 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -460,6 +460,8 @@ struct LLInventoryAction
static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);
static void removeItemFromDND(LLFolderView* root);
+ static const int sConfirmOnDeleteItemsNumber;
+
private:
static void buildMarketplaceFolders(LLFolderView* root);
static void updateMarketplaceFolders();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index c26f2f07ce..5e33e7987a 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -221,7 +221,11 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const
{
const LLInventoryObject* obj = getObject(obj_id);
-
+ if(!obj)
+ {
+ LL_WARNS(LOG_INV) << "Non-existent object [ id: " << obj_id << " ] " << LL_ENDL;
+ return NULL;
+ }
// Search up the parent chain until we get to root or an acceptable folder.
// This assumes there are no cycles in the tree else we'll get a hang.
LLUUID parent_id = obj->getParentUUID();
@@ -458,12 +462,8 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
}
// Purge the emptied folder
- // Note: we'd like to use purgeObject() but it doesn't cleanly eliminate the folder
- // which leads to issues further down the road when the folder is found again
- //purgeObject(folder_id);
- // We remove the folder and empty the trash instead which seems to work
- removeCategory(folder_id);
- gInventory.emptyFolderType("", LLFolderType::FT_TRASH);
+ removeCategory(folder_id);
+ remove_inventory_category(folder_id, NULL);
}
}
@@ -799,22 +799,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
-U32 LLInventoryModel::getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit)
-{
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(id, cats, items, LLInventoryModel::INCLUDE_TRASH);
-
- U32 items_found = items.size() + cats.size();
-
- for (U32 i = 0; i < cats.size() && items_found <= max_item_limit; ++i)
- {
- items_found += getDescendentsCountRecursive(cats[i]->getUUID(), max_item_limit - items_found);
- }
-
- return items_found;
-}
-
void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
{
const LLInventoryObject *obj = getObject(object_id);
@@ -3321,9 +3305,12 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderT
LLSD args;
if(LLFolderType::FT_TRASH == preferred_type)
{
- static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity");
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
const LLUUID trash_id = findCategoryUUIDForType(preferred_type);
- args["COUNT"] = (S32)getDescendentsCountRecursive(trash_id, trash_max_capacity);
+ gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); //All descendants
+ S32 item_count = items.size() + cats.size();
+ args["COUNT"] = item_count;
}
LLNotificationsUtil::add(notification, args, LLSD(),
boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, preferred_type));
@@ -3433,9 +3420,20 @@ bool callback_preview_trash_folder(const LLSD& notification, const LLSD& respons
void LLInventoryModel::checkTrashOverflow()
{
- static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity");
+ static LLCachedControl<U32> trash_max_capacity(gSavedSettings, "InventoryTrashMaxCapacity");
+
+ // Collect all descendants including those in subfolders.
+ //
+ // Note: Do we really need content of subfolders?
+ // This was made to prevent download of trash folder timeouting
+ // viewer and sub-folders are supposed to download independently.
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH);
- if (getDescendentsCountRecursive(trash_id, trash_max_capacity) >= trash_max_capacity)
+ gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH);
+ S32 item_count = items.size() + cats.size();
+
+ if (item_count >= trash_max_capacity)
{
if (LLFloaterPreviewTrash::isVisible())
{
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index c558c0803b..01e0ed7e9b 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -265,9 +265,6 @@ public:
// Follow parent chain to the top.
bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const;
-private:
- U32 getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit);
-
//--------------------------------------------------------------------
// Find
//--------------------------------------------------------------------
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 4427f32de9..26d7a7a28a 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -350,6 +350,11 @@ void LLInventoryFetchDescendentsObserver::startFetch()
if (!cat) continue;
if (!isCategoryComplete(cat))
{
+ // CHECK IT: isCategoryComplete() checks both version and descendant count but
+ // fetch() only works for Unknown version and doesn't care about descentants,
+ // as result fetch won't start and folder will potentially get stuck as
+ // incomplete in observer.
+ // Likely either both should use only version or both should check descendants.
cat->fetch(); //blindly fetch it without seeing if anything else is fetching it.
mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer.
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 4b117941a0..f9c91312ee 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1217,7 +1217,18 @@ void LLInventoryPanel::purgeSelectedItems()
const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList();
if (inventory_selected.empty()) return;
LLSD args;
- args["COUNT"] = (S32)inventory_selected.size();
+ S32 count = inventory_selected.size();
+ for (std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end();
+ it != end_it;
+ ++it)
+ {
+ LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID();
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH);
+ count += items.size() + cats.size();
+ }
+ args["COUNT"] = count;
LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2));
}
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 54459342a7..bb55a3a6c0 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -94,10 +94,12 @@ LLLoginInstance::LLLoginInstance() :
}
void LLLoginInstance::setPlatformInfo(const std::string platform,
- const std::string platform_version)
+ const std::string platform_version,
+ const std::string platform_name)
{
mPlatform = platform;
mPlatformVersion = platform_version;
+ mPlatformVersionName = platform_name;
}
LLLoginInstance::~LLLoginInstance()
@@ -166,7 +168,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
requested_options.append("event_notifications");
requested_options.append("classified_categories");
requested_options.append("adult_compliant");
- //requested_options.append("inventory-targets");
requested_options.append("buddy-list");
requested_options.append("newuser-config");
requested_options.append("ui-config");
@@ -188,14 +189,13 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
requested_options.append("god-connect");
}
- // (re)initialize the request params with creds.
- LLSD request_params = user_credential->getLoginParams();
+ LLSD request_params;
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
if ( ! llHashedUniqueID(hashed_unique_id_string) )
{
- LL_WARNS() << "Not providing a unique id in request params" << LL_ENDL;
+ LL_WARNS("LLLogin") << "Not providing a unique id in request params" << LL_ENDL;
}
request_params["start"] = construct_start_string();
@@ -209,10 +209,24 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params["platform"] = mPlatform;
request_params["platform_version"] = mPlatformVersion;
request_params["address_size"] = ADDRESS_SIZE;
+ request_params["platform_string"] = mPlatformVersionName;
request_params["id0"] = mSerialNumber;
request_params["host_id"] = gSavedSettings.getString("HostID");
request_params["extended_errors"] = true; // request message_id and message_args
+ // log request_params _before_ adding the credentials
+ LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
+
+ // Copy the credentials into the request after logging the rest
+ LLSD credentials(user_credential->getLoginParams());
+ for (LLSD::map_const_iterator it = credentials.beginMap();
+ it != credentials.endMap();
+ it++
+ )
+ {
+ request_params[it->first] = it->second;
+ }
+
mRequestData.clear();
mRequestData["method"] = "login_to_simulator";
mRequestData["params"] = request_params;
@@ -228,7 +242,7 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event)
if(!(event.has("state") && event.has("change") && event.has("progress")))
{
- LL_ERRS() << "Unknown message from LLLogin: " << event << LL_ENDL;
+ LL_ERRS("LLLogin") << "Unknown message from LLLogin: " << event << LL_ENDL;
}
mLoginState = event["state"].asString();
@@ -254,6 +268,9 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
LLSD response = event["data"];
std::string reason_response = response["reason"].asString();
std::string message_response = response["message"].asString();
+ LL_DEBUGS("LLLogin") << "reason " << reason_response
+ << " message " << message_response
+ << LL_ENDL;
// For the cases of critical message or TOS agreement,
// start the TOS dialog. The dialog response will be handled
// by the LLLoginInstance::handleTOSResponse() callback.
@@ -261,7 +278,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
// to reconnect or to end the attempt in failure.
if(reason_response == "tos")
{
- LL_INFOS() << "LLLoginInstance::handleLoginFailure ToS" << LL_ENDL;
+ LL_INFOS("LLLogin") << " ToS" << LL_ENDL;
LLSD data(LLSD::emptyMap());
data["message"] = message_response;
@@ -276,7 +293,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
else if(reason_response == "critical")
{
- LL_INFOS() << "LLLoginInstance::handleLoginFailure Crit" << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleLoginFailure Crit" << LL_ENDL;
LLSD data(LLSD::emptyMap());
data["message"] = message_response;
@@ -304,7 +321,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
// This shouldn't happen - the viewer manager should have forced an update;
// possibly the user ran the viewer directly and bypassed the update check
std::string required_version = response["message_args"]["VERSION"];
- LL_WARNS() << "Login failed because an update to version " << required_version << " is required." << LL_ENDL;
+ LL_WARNS("LLLogin") << "Login failed because an update to version " << required_version << " is required." << LL_ENDL;
if (gViewerWindow)
gViewerWindow->setShowProgress(FALSE);
@@ -321,7 +338,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
else
{
- LL_WARNS() << "Login failed for an unknown reason: " << LLSDOStreamer<LLSDNotationFormatter>(response) << LL_ENDL;
+ LL_WARNS("LLLogin") << "Login failed for an unknown reason: " << LLSDOStreamer<LLSDNotationFormatter>(response) << LL_ENDL;
if (gViewerWindow)
gViewerWindow->setShowProgress(FALSE);
@@ -337,7 +354,7 @@ void LLLoginInstance::handleLoginDisallowed(const LLSD& notification, const LLSD
void LLLoginInstance::handleLoginSuccess(const LLSD& event)
{
- LL_INFOS() << "LLLoginInstance::handleLoginSuccess" << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleLoginSuccess" << LL_ENDL;
attemptComplete();
}
@@ -346,7 +363,7 @@ void LLLoginInstance::handleDisconnect(const LLSD& event)
{
// placeholder
- LL_INFOS() << "LLLoginInstance::handleDisconnect placeholder " << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleDisconnect placeholder " << LL_ENDL;
}
void LLLoginInstance::handleIndeterminate(const LLSD& event)
@@ -360,7 +377,7 @@ void LLLoginInstance::handleIndeterminate(const LLSD& event)
LLSD message = event.get("data").get("message");
if(message.isDefined())
{
- LL_INFOS() << "LLLoginInstance::handleIndeterminate " << message.asString() << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleIndeterminate " << message.asString() << LL_ENDL;
LLSD progress_update;
progress_update["desc"] = message;
@@ -372,7 +389,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
{
if(accepted)
{
- LL_INFOS() << "LLLoginInstance::handleTOSResponse: accepted" << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: accepted" << LL_ENDL;
// Set the request data to true and retry login.
mRequestData["params"][key] = true;
@@ -380,7 +397,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
}
else
{
- LL_INFOS() << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL;
+ LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL;
attemptComplete();
}
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index f53c02c6e1..651ad10afb 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -62,7 +62,7 @@ public:
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
- void setPlatformInfo(const std::string platform, const std::string platform_version);
+ void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name);
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
@@ -96,6 +96,7 @@ private:
S32 mLastExecDuration;
std::string mPlatform;
std::string mPlatformVersion;
+ std::string mPlatformVersionName;
LLEventDispatcher mDispatcher;
};
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c4d1917567..c2a0393170 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1586,7 +1586,12 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
LLMeshRepository::sCacheBytesRead += size;
++LLMeshRepository::sCacheReads;
file.seek(offset);
- U8* buffer = new U8[size];
+ U8* buffer = new(std::nothrow) U8[size];
+ if (!buffer)
+ {
+ LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh LOD" << LL_ENDL;
+ return false;
+ }
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 5b53a05274..bf1716e18c 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -48,6 +48,7 @@
#include <boost/tokenizer.hpp>
#include <boost/bind.hpp>
+#include <boost/algorithm/string/replace.hpp>
#include "lldispatcher.h"
#include "llxfermanager.h"
@@ -180,9 +181,10 @@ LLMuteList::~LLMuteList()
BOOL LLMuteList::isLinden(const std::string& name) const
{
+ std::string username = boost::replace_all_copy(name, ".", " ");
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
- tokenizer tokens(name, sep);
+ tokenizer tokens(username, sep);
tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end()) return FALSE;
@@ -190,7 +192,8 @@ BOOL LLMuteList::isLinden(const std::string& name) const
if (token_iter == tokens.end()) return FALSE;
std::string last_name = *token_iter;
- return last_name == "Linden";
+ LLStringUtil::toLower(last_name);
+ return last_name == "linden";
}
static LLVOAvatar* find_avatar(const LLUUID& id)
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 7a183cb298..52c5234137 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -322,6 +322,8 @@ public:
*/
static std::string getSubstitutionName(const LLNotificationPtr& notification);
+ static std::string getSubstitutionOriginalName(const LLNotificationPtr& notification);
+
/**
* Adds notification panel to the IM floater.
*/
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 4a3923ef6e..6a58196760 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -242,6 +242,20 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica
}
// static
+std::string LLHandlerUtil::getSubstitutionOriginalName(const LLNotificationPtr& notification)
+{
+ if(notification->getSubstitutions().has("ORIGINAL_NAME"))
+ {
+ std::string name = notification->getSubstitutions()["ORIGINAL_NAME"];
+ if(!name.empty())
+ {
+ return name;
+ }
+ }
+ return LLHandlerUtil::getSubstitutionName(notification);
+}
+
+// static
void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 63ab88da42..14d25d8158 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -131,6 +131,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notif_to_im;
p.force_show = notification->getOfferFromAgent();
+ p.can_fade = notification->canFadeToast();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index 7acb2f9e90..fef0631fa6 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -77,6 +77,7 @@ void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notifica
p.notification = notification;
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
+ p.can_fade = notification->canFadeToast();
if(gAgent.isDoNotDisturb())
{
p.force_show = notification->getName() == "SystemMessage"
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 596327e8f1..a6ef130cd0 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -86,7 +86,7 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
}
std::string session_name = notification->getPayload()["SESSION_NAME"];
- const std::string name = notification->getSubstitutions()["NAME"];
+ const std::string name = LLHandlerUtil::getSubstitutionOriginalName(notification);
if (session_name.empty())
{
session_name = name;
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 31e89c0ed0..5518656f3f 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -344,7 +344,7 @@ void LLOutfitGallery::removeFromLastRow(LLOutfitGalleryItem* item)
mItemPanels.pop_back();
}
-LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name)
+LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name, LLUUID outfit_id)
{
LLOutfitGalleryItem::Params giparams;
LLOutfitGalleryItem* gitem = LLUICtrlFactory::create<LLOutfitGalleryItem>(giparams);
@@ -353,6 +353,7 @@ LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name)
gitem->setFollowsLeft();
gitem->setFollowsTop();
gitem->setOutfitName(name);
+ gitem->setUUID(outfit_id);
return gitem;
}
@@ -511,7 +512,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
if (!cat) return;
std::string name = cat->getName();
- LLOutfitGalleryItem* item = buildGalleryItem(name);
+ LLOutfitGalleryItem* item = buildGalleryItem(name, cat_id);
mOutfitMap.insert(LLOutfitGallery::outfit_map_value_t(cat_id, item));
item->setRightMouseDownCallback(boost::bind(&LLOutfitListBase::outfitRightClickCallBack, this,
_1, _2, _3, cat_id));
@@ -661,7 +662,8 @@ LLOutfitGalleryItem::LLOutfitGalleryItem(const Params& p)
mSelected(false),
mWorn(false),
mDefaultImage(true),
- mOutfitName("")
+ mOutfitName(""),
+ mUUID(LLUUID())
{
buildFromFile("panel_outfit_gallery_item.xml");
}
@@ -745,23 +747,20 @@ BOOL LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLUICtrl::handleRightMouseDown(x, y, mask);
}
-BOOL LLOutfitGallery::handleDoubleClick(S32 x, S32 y, MASK mask)
+BOOL LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLTabContainer* appearence_tabs = LLPanelOutfitsInventory::findInstance()->getChild<LLTabContainer>("appearance_tabs");
- LLPanel* panel = NULL;
- LLAccordionCtrl* accordion = NULL;
- if (appearence_tabs != NULL)
+ if (appearence_tabs && (mUUID != LLUUID()))
{
appearence_tabs->selectTabByName("outfitslist_tab");
- panel = appearence_tabs->getCurrentPanel();
- if (panel != NULL)
+ LLPanel* panel = appearence_tabs->getCurrentPanel();
+ if (panel)
{
- accordion = panel->getChild<LLAccordionCtrl>("outfits_accordion");
+ LLAccordionCtrl* accordion = panel->getChild<LLAccordionCtrl>("outfits_accordion");
LLOutfitsList* outfit_list = dynamic_cast<LLOutfitsList*>(panel);
if (accordion != NULL && outfit_list != NULL)
{
- LLUUID item_id = getSelectedOutfitUUID();
- outfit_list->setSelectedOutfitByUUID(item_id);
+ outfit_list->setSelectedOutfitByUUID(mUUID);
LLAccordionCtrlTab* tab = accordion->getSelectedTab();
tab->showAndFocusHeader();
return TRUE;
@@ -769,7 +768,7 @@ BOOL LLOutfitGallery::handleDoubleClick(S32 x, S32 y, MASK mask)
}
}
- return LLUICtrl::handleDoubleClick(x, y, mask);
+ return LLPanel::handleDoubleClick(x, y, mask);
}
void LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 37e75f1109..2566247072 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -115,8 +115,6 @@ public:
void onBeforeOutfitSnapshotSave();
void onAfterOutfitSnapshotSave();
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
-
protected:
/*virtual*/ void onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id);
/*virtual*/ void onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid);
@@ -150,7 +148,7 @@ private:
void updateRowsIfNeeded();
void updateGalleryWidth();
- LLOutfitGalleryItem* buildGalleryItem(std::string name);
+ LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id);
void onTextureSelectionChanged(LLInventoryItem* itemp);
@@ -258,6 +256,7 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
void setDefaultImage();
void setImageAssetId(LLUUID asset_id);
@@ -265,6 +264,7 @@ public:
void setOutfitName(std::string name);
void setOutfitWorn(bool value);
void setSelected(bool value);
+ void setUUID(LLUUID outfit_id) {mUUID = outfit_id;}
std::string getItemName() {return mOutfitName;}
bool isDefaultImage() {return mDefaultImage;}
@@ -274,6 +274,7 @@ public:
private:
LLPointer<LLViewerFetchedTexture> mTexturep;
+ LLUUID mUUID;
LLUUID mImageAssetId;
LLTextBox* mOutfitNameText;
LLTextBox* mOutfitWornText;
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 5d1ae4ff10..b9b97f4cce 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -208,19 +208,21 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough);
- // While we're at it let's get the stats from the new table if that
- // capability exists.
- std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
- if (!url.empty())
+ if (gAgent.getRegion())
{
- LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
- LLSD body;
- LLUUID classifiedId = getClassifiedId();
- body["classified_id"] = classifiedId;
- LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body,
- boost::bind(&LLPanelClassifiedInfo::handleSearchStatResponse, classifiedId, _1));
+ // While we're at it let's get the stats from the new table if that
+ // capability exists.
+ std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
+ if (!url.empty())
+ {
+ LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
+ LLSD body;
+ LLUUID classifiedId = getClassifiedId();
+ body["classified_id"] = classifiedId;
+ LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body,
+ boost::bind(&LLPanelClassifiedInfo::handleSearchStatResponse, classifiedId, _1));
+ }
}
-
// Update classified click stats.
// *TODO: Should we do this when opening not from search?
sendClickMessage("profile");
@@ -540,21 +542,24 @@ void LLPanelClassifiedInfo::sendClickMessage(
const LLVector3d& global_pos,
const std::string& sim_name)
{
- // You're allowed to click on your own ads to reassure yourself
- // that the system is working.
- LLSD body;
- body["type"] = type;
- body["from_search"] = from_search;
- body["classified_id"] = classified_id;
- body["parcel_id"] = parcel_id;
- body["dest_pos_global"] = global_pos.getValue();
- body["region_name"] = sim_name;
-
- std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
- LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
- LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
- LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
- "SearchStatTracking Click report sent.", "SearchStatTracking Click report NOT sent.");
+ if (gAgent.getRegion())
+ {
+ // You're allowed to click on your own ads to reassure yourself
+ // that the system is working.
+ LLSD body;
+ body["type"] = type;
+ body["from_search"] = from_search;
+ body["classified_id"] = classified_id;
+ body["parcel_id"] = parcel_id;
+ body["dest_pos_global"] = global_pos.getValue();
+ body["region_name"] = sim_name;
+
+ std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
+ LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
+ LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
+ LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
+ "SearchStatTracking Click report sent.", "SearchStatTracking Click report NOT sent.");
+ }
}
void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index f2d43a1037..a46fb3dfeb 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -129,9 +129,9 @@ public:
WearableEntry(LLWearableType::EType type,
const std::string &title,
const std::string &desc_title,
- U8 num_color_swatches, // number of 'color_swatches'
- U8 num_texture_pickers, // number of 'texture_pickers'
- U8 num_subparts, ... ); // number of subparts followed by a list of ETextureIndex and ESubparts
+ const texture_vec_t& color_swatches, // 'color_swatches'
+ const texture_vec_t& texture_pickers, // 'texture_pickers'
+ const subpart_vec_t& subparts); // subparts
const LLWearableType::EType mWearableType;
@@ -226,56 +226,38 @@ LLEditWearableDictionary::Wearables::Wearables()
// note the subpart that is listed first is treated as "default", regardless of what order is in enum.
// Please match the order presented in XUI. -Nyx
// this will affect what camera angle is shown when first editing a wearable
- addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS));
- addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL));
- addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL));
- addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES));
- addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT));
- addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS));
- addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES));
- addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS));
- addEntry(LLWearableType::WT_JACKET, new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET));
- addEntry(LLWearableType::WT_GLOVES, new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES));
- addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT));
- addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS));
- addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT));
- addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA));
- addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1,3,1, TEX_HEAD_TATTOO, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO));
- addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text",0,0,7, SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED));
+ addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS}));
+ addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text", texture_vec_t(), texture_vec_t{TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT}, subpart_vec_t{SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL}));
+ addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text", texture_vec_t(), texture_vec_t{TEX_HAIR}, subpart_vec_t{SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL}));
+ addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text", texture_vec_t(), texture_vec_t{TEX_EYES_IRIS}, subpart_vec_t{SUBPART_EYES}));
+ addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text", texture_vec_t{TEX_UPPER_SHIRT}, texture_vec_t{TEX_UPPER_SHIRT}, subpart_vec_t{SUBPART_SHIRT}));
+ addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text", texture_vec_t{TEX_LOWER_PANTS}, texture_vec_t{TEX_LOWER_PANTS}, subpart_vec_t{SUBPART_PANTS}));
+ addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text", texture_vec_t{TEX_LOWER_SHOES}, texture_vec_t{TEX_LOWER_SHOES}, subpart_vec_t{SUBPART_SHOES}));
+ addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text", texture_vec_t{TEX_LOWER_SOCKS}, texture_vec_t{TEX_LOWER_SOCKS}, subpart_vec_t{SUBPART_SOCKS}));
+ addEntry(LLWearableType::WT_JACKET, new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text", texture_vec_t{TEX_UPPER_JACKET}, texture_vec_t{TEX_UPPER_JACKET, TEX_LOWER_JACKET}, subpart_vec_t{SUBPART_JACKET}));
+ addEntry(LLWearableType::WT_GLOVES, new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text", texture_vec_t{TEX_UPPER_GLOVES}, texture_vec_t{TEX_UPPER_GLOVES}, subpart_vec_t{SUBPART_GLOVES}));
+ addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text", texture_vec_t{TEX_UPPER_UNDERSHIRT}, texture_vec_t{TEX_UPPER_UNDERSHIRT}, subpart_vec_t{SUBPART_UNDERSHIRT}));
+ addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text", texture_vec_t{TEX_LOWER_UNDERPANTS}, texture_vec_t{TEX_LOWER_UNDERPANTS}, subpart_vec_t{SUBPART_UNDERPANTS}));
+ addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT}));
+ addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA}));
+ addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text", texture_vec_t{TEX_HEAD_TATTOO}, texture_vec_t{TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO}, subpart_vec_t{SUBPART_TATTOO}));
+ addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED}));
}
LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type,
const std::string &title,
const std::string &desc_title,
- U8 num_color_swatches,
- U8 num_texture_pickers,
- U8 num_subparts, ... ) :
+ const texture_vec_t& color_swatches,
+ const texture_vec_t& texture_pickers,
+ const subpart_vec_t& subparts) :
LLDictionaryEntry(title),
mWearableType(type),
mTitle(title),
- mDescTitle(desc_title)
-{
- va_list argp;
- va_start(argp, num_subparts);
-
- for (U8 i = 0; i < num_color_swatches; ++i)
- {
- ETextureIndex index = (ETextureIndex)va_arg(argp,int);
- mColorSwatchCtrls.push_back(index);
- }
-
- for (U8 i = 0; i < num_texture_pickers; ++i)
- {
- ETextureIndex index = (ETextureIndex)va_arg(argp,int);
- mTextureCtrls.push_back(index);
- }
-
- for (U8 i = 0; i < num_subparts; ++i)
- {
- ESubpart part = (ESubpart)va_arg(argp,int);
- mSubparts.push_back(part);
- }
-}
+ mDescTitle(desc_title),
+ mSubparts(subparts),
+ mColorSwatchCtrls(color_swatches),
+ mTextureCtrls(texture_pickers)
+{}
LLEditWearableDictionary::Subparts::Subparts()
{
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 0e6f5b8924..05be4b5aee 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -164,6 +164,8 @@ public:
virtual void setupCtrls (LLPanel* parent) {};
+ virtual void onFilterChanged() { }
+
protected:
LLUUID mGroupID;
BOOL mAllowEdit;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 8440e9ee50..66a0a1d4ad 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
mSearchFilter = filter;
LLStringUtil::toLower(mSearchFilter);
update(GC_ALL);
+ onFilterChanged();
}
void LLPanelGroupSubTab::activate()
@@ -2471,12 +2472,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
//////////////////////////////////////////////////////////////////////////
- LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(role_id);
- U64 current_role_powers = GP_NO_POWERS;
- if (rit != gdatap->mRoles.end())
- {
- current_role_powers = ((*rit).second->getRoleData().mRolePowers);
- }
+ U64 current_role_powers = gdatap->getRolePowers(role_id);
if(isEnablingAbility)
{
@@ -2775,6 +2771,16 @@ void LLPanelGroupActionsSubTab::activate()
LLPanelGroupSubTab::activate();
update(GC_ALL);
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
+ mActionList->deleteAllItems();
+ buildActionsList(mActionList,
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::deactivate()
@@ -2803,19 +2809,31 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
if (mGroupID.isNull()) return;
- mActionList->deselectAllItems();
mActionMembers->deleteAllItems();
mActionRoles->deleteAllItems();
- mActionDescription->clear();
+ if(mActionList->hasSelectedItem())
+ {
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+ if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete())
+ {
+ handleActionSelect();
+ }
+ }
+}
+
+void LLPanelGroupActionsSubTab::onFilterChanged()
+{
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
mActionList->deleteAllItems();
buildActionsList(mActionList,
- GP_ALL_POWERS,
- GP_ALL_POWERS,
- NULL,
- FALSE,
- TRUE,
- FALSE);
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::handleActionSelect()
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 9a696124a8..1d1d69e0ae 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -311,6 +311,7 @@ public:
virtual bool needsApply(std::string& mesg);
virtual bool apply(std::string& mesg);
virtual void update(LLGroupChange gc);
+ virtual void onFilterChanged();
void handleActionSelect();
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 3db9500de0..dd75ae9c06 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1287,13 +1287,13 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id);
- return children != LLInventoryModel::CHILDREN_NO;
+ return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
if (command_name == "empty_lostnfound")
{
const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id);
- return children != LLInventoryModel::CHILDREN_NO;
+ return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
return TRUE;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 3f6bdde127..5973b08183 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -1285,7 +1285,7 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type
showWearablesListView();
//e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE
- applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type));
+ applyListViewFilter(static_cast<EListViewItemType>(LVIT_SHAPE + type));
}
static void update_status_widget_rect(LLView * widget, S32 right_border)
@@ -1305,8 +1305,10 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started)
S32 delta = started ? indicator_delta : 0;
S32 right_border = status_panel->getRect().getWidth() - delta;
- update_status_widget_rect(mCurrentOutfitName, right_border);
- update_status_widget_rect(mStatus, right_border);
+ if (mCurrentOutfitName)
+ update_status_widget_rect(mCurrentOutfitName, right_border);
+ if (mStatus)
+ update_status_widget_rect(mStatus, right_border);
indicator->setVisible(started);
}
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 51ec964ace..77378f8092 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -172,6 +172,7 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
}
else
{
+ cancel();
floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local")));
}
}
diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp
index 55cb7d616b..471e1c24f3 100644
--- a/indra/newview/llplacesinventorybridge.cpp
+++ b/indra/newview/llplacesinventorybridge.cpp
@@ -62,7 +62,7 @@ void LLPlacesLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
items.push_back(std::string("Purge Item"));
- if (!isItemRemovable())
+ if (!isItemRemovable() || (gInventory.getCategory(mUUID) && !gInventory.isCategoryComplete(mUUID)))
{
disabled_items.push_back(std::string("Purge Item"));
}
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 5cdc5dfd38..b7fea4e982 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1683,6 +1683,7 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
mScriptEd->sync();
}
+ if (!gAgent.getRegion()) return;
const LLInventoryItem *inv_item = getItem();
// save it out to asset server
std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgent");
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 645a77e42a..12bcd89cb0 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -52,6 +52,8 @@
#include "llviewerwindow.h"
#include "lllineeditor.h"
+#include <boost/lexical_cast.hpp>
+
const S32 CLIENT_RECT_VPAD = 4;
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
@@ -98,6 +100,29 @@ LLPreviewTexture::~LLPreviewTexture()
}
}
+void LLPreviewTexture::populateRatioList()
+{
+ // Fill in ratios list with common aspect ratio values
+ mRatiosList.clear();
+ mRatiosList.push_back(LLTrans::getString("Unconstrained"));
+ mRatiosList.push_back("1:1");
+ mRatiosList.push_back("4:3");
+ mRatiosList.push_back("10:7");
+ mRatiosList.push_back("3:2");
+ mRatiosList.push_back("16:10");
+ mRatiosList.push_back("16:9");
+ mRatiosList.push_back("2:1");
+
+ // Now fill combo box with provided list
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
+ combo->removeall();
+
+ for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it)
+ {
+ combo->add(*it);
+ }
+}
+
// virtual
BOOL LLPreviewTexture::postBuild()
{
@@ -138,27 +163,12 @@ BOOL LLPreviewTexture::postBuild()
}
}
- // Fill in ratios list with common aspect ratio values
- mRatiosList.clear();
- mRatiosList.push_back(LLTrans::getString("Unconstrained"));
- mRatiosList.push_back("1:1");
- mRatiosList.push_back("4:3");
- mRatiosList.push_back("10:7");
- mRatiosList.push_back("3:2");
- mRatiosList.push_back("16:10");
- mRatiosList.push_back("16:9");
- mRatiosList.push_back("2:1");
-
- // Now fill combo box with provided list
- LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
- combo->removeall();
-
- for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it)
- {
- combo->add(*it);
- }
+ // Fill in ratios list and combo box with common aspect ratio values
+ populateRatioList();
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
+
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
combo->setCurrentByIndex(0);
return LLPreview::postBuild();
@@ -444,16 +454,25 @@ void LLPreviewTexture::updateDimensions()
return;
}
- if (mAssetStatus != PREVIEW_ASSET_LOADED)
+ S32 img_width = mImage->getFullWidth();
+ S32 img_height = mImage->getFullHeight();
+
+ if (mAssetStatus != PREVIEW_ASSET_LOADED
+ || mLastWidth != img_width
+ || mLastHeight != img_height)
{
mAssetStatus = PREVIEW_ASSET_LOADED;
// Asset has been fully loaded, adjust aspect ratio
adjustAspectRatio();
}
-
+
+
// Update the width/height display every time
- getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth()));
- getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", img_width));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height));
+
+ mLastHeight = img_height;
+ mLastWidth = img_width;
// Reshape the floater only when required
if (mUpdateDimensions)
@@ -579,7 +598,12 @@ void LLPreviewTexture::adjustAspectRatio()
std::vector<std::string>::const_iterator found = std::find(mRatiosList.begin(), mRatiosList.end(), ratio.str());
if (found == mRatiosList.end())
{
- combo->setCurrentByIndex(0);
+ // No existing ratio found, create an element that will show image at original ratio
+ populateRatioList(); // makes sure previous custom ratio is cleared
+ std::string ratio = boost::lexical_cast<std::string>(num)+":" + boost::lexical_cast<std::string>(denom);
+ mRatiosList.push_back(ratio);
+ combo->add(ratio);
+ combo->setCurrentByIndex(mRatiosList.size()- 1);
}
else
{
@@ -587,6 +611,15 @@ void LLPreviewTexture::adjustAspectRatio()
}
}
}
+ else
+ {
+ // Aspect ratio was set to unconstrained or was clamped
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
+ if (combo)
+ {
+ combo->setCurrentByIndex(0); //unconstrained
+ }
+ }
mUpdateDimensions = TRUE;
}
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index b104a91c75..c156c48d0c 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -67,6 +67,7 @@ public:
/*virtual*/ void setObjectID(const LLUUID& object_id);
protected:
void init();
+ void populateRatioList();
/* virtual */ BOOL postBuild();
bool setAspectRatio(const F32 width, const F32 height);
static void onAspectRatioCommit(LLUICtrl*,void* userdata);
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 58e48480c1..ee8b2d79c0 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -45,6 +45,7 @@
#include "llimagepng.h"
#include "lllandmarkactions.h"
#include "lllocalcliprect.h"
+#include "llresmgr.h"
#include "llnotificationsutil.h"
#include "llslurl.h"
#include "llsnapshotlivepreview.h"
@@ -56,6 +57,7 @@
#include "llvfs.h"
#include "llwindow.h"
#include "llworld.h"
+#include <boost/filesystem.hpp>
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
@@ -1069,7 +1071,7 @@ BOOL LLSnapshotLivePreview::saveLocal()
getFormattedImage();
// Save the formatted image
- BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
+ BOOL success = saveLocal(mFormattedImage);
if(success)
{
@@ -1078,3 +1080,38 @@ BOOL LLSnapshotLivePreview::saveLocal()
return success;
}
+//Check if failed due to insufficient memory
+BOOL LLSnapshotLivePreview::saveLocal(LLPointer<LLImageFormatted> mFormattedImage)
+{
+ BOOL insufficient_memory;
+ BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage, FALSE, insufficient_memory);
+
+ if (insufficient_memory)
+ {
+ std::string lastSnapshotDir = LLViewerWindow::getLastSnapshotDir();
+
+#ifdef LL_WINDOWS
+ boost::filesystem::path b_path(utf8str_to_utf16str(lastSnapshotDir));
+#else
+ boost::filesystem::path b_path(lastSnapshotDir);
+#endif
+ boost::filesystem::space_info b_space = boost::filesystem::space(b_path);
+ if (b_space.free < mFormattedImage->getDataSize())
+ {
+ LLSD args;
+ args["PATH"] = lastSnapshotDir;
+
+ std::string needM_bytes_string;
+ LLResMgr::getInstance()->getIntegerString(needM_bytes_string, (mFormattedImage->getDataSize()) >> 10);
+ args["NEED_MEMORY"] = needM_bytes_string;
+
+ std::string freeM_bytes_string;
+ LLResMgr::getInstance()->getIntegerString(freeM_bytes_string, (b_space.free) >> 10);
+ args["FREE_MEMORY"] = freeM_bytes_string;
+
+ LLNotificationsUtil::add("SnapshotToComputerFailed", args);
+ return false;
+ }
+ }
+ return success;
+}
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index b689c50320..4ea8d25a5a 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -41,6 +41,7 @@ class LLSnapshotLivePreview : public LLView
LOG_CLASS(LLSnapshotLivePreview);
public:
+ static BOOL saveLocal(LLPointer<LLImageFormatted>);
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
Params()
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 2db1e4c67e..485b88e4c7 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2267,13 +2267,15 @@ void login_callback(S32 option, void *userdata)
*/
void show_release_notes_if_required()
{
- if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion
+ static bool release_notes_shown = false;
+ if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion)
&& LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds
&& gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
&& !gSavedSettings.getBOOL("FirstLoginThisInstall"))
{
LLSD info(LLAppViewer::instance()->getViewerInfo());
LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+ release_notes_shown = true;
}
}
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index bbce717c20..495c9c1f44 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -46,6 +46,8 @@
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include <boost/algorithm/string.hpp>
+
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
@@ -351,6 +353,10 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
{
setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label);
}
+ if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY)
+ {
+ setCheckBox(LLNotifications::instance().getGlobalString("skipnexttimesessiononly"), ignore_label);
+ }
else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
{
setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label);
@@ -385,15 +391,18 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
const LLFontGL* font = mCheck->getFont();
const S32 LINE_HEIGHT = font->getLineHeight();
+
+ std::vector<std::string> lines;
+ boost::split(lines, check_title, boost::is_any_of("\n"));
// Extend dialog for "check next time"
S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD;
- S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16;
+ S32 check_width = S32(font->getWidth(lines[0]) + 0.99f) + 16; // use width of the first line
max_msg_width = llmax(max_msg_width, check_width);
S32 dialog_width = max_msg_width + 2 * HPAD;
S32 dialog_height = LLToastPanel::getRect().getHeight();
- dialog_height += LINE_HEIGHT;
+ dialog_height += LINE_HEIGHT * lines.size();
dialog_height += LINE_HEIGHT / 2;
LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
@@ -402,7 +411,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
// set check_box's attributes
LLRect check_rect;
- mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT));
+ mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT*lines.size()));
mCheck->setLabel(check_title);
mCheck->setCommitCallback(boost::bind(&LLToastAlertPanel::onClickIgnore, this, _1));
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 49436ee406..bd68d8c999 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1450,13 +1450,20 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
-EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item)
+EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item, EDragAndDropType type)
{
// check the basics
if (!item || !obj) return ACCEPT_NO;
// HACK: downcast
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
- if (!vitem->isFinished()) return ACCEPT_NO;
+ if (!vitem->isFinished() && (type != DAD_CATEGORY))
+ {
+ // Note: for DAD_CATEGORY we assume that folder version check passed and folder
+ // is complete, meaning that items inside are up to date.
+ // (isFinished() == false) at the moment shows that item was loaded from cache.
+ // Library or agent inventory only.
+ return ACCEPT_NO;
+ }
if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links
// deny attempts to drop from an object onto itself. This is to
@@ -2296,7 +2303,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
(*item_iter) = item;
}
*/
- rv = willObjectAcceptInventory(root_object, item);
+ rv = willObjectAcceptInventory(root_object, item, DAD_CATEGORY);
if (rv < ACCEPT_YES_COPY_SINGLE)
{
LL_DEBUGS() << "Object will not accept " << item->getUUID() << LL_ENDL;
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 766046785b..2d99de2244 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -224,7 +224,7 @@ protected:
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
- static EAcceptance willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item);
+ static EAcceptance willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item, EDragAndDropType type = DAD_NONE);
public:
// helper functions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 5623036b91..f3e661e71a 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -478,38 +478,52 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
}
//--------------------------------------------------
+ // Determine target mode
+ //--------------------------------------------------
+ bool vertical_dragging = false;
+ bool spin_grabbing = false;
+ if ((mask == MASK_VERTICAL)
+ || (gGrabBtnVertical && (mask != MASK_SPIN)))
+ {
+ vertical_dragging = TRUE;
+ }
+ else if ((mask == MASK_SPIN)
+ || (gGrabBtnSpin && (mask != MASK_VERTICAL)))
+ {
+ spin_grabbing = TRUE;
+ }
+
+ //--------------------------------------------------
// Toggle spinning
//--------------------------------------------------
- if (mSpinGrabbing && !(mask == MASK_SPIN) && !gGrabBtnSpin)
+ if (mSpinGrabbing && !spin_grabbing)
{
- // user released ALT key, stop spinning
+ // user released or switched mask key(s), stop spinning
stopSpin();
}
- else if (!mSpinGrabbing && (mask == MASK_SPIN) )
+ else if (!mSpinGrabbing && spin_grabbing)
{
- // user pressed ALT key, start spinning
+ // user pressed mask key(s), start spinning
startSpin();
}
+ mSpinGrabbing = spin_grabbing;
//--------------------------------------------------
// Toggle vertical dragging
//--------------------------------------------------
- if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical)
+ if (mVerticalDragging && !vertical_dragging)
{
// ...switch to horizontal dragging
- mVerticalDragging = FALSE;
-
mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp);
mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal();
}
- else if (!mVerticalDragging && (mask == MASK_VERTICAL) )
+ else if (!mVerticalDragging && vertical_dragging)
{
// ...switch to vertical dragging
- mVerticalDragging = TRUE;
-
mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp);
mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal();
}
+ mVerticalDragging = vertical_dragging;
const F32 RADIANS_PER_PIXEL_X = 0.01f;
const F32 RADIANS_PER_PIXEL_Y = 0.01f;
@@ -755,12 +769,13 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
//--------------------------------------------------
// Toggle vertical dragging
//--------------------------------------------------
- if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical)
+ if (!(mask == MASK_VERTICAL) && !gGrabBtnVertical)
{
mVerticalDragging = FALSE;
}
- else if (!mVerticalDragging && (mask == MASK_VERTICAL) )
+ else if ((gGrabBtnVertical && (mask != MASK_SPIN))
+ || (mask == MASK_VERTICAL))
{
mVerticalDragging = TRUE;
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bf79a0595c..da6b18bb77 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1463,6 +1463,10 @@ void remove_inventory_category(
LLPointer<LLViewerInventoryCategory> obj = gInventory.getCategory(cat_id);
if(obj)
{
+ if (!gInventory.isCategoryComplete(cat_id))
+ {
+ LL_WARNS() << "Removing (purging) incomplete category " << obj->getName() << LL_ENDL;
+ }
if(LLFolderType::lookupIsProtectedType(obj->getPreferredType()))
{
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
@@ -1540,6 +1544,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
{
if (AISAPI::isAvailable())
{
+ if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
+ }
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
AISAPI::PurgeDescendents(id, cr);
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 900075488f..114f1d327b 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3054,20 +3054,23 @@ void LLViewerMediaImpl::update()
data = mMediaSource->getBitsData();
}
- // Offset the pixels pointer to match x_pos and y_pos
- data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
- data += ( y_pos * mMediaSource->getTextureDepth() );
-
+ if(data != NULL)
{
- LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
- placeholder_image->setSubImage(
- data,
- mMediaSource->getBitsWidth(),
- mMediaSource->getBitsHeight(),
- x_pos,
- y_pos,
- width,
- height);
+ // Offset the pixels pointer to match x_pos and y_pos
+ data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
+ data += ( y_pos * mMediaSource->getTextureDepth() );
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
+ placeholder_image->setSubImage(
+ data,
+ mMediaSource->getBitsWidth(),
+ mMediaSource->getBitsHeight(),
+ x_pos,
+ y_pos,
+ width,
+ height);
+ }
}
}
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index d46bb0199b..8d0c5af314 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -583,7 +583,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize() ;
- gViewerWindow->saveImageNumbered(formatted);
+ LLSnapshotLivePreview::saveLocal(formatted);
}
return true;
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9d02ec8a9a..083d2991f8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1222,6 +1222,11 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
const LLUUID& obj_id = (*obj_iter);
if(!highlight_offered_object(obj_id))
{
+ const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(obj_id);
+ if (parent && (parent->getPreferredType() == LLFolderType::FT_TRASH))
+ {
+ gInventory.checkTrashOverflow();
+ }
continue;
}
@@ -2836,6 +2841,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
+ args["ORIGINAL_NAME"] = original_name;
LLSD payload;
payload["from_id"] = from_id;
// Passing the "SESSION_NAME" to use it for IM notification logging
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 6abd6f7b64..cd8dd54fa6 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1462,9 +1462,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
}
bool size_okay = true;
-
- U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel;
- U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
+
+ S32 discard_level = mRawDiscardLevel;
+ if (mRawDiscardLevel < 0)
+ {
+ LL_DEBUGS() << "Negative raw discard level when creating image: " << mRawDiscardLevel << LL_ENDL;
+ discard_level = 0;
+ }
+
+ U32 raw_width = mRawImage->getWidth() << discard_level;
+ U32 raw_height = mRawImage->getHeight() << discard_level;
+
if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
{
LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL;
@@ -2081,7 +2089,9 @@ bool LLViewerFetchedTexture::updateFetch()
{
make_request = false;
}
- else if(mCachedRawImage.notNull() && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
+ else if(mCachedRawImage.notNull() // can be empty
+ && mCachedRawImageReady
+ && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
{
make_request = false;
switchToCachedImage(); //use the cached raw data first
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index feed5ba43d..a96cede739 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -33,6 +33,7 @@
#include <iostream>
#include <fstream>
#include <algorithm>
+#include <boost/filesystem.hpp>
#include <boost/lambda/core.hpp>
#include <boost/regex.hpp>
@@ -4355,8 +4356,10 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
}
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker)
+BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory)
{
+ insufficient_memory = FALSE;
+
if (!image)
{
LL_WARNS() << "No image to save" << LL_ENDL;
@@ -4400,6 +4403,17 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
}
+// Check if there is enough free space to save snapshot
+#ifdef LL_WINDOWS
+ boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir));
+#else
+ boost::filesystem::space_info b_space = boost::filesystem::space(sSnapshotDir);
+#endif
+ if (b_space.free < image->getDataSize())
+ {
+ insufficient_memory = TRUE;
+ return FALSE;
+ }
// Look for an unused file name
std::string filepath;
S32 i = 1;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index a134dfaaa9..38178fa910 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -352,7 +352,7 @@ public:
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type);
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
- BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false);
+ BOOL saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory);
// Reset the directory where snapshots are saved.
// Client will open directory picker on next snapshot save.
@@ -419,6 +419,7 @@ public:
bool getSystemUIScaleFactorChanged() { return mSystemUIScaleFactorChanged; }
static void showSystemUIScaleFactorChanged();
+ static std::string getLastSnapshotDir() { return sSnapshotDir; }
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index aa5d82a096..d62862dfb8 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2246,7 +2246,9 @@ bool LLVOAvatarSelf::updateAvatarRezMetrics(bool force_send)
{
const F32 AV_METRICS_INTERVAL_QA = 30.0;
F32 send_period = 300.0;
- if (gSavedSettings.getBOOL("QAModeMetrics"))
+
+ static LLCachedControl<bool> qa_mode_metrics(gSavedSettings,"QAModeMetrics");
+ if (qa_mode_metrics)
{
send_period = AV_METRICS_INTERVAL_QA;
}
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
index 410caa7290..05ab4d35a0 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
height="101"
layout="topleft"
left="100"
@@ -109,5 +109,43 @@
name="Mute Text">
<on_click function="AvatarIcon.Action" parameter="mute_unmute" />
<on_check function="AvatarIcon.Check" parameter="is_muted" />
- </menu_item_check>
-</menu>
+ </menu_item_check>
+ <menu_item_separator layout="topleft" name="Moderator Options Separator"/>
+ <context_menu
+ label="Moderator Options"
+ layout="topleft"
+ name="Moderator Options">
+ <menu_item_check
+ label="Allow text chat"
+ layout="topleft"
+ name="AllowTextChat">
+ <on_check function="AvatarIcon.Check" parameter="is_allowed_text_chat" />
+ <on_click function="AvatarIcon.Action" parameter="toggle_allow_text_chat" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_allow_text_chat" />
+ </menu_item_check>
+ <menu_item_call
+ label="Mute this participant"
+ layout="topleft"
+ name="ModerateVoiceMuteSelected">
+ <on_click function="AvatarIcon.Action" parameter="group_mute" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_mute" />
+ <on_visible function="AvatarIcon.Visible" parameter="show_mute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unmute this participant"
+ layout="topleft"
+ name="ModerateVoiceUnMuteSelected">
+ <on_click function="AvatarIcon.Action" parameter="group_unmute" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_unmute" />
+ <on_visible function="AvatarIcon.Visible" parameter="show_unmute" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator layout="topleft" name="Group Ban Separator"/>
+ <menu_item_call
+ label="Ban member"
+ layout="topleft"
+ name="BanMember">
+ <on_click function="AvatarIcon.Action" parameter="ban_member" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_ban_member" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3f39ea36f3..b6b58d5f4b 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4,6 +4,11 @@
Don&apos;t show me this again
</global>
+ <global name="skipnexttimesessiononly">
+Don&apos;t show me this again
+(for current session)
+ </global>
+
<global name="alwayschoose">
Always choose this option
@@ -869,7 +874,7 @@ Do you wish to proceed?
icon="alertmodal.tga"
name="JoinGroupNoCost"
type="alertmodal">
-You are joining group [NAME].
+You are joining group &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
Do you wish to proceed?
<tag>group</tag>
<tag>confirm</tag>
@@ -960,7 +965,7 @@ Sorry, trial users can't join groups.
icon="alertmodal.tga"
name="JoinGroupMaxGroups"
type="alertmodal">
-You cannot join '[group_name]':
+You cannot join &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
You are already a member of [group_count] groups, the maximum number allowed is [max_groups]
<tag>success</tag>
<tag>group_id</tag>
@@ -976,7 +981,7 @@ You are already a member of [group_count] groups, the maximum number allowed is
icon="alertmodal.tga"
name="JoinGroupClosedEnrollment"
type="alertmodal">
-You cannot join '[group_name]':
+You cannot join &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
The group no longer has open enrollment.
<tag>group_id</tag>
<tag>success</tag>
@@ -1065,7 +1070,7 @@ Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NA
icon="alertmodal.tga"
name="ReturnObjectsDeededToGroup"
type="alertmodal">
-Are you sure you want to return all objects shared with the group &apos;[NAME]&apos; on this parcel of land back to their previous owner&apos;s inventory?
+Are you sure you want to return all objects shared with the group &apos;&lt;nolink&gt;[NAME]&lt;/nolink&gt;&apos; on this parcel of land back to their previous owner&apos;s inventory?
*WARNING* This will delete the non-transferable objects deeded to the group!
@@ -1168,7 +1173,7 @@ Are you sure you want to disable all objects in this region?
icon="alertmodal.tga"
name="ReturnObjectsNotOwnedByGroup"
type="alertmodal">
-Return the objects on this parcel of land that are NOT shared with the group [NAME] back to their owners?
+Return the objects on this parcel of land that are NOT shared with the group &lt;nolink&gt;[NAME]&lt;/nolink&gt; back to their owners?
Objects: [N]
<tag>confirm</tag>
@@ -1963,7 +1968,7 @@ Eject [AVATAR_NAME] from your land?
name="EjectAvatarFromGroup"
persist="true"
type="notify">
-You ejected [AVATAR_NAME] from group [GROUP_NAME]
+You ejected [AVATAR_NAME] from group &lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;
<tag>group</tag>
</notification>
@@ -3338,7 +3343,7 @@ Please select a smaller area and try again.
By deeding this parcel, the group will be required to have and maintain sufficient land use credits.
The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members.
-Deed this [AREA] m² of land to the group &apos;[GROUP_NAME]&apos;?
+Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@@ -3355,7 +3360,7 @@ By deeding this parcel, the group will be required to have and maintain sufficie
The deed will include a simultaneous land contribution to the group from &apos;[NAME]&apos;.
The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members.
-Deed this [AREA] m² of land to the group &apos;[GROUP_NAME]&apos;?
+Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@@ -4020,7 +4025,7 @@ Leave Group?
icon="notify.tga"
name="GroupDepart"
type="notify">
-You have left the group &apos;[group_name]&apos;.
+You have left the group &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;.
<tag>group</tag>
</notification>
@@ -5700,8 +5705,33 @@ You cannot undo this action.
<unique/>
[QUESTION]
<tag>confirm</tag>
+ <form name="form">
+ <ignore name="ignore"
+ session_only="true"
+ text="Confirm before deleting items"/>
+ <button
+ default="true"
+ index="0"
+ name="Yes"
+ text="OK"/>
+ <button
+ index="1"
+ name="No"
+ text="Cancel"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DeleteFilteredItems"
+ type="alertmodal">
+ <unique/>
+ Your inventory is currently filtered and not all of the items you're about to delete are currently visible.
+
+Are you sure you want to delete them?
+ <tag>confirm</tag>
<usetemplate
- ignoretext="Confirm before deleting items"
+ ignoretext="Confirm before deleting filtered items"
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
@@ -6735,7 +6765,7 @@ The objects on the selected parcel of land owned by the Resident &apos;[NAME]&ap
name="GroupObjectsReturned"
persist="true"
type="notify">
-The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner&apos;s inventory.
+The objects on the selected parcel of land shared with the group &lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt; have been returned back to their owner&apos;s inventory.
Transferable deeded objects have been returned to their previous owners.
Non-transferable objects that are deeded to the group have been deleted.
<tag>group</tag>
@@ -7223,6 +7253,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
name="TeleportOffered"
log_to_im="true"
log_to_chat="false"
+ fade_toast="false"
type="offer"
sound="UISndNewIncomingIMSession">
[NAME_SLURL] has offered to teleport you to their location:
@@ -7298,6 +7329,7 @@ However, this region contains content accessible to adults only.
icon="notify.tga"
name="TeleportRequest"
log_to_im="true"
+ fade_toast="false"
type="offer">
[NAME_SLURL] is requesting to be teleported to your location.
[MESSAGE]
@@ -7654,6 +7686,7 @@ Other Key Experiences may be available.
icon="notify.tga"
name="ScriptQuestionExperience"
persist="false"
+ fade_toast="false"
type="notify">
&apos;&lt;nolink&gt;[OBJECTNAME]&lt;/nolink&gt;&apos;, an object owned by &apos;[NAME]&apos;, requests your participation in the [GRID_WIDE] experience:
@@ -7763,7 +7796,7 @@ To grant this permission please update your viewer to the latest version from [D
show_toast="false"
type="notify">
<tag>group</tag>
-[GROUPNAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
+&lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt;&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
[MESSAGE]
<form name="form">
<button
@@ -7894,7 +7927,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block
icon="notify.tga"
name="VoiceInviteGroup"
type="notify">
-[NAME] has joined a Voice Chat call with the group [GROUP].
+[NAME] has joined a Voice Chat call with the group &lt;nolink&gt;[GROUP]&lt;/nolink&gt;.
Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<tag>group</tag>
<tag>confirm</tag>
@@ -8226,6 +8259,11 @@ Appearance has been saved to XML to [PATH]
Failed to save appearance to XML.
</notification>
+ <notification icon="notifytip.tga"
+ name="SnapshotToComputerFailed" type="notifytip">
+Failed to save snapshot to [PATH]: Disk is full. [NEED_MEMORY]KB is required but only [FREE_MEMORY]KB is free.
+ </notification>
+
<notification
icon="notifytip.tga"
name="PresetNotSaved"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 71e4009571..1d4cbca1a5 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -246,17 +246,15 @@
name="updater_service_combobox"
width="300">
<combo_box.item
- label="Install automatically"
+ label="Install each update automatically"
name="Install_automatically"
value="3" />
- <!--
<combo_box.item
- label="Ask before installing"
+ label="Ask me when an optional update is ready to install"
name="Install_ask"
value="1" />
- -->
<combo_box.item
- label="I will download and install updates manually"
+ label="Install only mandatory updates"
name="Install_manual"
value="0" />
</combo_box>
diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml
index 4d20ecb9b6..8d058b0b53 100644
--- a/indra/newview/skins/default/xui/en/role_actions.xml
+++ b/indra/newview/skins/default/xui/en/role_actions.xml
@@ -105,6 +105,9 @@
<action description="Always allow &apos;Create Objects&apos;"
longdescription="Members in a Role with this Ability can create objects on a group-owned parcel, even if it&apos;s turned off in About Land &gt; Options tab."
name="land allow create" value="25" />
+ <action description="Ignore landing point"
+ longdescription="Members in a Role with this Ability can direct teleport to a group-owned parcel, even if a landing point is set in About Land &gt; Options tab."
+ name="land allow direct teleport" value="26" />
<action description="Allow &apos;Set Home to Here&apos; on group land"
longdescription="Members in a Role with this Ability can use World menu &gt; Landmarks &gt; Set Home to Here on a parcel deeded to this group."
name="land allow set home" value="28" />
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index f47f8e3dfa..6e228cefda 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -150,8 +150,7 @@ support@secondlife.com.</string>
<string name="LoginFailedAcountSuspended">Your account is not accessible until
[TIME] Pacific Time.</string>
<string name="LoginFailedAccountDisabled">We are unable to complete your request at this time.
-Please contact Second Life support for assistance at http://secondlife.com/support.
-If you are unable to change your password, please call (866) 476-9763.</string>
+Please contact Second Life support for assistance at http://support.secondlife.com.</string>
<string name="LoginFailedTransformError">Data inconsistency found during login.
Please contact support@secondlife.com.</string>
<string name="LoginFailedAccountMaintenance">Your account is undergoing minor maintenance.
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 85a117a96b..2edad30493 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -354,7 +354,7 @@ namespace tut
accountCredential->setCredentialData(identifier, authenticator);
logininstance->setNotificationsInterface(&notifications);
- logininstance->setPlatformInfo("win", "1.3.5");
+ logininstance->setPlatformInfo("win", "1.3.5", "Windows Bogus Version 100.6.6.6");
}
LLLoginInstance* logininstance;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d734106a9d..900e9f7b1b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -36,6 +36,8 @@ import re
import tarfile
import time
import random
+import subprocess
+
viewer_dir = os.path.dirname(__file__)
# Add indra/lib/python to our path so we don't have to muck with PYTHONPATH.
# Put it FIRST because some of our build hosts have an ancient install of
@@ -189,6 +191,7 @@ class ViewerManifest(LLManifest):
"Channel Base": CHANNEL_VENDOR_BASE,
"Channel":self.channel_with_pkg_suffix(),
"Platform":self.build_data_json_platform,
+ "Address Size":self.address_size,
"Update Service":"https://update.secondlife.com/update",
}
build_data_dict = self.finish_build_data_dict(build_data_dict)
@@ -340,9 +343,9 @@ class WindowsManifest(ViewerManifest):
else:
test_assembly_binding(src, "Microsoft.VC80.CRT", "")
raise Exception("Unknown condition")
- except NoManifestException, err:
+ except NoManifestException as err:
pass
- except NoMatchingAssemblyException, err:
+ except NoMatchingAssemblyException as err:
pass
self.ccopy(src,dst)
@@ -404,14 +407,14 @@ class WindowsManifest(ViewerManifest):
self.path('libaprutil-1.dll')
self.path('libapriconv-1.dll')
- except RuntimeError, err:
+ except RuntimeError as err:
print err.message
print "Skipping llcommon.dll (assuming llcommon was linked statically)"
# Mesh 3rd party libs needed for auto LOD and collada reading
try:
self.path("glod.dll")
- except RuntimeError, err:
+ except RuntimeError as err:
print err.message
print "Skipping GLOD library (assumming linked statically)"
@@ -727,7 +730,7 @@ class WindowsManifest(ViewerManifest):
for attempt in xrange(nsis_attempts):
try:
self.run_command('"' + NSIS_path + '" /V2 ' + self.dst_path_of(tempfile))
- except ManifestError, err:
+ except ManifestError as err:
if attempt+1 < nsis_attempts:
print >> sys.stderr, "nsis failed, waiting %d seconds before retrying" % nsis_retry_wait
time.sleep(nsis_retry_wait)
@@ -1105,7 +1108,11 @@ class DarwinManifest(ViewerManifest):
'vol':volname})
# mount the image and get the name of the mount point and device node
- hdi_output = self.run_command('hdiutil attach -private %r' % sparsename)
+ try:
+ hdi_output = subprocess.check_output(['hdiutil', 'attach', '-private', sparsename])
+ except subprocess.CalledProcessError as err:
+ sys.exit("failed to mount image at '%s'" % sparsename)
+
try:
devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
@@ -1219,7 +1226,7 @@ class DarwinManifest(ViewerManifest):
'bundle': app_in_dmg
})
signed=True # if no exception was raised, the codesign worked
- except ManifestError, err:
+ except ManifestError as err:
if sign_attempts:
print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait
time.sleep(sign_retry_wait)
@@ -1482,7 +1489,7 @@ def symlinkf(src, dst):
"""
try:
os.symlink(src, dst)
- except OSError, err:
+ except OSError as err:
if err.errno != errno.EEXIST:
raise
# We could just blithely attempt to remove and recreate the target