summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl4
-rw-r--r--indra/newview/app_settings/toolbars.xml1
-rw-r--r--indra/newview/installers/windows/lang_pl.nsibin12080 -> 12082 bytes
-rw-r--r--indra/newview/licenses-linux.txt2
-rw-r--r--indra/newview/licenses-mac.txt2
-rw-r--r--indra/newview/licenses-win32.txt8
-rw-r--r--indra/newview/llagentwearables.cpp9
-rw-r--r--indra/newview/llappdelegate-objc.mm12
-rw-r--r--indra/newview/llappearancemgr.cpp17
-rw-r--r--indra/newview/llappviewer.cpp186
-rw-r--r--indra/newview/llappviewermacosx-for-objc.h2
-rw-r--r--indra/newview/llappviewermacosx.cpp27
-rw-r--r--indra/newview/llcofwearables.cpp2
-rw-r--r--indra/newview/lleventpoll.cpp4
-rw-r--r--indra/newview/lleventpoll.h2
-rw-r--r--indra/newview/llfavoritesbar.cpp58
-rw-r--r--indra/newview/llfavoritesbar.h2
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp18
-rw-r--r--indra/newview/llfloatergodtools.cpp23
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp7
-rw-r--r--indra/newview/llfloaterlinkreplace.cpp2
-rw-r--r--indra/newview/llfloaterpreference.cpp52
-rw-r--r--indra/newview/llfloaterpreference.h2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp23
-rw-r--r--indra/newview/llhasheduniqueid.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp38
-rw-r--r--indra/newview/llinventorybridge.h3
-rw-r--r--indra/newview/llinventoryfunctions.cpp40
-rw-r--r--indra/newview/llinventoryfunctions.h2
-rw-r--r--indra/newview/llinventoryicon.cpp2
-rw-r--r--indra/newview/llmachineid.cpp556
-rw-r--r--indra/newview/llmachineid.h2
-rw-r--r--indra/newview/llmaniprotate.cpp5
-rw-r--r--indra/newview/llmanipscale.cpp5
-rw-r--r--indra/newview/llmaniptranslate.cpp5
-rw-r--r--indra/newview/llnotificationmanager.cpp2
-rw-r--r--indra/newview/llnotificationmanager.h4
-rw-r--r--indra/newview/lloutfitgallery.cpp2
-rw-r--r--indra/newview/lloutfitslist.cpp2
-rw-r--r--indra/newview/llpaneleditwearable.cpp2
-rw-r--r--indra/newview/llpanelgroupcreate.cpp2
-rw-r--r--indra/newview/llpaneloutfitedit.cpp11
-rw-r--r--indra/newview/llpreviewnotecard.cpp38
-rw-r--r--indra/newview/llpreviewnotecard.h8
-rw-r--r--indra/newview/llpreviewtexture.cpp39
-rw-r--r--indra/newview/llpreviewtexture.h1
-rw-r--r--indra/newview/llregioninfomodel.cpp23
-rw-r--r--indra/newview/llsechandler_basic.cpp32
-rw-r--r--indra/newview/llsechandler_basic.h1
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/lltoolpie.cpp4
-rw-r--r--indra/newview/llviewercontrol.cpp14
-rw-r--r--indra/newview/llviewerinput.cpp180
-rw-r--r--indra/newview/llviewerinput.h14
-rw-r--r--indra/newview/llviewerinventory.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp24
-rw-r--r--indra/newview/llviewermessage.cpp6
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llviewershadermgr.cpp2
-rw-r--r--indra/newview/llviewertexture.cpp21
-rw-r--r--indra/newview/llviewerwearable.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llvoavatar.cpp5
-rw-r--r--indra/newview/llvoavatarself.cpp9
-rw-r--r--indra/newview/llvoicevivox.cpp29
-rw-r--r--indra/newview/llwearableitemslist.cpp4
-rw-r--r--indra/newview/llwearablelist.cpp2
-rw-r--r--indra/newview/llworld.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_move.xml9
-rw-r--r--indra/newview/tests/gpus_results.txt14
-rw-r--r--indra/newview/tests/gpus_seen.txt16
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp4
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp4
79 files changed, 1293 insertions, 436 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 898c5a5273..eeb7e6f0aa 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3739,6 +3739,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>EnableCollisionSounds</key>
+ <map>
+ <key>Comment</key>
+ <string>Play sounds on collision</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>EnableMouselook</key>
<map>
<key>Comment</key>
@@ -12667,6 +12678,17 @@
<key>Value</key>
<integer>50</integer>
</map>
+ <key>TextureSaveLocation</key>
+ <map>
+ <key>Comment</key>
+ <string>Current location for bulk saving textures to disk</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>ThrottleBandwidthKBPS</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
index b768d609f4..d87403c78f 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -43,13 +43,13 @@ void default_lighting()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
- color *= vertex_color;
-
if (color.a < minimum_alpha)
{
discard;
}
-
+
+ color *= vertex_color;
+
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
index d04cd79f4b..37cac5f437 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
@@ -43,13 +43,13 @@ void fullbright_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
- color.rgb *= vertex_color.rgb;
-
if (color.a < minimum_alpha)
{
discard;
}
+ color.rgb *= vertex_color.rgb;
+
color.rgb = fullbrightAtmosTransport(color.rgb);
frag_color = applyWaterFog(color);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
index 3b9c04b22b..c98db4795c 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
@@ -41,13 +41,15 @@ VARYING vec2 vary_texcoord0;
void fullbright_lighting_water()
{
- vec4 color = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
if (color.a < minimum_alpha)
{
discard;
}
+ color.rgb *= vertex_color.rgb;
+
color.rgb = fullbrightAtmosTransport(color.rgb);
frag_color = applyWaterFog(color);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
index 0916797259..9c89c09573 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
@@ -41,13 +41,13 @@ void default_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
- color.rgb *= vertex_color.rgb;
-
if (color.a < minimum_alpha)
{
discard;
}
+ color.rgb *= vertex_color.rgb;
+
color.rgb = atmosLighting(color.rgb);
frag_color = applyWaterFog(color);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
index f2a84f1d42..9de7a03180 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
@@ -43,13 +43,13 @@ void default_lighting_water()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
- color.rgb *= vertex_color.rgb;
-
if (color.a < minimum_alpha)
{
discard;
}
+ color.rgb *= vertex_color.rgb;
+
color.rgb = atmosLighting(color.rgb);
color = applyWaterFog(color);
diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml
index eec0d81e8b..f3a23edc58 100644
--- a/indra/newview/app_settings/toolbars.xml
+++ b/indra/newview/app_settings/toolbars.xml
@@ -7,6 +7,7 @@
<command name="destinations"/>
<command name="people"/>
<command name="profile"/>
+ <command name="map"/>
<command name="move"/>
<command name="view"/>
<command name="howto"/>
diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi
index 05977847b9..865e8bdeee 100644
--- a/indra/newview/installers/windows/lang_pl.nsi
+++ b/indra/newview/installers/windows/lang_pl.nsi
Binary files differ
diff --git a/indra/newview/licenses-linux.txt b/indra/newview/licenses-linux.txt
index b43c402e64..e53ba94a36 100644
--- a/indra/newview/licenses-linux.txt
+++ b/indra/newview/licenses-linux.txt
@@ -638,7 +638,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
-Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
+Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
diff --git a/indra/newview/licenses-mac.txt b/indra/newview/licenses-mac.txt
index af80bff5d9..d0747ccd03 100644
--- a/indra/newview/licenses-mac.txt
+++ b/indra/newview/licenses-mac.txt
@@ -522,7 +522,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
-Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
+Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
diff --git a/indra/newview/licenses-win32.txt b/indra/newview/licenses-win32.txt
index 8736626907..98edd35bea 100644
--- a/indra/newview/licenses-win32.txt
+++ b/indra/newview/licenses-win32.txt
@@ -4,7 +4,7 @@ Logitech License
End-User License Agreement for Logitech LCD SDK
-This End-User License Agreement for Logitech LCD SDK ( “Agreement”) is a legal agreement between you, either an individual or legal entity (“You” or “you”) and Logitech Inc. (“Logitech”) for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter “LCD SDK”). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
+This End-User License Agreement for Logitech LCD SDK ( "Agreement") is a legal agreement between you, either an individual or legal entity ("You" or "you") and Logitech Inc. ("Logitech") for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter "LCD SDK"). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control.
1 Grant of License and Restrictions.
This Agreement grants You the following rights provided that You comply with all terms and conditions of this Agreement.
@@ -14,7 +14,7 @@ This Agreement grants You the following rights provided that You comply with all
(d) In the event Logitech, in its sole discretion, elects to provide copies of the LCD SDK to more than one individual employed by You (if You are not a single individual), each such individual shall be entitled to exercise the rights granted in this Agreement and shall be bound by the terms and conditions herein.
2 Updates.
-Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements (“Updates”) to You, in which case such Updates shall be deemed to be included in the “LCD SDK” and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
+Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements ("Updates") to You, in which case such Updates shall be deemed to be included in the "LCD SDK" and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates.
3 Intellectual Property Rights.
The LCD SDK is licensed, not sold, to You for use only under the terms and conditions of this Agreement. Logitech and its suppliers retain title to the LCD SDK and all intellectual property rights therein. The LCD SDK is protected by intellectual property laws and international treaties, including U.S. copyright law and international copyright treaties. All rights not expressly granted by Logitech are reserved.
@@ -23,7 +23,7 @@ The LCD SDK is licensed, not sold, to You for use only under the terms and condi
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LOGITECH AND ITS SUPPLIERS PROVIDE THE LCD SDK AND OTHER LOGITECH PRODUCTS AND SERVICES (IF ANY) AS IS AND WITHOUT WARRANTY OF ANY KIND. LOGITECH AND ITS SUPPLIERS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD-PARTY RIGHTS WITH RESPECT TO THE LCD SDK AND ANY WARRANTIES OF NON-INTERFERENCE OR ACCURACY OF INFORMATIONAL CONTENT. NO LOGITECH DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATION, EXTENSION, OR ADDITION TO THIS WARRANTY. Some jurisdictions do not allow limitations on how long an implied warranty lasts, so the above limitation may not apply to you.
5 Limitation of Liability.
-IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS’ TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
+IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS' TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability.
6 U.S. Government Rights.
Use, duplication, or disclosure of the software contained in the LCD SDK by the U.S. Government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988) FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Logitech Inc. 6505 Kaiser Drive, Fremont, CA 94555.
@@ -564,7 +564,7 @@ Vivox SDK License
RSA Data Security, Inc. MD5 Message-Digest Algorithm
-Audio coding: Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)
+Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C)
Open Source Software Licensing
Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below.
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 7f18ea6fe2..be168ff5dd 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1049,13 +1049,14 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
// updating inventory
+ LLWearableType* wearable_type_inst = LLWearableType::getInstance();
// TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later
// note: shirt is the first non-body part wearable item. Update if wearable order changes.
// This loop should remove all clothing, but not any body parts
for (S32 j = 0; j < (S32)LLWearableType::WT_COUNT; j++)
{
- if (LLWearableType::getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
+ if (wearable_type_inst->getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
{
removeWearable((LLWearableType::EType)j, true, 0);
}
@@ -1075,7 +1076,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
new_wearable->setName(new_item->getName());
new_wearable->setItemID(new_item->getUUID());
- if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART)
+ if (wearable_type_inst->getAssetType(type) == LLAssetType::AT_BODYPART)
{
// exactly one wearable per body part
setWearable(type,0,new_wearable);
@@ -1162,7 +1163,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab
if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
(old_item_id == new_item->getUUID()))
{
- LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
+ LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getInstance()->getTypeName(type) << LL_ENDL;
return;
}
@@ -1594,7 +1595,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
return;
}
- const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType());
+ const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
}
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index aeb3294f53..5214f4b838 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -301,6 +301,12 @@ struct AttachmentInfo
AttachmentInfo(metadata.staticDebugPathname, "text/xml")
};
+ secondLogPath = metadata.secondLogFilePathname;
+ if(!secondLogPath.empty())
+ {
+ info.push_back(AttachmentInfo(secondLogPath, "text/xml"));
+ }
+
// We "happen to know" that info[0].basename is "SecondLife.old" -- due to
// the fact that BugsplatMac only notices a crash during the viewer run
// following the crash.
@@ -339,6 +345,12 @@ struct AttachmentInfo
- (void)bugsplatStartupManagerDidFinishSendingCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
{
infos("Sent crash report to BugSplat");
+
+ if(!secondLogPath.empty())
+ {
+ boost::filesystem::remove(secondLogPath);
+ }
+ clearDumpLogsDir();
}
- (void)bugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager didFailWithError:(NSError *)error
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 31d5a97ce6..39c9fa1bca 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -957,7 +957,7 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L
// runway skip here?
}
- LL_INFOS() << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
+ LL_INFOS("Avatar") << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
holder->eraseTypeToLink(type);
// Add wearable to FoundData for actual wearing
LLViewerInventoryItem *item = gInventory.getItem(item_id);
@@ -1021,8 +1021,8 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
// Try to recover by replacing missing wearable with a new one.
LLNotificationsUtil::add("ReplacedMissingWearable");
- LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type)
- << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
+ LL_DEBUGS("Avatar") << "Wearable of type '" << LLWearableType::getInstance()->getTypeName(type)
+ << "' could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
// Add a new one in the lost and found folder.
@@ -4325,6 +4325,17 @@ public:
}
virtual void done()
{
+ if (mComplete.size() <= 0)
+ {
+ // Ex: timeout
+ LL_WARNS() << "Failed to load data. Removing observer " << LL_ENDL;
+ gInventory.removeObserver(this);
+ doOnIdleOneTime(mCallable);
+
+ delete this;
+ return;
+ }
+
// What we do here is get the complete information on the
// items in the requested category, and set up an observer
// that will wait for that to happen.
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index ddb4258030..1c67cc9705 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -717,8 +717,6 @@ LLAppViewer::LLAppViewer()
gLoggedInTime.stop();
- initLoggingAndGetLastDuration();
-
processMarkerFiles();
//
// OK to write stuff to logs now, we've now crash reported if necessary
@@ -771,10 +769,6 @@ bool LLAppViewer::init()
// Start of the application
//
- // initialize LLWearableType translation bridge.
- // Memory will be cleaned up in ::cleanupClass()
- LLWearableType::initParamSingleton(new LLUITranslationBridge());
-
// initialize the LLSettingsType translation bridge.
LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
LLSettingsType::initParamSingleton(trans);
@@ -796,6 +790,7 @@ bool LLAppViewer::init()
//
init_default_trans_args();
+ // inits from settings.xml and from strings.xml
if (!initConfiguration())
return false;
@@ -862,6 +857,10 @@ bool LLAppViewer::init()
// Setup LLTrans after LLUI::initClass has been called.
initStrings();
+ // initialize LLWearableType translation bridge.
+ // Will immediately use LLTranslationBridge to init LLWearableDictionary
+ LLWearableType::initParamSingleton(trans);
+
// Setup notifications after LLUI::initClass() has been called.
LLNotifications::instance();
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
@@ -1342,6 +1341,13 @@ bool LLAppViewer::init()
// Load User's bindings
loadKeyBindings();
+#if LL_WINDOWS
+ if (!mSecondInstance)
+ {
+ gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath());
+ }
+#endif
+
return true;
}
@@ -2248,75 +2254,87 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
void LLAppViewer::initLoggingAndGetLastDuration()
{
- //
- // Set up logging defaults for the viewer
- //
- LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
+ //
+ // Set up logging defaults for the viewer
+ //
+ LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
,gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")
);
- LLError::addGenericRecorder(&errorCallback);
- //LLError::setTimeFunction(getRuntime);
-
- // Remove the last ".old" log file.
- std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- "SecondLife.old");
- LLFile::remove(old_log_file);
-
- // Get name of the log file
- std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- "SecondLife.log");
- /*
- * Before touching any log files, compute the duration of the last run
- * by comparing the ctime of the previous start marker file with the ctime
- * of the last log file.
- */
- std::string start_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, START_MARKER_FILE_NAME);
- llstat start_marker_stat;
- llstat log_file_stat;
- std::ostringstream duration_log_stream; // can't log yet, so save any message for when we can below
- int start_stat_result = LLFile::stat(start_marker_file_name, &start_marker_stat);
- int log_stat_result = LLFile::stat(log_file, &log_file_stat);
- if ( 0 == start_stat_result && 0 == log_stat_result )
- {
- int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
- // only report a last run time if the last viewer was the same version
- // because this stat will be counted against this version
- if ( markerIsSameVersion(start_marker_file_name) )
- {
- gLastExecDuration = elapsed_seconds;
- }
- else
- {
- duration_log_stream << "start marker from some other version; duration is not reported";
- gLastExecDuration = -1;
- }
- }
- else
- {
- // at least one of the LLFile::stat calls failed, so we can't compute the run time
- duration_log_stream << "duration stat failure; start: "<< start_stat_result << " log: " << log_stat_result;
- gLastExecDuration = -1; // unknown
- }
- std::string duration_log_msg(duration_log_stream.str());
+ LLError::addGenericRecorder(&errorCallback);
+ //LLError::setTimeFunction(getRuntime);
- // Create a new start marker file for comparison with log file time for the next run
- LLAPRFile start_marker_file ;
- start_marker_file.open(start_marker_file_name, LL_APR_WB);
- if (start_marker_file.getFileHandle())
- {
- recordMarkerVersion(start_marker_file);
- start_marker_file.close();
- }
- // Rename current log file to ".old"
- LLFile::rename(log_file, old_log_file);
+ if (mSecondInstance)
+ {
+ LLFile::mkdir(gDirUtilp->getDumpLogsDirPath());
+
+ LLUUID uid;
+ uid.generate();
+ LLError::logToFile(gDirUtilp->getDumpLogsDirPath(uid.asString() + ".log"));
+ }
+ else
+ {
+ // Remove the last ".old" log file.
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.old");
+ LLFile::remove(old_log_file);
+
+ // Get name of the log file
+ std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.log");
+ /*
+ * Before touching any log files, compute the duration of the last run
+ * by comparing the ctime of the previous start marker file with the ctime
+ * of the last log file.
+ */
+ std::string start_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, START_MARKER_FILE_NAME);
+ llstat start_marker_stat;
+ llstat log_file_stat;
+ std::ostringstream duration_log_stream; // can't log yet, so save any message for when we can below
+ int start_stat_result = LLFile::stat(start_marker_file_name, &start_marker_stat);
+ int log_stat_result = LLFile::stat(log_file, &log_file_stat);
+ if (0 == start_stat_result && 0 == log_stat_result)
+ {
+ int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
+ // only report a last run time if the last viewer was the same version
+ // because this stat will be counted against this version
+ if (markerIsSameVersion(start_marker_file_name))
+ {
+ gLastExecDuration = elapsed_seconds;
+ }
+ else
+ {
+ duration_log_stream << "start marker from some other version; duration is not reported";
+ gLastExecDuration = -1;
+ }
+ }
+ else
+ {
+ // at least one of the LLFile::stat calls failed, so we can't compute the run time
+ duration_log_stream << "duration stat failure; start: " << start_stat_result << " log: " << log_stat_result;
+ gLastExecDuration = -1; // unknown
+ }
+ std::string duration_log_msg(duration_log_stream.str());
+
+ // Create a new start marker file for comparison with log file time for the next run
+ LLAPRFile start_marker_file;
+ start_marker_file.open(start_marker_file_name, LL_APR_WB);
+ if (start_marker_file.getFileHandle())
+ {
+ recordMarkerVersion(start_marker_file);
+ start_marker_file.close();
+ }
+
+ // Rename current log file to ".old"
+ LLFile::rename(log_file, old_log_file);
- // Set the log file to SecondLife.log
- LLError::logToFile(log_file);
- if (!duration_log_msg.empty())
- {
- LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
- }
+ // Set the log file to SecondLife.log
+ LLError::logToFile(log_file);
+ if (!duration_log_msg.empty())
+ {
+ LL_WARNS("MarkerFile") << duration_log_msg << LL_ENDL;
+ }
+ }
}
bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
@@ -3782,6 +3800,7 @@ void LLAppViewer::processMarkerFiles()
// - Other Crash (SecondLife.error_marker present)
// These checks should also remove these files for the last 2 cases if they currently exist
+ std::ostringstream marker_log_stream;
bool marker_is_same_version = true;
// first, look for the marker created at startup and deleted on a clean exit
mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
@@ -3792,12 +3811,12 @@ void LLAppViewer::processMarkerFiles()
marker_is_same_version = markerIsSameVersion(mMarkerFileName);
// now test to see if this file is locked by a running process (try to open for write)
- LL_DEBUGS("MarkerFile") << "Checking exec marker file for lock..." << LL_ENDL;
+ marker_log_stream << "Checking exec marker file for lock...";
mMarkerFile.open(mMarkerFileName, LL_APR_WB);
apr_file_t* fMarker = mMarkerFile.getFileHandle() ;
if (!fMarker)
{
- LL_INFOS("MarkerFile") << "Exec marker file open failed - assume it is locked." << LL_ENDL;
+ marker_log_stream << "Exec marker file open failed - assume it is locked.";
mSecondInstance = true; // lock means that instance is running.
}
else
@@ -3805,16 +3824,20 @@ void LLAppViewer::processMarkerFiles()
// We were able to open it, now try to lock it ourselves...
if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
{
- LL_WARNS_ONCE("MarkerFile") << "Locking exec marker failed." << LL_ENDL;
+ marker_log_stream << "Locking exec marker failed.";
mSecondInstance = true; // lost a race? be conservative
}
else
{
// No other instances; we've locked this file now, so record our version; delete on quit.
recordMarkerVersion(mMarkerFile);
- LL_DEBUGS("MarkerFile") << "Exec marker file existed but was not locked; rewritten." << LL_ENDL;
+ marker_log_stream << "Exec marker file existed but was not locked; rewritten.";
}
}
+ initLoggingAndGetLastDuration();
+
+ std::string marker_log_msg(marker_log_stream.str());
+ LL_INFOS("MarkerFile") << marker_log_msg << LL_ENDL;
if (mSecondInstance)
{
@@ -3833,6 +3856,7 @@ void LLAppViewer::processMarkerFiles()
}
else // marker did not exist... last exec (if any) did not freeze
{
+ initLoggingAndGetLastDuration();
// Create the marker file for this execution & lock it; it will be deleted on a clean exit
apr_status_t s;
s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, TRUE);
@@ -3956,12 +3980,16 @@ void LLAppViewer::removeMarkerFiles()
void LLAppViewer::removeDumpDir()
{
- if (gDirUtilp->dumpDirExists())
+ //Call this routine only on clean exit. Crash reporter will clean up
+ //its locking table for us.
+ std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
+ gDirUtilp->deleteDirAndContents(dump_dir);
+
+ if (mSecondInstance && !isError())
{
- //Call this routine only on clean exit. Crash reporter will clean up
- //its locking table for us.
- std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
- gDirUtilp->deleteDirAndContents(dump_dir);
+ std::string log_filename = LLError::logFileName();
+ LLError::logToFile("");
+ LLFile::remove(log_filename);
}
}
diff --git a/indra/newview/llappviewermacosx-for-objc.h b/indra/newview/llappviewermacosx-for-objc.h
index 79c3efff91..94bfa2491b 100644
--- a/indra/newview/llappviewermacosx-for-objc.h
+++ b/indra/newview/llappviewermacosx-for-objc.h
@@ -31,6 +31,7 @@ bool pumpMainLoop();
void handleQuit();
void cleanupViewer();
void infos(const std::string& message);
+void clearDumpLogsDir();
// This struct is malleable; it only serves as a way to convey a number of
// fields from llappviewermacosx.cpp's CrashMetadata_instance() function to the
@@ -47,6 +48,7 @@ struct CrashMetadata
std::string agentFullname;
std::string regionName;
std::string fatalMessage;
+ std::string secondLogFilePathname;
};
CrashMetadata& CrashMetadata_instance();
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 42946e4415..75395b1f23 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -57,6 +57,7 @@
#include <fstream>
#include "lldir.h"
+#include "lldiriterator.h"
#include <signal.h>
#include <CoreAudio/CoreAudio.h> // for systemwide mute
class LLMediaCtrl; // for LLURLDispatcher
@@ -136,6 +137,14 @@ void cleanupViewer()
gViewerAppPtr = NULL;
}
+void clearDumpLogsDir()
+{
+ if (!LLAppViewer::instance()->isSecondInstance())
+ {
+ gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath());
+ }
+}
+
// The BugsplatMac API is structured as a number of different method
// overrides, each returning a different piece of metadata. But since we
// obtain such metadata by opening and parsing a file, it seems ridiculous to
@@ -190,6 +199,24 @@ CrashMetadataSingleton::CrashMetadataSingleton()
LLStringUtil::replaceChar(agentFullname, '_', ' ');
regionName = get_metadata(info, "CurrentRegion");
fatalMessage = get_metadata(info, "FatalMessage");
+
+ if (gDirUtilp->fileExists(gDirUtilp->getDumpLogsDirPath()))
+ {
+ LLDirIterator file_iter(gDirUtilp->getDumpLogsDirPath(), "*.log");
+ std::string file_name;
+ bool found = true;
+ while(found)
+ {
+ if((found = file_iter.next(file_name)))
+ {
+ std::string log_filename = gDirUtilp->getDumpLogsDirPath(file_name);
+ if(LLError::logFileName() != log_filename)
+ {
+ secondLogFilePathname = log_filename;
+ }
+ }
+ }
+ }
}
}
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index b31981b235..aa2ba752b7 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -74,7 +74,7 @@ protected:
}
// Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
- std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
+ std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
menu_item->setLabel(new_label);
}
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 4b5fd8a758..6f3f6e9166 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -47,7 +47,7 @@ namespace LLEventPolling
namespace Details
{
- class LLEventPollImpl: public boost::enable_shared_from_this<LLEventPollImpl>
+ class LLEventPollImpl: public std::enable_shared_from_this<LLEventPollImpl>
{
public:
LLEventPollImpl(const LLHost &sender);
@@ -284,7 +284,7 @@ namespace Details
LLEventPoll::LLEventPoll(const std::string& poll_url, const LLHost& sender):
mImpl()
{
- mImpl = boost::make_shared<LLEventPolling::Details::LLEventPollImpl>(sender);
+ mImpl = std::make_shared<LLEventPolling::Details::LLEventPollImpl>(sender);
mImpl->start(poll_url);
}
diff --git a/indra/newview/lleventpoll.h b/indra/newview/lleventpoll.h
index 65766dbb2a..d6da04b281 100644
--- a/indra/newview/lleventpoll.h
+++ b/indra/newview/lleventpoll.h
@@ -51,7 +51,7 @@ public:
private:
- boost::shared_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
+ std::shared_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
};
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index e33def5969..a7147c3f04 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -682,8 +682,12 @@ void LLFavoritesBarCtrl::changed(U32 mask)
//virtual
void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
{
+ S32 delta_width = width - getRect().getWidth();
+ S32 delta_height = height - getRect().getHeight();
+
+ bool force_update = delta_width || delta_height || sForceReshape;
LLUICtrl::reshape(width, height, called_from_parent);
- updateButtons();
+ updateButtons(force_update);
}
void LLFavoritesBarCtrl::draw()
@@ -746,8 +750,13 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
return button_params;
}
-void LLFavoritesBarCtrl::updateButtons()
+void LLFavoritesBarCtrl::updateButtons(bool force_update)
{
+ if (LLApp::isExiting())
+ {
+ return;
+ }
+
mItems.clear();
if (!collectFavoriteItems(mItems))
@@ -778,28 +787,29 @@ void LLFavoritesBarCtrl::updateButtons()
const child_list_t* childs = getChildList();
child_list_const_iter_t child_it = childs->begin();
int first_changed_item_index = 0;
- int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
- //lets find first changed button
- while (child_it != childs->end() && first_changed_item_index < mItems.size())
- {
- LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
- if (button)
- {
- const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
- if (item)
- {
- // an child's order and mItems should be same
- if (button->getLandmarkId() != item->getUUID() // sort order has been changed
- || button->getLabelSelected() != item->getName() // favorite's name has been changed
- || button->getRect().mRight < rightest_point) // favbar's width has been changed
- {
- break;
- }
- }
- first_changed_item_index++;
- }
- child_it++;
- }
+ if (!force_update)
+ {
+ //lets find first changed button
+ while (child_it != childs->end() && first_changed_item_index < mItems.size())
+ {
+ LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
+ if (button)
+ {
+ const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
+ if (item)
+ {
+ // an child's order and mItems should be same
+ if (button->getLandmarkId() != item->getUUID() // sort order has been changed
+ || button->getLabelSelected() != item->getName()) // favorite's name has been changed
+ {
+ break;
+ }
+ }
+ first_changed_item_index++;
+ }
+ child_it++;
+ }
+ }
// now first_changed_item_index should contains a number of button that need to change
if (first_changed_item_index <= mItems.size())
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 3bb940948b..2d7ba9df67 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -75,7 +75,7 @@ public:
void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; }
protected:
- void updateButtons();
+ void updateButtons(bool force_update = false);
LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset );
const LLButton::Params& getButtonParams();
BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 0501c287ad..281d4f68f5 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1457,14 +1457,22 @@ void LLFloaterEditExtDayCycle::reblendSettings()
{
F64 position = mTimeSlider->getCurSliderValue();
- if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
+ if (mSkyBlender)
{
- mSkyBlender->switchTrack(mCurrentTrack, position);
+ if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
+ {
+ mSkyBlender->switchTrack(mCurrentTrack, position);
+ }
+ else
+ {
+ mSkyBlender->setPosition(position);
+ }
}
- else
- mSkyBlender->setPosition(position);
- mWaterBlender->setPosition(position);
+ if (mWaterBlender)
+ {
+ mWaterBlender->setPosition(position);
+ }
}
void LLFloaterEditExtDayCycle::doApplyCommit(LLSettingsDay::ptr_t day)
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index adc7f71586..4b22f7427b 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -248,6 +248,29 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
region_flags = flags;
}
+ if (msg->has(_PREHASH_RegionInfo5))
+ {
+ F32 chat_whisper_range;
+ F32 chat_normal_range;
+ F32 chat_shout_range;
+ F32 chat_whisper_offset;
+ F32 chat_normal_offset;
+ F32 chat_shout_offset;
+ U32 chat_flags;
+
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperRange, chat_whisper_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalRange, chat_normal_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutRange, chat_shout_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperOffset, chat_whisper_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalOffset, chat_normal_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutOffset, chat_shout_offset);
+ msg->getU32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatFlags, chat_flags);
+
+ LL_INFOS() << "Whisper range: " << chat_whisper_range << " normal range: " << chat_normal_range << " shout range: " << chat_shout_range
+ << " whisper offset: " << chat_whisper_offset << " normal offset: " << chat_normal_offset << " shout offset: " << chat_shout_offset
+ << " chat flags: " << chat_flags << LL_ENDL;
+ }
+
if (host != gAgent.getRegionHost())
{
// Update is for a different region than the one we're in.
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 7541bb5efe..441979389e 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -518,9 +518,12 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid);
// If not already present, create the participant view and attach it to the root, otherwise, just refresh it
- if (widget && update_view)
+ if (widget)
{
- updateConversationViewParticipant(uuid); // overkill?
+ if (update_view)
+ {
+ updateConversationViewParticipant(uuid); // overkill?
+ }
}
else
{
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index 595d584799..8ee7a72055 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -162,7 +162,7 @@ void LLFloaterLinkReplace::onStartClicked()
else
{
LLSD args;
- args["TYPE"] = LLWearableType::getTypeName(source_item->getWearableType());
+ args["TYPE"] = LLWearableType::getInstance()->getTypeName(source_item->getWearableType());
params.substitutions(args);
LLNotifications::instance().add(params);
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 6bf2136f60..82f01fb747 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -263,7 +263,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mGotPersonalInfo(false),
mOriginalIMViaEmail(false),
mLanguageChanged(false),
- mAvatarDataInitialized(false)
+ mAvatarDataInitialized(false),
+ mSearchDataDirty(true)
{
LLConversationLog::instance().addObserver(this);
@@ -2150,6 +2151,11 @@ void LLFloaterPreference::updateClickActionViews()
getChild<LLComboBox>("double_click_action_combo")->setValue(dbl_click_to_teleport ? 2 : (int)dbl_click_to_walk);
}
+void LLFloaterPreference::updateSearchableItems()
+{
+ mSearchDataDirty = true;
+}
+
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{
LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));
@@ -2332,7 +2338,7 @@ BOOL LLPanelPreference::postBuild()
}
//////////////////////PanelSetup ///////////////////
- if (hasChild("max_bandwidth"), TRUE)
+ if (hasChild("max_bandwidth", TRUE))
{
mBandWidthUpdater = new LLPanelPreference::Updater(boost::bind(&handleBandwidthChanged, _1), BANDWIDTH_UPDATER_TIMEOUT);
gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&LLPanelPreference::Updater::update, mBandWidthUpdater, _2));
@@ -2906,10 +2912,19 @@ void LLPanelPreferenceControls::populateControlTable()
filename = "control_table_contents_columns_basic.xml";
break;
default:
- // Either unknown mode or MODE_SAVED_SETTINGS
- // It doesn't have UI or actual settings yet
- LL_INFOS() << "Unimplemented mode" << LL_ENDL;
- return;
+ {
+ // Either unknown mode or MODE_SAVED_SETTINGS
+ // It doesn't have UI or actual settings yet
+ LL_WARNS() << "Unimplemented mode" << LL_ENDL;
+
+ // Searchable columns were removed, mark searchables for an update
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->updateSearchableItems();
+ }
+ return;
+ }
}
addControlTableColumns(filename);
@@ -2940,8 +2955,15 @@ void LLPanelPreferenceControls::populateControlTable()
}
else
{
- LL_INFOS() << "Unimplemented mode" << LL_ENDL;
- return;
+ LL_WARNS() << "Unimplemented mode" << LL_ENDL;
+ }
+
+ // Searchable columns were removed and readded, mark searchables for an update
+ // Note: at the moment tables/lists lack proper llsearchableui support
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->updateSearchableItems();
}
}
@@ -3184,7 +3206,12 @@ void LLPanelPreferenceControls::setKeyBind(const std::string &control, EMouseCli
break;
}
}
- mConflictHandler[mode].registerControl(control, index, click, key, mask, true);
+ // At the moment 'ignore_mask' mask is mostly ignored, a placeholder
+ // Todo: implement it since it's preferable for things like teleport to match
+ // mask exactly but for things like running to ignore additional masks
+ // Ideally this needs representation in keybindings UI
+ bool ignore_mask = true;
+ mConflictHandler[mode].registerControl(control, index, click, key, mask, ignore_mask);
}
else if (!set)
{
@@ -3559,6 +3586,12 @@ void LLFloaterPreference::onUpdateFilterTerm(bool force)
if( !mSearchData || (mSearchData->mLastFilter == seachValue && !force))
return;
+ if (mSearchDataDirty)
+ {
+ // Data exists, but is obsolete, regenerate
+ collectSearchableItems();
+ }
+
mSearchData->mLastFilter = seachValue;
if( !mSearchData->mRootTab )
@@ -3656,4 +3689,5 @@ void LLFloaterPreference::collectSearchableItems()
collectChildren( this, ll::prefs::PanelDataPtr(), pRootTabcontainer );
}
+ mSearchDataDirty = false;
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 1268935712..e9e19e9acb 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -108,6 +108,7 @@ public:
void getControlNames(std::vector<std::string>& names);
// updates click/double-click action controls depending on values from settings.xml
void updateClickActionViews();
+ void updateSearchableItems();
protected:
void onBtnOK(const LLSD& userdata);
@@ -220,6 +221,7 @@ private:
LLSearchEditor *mFilterEdit;
std::unique_ptr< ll::prefs::SearchData > mSearchData;
+ bool mSearchDataDirty;
void onUpdateFilterTerm( bool force = false );
void collectSearchableItems();
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 0e4bb2ff92..a10ba7a39d 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -470,6 +470,29 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
region_flags = flags;
}
+ if (msg->has(_PREHASH_RegionInfo5))
+ {
+ F32 chat_whisper_range;
+ F32 chat_normal_range;
+ F32 chat_shout_range;
+ F32 chat_whisper_offset;
+ F32 chat_normal_offset;
+ F32 chat_shout_offset;
+ U32 chat_flags;
+
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperRange, chat_whisper_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalRange, chat_normal_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutRange, chat_shout_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperOffset, chat_whisper_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalOffset, chat_normal_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutOffset, chat_shout_offset);
+ msg->getU32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatFlags, chat_flags);
+
+ LL_INFOS() << "Whisper range: " << chat_whisper_range << " normal range: " << chat_normal_range << " shout range: " << chat_shout_range
+ << " whisper offset: " << chat_whisper_offset << " normal offset: " << chat_normal_offset << " shout offset: " << chat_shout_offset
+ << " chat flags: " << chat_flags << LL_ENDL;
+ }
+
// GENERAL PANEL
panel = tab->getChild<LLPanel>("General");
panel->getChild<LLUICtrl>("region_text")->setValue(LLSD(sim_name));
diff --git a/indra/newview/llhasheduniqueid.cpp b/indra/newview/llhasheduniqueid.cpp
index 03192d3e61..38dafc167f 100644
--- a/indra/newview/llhasheduniqueid.cpp
+++ b/indra/newview/llhasheduniqueid.cpp
@@ -35,8 +35,8 @@ bool llHashedUniqueID(unsigned char id[MD5HEX_STR_SIZE])
bool idIsUnique = true;
LLMD5 hashed_unique_id;
unsigned char unique_id[MAC_ADDRESS_BYTES];
- if ( LLUUID::getNodeID(unique_id)
- || LLMachineID::getUniqueID(unique_id, sizeof(unique_id))
+ if ( LLMachineID::getUniqueID(unique_id, sizeof(unique_id))
+ || LLUUID::getNodeID(unique_id)
)
{
hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fc8179f3b4..81b55c1073 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -5465,11 +5465,20 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
items.push_back(std::string("Texture Separator"));
- items.push_back(std::string("Save As"));
- if (!canSaveTexture())
- {
- disabled_items.push_back(std::string("Save As"));
- }
+
+ if ((flags & ITEM_IN_MULTI_SELECTION) != 0)
+ {
+ items.push_back(std::string("Save Selected As"));
+ }
+ else
+ {
+ items.push_back(std::string("Save As"));
+ if (!canSaveTexture())
+ {
+ disabled_items.push_back(std::string("Save As"));
+ }
+ }
+
}
addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
@@ -5487,6 +5496,23 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
preview_texture->saveAs();
}
}
+ else if ("save_selected_as" == action)
+ {
+ openItem();
+ if (canSaveTexture())
+ {
+ LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
+ if (preview_texture)
+ {
+ preview_texture->saveMultipleToFile(mFileName);
+ }
+ }
+ else
+ {
+ LL_WARNS() << "You don't have permission to save " << getName() << " to disk." << LL_ENDL;
+ }
+
+ }
else LLItemBridge::performAction(model, action);
}
@@ -6816,7 +6842,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Wearable Edit"));
}
- if (LLWearableType::getAllowMultiwear(mWearableType))
+ if (LLWearableType::getInstance()->getAllowMultiwear(mWearableType))
{
items.push_back(std::string("Wearable Add"));
if (!gAgentWearables.canAddWearable(mWearableType))
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 9af8664388..c21bfbd02d 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -403,6 +403,9 @@ public:
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual void performAction(LLInventoryModel* model, std::string action);
bool canSaveTexture(void);
+ void setFileName(const std::string& file_name) { mFileName = file_name; }
+protected:
+ std::string mFileName;
};
class LLSoundBridge : public LLItemBridge
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f2e06d19f3..9cc67766ca 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -47,6 +47,7 @@
#include "llappviewer.h"
#include "llavataractions.h"
#include "llclipboard.h"
+#include "lldirpicker.h"
#include "lldonotdisturbnotificationstorage.h"
#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
@@ -2517,6 +2518,10 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
LLAppearanceMgr::instance().removeItemsFromAvatar(ids);
}
+ else if ("save_selected_as" == action)
+ {
+ (new LLDirPickerThread(boost::bind(&LLInventoryAction::saveMultipleTextures, _1, selected_items, model), std::string()))->getFile();
+ }
else
{
std::set<LLFolderViewItem*>::iterator set_iter;
@@ -2544,6 +2549,41 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
}
+void LLInventoryAction::saveMultipleTextures(const std::vector<std::string>& filenames, std::set<LLFolderViewItem*> selected_items, LLInventoryModel* model)
+{
+ gSavedSettings.setString("TextureSaveLocation", filenames[0]);
+
+ LLMultiPreview* multi_previewp = new LLMultiPreview();
+ gFloaterView->addChild(multi_previewp);
+
+ LLFloater::setFloaterHost(multi_previewp);
+
+ std::map<std::string, S32> tex_names_map;
+ std::set<LLFolderViewItem*>::iterator set_iter;
+
+ for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
+ {
+ LLFolderViewItem* folder_item = *set_iter;
+ if(!folder_item) continue;
+ LLTextureBridge* bridge = (LLTextureBridge*)folder_item->getViewModelItem();
+ if(!bridge) continue;
+
+ std::string tex_name = bridge->getName();
+ if(!tex_names_map.insert(std::pair<std::string, S32>(tex_name, 0)).second)
+ {
+ tex_names_map[tex_name]++;
+ bridge->setFileName(tex_name + llformat("_%.3d", tex_names_map[tex_name]));
+ }
+ bridge->performAction(model, "save_selected_as");
+ }
+
+ LLFloater::setFloaterHost(NULL);
+ if (multi_previewp)
+ {
+ multi_previewp->openFloater(LLSD());
+ }
+}
+
void LLInventoryAction::removeItemFromDND(LLFolderView* root)
{
if(gAgent.isDoNotDisturb())
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 37c3c47336..2cb2b1e877 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -468,6 +468,8 @@ struct LLInventoryAction
static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);
static void removeItemFromDND(LLFolderView* root);
+ static void saveMultipleTextures(const std::vector<std::string>& filenames, std::set<LLFolderViewItem*> selected_items, LLInventoryModel* model);
+
static const int sConfirmOnDeleteItemsNumber;
private:
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 81c001b8bd..44e493fdf4 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -196,7 +196,7 @@ const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx)
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
{
const LLWearableType::EType wearable_type = LLWearableType::inventoryFlagsToWearableType(misc_flag);
- return LLWearableType::getIconName(wearable_type);
+ return LLWearableType::getInstance()->getIconName(wearable_type);
}
LLInventoryType::EIconName LLInventoryIcon::assignSettingsIcon(U32 misc_flag)
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index 1810105b42..89eb941106 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -32,237 +32,445 @@
#include <iostream>
#include <comdef.h>
#include <Wbemidl.h>
+#elif LL_DARWIN
+#include <CoreFoundation/CoreFoundation.h>
+#include <IOKit/IOKitLib.h>
#endif
unsigned char static_unique_id[] = {0,0,0,0,0,0};
+unsigned char static_legacy_id[] = {0,0,0,0,0,0};
bool static has_static_unique_id = false;
+bool static has_static_legacy_id = false;
#if LL_WINDOWS
-class LLComInitialize
+class LLWMIMethods
{
- HRESULT mHR;
public:
- LLComInitialize()
+ LLWMIMethods()
+ : pLoc(NULL),
+ pSvc(NULL)
{
- mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
- if (FAILED(mHR))
- LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << std::hex << mHR << LL_ENDL;
+ initCOMObjects();
}
- ~LLComInitialize()
+ ~LLWMIMethods()
{
- if (SUCCEEDED(mHR))
- CoUninitialize();
+ if (isInitialized())
+ {
+ cleanCOMObjects();
+ }
}
-};
-#endif //LL_WINDOWS
+ bool isInitialized() { return SUCCEEDED(mHR); }
+ bool getWindowsProductNumber(unsigned char *unique_id, size_t len);
+ bool getDiskDriveSerialNumber(unsigned char *unique_id, size_t len);
+ bool getProcessorSerialNumber(unsigned char *unique_id, size_t len);
+ bool getMotherboardSerialNumber(unsigned char *unique_id, size_t len);
+ bool getComputerSystemProductUUID(unsigned char *unique_id, size_t len);
+ bool getGenericSerialNumber(const BSTR &select, const LPCWSTR &variable, unsigned char *unique_id, size_t len, bool validate_as_uuid = false);
-// get an unique machine id.
-// NOT THREAD SAFE - do before setting up threads.
-// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
+private:
+ void initCOMObjects();
+ void cleanCOMObjects();
-S32 LLMachineID::init()
+ HRESULT mHR;
+ IWbemLocator *pLoc;
+ IWbemServices *pSvc;
+};
+
+
+void LLWMIMethods::initCOMObjects()
{
- size_t len = sizeof(static_unique_id);
- memset(static_unique_id, 0, len);
- S32 ret_code = 0;
-#if LL_WINDOWS
# pragma comment(lib, "wbemuuid.lib")
+ // Step 1: --------------------------------------------------
+ // Initialize COM. ------------------------------------------
- // algorithm to detect BIOS serial number found at:
- // http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx
- // we can't use the MAC address since on Windows 7, the first returned MAC address changes with every reboot.
+ mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
+ if (FAILED(mHR))
+ {
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << std::hex << mHR << LL_ENDL;
+ return;
+ }
+ // Step 2: --------------------------------------------------
+ // Set general COM security levels --------------------------
+ // Note: If you are using Windows 2000, you need to specify -
+ // the default authentication credentials for a user by using
+ // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ----
+ // parameter of CoInitializeSecurity ------------------------
+
+ mHR = CoInitializeSecurity(
+ NULL,
+ -1, // COM authentication
+ NULL, // Authentication services
+ NULL, // Reserved
+ RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
+ RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
+ NULL, // Authentication info
+ EOAC_NONE, // Additional capabilities
+ NULL // Reserved
+ );
+
+ if (FAILED(mHR))
+ {
+ LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << std::hex << mHR << LL_ENDL;
+ CoUninitialize();
+ return; // Program has failed.
+ }
- HRESULT hres;
+ // Step 3: ---------------------------------------------------
+ // Obtain the initial locator to WMI -------------------------
- // Step 1: --------------------------------------------------
- // Initialize COM. ------------------------------------------
+ mHR = CoCreateInstance(
+ CLSID_WbemLocator,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_IWbemLocator, (LPVOID *)&pLoc);
- LLComInitialize comInit;
+ if (FAILED(mHR))
+ {
+ LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << std::hex << mHR << LL_ENDL;
+ CoUninitialize();
+ return; // Program has failed.
+ }
- // Step 2: --------------------------------------------------
- // Set general COM security levels --------------------------
- // Note: If you are using Windows 2000, you need to specify -
- // the default authentication credentials for a user by using
- // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ----
- // parameter of CoInitializeSecurity ------------------------
+ // Step 4: -----------------------------------------------------
+ // Connect to WMI through the IWbemLocator::ConnectServer method
+
+ // Connect to the root\cimv2 namespace with
+ // the current user and obtain pointer pSvc
+ // to make IWbemServices calls.
+ mHR = 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(mHR))
+ {
+ LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << std::hex << mHR << LL_ENDL;
+ pLoc->Release();
+ CoUninitialize();
+ return; // Program has failed.
+ }
- hres = CoInitializeSecurity(
- NULL,
- -1, // COM authentication
- NULL, // Authentication services
- NULL, // Reserved
- RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
- RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
- NULL, // Authentication info
- EOAC_NONE, // Additional capabilities
- NULL // Reserved
- );
+ LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL;
-
- if (FAILED(hres))
- {
- LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << std::hex << hres << LL_ENDL;
- return 1; // Program has failed.
- }
-
- // Step 3: ---------------------------------------------------
- // Obtain the initial locator to WMI -------------------------
-
- IWbemLocator *pLoc = NULL;
-
- hres = CoCreateInstance(
- CLSID_WbemLocator,
- 0,
- CLSCTX_INPROC_SERVER,
- IID_IWbemLocator, (LPVOID *) &pLoc);
-
- if (FAILED(hres))
- {
- LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << std::hex << hres << LL_ENDL;
- return 1; // Program has failed.
- }
+ // Step 5: --------------------------------------------------
+ // Set security levels on the proxy -------------------------
- // Step 4: -----------------------------------------------------
- // Connect to WMI through the IWbemLocator::ConnectServer method
-
- 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" << std::hex << hres << LL_ENDL;
- pLoc->Release();
- return 1; // Program has failed.
- }
+ mHR = 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(mHR))
+ {
+ LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << std::hex << mHR << LL_ENDL;
+ cleanCOMObjects();
+ return; // Program has failed.
+ }
+}
+
+
+void LLWMIMethods::cleanCOMObjects()
+{
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+}
+
+bool LLWMIMethods::getWindowsProductNumber(unsigned char *unique_id, size_t len)
+{
+ // wmic path Win32_ComputerSystemProduct get UUID
+ return getGenericSerialNumber(bstr_t("SELECT * FROM Win32_OperatingSystem"), L"SerialNumber", unique_id, len);
+}
+
+bool LLWMIMethods::getDiskDriveSerialNumber(unsigned char *unique_id, size_t len)
+{
+ // wmic path Win32_DiskDrive get DeviceID,SerialNumber
+ return getGenericSerialNumber(bstr_t("SELECT * FROM Win32_DiskDrive"), L"SerialNumber", unique_id, len);
+}
+
+bool LLWMIMethods::getProcessorSerialNumber(unsigned char *unique_id, size_t len)
+{
+ // wmic path Win32_Processor get DeviceID,ProcessorId
+ return getGenericSerialNumber(bstr_t("SELECT * FROM Win32_Processor"), L"ProcessorId", unique_id, len);
+}
- LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL;
+bool LLWMIMethods::getMotherboardSerialNumber(unsigned char *unique_id, size_t len)
+{
+ // wmic path Win32_Processor get DeviceID,ProcessorId
+ return getGenericSerialNumber(bstr_t("SELECT * FROM Win32_BaseBoard"), L"SerialNumber", unique_id, len);
+}
+
+bool LLWMIMethods::getComputerSystemProductUUID(unsigned char *unique_id, size_t len)
+{
+ // UUID from Win32_ComputerSystemProduct is motherboard's uuid and is identical to csproduct's uuid
+ // wmic csproduct get name,identifyingnumber,uuid
+ // wmic path Win32_ComputerSystemProduct get UUID
+ return getGenericSerialNumber(bstr_t("SELECT * FROM Win32_ComputerSystemProduct"), L"UUID", unique_id, len, true);
+}
+bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &variable, unsigned char *unique_id, size_t len, bool validate_as_uuid)
+{
+ if (!isInitialized())
+ {
+ return false;
+ }
- // Step 5: --------------------------------------------------
- // Set security levels on the proxy -------------------------
+ HRESULT hres;
- 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
- );
+ // Step 6: --------------------------------------------------
+ // Use the IWbemServices pointer to make requests of WMI ----
- if (FAILED(hres))
+ // For example, get the name of the operating system
+ IEnumWbemClassObject* pEnumerator = NULL;
+ hres = pSvc->ExecQuery(
+ bstr_t("WQL"),
+ select,
+ 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" << std::hex << hres << LL_ENDL;
+ return false; // Program has failed.
+ }
+
+ // Step 7: -------------------------------------------------
+ // Get the data from the query in step 6 -------------------
+
+ IWbemClassObject *pclsObj = NULL;
+ ULONG uReturn = 0;
+ bool found = false;
+
+ while (pEnumerator)
+ {
+ HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
+ &pclsObj, &uReturn);
+
+ if (0 == uReturn)
{
- LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << std::hex << hres << LL_ENDL;
- pSvc->Release();
- pLoc->Release();
- return 1; // Program has failed.
+ break;
}
- // Step 6: --------------------------------------------------
- // Use the IWbemServices pointer to make requests of WMI ----
-
- // For example, get the name of the operating system
- IEnumWbemClassObject* pEnumerator = NULL;
- hres = pSvc->ExecQuery(
- bstr_t("WQL"),
- bstr_t("SELECT * FROM Win32_OperatingSystem"),
- WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
- NULL,
- &pEnumerator);
-
- if (FAILED(hres))
+ VARIANT vtProp;
+
+ // Get the value of the Name property
+ hr = pclsObj->Get(variable, 0, &vtProp, 0, 0);
+ if (FAILED(hr))
{
- LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << std::hex << hres << LL_ENDL;
- pSvc->Release();
- pLoc->Release();
- return 1; // Program has failed.
+ LL_WARNS() << "Failed to get SerialNumber. Error code = 0x" << std::hex << hres << LL_ENDL;
+ pclsObj->Release();
+ pclsObj = NULL;
+ continue;
}
- // Step 7: -------------------------------------------------
- // Get the data from the query in step 6 -------------------
-
- IWbemClassObject *pclsObj = NULL;
- ULONG uReturn = 0;
-
- while (pEnumerator)
+ // use characters in the returned Serial Number to create a byte array of size len
+ BSTR serialNumber(vtProp.bstrVal);
+ unsigned int serial_size = SysStringLen(serialNumber);
+ if (serial_size < 1) // < len?
{
- HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
- &pclsObj, &uReturn);
+ VariantClear(&vtProp);
+ pclsObj->Release();
+ pclsObj = NULL;
+ continue;
+ }
- if(0 == uReturn)
+ if (validate_as_uuid)
+ {
+ std::wstring ws(serialNumber, serial_size);
+ std::string str(ws.begin(), ws.end());
+
+ if (!LLUUID::validate(str))
{
- break;
+ VariantClear(&vtProp);
+ pclsObj->Release();
+ pclsObj = NULL;
+ continue;
}
- VARIANT vtProp;
+ static const LLUUID f_uuid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF");
+ LLUUID id(str);
- // Get the value of the Name property
- hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0);
- if (FAILED(hr))
+ if (id.isNull() || id == f_uuid)
{
- LL_WARNS() << "Failed to get SerialNumber. Error code = 0x" << std::hex << hres << LL_ENDL;
+ // Not unique id
+ VariantClear(&vtProp);
pclsObj->Release();
pclsObj = NULL;
continue;
}
- LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
+ }
+ LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
- // use characters in the returned Serial Number to create a byte array of size len
- BSTR serialNumber ( vtProp.bstrVal);
- unsigned int serial_size = SysStringLen(serialNumber);
- unsigned int j = 0;
+ unsigned int j = 0;
- while (j < serial_size && vtProp.bstrVal[j] != 0)
+ while (j < serial_size && vtProp.bstrVal[j] != 0)
+ {
+ for (unsigned int i = 0; i < len; i++)
{
- for (unsigned int i = 0; i < len; i++)
+ if (j >= serial_size || vtProp.bstrVal[j] == 0)
+ break;
+
+ unique_id[i] = (unsigned int)(unique_id[i] + serialNumber[j]);
+ j++;
+ }
+ }
+ VariantClear(&vtProp);
+
+ pclsObj->Release();
+ pclsObj = NULL;
+ found = true;
+ break;
+ }
+
+ // Cleanup
+ // ========
+
+ if (pEnumerator)
+ pEnumerator->Release();
+
+ return found;
+}
+#elif LL_DARWIN
+bool getSerialNumber(unsigned char *unique_id, size_t len)
+{
+ CFStringRef serial_cf_str = NULL;
+ io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault,
+ IOServiceMatching("IOPlatformExpertDevice"));
+ if (platformExpert)
+ {
+ serial_cf_str = (CFStringRef) IORegistryEntryCreateCFProperty(platformExpert,
+ CFSTR(kIOPlatformSerialNumberKey),
+ kCFAllocatorDefault, 0);
+ IOObjectRelease(platformExpert);
+ }
+
+ if (serial_cf_str)
+ {
+ char buffer[64] = {0};
+ std::string serial_str("");
+ if (CFStringGetCString(serial_cf_str, buffer, 64, kCFStringEncodingUTF8))
+ {
+ serial_str = buffer;
+ }
+
+ S32 serial_size = serial_str.size();
+
+ if(serial_str.size() > 0)
+ {
+ S32 j = 0;
+ while (j < serial_size)
+ {
+ for (S32 i = 0; i < len; i++)
{
- if (j >= serial_size || vtProp.bstrVal[j] == 0)
+ if (j >= serial_size)
break;
-
- static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]);
+
+ unique_id[i] = (unsigned int)(unique_id[i] + serial_str[j]);
j++;
}
}
- VariantClear(&vtProp);
+ return true;
+ }
+ }
+ return false;
+}
+#endif
- pclsObj->Release();
- pclsObj = NULL;
- break;
+// get an unique machine id.
+// NOT THREAD SAFE - do before setting up threads.
+// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
+
+S32 LLMachineID::init()
+{
+ size_t len = sizeof(static_unique_id);
+ memset(static_unique_id, 0, len);
+ S32 ret_code = 0;
+#if LL_WINDOWS
+
+ LLWMIMethods comInit;
+
+ if (comInit.getWindowsProductNumber(static_legacy_id, len))
+ {
+ // Bios id can change on windows update, so it is not the best id to use
+ // but since old viewer already use them, we might need this id to decode
+ // passwords
+ has_static_legacy_id = true;
+ }
+
+ // Try motherboard/bios id, if it is present it is supposed to be sufficiently unique
+ if (comInit.getComputerSystemProductUUID(static_unique_id, len))
+ {
+ has_static_unique_id = true;
+ LL_DEBUGS("AppInit") << "Using product uuid as unique id" << LL_ENDL;
+ }
+
+ // Fallback to legacy
+ if (!has_static_unique_id)
+ {
+ if (has_static_legacy_id)
+ {
+ memcpy(static_unique_id, &static_legacy_id, len);
+ // Since ids are identical, mark legacy as not present
+ // to not cause retry's in sechandler
+ has_static_legacy_id = false;
+ has_static_unique_id = true;
+ LL_DEBUGS("AppInit") << "Using legacy serial" << LL_ENDL;
+ }
+ else
+ {
+ return 1; // Program has failed.
}
+ }
- // Cleanup
- // ========
-
- if (pSvc)
- pSvc->Release();
- if (pLoc)
- pLoc->Release();
- if (pEnumerator)
- pEnumerator->Release();
- ret_code=0;
-#else
- unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);
+ ret_code=0;
+#elif LL_DARWIN
+ if (getSerialNumber(static_unique_id, len))
+ {
+ has_static_unique_id = true;
+ LL_DEBUGS("AppInit") << "Using Serial number as unique id" << LL_ENDL;
+ }
+
+ {
+ unsigned char * staticPtr = (unsigned char *)(&static_legacy_id[0]);
ret_code = LLUUID::getNodeID(staticPtr);
+ has_static_legacy_id = true;
+ }
+
+ // Fallback to legacy
+ if (!has_static_unique_id)
+ {
+ if (has_static_legacy_id)
+ {
+ memcpy(static_unique_id, &static_legacy_id, len);
+ // Since ids are identical, mark legacy as not present
+ // to not cause retry's in sechandler
+ has_static_legacy_id = false;
+ has_static_unique_id = true;
+ LL_DEBUGS("AppInit") << "Using legacy serial" << LL_ENDL;
+ }
+ }
+#else
+ unsigned char * staticPtr = (unsigned char *)(&static_legacy_id[0]);
+ ret_code = LLUUID::getNodeID(staticPtr);
+ has_static_unique_id = true;
+ has_static_legacy_id = false;
#endif
- has_static_unique_id = true;
LL_INFOS("AppInit") << "UniqueID: 0x";
// Code between here and LL_ENDL is not executed unless the LL_DEBUGS
@@ -291,3 +499,13 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
}
return 0;
}
+
+S32 LLMachineID::getLegacyID(unsigned char *unique_id, size_t len)
+{
+ if (has_static_legacy_id)
+ {
+ memcpy(unique_id, &static_legacy_id, len);
+ return 1;
+ }
+ return 0;
+}
diff --git a/indra/newview/llmachineid.h b/indra/newview/llmachineid.h
index 6ef8c36fdb..ec1e855031 100644
--- a/indra/newview/llmachineid.h
+++ b/indra/newview/llmachineid.h
@@ -34,6 +34,8 @@ public:
LLMachineID();
virtual ~LLMachineID();
static S32 getUniqueID(unsigned char *unique_id, size_t len);
+ // fallback id for windows
+ static S32 getLegacyID(unsigned char *unique_id, size_t len);
static S32 init();
protected:
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index c3e39429a2..7c942e8b53 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -105,7 +105,10 @@ void LLManipRotate::handleSelect()
{
// *FIX: put this in mouseDown?
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
- gFloaterTools->setStatusText("rotate");
+ if (gFloaterTools)
+ {
+ gFloaterTools->setStatusText("rotate");
+ }
LLManip::handleSelect();
}
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 9a8222d941..e74fd1241b 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -170,7 +170,10 @@ void LLManipScale::handleSelect()
LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
updateSnapGuides(bbox);
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
- gFloaterTools->setStatusText("scale");
+ if (gFloaterTools)
+ {
+ gFloaterTools->setStatusText("scale");
+ }
LLManip::handleSelect();
}
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 9248c160c6..8736d3b51f 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -287,7 +287,10 @@ LLManipTranslate::~LLManipTranslate()
void LLManipTranslate::handleSelect()
{
LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
- gFloaterTools->setStatusText("move");
+ if (gFloaterTools)
+ {
+ gFloaterTools->setStatusText("move");
+ }
LLManip::handleSelect();
}
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index a6f20a9f27..b06131cf38 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -63,7 +63,7 @@ void LLNotificationManager::init()
mChannels.push_back(new LLBrowserNotification());
mChannels.push_back(new LLIMHandler());
- mChatHandler = boost::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
+ mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h
index 52c79cc689..cf987ff4e9 100644
--- a/indra/newview/llnotificationmanager.h
+++ b/indra/newview/llnotificationmanager.h
@@ -35,8 +35,6 @@
#include <map>
#include <string>
-#include <boost/shared_ptr.hpp>
-
namespace LLNotificationsUI {
class LLToast;
@@ -60,7 +58,7 @@ public:
void onChat(const LLChat& msg, const LLSD &args);
private:
- boost::shared_ptr<class LLFloaterIMNearbyChatHandler> mChatHandler;
+ std::shared_ptr<class LLFloaterIMNearbyChatHandler> mChatHandler;
std::vector<LLNotificationChannelPtr> mChannels;
};
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index c1b622ffff..6a1597fad5 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -900,7 +900,7 @@ void LLOutfitGalleryContextMenu::onOutfitsRemovalConfirmation(const LLSD& notifi
void LLOutfitGalleryContextMenu::onCreate(const LLSD& data)
{
- LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
+ LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
if (type == LLWearableType::WT_NONE)
{
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 423e57978a..7270580032 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -1207,7 +1207,7 @@ void LLOutfitListGearMenuBase::onRename()
void LLOutfitListGearMenuBase::onCreate(const LLSD& data)
{
- LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
+ LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
if (type == LLWearableType::WT_NONE)
{
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index c601a6c210..be11a4a9f3 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1276,7 +1276,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
{
// Don't change the camera if this type doesn't have a camera switch.
// Useful for wearables like physics that don't have an associated physical body part.
- if (LLWearableType::getDisableCameraSwitch(mWearablePtr->getType()))
+ if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType()))
{
return;
}
diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp
index 052212dc27..52be75072c 100644
--- a/indra/newview/llpanelgroupcreate.cpp
+++ b/indra/newview/llpanelgroupcreate.cpp
@@ -45,6 +45,7 @@
#include "llfloaterreg.h"
#include "llfloater.h"
#include "llgroupmgr.h"
+#include "llstatusbar.h" // to re-request balance
#include "lltrans.h"
#include "llnotificationsutil.h"
#include "lluicolortable.h"
@@ -117,6 +118,7 @@ void LLPanelGroupCreate::refreshCreatedGroup(const LLUUID& group_id)
params["group_id"] = group_id;
params["open_tab_name"] = "panel_group_info_sidetray";
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
+ LLStatusBar::sendMoneyBalanceRequest();
}
void LLPanelGroupCreate::addMembershipRow(const std::string &name)
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 5be9ab6095..35582d2967 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -98,7 +98,7 @@ std::string LLShopURLDispatcher::resolveURL(LLWearableType::EType wearable_type,
{
const std::string prefix = "MarketplaceURL";
const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female";
- const std::string type_str = LLWearableType::getTypeName(wearable_type);
+ const std::string type_str = LLWearableType::getInstance()->getTypeName(wearable_type);
std::string setting_name = prefix;
@@ -174,7 +174,7 @@ public:
private:
static void onCreate(const LLSD& param)
{
- LLWearableType::EType type = LLWearableType::typeNameToType(param.asString());
+ LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(param.asString());
if (type == LLWearableType::WT_NONE)
{
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
@@ -189,19 +189,20 @@ private:
{
LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE);
+ LLWearableType * wearable_type_inst = LLWearableType::getInstance();
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
{
LLWearableType::EType type = (LLWearableType::EType) i;
- const std::string& type_name = LLWearableType::getTypeName(type);
+ const std::string& type_name = wearable_type_inst->getTypeName(type);
LLMenuItemCallGL::Params p;
p.name = type_name;
- p.label = LLTrans::getString(LLWearableType::getTypeDefaultNewName(type));
+ p.label = LLTrans::getString(wearable_type_inst->getTypeDefaultNewName(type));
p.on_click.function_name = "Wearable.Create";
p.on_click.parameter = LLSD(type_name);
- LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
+ LLView* parent = wearable_type_inst->getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
}
}
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 1b60610668..59be35fe92 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -232,6 +232,7 @@ void LLPreviewNotecard::loadAsset()
if (!editor)
return;
+ bool fail = false;
if(item)
{
@@ -315,7 +316,31 @@ void LLPreviewNotecard::loadAsset()
getChildView("Delete")->setEnabled(TRUE);
}
}
- else
+ else if (mObjectUUID.notNull() && mItemUUID.notNull())
+ {
+ LLViewerObject* objectp = gObjectList.findObject(mObjectUUID);
+ if (objectp && (objectp->isInventoryPending() || objectp->isInventoryDirty()))
+ {
+ // It's a notecard in object's inventory and we failed to get it because inventory is not up to date.
+ // Subscribe for callback and retry at inventoryChanged()
+ registerVOInventoryListener(objectp, NULL); //removes previous listener
+
+ if (objectp->isInventoryDirty())
+ {
+ objectp->requestInventory();
+ }
+ }
+ else
+ {
+ fail = true;
+ }
+ }
+ else
+ {
+ fail = true;
+ }
+
+ if (fail)
{
editor->setText(LLStringUtil::null);
editor->makePristine();
@@ -600,6 +625,17 @@ void LLPreviewNotecard::syncExternal()
}
}
+/*virtual*/
+void LLPreviewNotecard::inventoryChanged(LLViewerObject* object,
+ LLInventoryObject::object_list_t* inventory,
+ S32 serial_num,
+ void* user_data)
+{
+ removeVOInventoryListener();
+ loadAsset();
+}
+
+
void LLPreviewNotecard::deleteNotecard()
{
LLNotificationsUtil::add("DeleteNotecard", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleConfirmDeleteDialog,this, _1, _2));
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index d9c14815c1..3a706b8645 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -31,6 +31,7 @@
#include "llassetstorage.h"
#include "llpreviewscript.h"
#include "lliconctrl.h"
+#include "llvoinventorylistener.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPreviewNotecard
@@ -41,7 +42,7 @@
class LLViewerTextEditor;
class LLButton;
-class LLPreviewNotecard : public LLPreview
+class LLPreviewNotecard : public LLPreview, public LLVOInventoryListener
{
public:
LLPreviewNotecard(const LLSD& key);
@@ -75,6 +76,11 @@ public:
void syncExternal();
+ void inventoryChanged(LLViewerObject* object,
+ LLInventoryObject::object_list_t* inventory,
+ S32 serial_num,
+ void* user_data) override;
+
protected:
void updateTitleButtons() override;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 1e91da529c..cd7b93aba7 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -50,6 +50,7 @@
#include "llviewertexture.h"
#include "llviewertexturelist.h"
#include "lluictrlfactory.h"
+#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "lllineeditor.h"
@@ -317,6 +318,44 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
}
+
+void LLPreviewTexture::saveMultipleToFile(const std::string& file_name)
+{
+ std::string texture_location(gSavedSettings.getString("TextureSaveLocation"));
+ std::string texture_name = file_name.empty() ? getItem()->getName() : file_name;
+
+ std::string filepath;
+ S32 i = 0;
+ S32 err = 0;
+ std::string extension(".png");
+ do
+ {
+ filepath = texture_location;
+ filepath += gDirUtilp->getDirDelimiter();
+ filepath += texture_name;
+
+ if (i != 0)
+ {
+ filepath += llformat("_%.3d", i);
+ }
+
+ filepath += extension;
+
+ llstat stat_info;
+ err = LLFile::stat( filepath, &stat_info );
+ i++;
+ } while (-1 != err); // Search until the file is not found (i.e., stat() gives an error).
+
+
+ mSaveFileName = filepath;
+ mLoadingFullImage = TRUE;
+ getWindow()->incBusyCount();
+
+ mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
+ mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
+ 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
+}
+
// virtual
void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
{
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index ad77d9e118..9b6a843875 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -63,6 +63,7 @@ public:
void openToSave();
void saveTextureToFile(const std::vector<std::string>& filenames);
+ void saveMultipleToFile(const std::string& file_name = "");
static void onSaveAsBtn(void* data);
diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp
index 7daaa7ef8e..6caec6ec4a 100644
--- a/indra/newview/llregioninfomodel.cpp
+++ b/indra/newview/llregioninfomodel.cpp
@@ -173,6 +173,29 @@ void LLRegionInfoModel::update(LLMessageSystem* msg)
mRegionFlags = flags;
}
+ if (msg->has(_PREHASH_RegionInfo5))
+ {
+ F32 chat_whisper_range;
+ F32 chat_normal_range;
+ F32 chat_shout_range;
+ F32 chat_whisper_offset;
+ F32 chat_normal_offset;
+ F32 chat_shout_offset;
+ U32 chat_flags;
+
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperRange, chat_whisper_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalRange, chat_normal_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutRange, chat_shout_range);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatWhisperOffset, chat_whisper_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatNormalOffset, chat_normal_offset);
+ msg->getF32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatShoutOffset, chat_shout_offset);
+ msg->getU32Fast(_PREHASH_RegionInfo5, _PREHASH_ChatFlags, chat_flags);
+
+ LL_INFOS() << "Whisper range: " << chat_whisper_range << " normal range: " << chat_normal_range << " shout range: " << chat_shout_range
+ << " whisper offset: " << chat_whisper_offset << " normal offset: " << chat_normal_offset << " shout offset: " << chat_shout_offset
+ << " chat flags: " << chat_flags << LL_ENDL;
+ }
+
// the only reasonable way to decide if we actually have any data is to
// check to see if any of these fields have nonzero sizes
if (msg->getSize(_PREHASH_RegionInfo2, _PREHASH_ProductSKU) > 0 ||
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 19db020a31..35eee991e4 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1310,8 +1310,8 @@ LLSecAPIBasicHandler::~LLSecAPIBasicHandler()
_writeProtectedData();
}
-void LLSecAPIBasicHandler::_readProtectedData()
-{
+void LLSecAPIBasicHandler::_readProtectedData(unsigned char *unique_id, U32 id_len)
+{
// attempt to load the file into our map
LLPointer<LLSDParser> parser = new LLSDXMLParser();
llifstream protected_data_stream(mProtectedDataFilename.c_str(),
@@ -1322,9 +1322,7 @@ void LLSecAPIBasicHandler::_readProtectedData()
U8 buffer[BUFFER_READ_SIZE];
U8 decrypted_buffer[BUFFER_READ_SIZE];
int decrypted_length;
- unsigned char unique_id[MAC_ADDRESS_BYTES];
- LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
- LLXORCipher cipher(unique_id, sizeof(unique_id));
+ LLXORCipher cipher(unique_id, id_len);
// read in the salt and key
protected_data_stream.read((char *)salt, STORE_SALT_SIZE);
@@ -1375,6 +1373,30 @@ void LLSecAPIBasicHandler::_readProtectedData()
}
}
+void LLSecAPIBasicHandler::_readProtectedData()
+{
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ try
+ {
+ // try default id
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ _readProtectedData(unique_id, sizeof(unique_id));
+ }
+ catch(LLProtectedDataException&)
+ {
+ // try with legacy id, it will return false if it is identical to getUniqueID
+ // or if it is not assigned/not in use
+ if (LLMachineID::getLegacyID(unique_id, sizeof(unique_id)))
+ {
+ _readProtectedData(unique_id, sizeof(unique_id));
+ }
+ else
+ {
+ throw;
+ }
+ }
+}
+
void LLSecAPIBasicHandler::_writeProtectedData()
{
std::ostringstream formatted_data_ostream;
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h
index 3bfac3f056..0ff5e30c9b 100644
--- a/indra/newview/llsechandler_basic.h
+++ b/indra/newview/llsechandler_basic.h
@@ -329,6 +329,7 @@ public:
protected:
+ void _readProtectedData(unsigned char *unique_id, U32 id_len);
void _readProtectedData();
void _writeProtectedData();
std::string _legacyLoadPassword();
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 6dfe40c29a..aed9dba7ef 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -210,7 +210,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
// when editing its physics.
if (!gAgentCamera.cameraCustomizeAvatar())
{
- LLVOAvatarSelf::onCustomizeStart(LLWearableType::getDisableCameraSwitch(wearable_ptr->getType()));
+ LLVOAvatarSelf::onCustomizeStart(LLWearableType::getInstance()->getDisableCameraSwitch(wearable_ptr->getType()));
}
if (is_wearable_edit_visible)
{
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index c70fcedde5..54ff7d295e 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1097,8 +1097,6 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
final_name = LLTrans::getString("TooltipPerson");;
}
- // *HACK: We may select this object, so pretend it was clicked
- mPick = mHoverPick;
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
p.message(final_name);
@@ -1210,8 +1208,6 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
if (show_all_object_tips || needs_tip)
{
- // We may select this object, so pretend it was clicked
- mPick = mHoverPick;
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
p.message(tooltip_msg);
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 76dc9a6790..89c600fc2c 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -143,6 +143,20 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
gBumpImageList.destroyGL();
gBumpImageList.restoreGL();
+ if (gPipeline.isInit())
+ {
+ // ALM depends onto atmospheric shaders, state might have changed
+ bool old_state = LLPipeline::sRenderDeferred;
+ LLPipeline::refreshCachedSettings();
+ gPipeline.updateRenderDeferred();
+ if (old_state != LLPipeline::sRenderDeferred)
+ {
+ gPipeline.releaseGLBuffers();
+ gPipeline.createGLBuffers();
+ gPipeline.resetVertexBuffers();
+ }
+ }
+
// else, leave terrain detail as is
LLViewerShaderMgr::instance()->setShaders();
return true;
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index c0eaa88f54..6629a2ffac 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -60,8 +60,21 @@ const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true);
+struct LLKeybindFunctionData
+{
+ LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global)
+ :
+ mFunction(function),
+ mIsGlobal(global)
+ {
+ }
+ boost::function<bool(EKeystate keystate)> mFunction;
+ // todo: might be good idea to make this into enum, like: global/inworld/menu
+ bool mIsGlobal;
+};
+
struct LLKeyboardActionRegistry
-: public LLRegistrySingleton<std::string, boost::function<bool (EKeystate keystate)>, LLKeyboardActionRegistry>
+: public LLRegistrySingleton<const std::string, LLKeybindFunctionData, LLKeyboardActionRegistry>
{
LLSINGLETON_EMPTY_CTOR(LLKeyboardActionRegistry);
};
@@ -852,7 +865,10 @@ bool agen_control_lbutton_handle(EKeystate s)
return true;
}
-#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, ACTION);
+// In-world keybindings, like walking or camera
+#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, LLKeybindFunctionData(ACTION, false));
+// Global keybindings that should work even with floaters focused, like voice
+#define REGISTER_KEYBOARD_GLOBAL_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, LLKeybindFunctionData(ACTION, true));
REGISTER_KEYBOARD_ACTION("jump", agent_jump);
REGISTER_KEYBOARD_ACTION("push_down", agent_push_down);
REGISTER_KEYBOARD_ACTION("push_forward", agent_push_forward);
@@ -903,8 +919,8 @@ REGISTER_KEYBOARD_ACTION("toggle_pause_media", toggle_pause_media);
REGISTER_KEYBOARD_ACTION("toggle_enable_media", toggle_enable_media);
REGISTER_KEYBOARD_ACTION("teleport_to", teleport_to);
REGISTER_KEYBOARD_ACTION("walk_to", walk_to);
-REGISTER_KEYBOARD_ACTION("toggle_voice", toggle_voice);
-REGISTER_KEYBOARD_ACTION("voice_follow_key", voice_follow_key);
+REGISTER_KEYBOARD_GLOBAL_ACTION("toggle_voice", toggle_voice);
+REGISTER_KEYBOARD_GLOBAL_ACTION("voice_follow_key", voice_follow_key);
#undef REGISTER_KEYBOARD_ACTION
LLViewerInput::LLViewerInput()
@@ -1034,6 +1050,33 @@ BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
return gViewerWindow->handleKeyUp(translated_key, translated_mask);
}
+bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask)
+{
+ S32 mode = getMode();
+ return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE);
+}
+
+bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
+{
+ S32 mode = getMode();
+ return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE);
+}
+
+bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)
+{
+ bool res = false;
+ S32 mode = getMode();
+ if (down)
+ {
+ res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_DOWN, true);
+ }
+ else
+ {
+ res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_UP, true);
+ }
+ return res;
+}
+
BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
S32 index;
@@ -1061,39 +1104,64 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
}
// Not remapped, look for a function
-
- function_t* result = LLKeyboardActionRegistry::getValue(function_name);
+
+ LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
if (result)
{
- function = *result;
+ function = result->mFunction;
}
if (!function)
{
- LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
+ LL_WARNS_ONCE() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
- // check for duplicate first and overwrite
- S32 size = mKeyBindings[mode].size();
- for (index = 0; index < size; index++)
+ if (mode >= MODE_COUNT)
{
- if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask)
- break;
+ LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
+ return FALSE;
}
- if (mode >= MODE_COUNT)
- {
- LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
- return FALSE;
- }
+ // check for duplicate first and overwrite
+ if (result->mIsGlobal)
+ {
+ S32 size = mGlobalKeyBindings[mode].size();
+ for (index = 0; index < size; index++)
+ {
+ if (key == mGlobalKeyBindings[mode][index].mKey && mask == mGlobalKeyBindings[mode][index].mMask)
+ {
+ mGlobalKeyBindings[mode][index].mFunction = function;
+ return TRUE;
+ }
+ }
+ }
+ else
+ {
+ S32 size = mKeyBindings[mode].size();
+ for (index = 0; index < size; index++)
+ {
+ if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask)
+ {
+ mKeyBindings[mode][index].mFunction = function;
+ return TRUE;
+ }
+ }
+ }
LLKeyboardBinding bind;
bind.mKey = key;
bind.mMask = mask;
bind.mFunction = function;
- mKeyBindings[mode].push_back(bind);
+ if (result->mIsGlobal)
+ {
+ mGlobalKeyBindings[mode].push_back(bind);
+ }
+ else
+ {
+ mKeyBindings[mode].push_back(bind);
+ }
return TRUE;
}
@@ -1104,38 +1172,63 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
typedef boost::function<bool(EKeystate)> function_t;
function_t function = NULL;
- function_t* result = LLKeyboardActionRegistry::getValue(function_name);
+ LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
if (result)
{
- function = *result;
+ function = result->mFunction;
}
if (!function)
{
- LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
+ LL_WARNS_ONCE() << "Can't bind mouse key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
- // check for duplicate first and overwrite
- S32 size = mMouseBindings[mode].size();
- for (index = 0; index < size; index++)
- {
- if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
- break;
- }
-
if (mode >= MODE_COUNT)
{
LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
return FALSE;
}
+ // check for duplicate first and overwrite
+ if (result->mIsGlobal)
+ {
+ S32 size = mGlobalMouseBindings[mode].size();
+ for (index = 0; index < size; index++)
+ {
+ if (mouse == mGlobalMouseBindings[mode][index].mMouse && mask == mGlobalMouseBindings[mode][index].mMask)
+ {
+ mGlobalMouseBindings[mode][index].mFunction = function;
+ return true;
+ }
+ }
+ }
+ else
+ {
+ S32 size = mMouseBindings[mode].size();
+ for (index = 0; index < size; index++)
+ {
+ if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
+ {
+ mMouseBindings[mode][index].mFunction = function;
+ return true;
+ }
+ }
+ }
+
LLMouseBinding bind;
bind.mMouse = mouse;
bind.mMask = mask;
bind.mFunction = function;
- mMouseBindings[mode].push_back(bind);
+ if (result->mIsGlobal)
+ {
+ mGlobalMouseBindings[mode].push_back(bind);
+ }
+ else
+ {
+ mMouseBindings[mode].push_back(bind);
+ }
return TRUE;
}
@@ -1162,6 +1255,8 @@ void LLViewerInput::resetBindings()
{
for (S32 i = 0; i < MODE_COUNT; i++)
{
+ mGlobalKeyBindings[i].clear();
+ mGlobalMouseBindings[i].clear();
mKeyBindings[i].clear();
mMouseBindings[i].clear();
}
@@ -1439,11 +1534,18 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
return handled;
}
-bool LLViewerInput::scanMouse(const std::vector<LLMouseBinding> &binding, S32 binding_count, EMouseClickType mouse, MASK mask, EMouseState state) const
+bool LLViewerInput::scanMouse(
+ const std::vector<LLMouseBinding> &binding,
+ S32 binding_count,
+ EMouseClickType mouse,
+ MASK mask,
+ EMouseState state,
+ bool ignore_additional_masks
+) const
{
for (S32 i = 0; i < binding_count; i++)
{
- if (binding[i].mMouse == mouse && (binding[i].mMask & mask) == binding[i].mMask)
+ if (binding[i].mMouse == mouse && (ignore_additional_masks ? (binding[i].mMask & mask) == binding[i].mMask : binding[i].mMask == mask))
{
bool res = false;
switch (state)
@@ -1480,7 +1582,11 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const
bool res = false;
S32 mode = getMode();
MASK mask = gKeyboard->currentMask(TRUE);
- res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state);
+
+ // By default mouse clicks require exact mask
+ // Todo: support for mIgnoreMasks because some functions like teleports
+ // expect to be canceled, but for voice it's prefered to ignore mask.
+ res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state, false);
// no user defined actions found or those actions can't handle the key/button, handle control if nessesary
if (!res && agent_control_lbutton.canHandle(click, KEY_NONE, mask))
{
@@ -1536,5 +1642,11 @@ bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask
if (mouse == mMouseBindings[mode][index].mMouse && mask == mMouseBindings[mode][index].mMask)
return true;
}
+ size = mGlobalMouseBindings[mode].size();
+ for (S32 index = 0; index < size; index++)
+ {
+ if (mouse == mGlobalMouseBindings[mode][index].mMouse && mask == mGlobalMouseBindings[mode][index].mMask)
+ return true;
+ }
return false;
}
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 281a209896..ca70ac76bf 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -109,6 +109,13 @@ public:
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
BOOL handleKeyUp(KEY key, MASK mask);
+ // Handle 'global' keybindings that do not consume event,
+ // yet need to be processed early
+ // Example: we want voice to toggle even if some floater is focused
+ bool handleGlobalBindsKeyDown(KEY key, MASK mask);
+ bool handleGlobalBindsKeyUp(KEY key, MASK mask);
+ bool handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down);
+
S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error
EKeyboardMode getMode() const;
@@ -149,7 +156,8 @@ private:
S32 binding_count,
EMouseClickType mouse,
MASK mask,
- EMouseState state) const;
+ EMouseState state,
+ bool ignore_additional_masks) const;
S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode);
BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
@@ -164,6 +172,10 @@ private:
std::vector<LLKeyboardBinding> mKeyBindings[MODE_COUNT];
std::vector<LLMouseBinding> mMouseBindings[MODE_COUNT];
+ // keybindings that do not consume event and are handled earlier, before floaters
+ std::vector<LLKeyboardBinding> mGlobalKeyBindings[MODE_COUNT];
+ std::vector<LLMouseBinding> mGlobalMouseBindings[MODE_COUNT];
+
typedef std::map<U32, U32> key_remap_t;
key_remap_t mRemapKeys[MODE_COUNT];
std::set<KEY> mKeysSkippedByUI;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bbed741a33..55ac817479 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1756,7 +1756,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge,
else
{
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
- LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name);
+ LLWearableType::EType wearable_type = LLWearableType::getInstance()->typeNameToType(type_name);
if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT)
{
const LLUUID parent_id = bridge ? bridge->getUUID() : LLUUID::null;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5b1ad9e2a0..635b731193 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -360,11 +360,21 @@ LLMenuParcelObserver::~LLMenuParcelObserver()
void LLMenuParcelObserver::changed()
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
- gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID()));
-
- BOOL buyable = enable_buy_land(NULL);
- gMenuHolder->childSetEnabled("Land Buy", buyable);
- gMenuHolder->childSetEnabled("Buy Land...", buyable);
+ if (gMenuLand && parcel)
+ {
+ LLView* child = gMenuLand->findChild<LLView>("Land Buy Pass");
+ if (child)
+ {
+ child->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+ }
+
+ child = gMenuLand->findChild<LLView>("Land Buy");
+ if (child)
+ {
+ BOOL buyable = enable_buy_land(NULL);
+ child->setEnabled(buyable);
+ }
+ }
}
@@ -8556,7 +8566,7 @@ class LLEditEnableTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
+ LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing);
if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
return LLAgentWearables::selfHasWearable(type);
return false;
@@ -8572,7 +8582,7 @@ class LLEditTakeOff : public view_listener_t
LLAppearanceMgr::instance().removeAllClothesFromAvatar();
else
{
- LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
+ LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing);
if (type >= LLWearableType::WT_SHAPE
&& type < LLWearableType::WT_COUNT
&& (gAgentWearables.getWearableCount(type) > 0))
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 39c891c9c1..9d85586dae 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -38,6 +38,7 @@
#include "llfollowcamparams.h"
#include "llinventorydefines.h"
#include "lllslconstants.h"
+#include "llmaterialtable.h"
#include "llregionhandle.h"
#include "llsd.h"
#include "llsdserialize.h"
@@ -3855,6 +3856,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
return;
}
+ if (LLMaterialTable::basic.isCollisionSound(sound_id) && !gSavedSettings.getBOOL("EnableCollisionSounds"))
+ {
+ return;
+ }
+
gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index ba02f92791..198fe1563c 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2828,7 +2828,6 @@ void LLViewerRegion::unpackRegionHandshake()
mProductName = productName;
}
-
mCentralBakeVersion = region_protocols & 1; // was (S32)gSavedSettings.getBOOL("UseServerTextureBaking");
LLVLComposition *compp = getComposition();
if (compp)
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index be5c22e7c3..945b51d819 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -466,8 +466,8 @@ void LLViewerShaderMgr::setShaders()
bool canRenderDeferred = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred");
bool hasWindLightShaders = LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders");
S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
- bool useRenderDeferred = canRenderDeferred && gSavedSettings.getBOOL("RenderDeferred") && gSavedSettings.getBOOL("RenderAvatarVP");
bool doingWindLight = hasWindLightShaders && gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ bool useRenderDeferred = doingWindLight && canRenderDeferred && gSavedSettings.getBOOL("RenderDeferred") && gSavedSettings.getBOOL("RenderAvatarVP");
//using shaders, disable fixed function
LLGLSLShader::sNoFixedFunction = true;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index ca01bb46aa..7fbc4d789b 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3518,11 +3518,22 @@ BOOL LLViewerMediaTexture::findFaces()
for(; iter != obj_list->end(); ++iter)
{
LLVOVolume* obj = *iter;
- if(obj->mDrawable.isNull())
- {
- ret = FALSE;
- continue;
- }
+ if (obj->isDead())
+ {
+ // Isn't supposed to happen, objects are supposed to detach
+ // themselves on markDead()
+ // If this happens, viewer is likely to crash
+ llassert(0);
+ LL_WARNS() << "Dead object in mMediaImplp's object list" << LL_ENDL;
+ ret = FALSE;
+ continue;
+ }
+
+ if (obj->mDrawable.isNull() || obj->mDrawable->isDead())
+ {
+ ret = FALSE;
+ continue;
+ }
S32 face_id = -1;
S32 num_faces = obj->mDrawable->getNumFaces();
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 9c4dfd1ca2..c80cf27bda 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -562,7 +562,7 @@ void LLViewerWearable::saveNewAsset() const
void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLWearableSaveData* data = (LLWearableSaveData*)userdata;
- const std::string& type_name = LLWearableType::getTypeName(data->mType);
+ const std::string& type_name = LLWearableType::getInstance()->getTypeName(data->mType);
if(0 == status)
{
// Success
@@ -588,7 +588,7 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void*
std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w)
{
- s << "wearable " << LLWearableType::getTypeName(w.mType) << "\n";
+ s << "wearable " << LLWearableType::getInstance()->getTypeName(w.mType) << "\n";
s << " Name: " << w.mName << "\n";
s << " Desc: " << w.mDescription << "\n";
//w.mPermissions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1d13a306ef..c20021d4c7 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -54,7 +54,6 @@
#include "llslurl.h"
#include "llrender.h"
-#include "llvoiceclient.h" // for push-to-talk button handling
#include "stringize.h"
//
@@ -1057,6 +1056,9 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
x = ll_round((F32)x / mDisplayScale.mV[VX]);
y = ll_round((F32)y / mDisplayScale.mV[VY]);
+ // Handle non-consuming global keybindings, like voice
+ gViewerInput.handleGlobalBindsMouse(clicktype, mask, down);
+
// only send mouse clicks to UI if UI is visible
if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -1577,6 +1579,10 @@ void LLViewerWindow::handleFocusLost(LLWindow *window)
BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
{
+ // Handle non-consuming global keybindings, like voice
+ // Never affects event processing.
+ gViewerInput.handleGlobalBindsKeyDown(key, mask);
+
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
@@ -1601,6 +1607,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
{
+ // Handle non-consuming global keybindings, like voice
+ // Never affects event processing.
+ gViewerInput.handleGlobalBindsKeyUp(key, mask);
+
// Let the inspect tool code check for ALT key to set LLToolSelectRect active instead LLToolCamera
LLToolCompInspect * tool_inspectp = LLToolCompInspect::getInstance();
if (LLToolMgr::getInstance()->getCurrentTool() == tool_inspectp)
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index e085a945a8..0e0ebce949 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8952,7 +8952,7 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
S32 u8_value = F32_to_U8(value,viewer_param->getMinWeight(),viewer_param->getMaxWeight());
apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" display=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
viewer_param->getID(), viewer_param->getName().c_str(), viewer_param->getDisplayName().c_str(), value, u8_value, type_string.c_str(),
- LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str(),
+ LLWearableType::getInstance()->getTypeName(LLWearableType::EType(wtype)).c_str(),
viewer_param->getGroup());
}
@@ -9730,6 +9730,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
LLAPRFile outfile;
+ LLWearableType *wr_inst = LLWearableType::getInstance();
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
if (APR_SUCCESS == outfile.open(fullpath, LL_APR_WB ))
{
@@ -9746,7 +9747,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
{
for (S32 type = LLWearableType::WT_SHAPE; type < LLWearableType::WT_COUNT; type++)
{
- const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type);
+ const std::string& wearable_name = wr_inst->getTypeName((LLWearableType::EType)type);
apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
for (LLVisualParam* param = getFirstVisualParam(); param; param = getNextVisualParam())
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7faca2ee5b..60a69a4ac4 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2036,6 +2036,7 @@ void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL fini
const std::string LLVOAvatarSelf::verboseDebugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const
{
std::ostringstream outbuf;
+ LLWearableType *wr_inst = LLWearableType::getInstance();
for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter =
sAvatarDictionary->getBakedTextures().begin();
baked_iter != sAvatarDictionary->getBakedTextures().end();
@@ -2059,7 +2060,7 @@ const std::string LLVOAvatarSelf::verboseDebugDumpLocalTextureDataInfo(const LLV
{
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
{
- outbuf << " " << LLWearableType::getTypeName(wearable_type) << " " << wearable_index << ":";
+ outbuf << " " << wr_inst->getTypeName(wearable_type) << " " << wearable_index << ":";
const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(tex_index, wearable_index);
if (local_tex_obj)
{
@@ -2114,6 +2115,7 @@ void LLVOAvatarSelf::dumpAllTextures() const
const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const
{
std::string text="";
+ LLWearableType *wr_inst = LLWearableType::getInstance();
text = llformat("[Final:%d Avail:%d] ",isLocalTextureDataFinal(layerset), isLocalTextureDataAvailable(layerset));
@@ -2137,7 +2139,7 @@ const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTe
const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
if (wearable_count > 0)
{
- text += LLWearableType::getTypeName(wearable_type) + ":";
+ text += wr_inst->getTypeName(wearable_type) + ":";
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
{
const U32 discard_level = getLocalDiscardLevel(tex_index, wearable_index);
@@ -2844,9 +2846,10 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
apr_file_printf( file, "\n<wearable_info>\n" );
LLWearableData *wd = getWearableData();
+ LLWearableType *wr_inst = LLWearableType::getInstance();
for (S32 type = 0; type < LLWearableType::WT_COUNT; type++)
{
- const std::string& type_name = LLWearableType::getTypeName((LLWearableType::EType)type);
+ const std::string& type_name = wr_inst->getTypeName((LLWearableType::EType)type);
for (U32 j=0; j< wd->getWearableCount((LLWearableType::EType)type); j++)
{
LLViewerWearable *wearable = gAgentWearables.getViewerWearable((LLWearableType::EType)type,j);
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4d2eac8c09..e6da5c5939 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1880,13 +1880,22 @@ bool LLVivoxVoiceClient::waitForChannel()
break;
}
- } while (mVoiceEnabled && !mRelogRequested && !sShuttingDown);
+ } while (!sShuttingDown && mVoiceEnabled && !mRelogRequested);
- LL_DEBUGS("Voice")
- << "leaving inner waitForChannel loop"
- << " RelogRequested=" << mRelogRequested
- << " VoiceEnabled=" << mVoiceEnabled
- << LL_ENDL;
+ if (!sShuttingDown)
+ {
+ LL_DEBUGS("Voice")
+ << "leaving inner waitForChannel loop"
+ << " RelogRequested=" << mRelogRequested
+ << " VoiceEnabled=" << mVoiceEnabled
+ << LL_ENDL;
+ }
+ else
+ {
+ // if sShuttingDown is set, we already logged out
+ LL_DEBUGS("Voice") << "leaving inner waitForChannel loop." << LL_ENDL;
+ return false;
+ }
mIsProcessingChannels = false;
@@ -1902,7 +1911,7 @@ bool LLVivoxVoiceClient::waitForChannel()
return false;
}
}
- } while (mVoiceEnabled && mRelogRequested && isGatewayRunning() && !sShuttingDown);
+ } while (!sShuttingDown && mVoiceEnabled && mRelogRequested && isGatewayRunning());
LL_DEBUGS("Voice")
<< "exiting"
@@ -4718,6 +4727,12 @@ bool LLVivoxVoiceClient::switchChannel(
// The old session may now need to be deleted.
reapSession(oldSession);
+ // If voice was on, turn it off
+ if (LLVoiceClient::getInstance()->getUserPTTState())
+ {
+ LLVoiceClient::getInstance()->setUserPTTState(false);
+ }
+
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
}
else
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 9acc0f8d2f..bf4db81475 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -820,7 +820,7 @@ void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, LLWearableTyp
setMenuItemVisible(menup, "wearable_attach_to", false);
setMenuItemVisible(menup, "wearable_attach_to_hud", false);
- std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
+ std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
LLMenuItemGL* menu_item = menup->getChild<LLMenuItemGL>("create_new");
menu_item->setLabel(new_label);
@@ -1005,7 +1005,7 @@ void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
if (!item || !item->isWearableType()) return;
LLWearableType::EType w_type = item->getWearableType();
- std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
+ std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
menu_item->setLabel(new_label);
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index b61fbbd073..00f8bace70 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -241,7 +241,7 @@ LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type,
LLViewerWearable *wearable = generateNewWearable();
wearable->setType( type, avatarp );
- std::string name = LLTrans::getString( LLWearableType::getTypeDefaultNewName(wearable->getType()) );
+ std::string name = LLWearableType::getInstance()->getTypeLabel(wearable->getType());
wearable->setName( name );
LLPermissions perm;
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index a1a1db35d6..fb3fc55a94 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1194,6 +1194,11 @@ public:
virtual void post(ResponsePtr response, const LLSD& context, const LLSD& input) const
{
+ if (LLApp::isExiting())
+ {
+ return;
+ }
+
if (!input["body"].has("agent-id") ||
!input["body"].has("sim-ip-and-port") ||
!input["body"].has("seed-capability"))
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 5a35bbf121..78ca170813 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -815,6 +815,14 @@
function="Inventory.DoToSelected"
parameter="save_as" />
</menu_item_call>
+ <menu_item_call
+ label="Save Selected As"
+ layout="topleft"
+ name="Save Selected As">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="save_selected_as" />
+ </menu_item_call>
<menu_item_separator
layout="topleft"
name="Wearable And Object Separator"/>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
index 8794e3bf95..864223e616 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
@@ -259,6 +259,15 @@
<combo_box.commit_callback
function="Pref.ClickActionChange"/>
</combo_box>
+ <check_box
+ control_name="EnableCollisionSounds"
+ height="20"
+ label="Play sound on collisions"
+ layout="topleft"
+ left="83"
+ name="sound_on_collisions"
+ top_pad="10"
+ width="200" />
<button
height="23"
label="Other Devices"
diff --git a/indra/newview/tests/gpus_results.txt b/indra/newview/tests/gpus_results.txt
index 106593afd5..3b3fb1aeb6 100644
--- a/indra/newview/tests/gpus_results.txt
+++ b/indra/newview/tests/gpus_results.txt
@@ -1487,8 +1487,8 @@ Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile unsupported 1 1 3 Mesa
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2 unsupported 1 1 3 Mesa
-Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset unsupported 1 1 3 Mesa
-Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
+Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset unsupported 1 1 3 Mesa
+Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Intel Pineview supported 0 1 1.4 Intel Pineview
Intel Q45/Q43 supported 1 1 2.1 Intel Q45/Q43
Intel Royal BNA Driver unsupported 0 0 0 Intel Royal BNA
@@ -3012,11 +3012,11 @@ Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile GEM 20100330 DEVELOPMENT x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Server unsupported 1 1 3 Mesa
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset unsupported 1 1 3 Mesa
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 supported 1 1 2.1 Intel Q45/Q43
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2 supported 1 1 2.1 Intel Q45/Q43
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX unsupported 1 1 3 Mesa
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset unsupported 1 1 3 Mesa
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 supported 1 1 2.1 Intel Q45/Q43
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2 supported 1 1 2.1 Intel Q45/Q43
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX unsupported 1 1 3 Mesa
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RS200 4437) x86/MMX/SSE2 NO-TCL DRI2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) TCL DRI2 unsupported 1 1 3 Mesa
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 TCL DRI2 unsupported 1 1 3 Mesa
diff --git a/indra/newview/tests/gpus_seen.txt b/indra/newview/tests/gpus_seen.txt
index a417cb3761..66cbeece97 100644
--- a/indra/newview/tests/gpus_seen.txt
+++ b/indra/newview/tests/gpus_seen.txt
@@ -1954,8 +1954,8 @@ Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Desktop x86/MM
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Intel Open Source Technology Center Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
-Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset
-Intel Open Source Technology Center Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
+Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset
+Intel Open Source Technology Center Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
Intel Pineview
Intel Q45/Q43
Intel Royal BNA Driver
@@ -4079,12 +4079,12 @@ Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile GEM 20100330 DEVELOP
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Intel(R) Sandybridge Server
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
-Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intel(R) GM45 Express Chipset x86/MMX/SSE2
Tungsten Graphics, Inc. Mesa DRI R100 (RS200 4437) x86/MMX/SSE2 NO-TCL DRI2
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) TCL DRI2
Tungsten Graphics, Inc. Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 TCL DRI2
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index f9abc8b25d..8d1956957c 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -308,6 +308,10 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
memcpy(unique_id, gMACAddress, len);
return 1;
}
+S32 LLMachineID::getLegacyID(unsigned char *unique_id, size_t len)
+{
+ return 0;
+}
//-----------------------------------------------------------------------------
// misc
std::string xml_escape_string(const std::string& in)
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index e5d226a2a4..02185316b2 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -121,6 +121,10 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
memcpy(unique_id, gMACAddress, len);
return 1;
}
+S32 LLMachineID::getLegacyID(unsigned char *unique_id, size_t len)
+{
+ return 0;
+}
S32 LLMachineID::init() { return 1; }