summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcharacter/llmultigesture.cpp2
-rw-r--r--indra/llcharacter/llmultigesture.h10
-rw-r--r--indra/llcommon/llstring.cpp106
-rw-r--r--indra/llcommon/llstring.h7
-rw-r--r--indra/llprimitive/llprimitive.cpp6
-rw-r--r--indra/llprimitive/llprimitive.h2
-rw-r--r--indra/llrender/llgl.cpp14
-rw-r--r--indra/llrender/llgltexture.cpp3
-rw-r--r--indra/llrender/llgltexture.h1
-rw-r--r--indra/llrender/llvertexbuffer.cpp59
-rw-r--r--indra/llui/llaccordionctrl.cpp347
-rw-r--r--indra/llui/llaccordionctrl.h4
-rw-r--r--indra/llui/llaccordionctrltab.cpp371
-rw-r--r--indra/llui/llaccordionctrltab.h12
-rw-r--r--indra/llui/llbutton.cpp13
-rw-r--r--indra/llui/llbutton.h2
-rw-r--r--indra/llui/llcombobox.cpp15
-rw-r--r--indra/llui/llflatlistview.cpp95
-rw-r--r--indra/llui/llflatlistview.h11
-rw-r--r--indra/llui/llfloater.cpp3
-rw-r--r--indra/llui/llfloater.h4
-rw-r--r--indra/llui/llfolderview.cpp8
-rw-r--r--indra/llui/llfolderviewitem.cpp4
-rw-r--r--indra/llui/llfolderviewmodel.cpp4
-rw-r--r--indra/llui/llfolderviewmodel.h2
-rw-r--r--indra/llui/lllineeditor.cpp28
-rw-r--r--indra/llui/lllineeditor.h3
-rw-r--r--indra/llui/llmenugl.cpp7
-rw-r--r--indra/llui/llmodaldialog.cpp3
-rw-r--r--indra/llui/llnotifications.cpp1
-rw-r--r--indra/llui/llnotifications.h1
-rw-r--r--indra/llui/lltabcontainer.cpp31
-rw-r--r--indra/llui/lltabcontainer.h4
-rw-r--r--indra/llui/lltoolbar.cpp3
-rw-r--r--indra/llui/lltransutil.cpp4
-rw-r--r--indra/llui/llui.h2
-rw-r--r--indra/llui/lluictrl.h1
-rw-r--r--indra/llwindow/llwindow.h8
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm1
-rw-r--r--indra/llwindow/llwindowmacosx.cpp504
-rw-r--r--indra/llwindow/llwindowmacosx.h5
-rw-r--r--indra/llwindow/llwindowwin32.cpp5
-rw-r--r--indra/llwindow/llwindowwin32.h5
-rw-r--r--indra/llxml/llcontrol.cpp4
-rw-r--r--indra/llxml/llxmlnode.cpp2
-rw-r--r--indra/newview/app_settings/camera/Front.xml22
-rw-r--r--indra/newview/app_settings/camera/Rear.xml22
-rw-r--r--indra/newview/app_settings/camera/Side.xml22
-rw-r--r--indra/newview/app_settings/settings.xml2298
-rw-r--r--indra/newview/installers/windows/installer_template.nsi12
-rw-r--r--indra/newview/llagentcamera.cpp3
-rw-r--r--indra/newview/llagentpicksinfo.cpp12
-rw-r--r--indra/newview/llagentpicksinfo.h4
-rw-r--r--indra/newview/llappearancemgr.cpp8
-rw-r--r--indra/newview/llappearancemgr.h4
-rw-r--r--indra/newview/llappviewer.cpp10
-rw-r--r--indra/newview/llavatariconctrl.cpp6
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp472
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h140
-rw-r--r--indra/newview/llchannelmanager.cpp19
-rw-r--r--indra/newview/llcofwearables.cpp4
-rw-r--r--indra/newview/llcompilequeue.cpp13
-rw-r--r--indra/newview/llcontrolavatar.cpp32
-rw-r--r--indra/newview/llconversationmodel.h2
-rw-r--r--indra/newview/lldrawable.cpp13
-rw-r--r--indra/newview/lldrawpoolground.cpp6
-rw-r--r--indra/newview/llenvironment.cpp2
-rw-r--r--indra/newview/llfilepicker.cpp6
-rw-r--r--indra/newview/llfloateravatarpicker.cpp10
-rw-r--r--indra/newview/llfloatercolorpicker.cpp10
-rw-r--r--indra/newview/llfloaterconversationpreview.cpp3
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp2
-rw-r--r--indra/newview/llfloaterexperiencepicker.cpp9
-rw-r--r--indra/newview/llfloaterimcontainer.cpp3
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp3
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp2
-rw-r--r--indra/newview/llfloaterimsession.cpp6
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp2
-rw-r--r--indra/newview/llfloaterjoystick.cpp30
-rw-r--r--indra/newview/llfloaterjoystick.h1
-rw-r--r--indra/newview/llfloaternotificationstabbed.cpp2
-rw-r--r--indra/newview/llfloaterpreference.cpp11
-rw-r--r--indra/newview/llfloatersearch.cpp6
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp12
-rw-r--r--indra/newview/llgesturemgr.cpp75
-rw-r--r--indra/newview/llgesturemgr.h11
-rw-r--r--indra/newview/llgroupactions.cpp23
-rw-r--r--indra/newview/llgroupactions.h2
-rw-r--r--indra/newview/llgrouplist.cpp21
-rw-r--r--indra/newview/llgrouplist.h2
-rw-r--r--indra/newview/llimhandler.cpp5
-rw-r--r--indra/newview/llimview.cpp12
-rw-r--r--indra/newview/llinspect.cpp6
-rw-r--r--indra/newview/llinspectavatar.cpp15
-rw-r--r--indra/newview/llinspecttoast.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp65
-rw-r--r--indra/newview/llinventorybridge.h6
-rw-r--r--indra/newview/llinventoryfunctions.cpp169
-rw-r--r--indra/newview/llinventoryfunctions.h3
-rw-r--r--indra/newview/llinventorygallery.cpp177
-rw-r--r--indra/newview/llinventorygallery.h4
-rw-r--r--indra/newview/llinventorygallerymenu.cpp52
-rw-r--r--indra/newview/llinventoryitemslist.cpp2
-rw-r--r--indra/newview/llinventoryitemslist.h8
-rw-r--r--indra/newview/llinventorypanel.cpp56
-rw-r--r--indra/newview/llinventorypanel.h10
-rw-r--r--indra/newview/lllocationinputctrl.cpp20
-rw-r--r--indra/newview/lllocationinputctrl.h1
-rw-r--r--indra/newview/lllogchat.cpp23
-rw-r--r--indra/newview/lllogchat.h1
-rw-r--r--indra/newview/llmeshrepository.cpp2
-rw-r--r--indra/newview/llnavigationbar.cpp3
-rw-r--r--indra/newview/llnotificationalerthandler.cpp2
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp5
-rw-r--r--indra/newview/llnotificationofferhandler.cpp3
-rw-r--r--indra/newview/llnotificationscripthandler.cpp5
-rw-r--r--indra/newview/llnotificationtiphandler.cpp5
-rw-r--r--indra/newview/lloutfitgallery.cpp41
-rw-r--r--indra/newview/lloutfitgallery.h4
-rw-r--r--indra/newview/lloutfitslist.cpp199
-rw-r--r--indra/newview/lloutfitslist.h23
-rw-r--r--indra/newview/llpanelappearancetab.cpp27
-rw-r--r--indra/newview/llpanelappearancetab.h13
-rw-r--r--indra/newview/llpanelavatar.cpp52
-rw-r--r--indra/newview/llpanelavatar.h14
-rw-r--r--indra/newview/llpanelclassified.cpp5
-rw-r--r--indra/newview/llpaneleditwater.cpp2
-rw-r--r--indra/newview/llpanelface.cpp12
-rw-r--r--indra/newview/llpanelgroup.cpp30
-rw-r--r--indra/newview/llpanelgroupnotices.cpp1
-rw-r--r--indra/newview/llpanelobject.cpp6
-rw-r--r--indra/newview/llpanelobjectinventory.cpp8
-rw-r--r--indra/newview/llpaneloutfitedit.cpp5
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp30
-rw-r--r--indra/newview/llpaneloutfitsinventory.h1
-rw-r--r--indra/newview/llpanelprofile.cpp512
-rw-r--r--indra/newview/llpanelprofile.h45
-rw-r--r--indra/newview/llpanelprofilepicks.cpp22
-rw-r--r--indra/newview/llpanelprofilepicks.h4
-rw-r--r--indra/newview/llpanelwearing.cpp13
-rw-r--r--indra/newview/llpanelwearing.h2
-rw-r--r--indra/newview/llpersistentnotificationstorage.cpp2
-rw-r--r--indra/newview/llpresetsmanager.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp11
-rw-r--r--indra/newview/llpreviewgesture.h1
-rw-r--r--indra/newview/llscreenchannel.cpp3
-rw-r--r--indra/newview/llscreenchannel.h6
-rw-r--r--indra/newview/llscriptfloater.cpp2
-rw-r--r--indra/newview/llsearchhistory.cpp11
-rw-r--r--indra/newview/llsetkeybinddialog.cpp9
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp34
-rw-r--r--indra/newview/llslurl.cpp816
-rw-r--r--indra/newview/llslurl.h5
-rw-r--r--indra/newview/llspatialpartition.cpp67
-rw-r--r--indra/newview/llspatialpartition.h4
-rw-r--r--indra/newview/llstartup.cpp17
-rw-r--r--indra/newview/llsyswellwindow.cpp4
-rw-r--r--indra/newview/lltexturectrl.cpp11
-rw-r--r--indra/newview/lltexturectrl.h7
-rw-r--r--indra/newview/lltextureview.cpp4
-rw-r--r--indra/newview/llthumbnailctrl.cpp81
-rw-r--r--indra/newview/llthumbnailctrl.h9
-rw-r--r--indra/newview/lltoastalertpanel.cpp6
-rw-r--r--indra/newview/lltooldraganddrop.cpp7
-rw-r--r--indra/newview/lltoolmorph.cpp7
-rw-r--r--indra/newview/lltoolpie.cpp11
-rw-r--r--indra/newview/llurldispatcher.cpp5
-rw-r--r--indra/newview/llviewerassetupload.cpp2
-rw-r--r--indra/newview/llvieweraudio.cpp25
-rw-r--r--indra/newview/llviewercontrol.cpp24
-rw-r--r--indra/newview/llviewerdisplay.cpp10
-rw-r--r--indra/newview/llviewerjoystick.cpp194
-rw-r--r--indra/newview/llviewerjoystick.h14
-rw-r--r--indra/newview/llviewermessage.cpp29
-rw-r--r--indra/newview/llviewerobject.cpp18
-rw-r--r--indra/newview/llviewerparcelmgr.cpp6
-rw-r--r--indra/newview/llviewertexlayer.cpp6
-rw-r--r--indra/newview/llviewertexture.cpp84
-rw-r--r--indra/newview/llviewertexturelist.cpp22
-rw-r--r--indra/newview/llviewerwindow.cpp19
-rw-r--r--indra/newview/llvoavatar.cpp23
-rw-r--r--indra/newview/llvoicecallhandler.cpp6
-rw-r--r--indra/newview/llvopartgroup.cpp2
-rw-r--r--indra/newview/llvosky.cpp5
-rw-r--r--indra/newview/llwearableitemslist.cpp46
-rw-r--r--indra/newview/pipeline.cpp2
-rw-r--r--indra/newview/skins/default/textures/icons/Group_Notices.pngbin0 -> 3502 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_media_browser.xml12
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml15
-rw-r--r--indra/newview/skins/default/xui/en/floater_region_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml226
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml68
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml53
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_list_item.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_list_item_short.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_firstlife.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_secondlife.xml103
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml8
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml6
-rw-r--r--indra/newview/tests/llslurl_test.cpp6
204 files changed, 4050 insertions, 5025 deletions
diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index 7ed242f90a..511d931569 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -68,6 +68,8 @@ void LLMultiGesture::reset()
mCurrentStep = 0;
mWaitTimer.reset();
mWaitingTimer = FALSE;
+ mTriggeredByKey = FALSE;
+ mKeyReleased = FALSE;
mWaitingAnimations = FALSE;
mWaitingAtEnd = FALSE;
mRequestedAnimIDs.clear();
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index 92820159d4..1865ec089c 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -83,9 +83,18 @@ public:
// We're waiting for triggered animations to stop playing
BOOL mWaitingAnimations;
+ // We're waiting for key release
+ BOOL mWaitingKeyRelease;
+
// We're waiting a fixed amount of time
BOOL mWaitingTimer;
+ // We're waiting for triggered animations to stop playing
+ BOOL mTriggeredByKey;
+
+ // Has the key been released?
+ BOOL mKeyReleased;
+
// Waiting after the last step played for all animations to complete
BOOL mWaitingAtEnd;
@@ -210,6 +219,7 @@ public:
const U32 WAIT_FLAG_TIME = 0x01;
const U32 WAIT_FLAG_ALL_ANIM = 0x02;
+const U32 WAIT_FLAG_KEY_RELEASE = 0x04;
class LLGestureStepWait : public LLGestureStep
{
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index f6629803ee..9a2251e0a7 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -600,6 +600,7 @@ std::string mbcsstring_makeASCII(const std::string& wstr)
}
return out_str;
}
+
std::string utf8str_removeCRLF(const std::string& utf8str)
{
if (0 == utf8str.length())
@@ -621,6 +622,43 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
return out;
}
+// Search for any emoji symbol, return true if found
+bool wstring_has_emoji(const LLWString& wstr)
+{
+ for (const llwchar& wch : wstr)
+ {
+ if (LLStringOps::isEmoji(wch))
+ return true;
+ }
+
+ return false;
+}
+
+// Cut emoji symbols if exist
+bool wstring_remove_emojis(LLWString& wstr)
+{
+ bool found = false;
+ for (size_t i = 0; i < wstr.size(); ++i)
+ {
+ if (LLStringOps::isEmoji(wstr[i]))
+ {
+ wstr.erase(i--, 1);
+ found = true;
+ }
+ }
+ return found;
+}
+
+// Cut emoji symbols if exist
+bool utf8str_remove_emojis(std::string& utf8str)
+{
+ LLWString wstr = utf8str_to_wstring(utf8str);
+ if (!wstring_remove_emojis(wstr))
+ return false;
+ utf8str = wstring_to_utf8str(wstr);
+ return true;
+}
+
#if LL_WINDOWS
unsigned int ll_wstring_default_code_page()
{
@@ -833,6 +871,66 @@ std::string LLStringOps::sDayFormat;
std::string LLStringOps::sAM;
std::string LLStringOps::sPM;
+// static
+bool LLStringOps::isEmoji(llwchar wch)
+{
+ // Most of the following symbols are not actually emoticons, but rather small pictures
+
+ // 0x1F000 .. 0x1F02F - mahjong tiles
+ // https://symbl.cc/en/unicode/table/#mahjong-tiles
+
+ // 0x1F030 .. 0x1F09F - domino tiles
+ // https://symbl.cc/en/unicode/table/#domino-tiles
+
+ // 0x1F0A0 .. 0x1F0FF - playing cards
+ // https://symbl.cc/en/unicode/table/#playing-cards
+
+ // 0x1F100 .. 0x1F1FF - enclosed alphanumeric supplement
+ // https://symbl.cc/en/unicode/table/#enclosed-alphanumeric-supplement
+
+ // 0x1F200 .. 0x1F2FF - enclosed ideographic supplement
+ // https://symbl.cc/en/unicode/table/#enclosed-ideographic-supplement
+
+ // 0x1F300 .. 0x1F5FF - miscellaneous symbols and pictographs
+ // https://symbl.cc/en/unicode/table/#miscellaneous-symbols-and-pictographs
+
+ // 0x1F600 .. 0x1F64F - emoticons
+ // https://symbl.cc/en/unicode/table/#emoticons
+
+ // 0x1F650 .. 0x1F67F - ornamental dingbats
+ // https://symbl.cc/en/unicode/table/#ornamental-dingbats
+
+ // 0x1F680 .. 0x1F6FF - transport and map symbols
+ // https://symbl.cc/en/unicode/table/#transport-and-map-symbols
+
+ // 0x1F700 .. 0x1F77F - alchemical symbols
+ // https://symbl.cc/en/unicode/table/#alchemical-symbols
+
+ // 0x1F780 .. 0x1F7FF - geometric shapes extended
+ // https://symbl.cc/en/unicode/table/#geometric-shapes-extended
+
+ // 0x1F800 .. 0x1F8FF - supplemental arrows c
+ // https://symbl.cc/en/unicode/table/#supplemental-arrows-c
+
+ // 0x1F900 .. 0x1F9FF - supplemental symbols and pictographs
+ // https://symbl.cc/en/unicode/table/#supplemental-symbols-and-pictographs
+
+ // 0x1FA00 .. 0x1FA6F - chess symbols
+ // https://symbl.cc/en/unicode/table/#chess-symbols
+
+ // 0x1FA70 .. 0x1FAFF - symbols and pictographs extended a
+ // https://symbl.cc/en/unicode/table/#symbols-and-pictographs-extended-a
+
+ // 0x1FB00 .. 0x1FBFF - symbols for legacy computing
+ // https://symbl.cc/en/unicode/table/#symbols-for-legacy-computing
+
+ // 0x1FC00 .. 0x1FFFF - undefined block 44
+ // These symbols aren't defined yet
+ // https://symbl.cc/en/unicode/table/#undefined-block-44
+
+ return wch >= 0x1F000 && wch < 0x1FC00;
+}
+
S32 LLStringOps::collate(const llwchar* a, const llwchar* b)
{
@@ -1235,9 +1333,17 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
}
else
{
+#if 0
+ // EXT-1565 : Zai Lynch, James Linden : 15/Oct/09
+ // [BSI] Feedback: Viewer clock mentions SLT, but would prefer it to show PST/PDT
// "slt" = Second Life Time, which is deprecated.
// If not utc or user local time, fallback to Pacific time
replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST";
+#else
+ // SL-20370 : Steeltoe Linden : 29/Sep/23
+ // Change "PDT" to "SLT" on menu bar
+ replacement = "SLT";
+#endif
}
return true;
}
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 1fd6cac14a..6e70a6fa5c 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -189,6 +189,8 @@ public:
static bool isAlnum(char a) { return isalnum((unsigned char)a) != 0; }
static bool isAlnum(llwchar a) { return iswalnum(a) != 0; }
+ static bool isEmoji(llwchar wch);
+
static S32 collate(const char* a, const char* b) { return strcoll(a, b); }
static S32 collate(const llwchar* a, const llwchar* b);
@@ -737,6 +739,11 @@ LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str);
LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str);
+LL_COMMON_API bool wstring_has_emoji(const LLWString& wstr);
+
+LL_COMMON_API bool wstring_remove_emojis(LLWString& wstr);
+
+LL_COMMON_API bool utf8str_remove_emojis(std::string& utf8str);
#if LL_WINDOWS
/* @name Windows string helpers
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 67c225d25d..bfc9bc0861 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -107,7 +107,7 @@ const F32 FLEXIBLE_OBJECT_DEFAULT_LENGTH = 1.0f;
const BOOL FLEXIBLE_OBJECT_DEFAULT_USING_COLLISION_SPHERE = FALSE;
const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE;
-const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e";
+const LLUUID SCULPT_DEFAULT_TEXTURE("be293869-d0d9-0a69-5989-ad27f1946fd4"); // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e";
// Texture rotations are sent over the wire as a S16. This is used to scale the actual float
// value to a S16. Don't use 7FFF as it introduces some odd rounding with 180 since it
@@ -1946,7 +1946,7 @@ bool LLFlexibleObjectData::fromLLSD(LLSD& sd)
LLSculptParams::LLSculptParams()
{
mType = PARAMS_SCULPT;
- mSculptTexture.set(SCULPT_DEFAULT_TEXTURE);
+ mSculptTexture = SCULPT_DEFAULT_TEXTURE;
mSculptType = LL_SCULPT_TYPE_SPHERE;
}
@@ -2032,7 +2032,7 @@ void LLSculptParams::setSculptTexture(const LLUUID& texture_id, U8 sculpt_type)
U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK;
if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX)
{
- mSculptTexture.set(SCULPT_DEFAULT_TEXTURE);
+ mSculptTexture = SCULPT_DEFAULT_TEXTURE;
mSculptType = LL_SCULPT_TYPE_SPHERE;
}
else
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 309b18faa9..ba76fe1ac5 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -89,7 +89,7 @@ extern const F32 OBJECT_REV_MIN;
extern const F32 OBJECT_REV_MAX;
extern const F32 OBJECT_REV_INC;
-extern const char *SCULPT_DEFAULT_TEXTURE;
+extern const LLUUID SCULPT_DEFAULT_TEXTURE;
//============================================================================
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index cfc9ce735d..44f7667d2c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -93,6 +93,17 @@ void APIENTRY gl_debug_callback(GLenum source,
return;
}
+ if (gGLManager.mIsDisabled &&
+ severity == GL_DEBUG_SEVERITY_HIGH_ARB &&
+ source == GL_DEBUG_SOURCE_API_ARB &&
+ type == GL_DEBUG_TYPE_ERROR_ARB &&
+ id == GL_INVALID_VALUE)
+ {
+ // Suppress messages about deleting already deleted objects called from LLViewerWindow::stopGL()
+ // "GL_INVALID_VALUE error generated. Handle does not refer to an object generated by OpenGL."
+ return;
+ }
+
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
@@ -106,7 +117,8 @@ void APIENTRY gl_debug_callback(GLenum source,
LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
LL_WARNS() << "Message: " << message << LL_ENDL;
LL_WARNS() << "-----------------------" << LL_ENDL;
- if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
+ // No needs to halt when is called from LLViewerWindow::stopGL()
+ if (severity == GL_DEBUG_SEVERITY_HIGH_ARB && !gGLManager.mIsDisabled)
{
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
}
diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp
index e012eb9a62..17cc2b9834 100644
--- a/indra/llrender/llgltexture.cpp
+++ b/indra/llrender/llgltexture.cpp
@@ -113,7 +113,8 @@ void LLGLTexture::setBoostLevel(S32 level)
{
mBoostLevel = level ;
if(mBoostLevel != LLGLTexture::BOOST_NONE
- && mBoostLevel != LLGLTexture::BOOST_ICON)
+ && mBoostLevel != LLGLTexture::BOOST_ICON
+ && mBoostLevel != LLGLTexture::BOOST_THUMBNAIL)
{
setNoDelete() ;
}
diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index 8cfe7b62de..a5b666cdbd 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -64,6 +64,7 @@ public:
BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay.
BOOST_HUD ,
BOOST_ICON ,
+ BOOST_THUMBNAIL ,
BOOST_UI ,
BOOST_PREVIEW ,
BOOST_MAP ,
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index be3e6ddff0..937b8c74ff 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -2181,65 +2181,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
//set up pointers if the data mask is different ...
bool setup = (sLastMask != data_mask);
- if (gDebugGL && data_mask != 0)
- { //make sure data requirements are fulfilled
- LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
- if (shader)
- {
- U32 required_mask = 0;
- for (U32 i = 0; i < LLVertexBuffer::TYPE_TEXTURE_INDEX; ++i)
- {
- if (shader->getAttribLocation(i) > -1)
- {
- U32 required = 1 << i;
- if ((data_mask & required) == 0)
- {
- LL_WARNS() << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << LL_ENDL;
- }
-
- required_mask |= required;
- }
- }
-
- if ((data_mask & required_mask) != required_mask)
- {
-
- U32 unsatisfied_mask = (required_mask & ~data_mask);
-
- for (U32 i = 0; i < TYPE_MAX; i++)
- {
- U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
- switch (unsatisfied_flag)
- {
- case 0: break;
- case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
- case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
- case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
- case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
- case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
- case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
- case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
- case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
- case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
- case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
- case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
- case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
- case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
- default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
- }
- }
-
- // TYPE_INDEX is beyond TYPE_MAX, so check for it individually
- if (unsatisfied_mask & (1 << TYPE_INDEX))
- {
- LL_INFOS() << "Missing indices" << LL_ENDL;
- }
-
- LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
- }
- }
- }
-
if (useVBOs())
{
if (mGLArray)
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 809d72208f..e18c40e7c3 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -60,7 +60,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
initNoTabsWidget(params.no_matched_tabs_text);
mSingleExpansion = params.single_expansion;
- if(mFitParent && !mSingleExpansion)
+ if (mFitParent && !mSingleExpansion)
{
LL_INFOS() << "fit_parent works best when combined with single_expansion" << LL_ENDL;
}
@@ -102,14 +102,13 @@ void LLAccordionCtrl::draw()
LLPanel::draw();
}
-
//---------------------------------------------------------------------------------
BOOL LLAccordionCtrl::postBuild()
{
- static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+ static LLUICachedControl<S32> scrollbar_size("UIScrollbarSize", 0);
LLRect scroll_rect;
- scroll_rect.setOriginAndSize(
+ scroll_rect.setOriginAndSize(
getRect().getWidth() - scrollbar_size,
1,
scrollbar_size,
@@ -126,39 +125,42 @@ BOOL LLAccordionCtrl::postBuild()
sbparams.follows.flags(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
sbparams.change_callback(boost::bind(&LLAccordionCtrl::onScrollPosChangeCallback, this, _1, _2));
- mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
- LLView::addChild( mScrollbar );
- mScrollbar->setVisible( false );
+ mScrollbar = LLUICtrlFactory::create<LLScrollbar>(sbparams);
+ LLView::addChild(mScrollbar);
+ mScrollbar->setVisible(FALSE);
mScrollbar->setFollowsRight();
mScrollbar->setFollowsTop();
mScrollbar->setFollowsBottom();
//if it was created from xml...
std::vector<LLUICtrl*> accordion_tabs;
- for(child_list_const_iter_t it = getChildList()->begin();
+ for (child_list_const_iter_t it = getChildList()->begin();
getChildList()->end() != it; ++it)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(*it);
- if(accordion_tab == NULL)
+ if (accordion_tab == NULL)
continue;
- if(std::find(mAccordionTabs.begin(),mAccordionTabs.end(),accordion_tab) == mAccordionTabs.end())
+ if (std::find(mAccordionTabs.begin(), mAccordionTabs.end(), accordion_tab) == mAccordionTabs.end())
{
accordion_tabs.push_back(accordion_tab);
}
}
- for(std::vector<LLUICtrl*>::reverse_iterator it = accordion_tabs.rbegin();it!=accordion_tabs.rend();++it)
+ for (std::vector<LLUICtrl*>::reverse_iterator it = accordion_tabs.rbegin();
+ it < accordion_tabs.rend(); ++it)
+ {
addCollapsibleCtrl(*it);
+ }
- arrange ();
+ arrange();
- if(mSingleExpansion)
+ if (mSingleExpansion)
{
- if(!mAccordionTabs[0]->getDisplayChildren())
+ if (!mAccordionTabs[0]->getDisplayChildren())
mAccordionTabs[0]->setDisplayChildren(true);
- for(size_t i=1;i<mAccordionTabs.size();++i)
+ for (size_t i = 1; i < mAccordionTabs.size(); ++i)
{
- if(mAccordionTabs[i]->getDisplayChildren())
+ if (mAccordionTabs[i]->getDisplayChildren())
mAccordionTabs[i]->setDisplayChildren(false);
}
}
@@ -205,23 +207,22 @@ BOOL LLAccordionCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
//---------------------------------------------------------------------------------
void LLAccordionCtrl::shiftAccordionTabs(S16 panel_num, S32 delta)
{
- for(size_t i = panel_num; i < mAccordionTabs.size(); i++ )
+ for (size_t i = panel_num; i < mAccordionTabs.size(); ++i)
{
ctrlShiftVertical(mAccordionTabs[i],delta);
}
}
-
//---------------------------------------------------------------------------------
void LLAccordionCtrl::onCollapseCtrlCloseOpen(S16 panel_num)
{
- if(mSingleExpansion)
+ if (mSingleExpansion)
{
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
- if(i==panel_num)
+ if (i == panel_num)
continue;
- if(mAccordionTabs[i]->getDisplayChildren())
+ if (mAccordionTabs[i]->getDisplayChildren())
mAccordionTabs[i]->setDisplayChildren(false);
}
@@ -232,64 +233,63 @@ void LLAccordionCtrl::onCollapseCtrlCloseOpen(S16 panel_num)
void LLAccordionCtrl::show_hide_scrollbar(S32 width, S32 height)
{
calcRecuiredHeight();
- if(getRecuiredHeight() > height )
- showScrollbar(width,height);
+ if (getRecuiredHeight() > height)
+ showScrollbar(width, height);
else
- hideScrollbar(width,height);
+ hideScrollbar(width, height);
}
-void LLAccordionCtrl::showScrollbar(S32 width, S32 height)
+void LLAccordionCtrl::showScrollbar(S32 width, S32 height)
{
bool was_visible = mScrollbar->getVisible();
- mScrollbar->setVisible(true);
+ mScrollbar->setVisible(TRUE);
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
ctrlSetLeftTopAndSize(mScrollbar
- ,width-scrollbar_size - PARENT_BORDER_MARGIN/2
- ,height-PARENT_BORDER_MARGIN
- ,scrollbar_size
- ,height-2*PARENT_BORDER_MARGIN);
+ , width - scrollbar_size - PARENT_BORDER_MARGIN / 2
+ , height - PARENT_BORDER_MARGIN
+ , scrollbar_size
+ , height - PARENT_BORDER_MARGIN * 2);
mScrollbar->setPageSize(height);
- mScrollbar->setDocParams(mInnerRect.getHeight(),mScrollbar->getDocPos());
+ mScrollbar->setDocParams(mInnerRect.getHeight(), mScrollbar->getDocPos());
- if(was_visible)
+ if (was_visible)
{
S32 scroll_pos = llmin(mScrollbar->getDocPos(), getRecuiredHeight() - height - 1);
mScrollbar->setDocPos(scroll_pos);
}
}
-void LLAccordionCtrl::hideScrollbar( S32 width, S32 height )
+void LLAccordionCtrl::hideScrollbar(S32 width, S32 height)
{
- if(mScrollbar->getVisible() == false)
+ if (mScrollbar->getVisible() == FALSE)
return;
- mScrollbar->setVisible(false);
+ mScrollbar->setVisible(FALSE);
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
S32 panel_width = width - 2*BORDER_MARGIN;
- //reshape all accordeons and shift all draggers
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ // Reshape all accordions and shift all draggers
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLRect panel_rect = mAccordionTabs[i]->getRect();
- ctrlSetLeftTopAndSize(mAccordionTabs[i],panel_rect.mLeft,panel_rect.mTop,panel_width,panel_rect.getHeight());
+ ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_rect.mLeft, panel_rect.mTop, panel_width, panel_rect.getHeight());
}
mScrollbar->setDocPos(0);
- if(mAccordionTabs.size()>0)
+ if (!mAccordionTabs.empty())
{
- S32 panel_top = height - BORDER_MARGIN; // Top coordinate of the first panel
+ S32 panel_top = height - BORDER_MARGIN; // Top coordinate of the first panel
S32 diff = panel_top - mAccordionTabs[0]->getRect().mTop;
- shiftAccordionTabs(0,diff);
+ shiftAccordionTabs(0, diff);
}
}
-
//---------------------------------------------------------------------------------
S32 LLAccordionCtrl::calcRecuiredHeight()
{
@@ -305,7 +305,7 @@ S32 LLAccordionCtrl::calcRecuiredHeight()
}
}
- mInnerRect.setLeftTopAndSize(0,rec_height + BORDER_MARGIN*2,getRect().getWidth(),rec_height + BORDER_MARGIN);
+ mInnerRect.setLeftTopAndSize(0, rec_height + BORDER_MARGIN * 2, getRect().getWidth(), rec_height + BORDER_MARGIN);
return mInnerRect.getHeight();
}
@@ -313,7 +313,7 @@ S32 LLAccordionCtrl::calcRecuiredHeight()
//---------------------------------------------------------------------------------
void LLAccordionCtrl::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top, S32 width, S32 height)
{
- if(!panel)
+ if (!panel)
return;
LLRect panel_rect = panel->getRect();
panel_rect.setLeftTopAndSize( left, top, width, height);
@@ -321,9 +321,9 @@ void LLAccordionCtrl::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top, S3
panel->setRect(panel_rect);
}
-void LLAccordionCtrl::ctrlShiftVertical(LLView* panel,S32 delta)
+void LLAccordionCtrl::ctrlShiftVertical(LLView* panel, S32 delta)
{
- if(!panel)
+ if (!panel)
return;
panel->translate(0,delta);
}
@@ -333,9 +333,9 @@ void LLAccordionCtrl::ctrlShiftVertical(LLView* panel,S32 delta)
void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
- if(!accordion_tab)
+ if (!accordion_tab)
return;
- if(std::find(beginChild(), endChild(), accordion_tab) == endChild())
+ if (std::find(beginChild(), endChild(), accordion_tab) == endChild())
addChild(accordion_tab);
mAccordionTabs.push_back(accordion_tab);
@@ -369,7 +369,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
}
}
-void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)
+void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)
{
LLTextBox::Params tp = tb_params;
tp.rect(getLocalRect());
@@ -377,39 +377,39 @@ void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)
mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this);
}
-void LLAccordionCtrl::updateNoTabsHelpTextVisibility()
+void LLAccordionCtrl::updateNoTabsHelpTextVisibility()
{
bool visible_exists = false;
std::vector<LLAccordionCtrlTab*>::const_iterator it = mAccordionTabs.begin();
const std::vector<LLAccordionCtrlTab*>::const_iterator it_end = mAccordionTabs.end();
- for (; it != it_end; ++it)
+ while (it < it_end)
{
- if ((*it)->getVisible())
+ if ((*(it++))->getVisible())
{
visible_exists = true;
break;
}
}
- mNoVisibleTabsHelpText->setVisible(!visible_exists);
+ mNoVisibleTabsHelpText->setVisible(visible_exists ? FALSE : TRUE);
}
-void LLAccordionCtrl::arrangeSinge()
+void LLAccordionCtrl::arrangeSingle()
{
- S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter
- S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
- S32 panel_width = getRect().getWidth() - 4; // Top coordinate of the first panel
+ S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter
+ S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
+ S32 panel_width = getRect().getWidth() - 4;
S32 panel_height;
S32 collapsed_height = 0;
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- if(accordion_tab->getVisible() == false) //skip hidden accordion tabs
+ if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
continue;
- if(!accordion_tab->isExpanded() )
+ if (!accordion_tab->isExpanded() )
{
collapsed_height+=mAccordionTabs[i]->getRect().getHeight();
}
@@ -417,28 +417,28 @@ void LLAccordionCtrl::arrangeSinge()
S32 expanded_height = getRect().getHeight() - BORDER_MARGIN - collapsed_height;
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- if(accordion_tab->getVisible() == false) //skip hidden accordion tabs
+ if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
continue;
- if(!accordion_tab->isExpanded() )
+ if (!accordion_tab->isExpanded() )
{
panel_height = accordion_tab->getRect().getHeight();
}
else
{
- if(mFitParent)
+ if (mFitParent)
{
panel_height = expanded_height;
}
else
{
- if(accordion_tab->getAccordionView())
+ if (accordion_tab->getAccordionView())
{
panel_height = accordion_tab->getAccordionView()->getRect().getHeight() +
- accordion_tab->getHeaderHeight() + 2*BORDER_MARGIN;
+ accordion_tab->getHeaderHeight() + BORDER_MARGIN * 2;
}
else
{
@@ -451,67 +451,67 @@ void LLAccordionCtrl::arrangeSinge()
panel_height = llmax(panel_height, accordion_tab->getHeaderHeight());
ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
- panel_top-=mAccordionTabs[i]->getRect().getHeight();
+ panel_top -= mAccordionTabs[i]->getRect().getHeight();
}
show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
updateLayout(getRect().getWidth(), getRect().getHeight());
}
-void LLAccordionCtrl::arrangeMultiple()
+void LLAccordionCtrl::arrangeMultiple()
{
- S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter
- S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
- S32 panel_width = getRect().getWidth() - 4; // Top coordinate of the first panel
+ S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter
+ S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
+ S32 panel_width = getRect().getWidth() - 4;
//Calculate params
- for(size_t i = 0; i < mAccordionTabs.size(); i++ )
+ for (size_t i = 0; i < mAccordionTabs.size(); i++ )
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- if(accordion_tab->getVisible() == false) //skip hidden accordion tabs
+ if (accordion_tab->getVisible() == FALSE) // Skip hidden accordion tabs
continue;
- if(!accordion_tab->isExpanded() )
+ if (!accordion_tab->isExpanded() )
{
ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, accordion_tab->getRect().getHeight());
- panel_top-=mAccordionTabs[i]->getRect().getHeight();
+ panel_top -= mAccordionTabs[i]->getRect().getHeight();
}
else
{
S32 panel_height = accordion_tab->getRect().getHeight();
- if(mFitParent)
+ if (mFitParent)
{
- // all expanded tabs will have equal height
+ // All expanded tabs will have equal height
panel_height = calcExpandedTabHeight(i, panel_top);
ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
- // try to make accordion tab fit accordion view height.
+ // Try to make accordion tab fit accordion view height.
// Accordion View should implement getRequiredRect() and provide valid height
S32 optimal_height = accordion_tab->getAccordionView()->getRequiredRect().getHeight();
optimal_height += accordion_tab->getHeaderHeight() + 2 * BORDER_MARGIN;
- if(optimal_height < panel_height)
+ if (optimal_height < panel_height)
{
panel_height = optimal_height;
}
// minimum tab height is equal to header height
- if(mAccordionTabs[i]->getHeaderHeight() > panel_height)
+ if (mAccordionTabs[i]->getHeaderHeight() > panel_height)
{
panel_height = mAccordionTabs[i]->getHeaderHeight();
}
}
ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
- panel_top-=panel_height;
+ panel_top -= panel_height;
}
}
- show_hide_scrollbar(getRect().getWidth(),getRect().getHeight());
+ show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
- updateLayout(getRect().getWidth(),getRect().getHeight());
+ updateLayout(getRect().getWidth(), getRect().getHeight());
}
@@ -519,70 +519,67 @@ void LLAccordionCtrl::arrange()
{
updateNoTabsHelpTextVisibility();
- if( mAccordionTabs.size() == 0)
+ if (mAccordionTabs.empty())
{
- //We do not arrange if we do not have what should be arranged
+ // Nothing to arrange
return;
}
-
- if(mAccordionTabs.size() == 1)
+ if (mAccordionTabs.size() == 1)
{
- S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
- S32 panel_width = getRect().getWidth() - 4; // Top coordinate of the first panel
+ S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
+ S32 panel_width = getRect().getWidth() - 4;
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[0]);
LLRect panel_rect = accordion_tab->getRect();
- S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN;
-
+ S32 panel_height = getRect().getHeight() - BORDER_MARGIN * 2;
if (accordion_tab->getFitParent())
panel_height = accordion_tab->getRect().getHeight();
- ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height);
+
+ ctrlSetLeftTopAndSize(accordion_tab, panel_rect.mLeft, panel_top, panel_width, panel_height);
- show_hide_scrollbar(getRect().getWidth(),getRect().getHeight());
+ show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
return;
-
}
- if(mSingleExpansion)
- arrangeSinge ();
+ if (mSingleExpansion)
+ arrangeSingle();
else
- arrangeMultiple ();
+ arrangeMultiple();
}
//---------------------------------------------------------------------------------
-BOOL LLAccordionCtrl::handleScrollWheel ( S32 x, S32 y, S32 clicks )
+BOOL LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- if(LLPanel::handleScrollWheel(x,y,clicks))
+ if (LLPanel::handleScrollWheel(x, y, clicks))
return TRUE;
- if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) )
+ if (mScrollbar->getVisible() && mScrollbar->handleScrollWheel(0, 0, clicks))
return TRUE;
- return false;
-
+ return FALSE;
}
-BOOL LLAccordionCtrl::handleKeyHere (KEY key, MASK mask)
+BOOL LLAccordionCtrl::handleKeyHere(KEY key, MASK mask)
{
- if( mScrollbar->getVisible() && mScrollbar->handleKeyHere( key,mask ) )
+ if (mScrollbar->getVisible() && mScrollbar->handleKeyHere(key, mask))
return TRUE;
- return LLPanel::handleKeyHere(key,mask);
+ return LLPanel::handleKeyHere(key, mask);
}
-BOOL LLAccordionCtrl::handleDragAndDrop (S32 x, S32 y, MASK mask,
- BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
+BOOL LLAccordionCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
{
// Scroll folder view if needed. Never accepts a drag or drop.
*accept = ACCEPT_NO;
BOOL handled = autoScroll(x, y);
- if( !handled )
+ if (!handled)
{
handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type,
cargo_data, accept, tooltip_msg) != NULL;
@@ -590,14 +587,14 @@ BOOL LLAccordionCtrl::handleDragAndDrop (S32 x, S32 y, MASK mask,
return TRUE;
}
-BOOL LLAccordionCtrl::autoScroll (S32 x, S32 y)
+BOOL LLAccordionCtrl::autoScroll(S32 x, S32 y)
{
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
bool scrolling = false;
- if( mScrollbar->getVisible() )
+ if (mScrollbar->getVisible())
{
- LLRect rect_local( 0, getRect().getHeight(), getRect().getWidth() - scrollbar_size, 0 );
+ LLRect rect_local(0, getRect().getHeight(), getRect().getWidth() - scrollbar_size, 0);
LLRect screen_local_extents;
// clip rect against root view
@@ -610,51 +607,52 @@ BOOL LLAccordionCtrl::autoScroll (S32 x, S32 y)
LLRect bottom_scroll_rect = screen_local_extents;
bottom_scroll_rect.mTop = rect_local.mBottom + auto_scroll_region_height;
- if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar->getDocPos() < mScrollbar->getDocPosMax()) )
+ if (bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar->getDocPos() < mScrollbar->getDocPosMax()))
{
- mScrollbar->setDocPos( mScrollbar->getDocPos() + auto_scroll_speed );
+ mScrollbar->setDocPos(mScrollbar->getDocPos() + auto_scroll_speed);
mAutoScrolling = true;
scrolling = true;
}
LLRect top_scroll_rect = screen_local_extents;
top_scroll_rect.mBottom = rect_local.mTop - auto_scroll_region_height;
- if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar->getDocPos() > 0) )
+ if (top_scroll_rect.pointInRect(x, y) && (mScrollbar->getDocPos() > 0))
{
- mScrollbar->setDocPos( mScrollbar->getDocPos() - auto_scroll_speed );
+ mScrollbar->setDocPos(mScrollbar->getDocPos() - auto_scroll_speed);
mAutoScrolling = true;
scrolling = true;
}
}
- return scrolling;
+
+ return scrolling ? TRUE : FALSE;
}
-void LLAccordionCtrl::updateLayout (S32 width, S32 height)
+void LLAccordionCtrl::updateLayout(S32 width, S32 height)
{
S32 panel_top = height - BORDER_MARGIN ;
- if(mScrollbar->getVisible())
- panel_top+=mScrollbar->getDocPos();
+ if (mScrollbar->getVisible())
+ panel_top += mScrollbar->getDocPos();
- S32 panel_width = width - 2*BORDER_MARGIN;
+ S32 panel_width = width - BORDER_MARGIN * 2;
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
- if(mScrollbar->getVisible())
- panel_width-=scrollbar_size;
+ if (mScrollbar->getVisible())
+ panel_width -= scrollbar_size;
- //set sizes for first panels and dragbars
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ // set sizes for first panels and dragbars
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
- if(!mAccordionTabs[i]->getVisible())
+ if (!mAccordionTabs[i]->getVisible())
continue;
LLRect panel_rect = mAccordionTabs[i]->getRect();
- ctrlSetLeftTopAndSize(mAccordionTabs[i],panel_rect.mLeft,panel_top,panel_width,panel_rect.getHeight());
- panel_top-=panel_rect.getHeight();
+ ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
+ panel_top -= panel_rect.getHeight();
}
}
-void LLAccordionCtrl::onScrollPosChangeCallback(S32, LLScrollbar*)
+void LLAccordionCtrl::onScrollPosChangeCallback(S32, LLScrollbar*)
{
- updateLayout(getRect().getWidth(),getRect().getHeight());
+ updateLayout(getRect().getWidth(), getRect().getHeight());
}
// virtual
@@ -687,42 +685,43 @@ void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl)
LLUICtrl::onUpdateScrollToChild(cntrl);
}
-void LLAccordionCtrl::onOpen (const LLSD& key)
+void LLAccordionCtrl::onOpen(const LLSD& key)
{
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
LLPanel* panel = dynamic_cast<LLPanel*>(accordion_tab->getAccordionView());
- if(panel!=NULL)
+ if (panel != NULL)
{
panel->onOpen(key);
}
}
}
+
S32 LLAccordionCtrl::notifyParent(const LLSD& info)
{
- if(info.has("action"))
+ if (info.has("action"))
{
std::string str_action = info["action"];
- if(str_action == "size_changes")
+ if (str_action == "size_changes")
{
//
arrange();
return 1;
}
- else if(str_action == "select_next")
+ if (str_action == "select_next")
{
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- if(accordion_tab->hasFocus())
+ if (accordion_tab->hasFocus())
{
- while(++i<mAccordionTabs.size())
+ while (++i < mAccordionTabs.size())
{
- if(mAccordionTabs[i]->getVisible())
+ if (mAccordionTabs[i]->getVisible())
break;
}
- if(i<mAccordionTabs.size())
+ if (i < mAccordionTabs.size())
{
accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
accordion_tab->notify(LLSD().with("action","select_first"));
@@ -733,17 +732,17 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return 0;
}
- else if(str_action == "select_prev")
+ if (str_action == "select_prev")
{
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- if(accordion_tab->hasFocus() && i>0)
+ if (accordion_tab->hasFocus() && i > 0)
{
bool prev_visible_tab_found = false;
- while(i>0)
+ while (i > 0)
{
- if(mAccordionTabs[--i]->getVisible())
+ if (mAccordionTabs[--i]->getVisible())
{
prev_visible_tab_found = true;
break;
@@ -761,12 +760,12 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return 0;
}
- else if(str_action == "select_current")
+ if (str_action == "select_current")
{
- for(size_t i=0;i<mAccordionTabs.size();++i)
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
// Set selection to the currently focused tab.
- if(mAccordionTabs[i]->hasFocus())
+ if (mAccordionTabs[i]->hasFocus())
{
if (mAccordionTabs[i] != mSelectedTab)
{
@@ -783,7 +782,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return 0;
}
- else if(str_action == "deselect_current")
+ if (str_action == "deselect_current")
{
// Reset selection to the currently selected tab.
if (mSelectedTab)
@@ -802,9 +801,9 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
screenRectToLocal(screen_rc, &local_rc);
// Translate to parent coordinatess to check if we are in visible rectangle
- local_rc.translate( getRect().mLeft, getRect().mBottom );
+ local_rc.translate(getRect().mLeft, getRect().mBottom);
- if ( !getRect().contains (local_rc) )
+ if (!getRect().contains (local_rc))
{
// Back to local coords and calculate position for scroller
S32 bottom = mScrollbar->getDocPos() - local_rc.mBottom + getRect().mBottom;
@@ -814,7 +813,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
bottom, // min vertical scroll
top); // max vertical scroll
- mScrollbar->setDocPos( scroll_pos );
+ mScrollbar->setDocPos(scroll_pos);
}
return 1;
}
@@ -834,15 +833,16 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return LLPanel::notifyParent(info);
}
-void LLAccordionCtrl::reset ()
+
+void LLAccordionCtrl::reset()
{
- if(mScrollbar)
+ if (mScrollbar)
mScrollbar->setDocPos(0);
}
void LLAccordionCtrl::expandDefaultTab()
{
- if (mAccordionTabs.size() > 0)
+ if (!mAccordionTabs.empty())
{
LLAccordionCtrlTab* tab = mAccordionTabs.front();
@@ -877,7 +877,7 @@ void LLAccordionCtrl::sort()
arrange();
}
-void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
+void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
{
LLStringUtil::format_map_t args;
args["[SEARCH_TERM]"] = LLURI::escape(filter_string);
@@ -907,7 +907,7 @@ const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const
S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */)
{
- if(tab_index < 0)
+ if (tab_index < 0)
{
return available_height;
}
@@ -915,9 +915,9 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
S32 collapsed_tabs_height = 0;
S32 num_expanded = 0;
- for(size_t n = tab_index; n < mAccordionTabs.size(); ++n)
+ for (size_t n = tab_index; n < mAccordionTabs.size(); ++n)
{
- if(!mAccordionTabs[n]->isExpanded())
+ if (!mAccordionTabs[n]->isExpanded())
{
collapsed_tabs_height += mAccordionTabs[n]->getHeaderHeight();
}
@@ -927,7 +927,7 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
}
}
- if(0 == num_expanded)
+ if (0 == num_expanded)
{
return available_height;
}
@@ -936,3 +936,20 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
expanded_tab_height /= num_expanded;
return expanded_tab_height;
}
+
+void LLAccordionCtrl::collapseAllTabs()
+{
+ if (mAccordionTabs.size() > 0)
+ {
+ for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ {
+ LLAccordionCtrlTab *tab = mAccordionTabs[i];
+
+ if (tab->getDisplayChildren())
+ {
+ tab->setDisplayChildren(false);
+ }
+ }
+ arrange();
+ }
+}
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 2828254472..f226d38bed 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -122,6 +122,8 @@ public:
void setComparator(const LLTabComparator* comp) { mTabComparator = comp; }
void sort();
+ void collapseAllTabs();
+
/**
* Sets filter substring as a search_term for help text when there are no any visible tabs.
*/
@@ -144,7 +146,7 @@ private:
void initNoTabsWidget(const LLTextBox::Params& tb_params);
void updateNoTabsHelpTextVisibility();
- void arrangeSinge();
+ void arrangeSingle();
void arrangeMultiple();
// Calc Splitter's height that is necessary to display all child content
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 04485c6262..20da568746 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -69,13 +69,13 @@ public:
virtual BOOL postBuild();
std::string getTitle();
- void setTitle(const std::string& title, const std::string& hl);
+ void setTitle(const std::string& title, const std::string& hl);
- void setTitleFontStyle(std::string style);
+ void setTitleFontStyle(std::string style);
- void setTitleColor(LLUIColor);
+ void setTitleColor(LLUIColor);
- void setSelected(bool is_selected) { mIsSelected = is_selected; }
+ void setSelected(bool is_selected) { mIsSelected = is_selected; }
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
@@ -85,8 +85,8 @@ public:
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg);
-private:
+private:
LLTextBox* mHeaderTextbox;
// Overlay images (arrows)
@@ -102,7 +102,7 @@ private:
LLPointer<LLUIImage> mImageHeaderFocused;
// style saved when applying it in setTitleFontStyle
- LLStyle::Params mStyleParams;
+ LLStyle::Params mStyleParams;
LLUIColor mHeaderBGColor;
@@ -157,19 +157,17 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::postBuild()
std::string LLAccordionCtrlTab::LLAccordionCtrlTabHeader::getTitle()
{
- if(mHeaderTextbox)
+ if (mHeaderTextbox)
{
return mHeaderTextbox->getText();
}
- else
- {
- return LLStringUtil::null;
- }
+
+ return LLStringUtil::null;
}
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& title, const std::string& hl)
{
- if(mHeaderTextbox)
+ if (mHeaderTextbox)
{
LLTextUtil::textboxSetHighlightedVal(
mHeaderTextbox,
@@ -192,7 +190,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleColor(LLUIColor color)
{
- if(mHeaderTextbox)
+ if (mHeaderTextbox)
{
mHeaderTextbox->setColor(color);
}
@@ -204,11 +202,11 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
S32 height = getRect().getHeight();
F32 alpha = getCurrentTransparency();
- gl_rect_2d(0,0,width - 1 ,height - 1,mHeaderBGColor.get() % alpha,true);
+ gl_rect_2d(0, 0, width - 1, height - 1, mHeaderBGColor.get() % alpha, TRUE);
LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());
- bool collapsible = (parent && parent->getCollapsible());
- bool expanded = (parent && parent->getDisplayChildren());
+ bool collapsible = parent && parent->getCollapsible();
+ bool expanded = parent && parent->getDisplayChildren();
// Handle overlay images, if needed
// Only show green "focus" background image if the accordion is open,
@@ -218,23 +216,22 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
/*&& !(collapsible && !expanded)*/ // WHY??
)
{
- mImageHeaderFocused->draw(0,0,width,height);
+ mImageHeaderFocused->draw(0, 0, width, height);
}
else
{
- mImageHeader->draw(0,0,width,height);
+ mImageHeader->draw(0, 0, width, height);
}
- if(mNeedsHighlight)
+ if (mNeedsHighlight)
{
- mImageHeaderOver->draw(0,0,width,height);
+ mImageHeaderOver->draw(0, 0, width, height);
}
-
- if(collapsible)
+ if (collapsible)
{
LLPointer<LLUIImage> overlay_image;
- if(expanded)
+ if (expanded)
{
overlay_image = mImageExpanded;
}
@@ -242,8 +239,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
{
overlay_image = mImageCollapsed;
}
- overlay_image->draw(HEADER_IMAGE_LEFT_OFFSET,
- (height - overlay_image->getHeight()) / 2);
+ overlay_image->draw(HEADER_IMAGE_LEFT_OFFSET, (height - overlay_image->getHeight()) / 2);
}
LLUICtrl::draw();
@@ -253,7 +249,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::reshape(S32 width, S32 height
{
S32 header_height = mHeaderTextbox->getTextPixelHeight();
- LLRect textboxRect(HEADER_TEXT_LEFT_OFFSET,(height+header_height)/2 ,width,(height-header_height)/2);
+ LLRect textboxRect(HEADER_TEXT_LEFT_OFFSET, (height + header_height) / 2, width, (height - header_height) / 2);
mHeaderTextbox->reshape(textboxRect.getWidth(), textboxRect.getHeight());
mHeaderTextbox->setRect(textboxRect);
@@ -272,20 +268,24 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::onMouseEnter(S32 x, S32 y, MA
LLUICtrl::onMouseEnter(x, y, mask);
mNeedsHighlight = true;
}
+
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::onMouseLeave(S32 x, S32 y, MASK mask)
{
LLUICtrl::onMouseLeave(x, y, mask);
mNeedsHighlight = false;
mAutoOpenTimer.stop();
}
+
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
- if ( ( key == KEY_LEFT || key == KEY_RIGHT) && mask == MASK_NONE)
+ if ((key == KEY_LEFT || key == KEY_RIGHT) && mask == MASK_NONE)
{
return getParent()->handleKey(key, mask, called_from_parent);
}
+
return LLUICtrl::handleKey(key, mask, called_from_parent);
}
+
BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop,
EDragAndDropType cargo_type,
@@ -295,7 +295,7 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32
{
LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());
- if ( parent && !parent->getDisplayChildren() && parent->getCollapsible() && parent->canOpenClose() )
+ if (parent && !parent->getDisplayChildren() && parent->getCollapsible() && parent->canOpenClose())
{
if (mAutoOpenTimer.getStarted())
{
@@ -307,12 +307,15 @@ BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32
}
}
else
+ {
mAutoOpenTimer.start();
+ }
}
return LLUICtrl::handleDragAndDrop(x, y, mask, drop, cargo_type,
cargo_data, accept, tooltip_msg);
}
+
LLAccordionCtrlTab::Params::Params()
: title("title")
,display_children("expanded", true)
@@ -384,41 +387,39 @@ LLAccordionCtrlTab::~LLAccordionCtrlTab()
{
}
-
void LLAccordionCtrlTab::setDisplayChildren(bool display)
{
mDisplayChildren = display;
LLRect rect = getRect();
- rect.mBottom = rect.mTop - (getDisplayChildren() ?
- mExpandedHeight : HEADER_HEIGHT);
+ rect.mBottom = rect.mTop - (getDisplayChildren() ? mExpandedHeight : HEADER_HEIGHT);
setRect(rect);
- if(mContainerPanel)
+ if (mContainerPanel)
+ {
mContainerPanel->setVisible(getDisplayChildren());
+ }
- if(mDisplayChildren)
+ if (mDisplayChildren)
{
adjustContainerPanel();
}
else
{
- if(mScrollbar)
- mScrollbar->setVisible(false);
+ if (mScrollbar)
+ mScrollbar->setVisible(FALSE);
}
-
}
void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
{
LLRect headerRect;
- headerRect.setLeftTopAndSize(
- 0,height,width,HEADER_HEIGHT);
+ headerRect.setLeftTopAndSize(0, height, width, HEADER_HEIGHT);
mHeader->setRect(headerRect);
mHeader->reshape(headerRect.getWidth(), headerRect.getHeight());
- if(!mDisplayChildren)
+ if (!mDisplayChildren)
return;
LLRect childRect;
@@ -426,7 +427,7 @@ void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent
childRect.setLeftTopAndSize(
getPaddingLeft(),
height - getHeaderHeight() - getPaddingTop(),
- width - getPaddingLeft() - getPaddingRight(),
+ width - getPaddingLeft() - getPaddingRight(),
height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );
adjustContainerPanel(childRect);
@@ -434,7 +435,7 @@ void LLAccordionCtrlTab::reshape(S32 width, S32 height, BOOL called_from_parent
void LLAccordionCtrlTab::changeOpenClose(bool is_open)
{
- if(is_open)
+ if (is_open)
mExpandedHeight = getRect().getHeight();
setDisplayChildren(!is_open);
@@ -483,14 +484,14 @@ void LLAccordionCtrlTab::onUpdateScrollToChild(const LLUICtrl *cntrl)
BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask)
{
- if(mCollapsible && mHeaderVisible && mCanOpenClose)
+ if (mCollapsible && mHeaderVisible && mCanOpenClose)
{
- if(y >= (getRect().getHeight() - HEADER_HEIGHT) )
+ if (y >= (getRect().getHeight() - HEADER_HEIGHT))
{
mHeader->setFocus(true);
changeOpenClose(getDisplayChildren());
- //reset stored state
+ // Reset stored state
mWasStateStored = false;
return TRUE;
}
@@ -510,7 +511,7 @@ boost::signals2::connection LLAccordionCtrlTab::setDropDownStateChangedCallback(
bool LLAccordionCtrlTab::addChild(LLView* child, S32 tab_group)
{
- if(DD_HEADER_NAME != child->getName())
+ if (DD_HEADER_NAME != child->getName())
{
reshape(child->getRect().getWidth() , child->getRect().getHeight() + HEADER_HEIGHT );
mExpandedHeight = getRect().getHeight();
@@ -518,12 +519,12 @@ bool LLAccordionCtrlTab::addChild(LLView* child, S32 tab_group)
bool res = LLUICtrl::addChild(child, tab_group);
- if(DD_HEADER_NAME != child->getName())
+ if (DD_HEADER_NAME != child->getName())
{
- if(!mCollapsible)
+ if (!mCollapsible)
setDisplayChildren(true);
else
- setDisplayChildren(getDisplayChildren());
+ setDisplayChildren(getDisplayChildren());
}
if (!mContainerPanel)
@@ -534,7 +535,7 @@ bool LLAccordionCtrlTab::addChild(LLView* child, S32 tab_group)
void LLAccordionCtrlTab::setAccordionView(LLView* panel)
{
- addChild(panel,0);
+ addChild(panel, 0);
}
std::string LLAccordionCtrlTab::getTitle() const
@@ -543,10 +544,8 @@ std::string LLAccordionCtrlTab::getTitle() const
{
return mHeader->getTitle();
}
- else
- {
- return LLStringUtil::null;
- }
+
+ return LLStringUtil::null;
}
void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& hl)
@@ -579,6 +578,7 @@ boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const f
{
return mHeader->setFocusReceivedCallback(cb);
}
+
return boost::signals2::connection();
}
@@ -588,6 +588,7 @@ boost::signals2::connection LLAccordionCtrlTab::setFocusLostCallback(const focus
{
return mHeader->setFocusLostCallback(cb);
}
+
return boost::signals2::connection();
}
@@ -601,59 +602,65 @@ void LLAccordionCtrlTab::setSelected(bool is_selected)
LLView* LLAccordionCtrlTab::findContainerView()
{
- for(child_list_const_iter_t it = getChildList()->begin();
- getChildList()->end() != it; ++it)
+ child_list_const_iter_t it = getChildList()->begin(), it_end = getChildList()->end();
+ while (it != it_end)
{
- LLView* child = *it;
- if(DD_HEADER_NAME == child->getName())
- continue;
- if(!child->getVisible())
- continue;
- return child;
+ LLView* child = *(it++);
+ if (DD_HEADER_NAME != child->getName() && child->getVisible())
+ return child;
}
+
return NULL;
}
void LLAccordionCtrlTab::selectOnFocusReceived()
{
if (getParent()) // A parent may not be set if tabs are added dynamically.
+ {
getParent()->notifyParent(LLSD().with("action", "select_current"));
+ }
}
void LLAccordionCtrlTab::deselectOnFocusLost()
{
- if(getParent()) // A parent may not be set if tabs are added dynamically.
+ if (getParent()) // A parent may not be set if tabs are added dynamically.
{
getParent()->notifyParent(LLSD().with("action", "deselect_current"));
}
-
}
S32 LLAccordionCtrlTab::getHeaderHeight()
{
- return mHeaderVisible?HEADER_HEIGHT:0;
+ return mHeaderVisible ? HEADER_HEIGHT : 0;
}
-void LLAccordionCtrlTab::setHeaderVisible(bool value)
+void LLAccordionCtrlTab::setHeaderVisible(bool value)
{
- if(mHeaderVisible == value)
+ if (mHeaderVisible == value)
return;
+
mHeaderVisible = value;
- if(mHeader)
- mHeader->setVisible(value);
+
+ if (mHeader)
+ {
+ mHeader->setVisible(value ? TRUE : FALSE);
+ }
+
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
};
//virtual
BOOL LLAccordionCtrlTab::postBuild()
{
- if(mHeader)
+ if (mHeader)
+ {
mHeader->setVisible(mHeaderVisible);
-
- static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+ }
+
+ static LLUICachedControl<S32> scrollbar_size("UIScrollbarSize", 0);
LLRect scroll_rect;
- scroll_rect.setOriginAndSize(
+ scroll_rect.setOriginAndSize(
getRect().getWidth() - scrollbar_size,
1,
scrollbar_size,
@@ -661,7 +668,7 @@ BOOL LLAccordionCtrlTab::postBuild()
mContainerPanel = findContainerView();
- if(!mFitPanel)
+ if (!mFitPanel)
{
LLScrollbar::Params sbparams;
sbparams.name("scrollable vertical");
@@ -674,9 +681,8 @@ BOOL LLAccordionCtrlTab::postBuild()
sbparams.follows.flags(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
sbparams.change_callback(boost::bind(&LLAccordionCtrlTab::onScrollPosChangeCallback, this, _1, _2));
-
- mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
- LLView::addChild( mScrollbar );
+ mScrollbar = LLUICtrlFactory::create<LLScrollbar>(sbparams);
+ LLView::addChild(mScrollbar);
mScrollbar->setFollowsRight();
mScrollbar->setFollowsTop();
mScrollbar->setFollowsBottom();
@@ -684,44 +690,48 @@ BOOL LLAccordionCtrlTab::postBuild()
mScrollbar->setVisible(false);
}
- if(mContainerPanel)
+ if (mContainerPanel)
+ {
mContainerPanel->setVisible(mDisplayChildren);
+ }
return LLUICtrl::postBuild();
}
-bool LLAccordionCtrlTab::notifyChildren (const LLSD& info)
+
+bool LLAccordionCtrlTab::notifyChildren (const LLSD& info)
{
- if(info.has("action"))
+ if (info.has("action"))
{
std::string str_action = info["action"];
- if(str_action == "store_state")
+ if (str_action == "store_state")
{
storeOpenCloseState();
return true;
}
- if(str_action == "restore_state")
+
+ if (str_action == "restore_state")
{
restoreOpenCloseState();
return true;
}
}
+
return LLUICtrl::notifyChildren(info);
}
S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
{
- if(info.has("action"))
+ if (info.has("action"))
{
std::string str_action = info["action"];
- if(str_action == "size_changes")
+ if (str_action == "size_changes")
{
- //
S32 height = info["height"];
- height = llmax(height,10) + HEADER_HEIGHT + getPaddingTop() + getPaddingBottom();
+ height = llmax(height, 10) + HEADER_HEIGHT + getPaddingTop() + getPaddingBottom();
mExpandedHeight = height;
- if(isExpanded() && !mSkipChangesOnNotifyParent)
+ if (isExpanded() && !mSkipChangesOnNotifyParent)
{
LLRect panel_rect = getRect();
panel_rect.setLeftTopAndSize( panel_rect.mLeft, panel_rect.mTop, panel_rect.getWidth(), height);
@@ -729,12 +739,13 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
setRect(panel_rect);
}
- //LLAccordionCtrl should rearrange accordion tab if one of accordion change its size
+ // LLAccordionCtrl should rearrange accordion tab if one of accordions changed its size
if (getParent()) // A parent may not be set if tabs are added dynamically.
getParent()->notifyParent(info);
return 1;
}
- else if(str_action == "select_prev")
+
+ if (str_action == "select_prev")
{
showAndFocusHeader();
return 1;
@@ -772,78 +783,85 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
S32 LLAccordionCtrlTab::notify(const LLSD& info)
{
- if(info.has("action"))
+ if (info.has("action"))
{
std::string str_action = info["action"];
- if(str_action == "select_first")
+ if (str_action == "select_first")
{
showAndFocusHeader();
return 1;
}
- else if( str_action == "select_last" )
+
+ if (str_action == "select_last")
{
- if(getDisplayChildren() == false)
+ if (!getDisplayChildren())
{
showAndFocusHeader();
}
else
{
LLView* view = getAccordionView();
- if(view)
- view->notify(LLSD().with("action","select_last"));
+ if (view)
+ {
+ view->notify(LLSD().with("action", "select_last"));
+ }
}
}
}
+
return 0;
}
BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
{
- if( !mHeader->hasFocus() )
+ if (!mHeader->hasFocus())
return LLUICtrl::handleKey(key, mask, called_from_parent);
- if ( (key == KEY_RETURN )&& mask == MASK_NONE)
+ if ((key == KEY_RETURN) && mask == MASK_NONE)
{
changeOpenClose(getDisplayChildren());
return TRUE;
}
- if ( (key == KEY_ADD || key == KEY_RIGHT)&& mask == MASK_NONE)
+ if ((key == KEY_ADD || key == KEY_RIGHT) && mask == MASK_NONE)
{
- if(getDisplayChildren() == false)
+ if (!getDisplayChildren())
{
changeOpenClose(getDisplayChildren());
return TRUE;
}
}
- if ( (key == KEY_SUBTRACT || key == KEY_LEFT)&& mask == MASK_NONE)
+
+ if ((key == KEY_SUBTRACT || key == KEY_LEFT) && mask == MASK_NONE)
{
- if(getDisplayChildren() == true)
+ if (getDisplayChildren())
{
changeOpenClose(getDisplayChildren());
return TRUE;
}
}
- if ( key == KEY_DOWN && mask == MASK_NONE)
+ if (key == KEY_DOWN && mask == MASK_NONE)
{
- //if collapsed go to the next accordion
- if(getDisplayChildren() == false)
- //we processing notifyParent so let call parent directly
- getParent()->notifyParent(LLSD().with("action","select_next"));
+ // if collapsed go to the next accordion
+ if (!getDisplayChildren())
+ {
+ // we're processing notifyParent so let call parent directly
+ getParent()->notifyParent(LLSD().with("action", "select_next"));
+ }
else
{
- getAccordionView()->notify(LLSD().with("action","select_first"));
+ getAccordionView()->notify(LLSD().with("action", "select_first"));
}
return TRUE;
}
- if ( key == KEY_UP && mask == MASK_NONE)
+ if (key == KEY_UP && mask == MASK_NONE)
{
- //go to the previous accordion
+ // go to the previous accordion
- //we processing notifyParent so let call parent directly
- getParent()->notifyParent(LLSD().with("action","select_prev"));
+ // we're processing notifyParent so let call parent directly
+ getParent()->notifyParent(LLSD().with("action", "select_prev"));
return TRUE;
}
@@ -869,28 +887,29 @@ void LLAccordionCtrlTab::showAndFocusHeader()
// accordion tab (assuming that the parent is an LLAccordionCtrl) the calls chain
// is shortened and messages from inside the collapsed tabs are avoided.
// See STORM-536.
- getParent()->notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue()));
+ getParent()->notifyParent(LLSD().with("scrollToShowRect", screen_rc.getValue()));
}
-void LLAccordionCtrlTab::storeOpenCloseState()
+
+void LLAccordionCtrlTab::storeOpenCloseState()
{
- if(mWasStateStored)
+ if (mWasStateStored)
return;
mStoredOpenCloseState = getDisplayChildren();
mWasStateStored = true;
}
-void LLAccordionCtrlTab::restoreOpenCloseState()
+void LLAccordionCtrlTab::restoreOpenCloseState()
{
- if(!mWasStateStored)
+ if (!mWasStateStored)
return;
- if(getDisplayChildren() != mStoredOpenCloseState)
+ if (getDisplayChildren() != mStoredOpenCloseState)
{
changeOpenClose(getDisplayChildren());
}
mWasStateStored = false;
}
-void LLAccordionCtrlTab::adjustContainerPanel ()
+void LLAccordionCtrlTab::adjustContainerPanel()
{
S32 width = getRect().getWidth();
S32 height = getRect().getHeight();
@@ -907,83 +926,83 @@ void LLAccordionCtrlTab::adjustContainerPanel ()
void LLAccordionCtrlTab::adjustContainerPanel(const LLRect& child_rect)
{
- if(!mContainerPanel)
+ if (!mContainerPanel)
return;
- if(!mFitPanel)
+ if (!mFitPanel)
{
show_hide_scrollbar(child_rect);
updateLayout(child_rect);
}
else
{
- mContainerPanel->reshape(child_rect.getWidth(),child_rect.getHeight());
+ mContainerPanel->reshape(child_rect.getWidth(), child_rect.getHeight());
mContainerPanel->setRect(child_rect);
}
}
S32 LLAccordionCtrlTab::getChildViewHeight()
{
- if(!mContainerPanel)
+ if (!mContainerPanel)
return 0;
return mContainerPanel->getRect().getHeight();
}
void LLAccordionCtrlTab::show_hide_scrollbar(const LLRect& child_rect)
{
- if(getChildViewHeight() > child_rect.getHeight() )
+ if (getChildViewHeight() > child_rect.getHeight())
showScrollbar(child_rect);
else
hideScrollbar(child_rect);
}
+
void LLAccordionCtrlTab::showScrollbar(const LLRect& child_rect)
{
- if(!mContainerPanel || !mScrollbar)
+ if (!mContainerPanel || !mScrollbar)
return;
bool was_visible = mScrollbar->getVisible();
mScrollbar->setVisible(true);
static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
- {
- ctrlSetLeftTopAndSize(mScrollbar,child_rect.getWidth()-scrollbar_size,
- child_rect.getHeight()-PARENT_BORDER_MARGIN,
- scrollbar_size,
- child_rect.getHeight()-2*PARENT_BORDER_MARGIN);
- }
+ ctrlSetLeftTopAndSize(mScrollbar,
+ child_rect.getWidth() - scrollbar_size,
+ child_rect.getHeight() - PARENT_BORDER_MARGIN,
+ scrollbar_size,
+ child_rect.getHeight() - PARENT_BORDER_MARGIN * 2);
LLRect orig_rect = mContainerPanel->getRect();
mScrollbar->setPageSize(child_rect.getHeight());
- mScrollbar->setDocParams(orig_rect.getHeight(),mScrollbar->getDocPos());
+ mScrollbar->setDocParams(orig_rect.getHeight(), mScrollbar->getDocPos());
- if(was_visible)
+ if (was_visible)
{
S32 scroll_pos = llmin(mScrollbar->getDocPos(), orig_rect.getHeight() - child_rect.getHeight() - 1);
mScrollbar->setDocPos(scroll_pos);
}
- else//shrink child panel
+ else // Shrink child panel
{
updateLayout(child_rect);
}
-
}
-void LLAccordionCtrlTab::hideScrollbar( const LLRect& child_rect )
+void LLAccordionCtrlTab::hideScrollbar(const LLRect& child_rect)
{
- if(!mContainerPanel || !mScrollbar)
+ if (!mContainerPanel || !mScrollbar)
return;
- if(mScrollbar->getVisible() == false)
+ if (mScrollbar->getVisible() == FALSE)
return;
- mScrollbar->setVisible(false);
+
+ mScrollbar->setVisible(FALSE);
mScrollbar->setDocPos(0);
//shrink child panel
updateLayout(child_rect);
}
-void LLAccordionCtrlTab::onScrollPosChangeCallback(S32, LLScrollbar*)
+void LLAccordionCtrlTab::onScrollPosChangeCallback(S32, LLScrollbar*)
{
LLRect child_rect;
@@ -999,21 +1018,20 @@ void LLAccordionCtrlTab::onScrollPosChangeCallback(S32, LLScrollbar*)
updateLayout(child_rect);
}
-void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child)
+void LLAccordionCtrlTab::drawChild(const LLRect& root_rect, LLView* child)
{
if (child && child->getVisible() && child->getRect().isValid())
{
LLRect screen_rect;
- localRectToScreen(child->getRect(),&screen_rect);
-
- if ( root_rect.overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect))
+ localRectToScreen(child->getRect(), &screen_rect);
+
+ if (root_rect.overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect))
{
gGL.matrixMode(LLRender::MM_MODELVIEW);
LLUI::pushMatrix();
{
LLUI::translate((F32)child->getRect().mLeft, (F32)child->getRect().mBottom);
child->draw();
-
}
LLUI::popMatrix();
}
@@ -1022,64 +1040,67 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child)
void LLAccordionCtrlTab::draw()
{
- if(mFitPanel)
+ if (mFitPanel)
+ {
LLUICtrl::draw();
+ }
else
{
- LLRect root_rect = getRootView()->getRect();
- drawChild(root_rect,mHeader);
- drawChild(root_rect,mScrollbar );
- {
- LLRect child_rect;
+ LLRect root_rect(getRootView()->getRect());
+ drawChild(root_rect, mHeader);
+ drawChild(root_rect, mScrollbar);
- S32 width = getRect().getWidth();
- S32 height = getRect().getHeight();
+ LLRect child_rect;
- child_rect.setLeftTopAndSize(
- getPaddingLeft(),
- height - getHeaderHeight() - getPaddingTop(),
- width - getPaddingLeft() - getPaddingRight(),
- height - getHeaderHeight() - getPaddingTop() - getPaddingBottom() );
+ S32 width = getRect().getWidth();
+ S32 height = getRect().getHeight();
- LLLocalClipRect clip(child_rect);
- drawChild(root_rect,mContainerPanel);
- }
+ child_rect.setLeftTopAndSize(
+ getPaddingLeft(),
+ height - getHeaderHeight() - getPaddingTop(),
+ width - getPaddingLeft() - getPaddingRight(),
+ height - getHeaderHeight() - getPaddingTop() - getPaddingBottom());
+
+ LLLocalClipRect clip(child_rect);
+ drawChild(root_rect,mContainerPanel);
}
}
-void LLAccordionCtrlTab::updateLayout ( const LLRect& child_rect )
+void LLAccordionCtrlTab::updateLayout(const LLRect& child_rect)
{
LLView* child = getAccordionView();
- if(!mContainerPanel)
+ if (!mContainerPanel)
return;
S32 panel_top = child_rect.getHeight();
S32 panel_width = child_rect.getWidth();
- static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
- if(mScrollbar && mScrollbar->getVisible() != false)
+ static LLUICachedControl<S32> scrollbar_size("UIScrollbarSize", 0);
+ if (mScrollbar && mScrollbar->getVisible())
{
- panel_top+=mScrollbar->getDocPos();
- panel_width-=scrollbar_size;
+ panel_top += mScrollbar->getDocPos();
+ panel_width -= scrollbar_size;
}
- //set sizes for first panels and dragbars
+ // Set sizes for first panels and dragbars
LLRect panel_rect = child->getRect();
- ctrlSetLeftTopAndSize(mContainerPanel,child_rect.mLeft,panel_top,panel_width,panel_rect.getHeight());
+ ctrlSetLeftTopAndSize(mContainerPanel, child_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
}
+
void LLAccordionCtrlTab::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top, S32 width, S32 height)
{
- if(!panel)
+ if (!panel)
return;
LLRect panel_rect = panel->getRect();
- panel_rect.setLeftTopAndSize( left, top, width, height);
+ panel_rect.setLeftTopAndSize(left, top, width, height);
panel->reshape( width, height, 1);
panel->setRect(panel_rect);
}
+
BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
{
//header may be not the first child but we need to process it first
- if(y >= (getRect().getHeight() - HEADER_HEIGHT - HEADER_HEIGHT/2) )
+ if (y >= (getRect().getHeight() - HEADER_HEIGHT - HEADER_HEIGHT / 2))
{
//inside tab header
//fix for EXT-6619
@@ -1088,16 +1109,18 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
}
return LLUICtrl::handleToolTip(x, y, mask);
}
-BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks )
+
+BOOL LLAccordionCtrlTab::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- if( LLUICtrl::handleScrollWheel(x,y,clicks))
+ if (LLUICtrl::handleScrollWheel(x, y, clicks))
{
return TRUE;
}
- if( mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) )
+
+ if (mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel(0, 0, clicks))
{
return TRUE;
}
+
return FALSE;
}
-
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 2c72e8c036..496c34c38b 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -104,7 +104,7 @@ public:
virtual void setDisplayChildren(bool display);
// Returns expand/collapse state
- virtual bool getDisplayChildren() const {return mDisplayChildren;};
+ virtual bool getDisplayChildren() const { return mDisplayChildren; };
//set LLAccordionCtrlTab panel
void setAccordionView(LLView* panel);
@@ -126,12 +126,12 @@ public:
void setSelected(bool is_selected);
- bool getCollapsible() {return mCollapsible;};
+ bool getCollapsible() { return mCollapsible; };
- void setCollapsible(bool collapsible) {mCollapsible = collapsible;};
+ void setCollapsible(bool collapsible) { mCollapsible = collapsible; };
void changeOpenClose(bool is_open);
- void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close;};
+ void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close; };
bool canOpenClose() const { return mCanOpenClose; };
virtual BOOL postBuild();
@@ -142,8 +142,8 @@ public:
void draw();
- void storeOpenCloseState ();
- void restoreOpenCloseState ();
+ void storeOpenCloseState();
+ void restoreOpenCloseState();
protected:
LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&);
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 49d275997a..ceceb90f0a 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -58,10 +58,11 @@ static LLDefaultChildRegistry::Register<LLButton> r("button");
template class LLButton* LLView::getChild<class LLButton>(
const std::string& name, BOOL recurse) const;
-// globals loaded from settings.xml
-S32 LLBUTTON_H_PAD = 0;
-S32 BTN_HEIGHT_SMALL= 0;
-S32 BTN_HEIGHT = 0;
+// globals
+S32 LLBUTTON_H_PAD = 4;
+S32 BTN_HEIGHT_SMALL= 23;
+S32 BTN_HEIGHT = 23;
+S32 BTN_DROP_SHADOW = 2;
LLButton::Params::Params()
: label_selected("label_selected"), // requires is_toggle true
@@ -91,8 +92,8 @@ LLButton::Params::Params()
image_overlay_disabled_color("image_overlay_disabled_color", LLColor4::white % 0.3f),
image_overlay_selected_color("image_overlay_selected_color", LLColor4::white),
flash_color("flash_color"),
- pad_right("pad_right", LLUI::getInstance()->mSettingGroups["config"]->getS32("ButtonHPad")),
- pad_left("pad_left", LLUI::getInstance()->mSettingGroups["config"]->getS32("ButtonHPad")),
+ pad_right("pad_right", LLBUTTON_H_PAD),
+ pad_left("pad_left", LLBUTTON_H_PAD),
pad_bottom("pad_bottom"),
click_callback("click_callback"),
mouse_down_callback("mouse_down_callback"),
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index ccd31e90c0..ab64440c19 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -43,10 +43,10 @@
//
// PLEASE please use these "constants" when building your own buttons.
-// They are loaded from settings.xml at run time.
extern S32 LLBUTTON_H_PAD;
extern S32 BTN_HEIGHT_SMALL;
extern S32 BTN_HEIGHT;
+extern S32 BTN_DROP_SHADOW;
//
// Helpful functions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 9ca05a16f3..7a925c0659 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -482,8 +482,6 @@ void LLComboBox::onFocusLost()
void LLComboBox::setButtonVisible(BOOL visible)
{
- static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
-
mButton->setVisible(visible);
if (mTextEntry)
{
@@ -491,7 +489,7 @@ void LLComboBox::setButtonVisible(BOOL visible)
if (visible)
{
S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0;
- text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button;
+ text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW;
}
//mTextEntry->setRect(text_entry_rect);
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
@@ -530,19 +528,18 @@ void LLComboBox::setEnabledByValue(const LLSD& value, BOOL enabled)
void LLComboBox::createLineEditor(const LLComboBox::Params& p)
{
- static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
LLRect rect = getLocalRect();
if (mAllowTextEntry)
{
S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0;
- S32 shadow_size = drop_shadow_button;
+ S32 shadow_size = BTN_DROP_SHADOW;
mButton->setRect(LLRect( getRect().getWidth() - llmax(8,arrow_width) - 2 * shadow_size,
rect.mTop, rect.mRight, rect.mBottom));
mButton->setTabStop(FALSE);
mButton->setHAlign(LLFontGL::HCENTER);
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
- text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button;
+ text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW;
// clear label on button
std::string cur_label = mButton->getLabelSelected();
LLLineEditor::Params params = p.combo_editor;
@@ -1081,13 +1078,11 @@ void LLComboBox::onSetHighlight() const
void LLComboBox::imageLoaded()
{
- static LLUICachedControl<S32> drop_shadow_button("DropShadowButton", 0);
-
if (mAllowTextEntry)
{
LLRect rect = getLocalRect();
S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0;
- S32 shadow_size = drop_shadow_button;
+ S32 shadow_size = BTN_DROP_SHADOW;
mButton->setRect(LLRect(getRect().getWidth() - llmax(8, arrow_width) - 2 * shadow_size,
rect.mTop, rect.mRight, rect.mBottom));
if (mButton->getVisible())
@@ -1096,7 +1091,7 @@ void LLComboBox::imageLoaded()
if (mTextEntry)
{
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
- text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * drop_shadow_button;
+ text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * BTN_DROP_SHADOW;
mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
}
}
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index b13e7389cc..fd4c33df30 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -1198,7 +1198,7 @@ void LLFlatListView::onFocusReceived()
{
if (size())
{
- mSelectedItemsBorder->setVisible(TRUE);
+ mSelectedItemsBorder->setVisible(TRUE);
}
gEditMenuHandler = this;
}
@@ -1207,7 +1207,7 @@ void LLFlatListView::onFocusLost()
{
mSelectedItemsBorder->setVisible(FALSE);
// Route menu back to the default
- if( gEditMenuHandler == this )
+ if (gEditMenuHandler == this)
{
gEditMenuHandler = NULL;
}
@@ -1216,16 +1216,16 @@ void LLFlatListView::onFocusLost()
//virtual
S32 LLFlatListView::notify(const LLSD& info)
{
- if(info.has("action"))
+ if (info.has("action"))
{
std::string str_action = info["action"];
- if(str_action == "select_first")
+ if (str_action == "select_first")
{
setFocus(true);
selectFirstItem();
return 1;
}
- else if(str_action == "select_last")
+ else if (str_action == "select_last")
{
setFocus(true);
selectLastItem();
@@ -1238,6 +1238,7 @@ S32 LLFlatListView::notify(const LLSD& info)
notifyParentItemsRectChanged();
return 1;
}
+
return 0;
}
@@ -1249,10 +1250,8 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
detached_items.clear();
// Go through items and detach valid items, remove them from items panel
// and add to detached_items.
- for (pairs_iterator_t
- iter = mItemPairs.begin(),
- iter_end = mItemPairs.end();
- iter != iter_end; ++iter)
+ pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
+ while (iter != iter_end)
{
LLPanel* pItem = (*iter)->first;
if (1 == pItem->notify(action))
@@ -1261,6 +1260,7 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
mItemsPanel->removeChild(pItem);
detached_items.push_back(pItem);
}
+ iter++;
}
if (!detached_items.empty())
{
@@ -1268,13 +1268,12 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
if (detached_items.size() == mItemPairs.size())
{
// This way will be faster if all items were disconnected
- for (pairs_iterator_t
- iter = mItemPairs.begin(),
- iter_end = mItemPairs.end();
- iter != iter_end; ++iter)
+ pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
+ while (iter != iter_end)
{
(*iter)->first = NULL;
delete *iter;
+ iter++;
}
mItemPairs.clear();
// Also set items panel height to zero.
@@ -1287,16 +1286,14 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
}
else
{
- for (std::vector<LLPanel*>::const_iterator
- detached_iter = detached_items.begin(),
- detached_iter_end = detached_items.end();
- detached_iter != detached_iter_end; ++detached_iter)
+ std::vector<LLPanel*>::const_iterator
+ detached_iter = detached_items.begin(),
+ detached_iter_end = detached_items.end();
+ while (detached_iter < detached_iter_end)
{
LLPanel* pDetachedItem = *detached_iter;
- for (pairs_iterator_t
- iter = mItemPairs.begin(),
- iter_end = mItemPairs.end();
- iter != iter_end; ++iter)
+ pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
+ while (iter != iter_end)
{
item_pair_t* item_pair = *iter;
if (item_pair->first == pDetachedItem)
@@ -1306,7 +1303,9 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
delete item_pair;
break;
}
+ iter++;
}
+ detached_iter++;
}
rearrangeItems();
}
@@ -1322,7 +1321,6 @@ LLFlatListViewEx::Params::Params()
: no_items_msg("no_items_msg")
, no_filtered_items_msg("no_filtered_items_msg")
{
-
}
LLFlatListViewEx::LLFlatListViewEx(const Params& p)
@@ -1332,7 +1330,6 @@ LLFlatListViewEx::LLFlatListViewEx(const Params& p)
, mForceShowingUnmatchedItems(false)
, mHasMatchedItems(false)
{
-
}
void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string)
@@ -1352,7 +1349,6 @@ void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string)
// list does not contain any items at all
setNoItemsCommentText(mNoItemsMsg);
}
-
}
bool LLFlatListViewEx::getForceShowingUnmatchedItems()
@@ -1365,26 +1361,28 @@ void LLFlatListViewEx::setForceShowingUnmatchedItems(bool show)
mForceShowingUnmatchedItems = show;
}
-void LLFlatListViewEx::setFilterSubString(const std::string& filter_str)
+void LLFlatListViewEx::setFilterSubString(const std::string& filter_str, bool notify_parent)
{
if (0 != LLStringUtil::compareInsensitive(filter_str, mFilterSubString))
{
mFilterSubString = filter_str;
updateNoItemsMessage(mFilterSubString);
- filterItems();
+ filterItems(false, notify_parent);
}
}
-void LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
+bool LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
{
- if (!item) return;
+ if (!item)
+ return false;
+
+ BOOL visible = TRUE;
// 0 signifies that filter is matched,
// i.e. we don't hide items that don't support 'match_filter' action, separators etc.
if (0 == item->notify(action))
{
mHasMatchedItems = true;
- item->setVisible(true);
}
else
{
@@ -1392,36 +1390,45 @@ void LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
if (!mForceShowingUnmatchedItems)
{
selectItem(item, false);
+ visible = FALSE;
}
- item->setVisible(mForceShowingUnmatchedItems);
}
+
+ if (item->getVisible() != visible)
+ {
+ item->setVisible(visible);
+ return true;
+ }
+
+ return false;
}
-void LLFlatListViewEx::filterItems()
+void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent)
{
- typedef std::vector <LLPanel*> item_panel_list_t;
-
std::string cur_filter = mFilterSubString;
LLStringUtil::toUpper(cur_filter);
LLSD action;
action.with("match_filter", cur_filter);
- item_panel_list_t items;
- getItems(items);
-
mHasMatchedItems = false;
- for (item_panel_list_t::iterator
- iter = items.begin(),
- iter_end = items.end();
- iter != iter_end; ++iter)
+ bool visibility_changed = false;
+ pairs_const_iterator_t iter = getItemPairs().begin(), iter_end = getItemPairs().end();
+ while (iter != iter_end)
{
- LLPanel* pItem = (*iter);
- updateItemVisibility(pItem, action);
+ LLPanel* pItem = (*(iter++))->first;
+ visibility_changed |= updateItemVisibility(pItem, action);
}
- sort();
- notifyParentItemsRectChanged();
+ if (re_sort)
+ {
+ sort();
+ }
+
+ if (visibility_changed && notify_parent)
+ {
+ notifyParentItemsRectChanged();
+ }
}
bool LLFlatListViewEx::hasMatchedItems()
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index d47c1cf333..adb0e3e553 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -300,6 +300,7 @@ public:
virtual S32 notify(const LLSD& info) ;
virtual ~LLFlatListView();
+
protected:
/** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */
@@ -375,7 +376,9 @@ protected:
LLRect getLastSelectedItemRect();
- void ensureSelectedVisible();
+ void ensureSelectedVisible();
+
+ const pairs_list_t& getItemPairs() { return mItemPairs; }
private:
@@ -482,14 +485,14 @@ public:
/**
* Sets up new filter string and filters the list.
*/
- void setFilterSubString(const std::string& filter_str);
+ void setFilterSubString(const std::string& filter_str, bool notify_parent);
std::string getFilterSubString() { return mFilterSubString; }
/**
* Filters the list, rearranges and notifies parent about shape changes.
* Derived classes may want to overload rearrangeItems() to exclude repeated separators after filtration.
*/
- void filterItems();
+ void filterItems(bool re_sort, bool notify_parent);
/**
* Returns true if last call of filterItems() found at least one matching item
@@ -513,7 +516,7 @@ protected:
* @param item - item we are changing
* @param item - action - parameters to determin visibility from
*/
- void updateItemVisibility(LLPanel* item, const LLSD &action);
+ bool updateItemVisibility(LLPanel* item, const LLSD &action);
private:
std::string mNoFilteredItemsMsg;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 2303cd24b7..d08084cdf5 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1961,10 +1961,9 @@ void LLFloater::drawShadow(LLPanel* panel)
S32 right = panel->getRect().getWidth() - LLPANEL_BORDER_WIDTH;
S32 bottom = LLPANEL_BORDER_WIDTH;
- static LLUICachedControl<S32> shadow_offset_S32 ("DropShadowFloater", 0);
static LLUIColor shadow_color_cached = LLUIColorTable::instance().getColor("ColorDropShadow");
LLColor4 shadow_color = shadow_color_cached;
- F32 shadow_offset = (F32)shadow_offset_S32;
+ F32 shadow_offset = (F32)DROP_SHADOW_FLOATER;
if (!panel->isBackgroundOpaque())
{
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 668cd208a9..7840611ce1 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -61,6 +61,10 @@ const BOOL CLOSE_NO = FALSE;
const BOOL ADJUST_VERTICAL_YES = TRUE;
const BOOL ADJUST_VERTICAL_NO = FALSE;
+const F32 CONTEXT_CONE_IN_ALPHA = 0.f;
+const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
+const F32 CONTEXT_CONE_FADE_TIME = .08f;
+
namespace LLFloaterEnums
{
enum EOpenPositioning
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 650ae9ae75..d7ba47c9f5 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -335,9 +335,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height )
void LLFolderView::filter( LLFolderViewFilter& filter )
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
- static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
- static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
- filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100));
+ const S32 TIME_VISIBLE = 10; // in milliseconds
+ const S32 TIME_INVISIBLE = 1;
+ filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? TIME_VISIBLE : TIME_INVISIBLE), 1, 100));
// Note: we filter the model, not the view
getViewModelItem()->filter(filter);
@@ -765,7 +765,7 @@ void LLFolderView::removeSelectedItems()
}
else
{
- LL_INFOS() << "Cannot delete " << item->getName() << LL_ENDL;
+ LL_DEBUGS() << "Cannot delete " << item->getName() << LL_ENDL;
return;
}
}
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 0dc66bf37a..6ae150dca5 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -601,15 +601,13 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
{
- static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::getInstance()->mSettingGroups["config"],"DragAndDropDistanceThreshold", 3);
-
mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight));
if( hasMouseCapture() && isMovable() )
{
LLFolderView* root = getRoot();
- if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > drag_and_drop_threshold() * drag_and_drop_threshold()
+ if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD
&& root->getAllowDrag()
&& root->getCurSelectedItem()
&& root->startDrag())
diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp
index f217b743a0..96aca62927 100644
--- a/indra/llui/llfolderviewmodel.cpp
+++ b/indra/llui/llfolderviewmodel.cpp
@@ -48,8 +48,8 @@ std::string LLFolderViewModelCommon::getStatusText(bool is_empty_folder)
void LLFolderViewModelCommon::filter()
{
- static LLCachedControl<S32> max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
- getFilter().resetTime(llclamp(max_time(), 1, 100));
+ const S32 MAX_FILTER_TIME = 10;
+ getFilter().resetTime(MAX_FILTER_TIME);
mFolderView->getViewModelItem()->filter(getFilter());
}
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 551a60e097..0f11560790 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -170,7 +170,7 @@ public:
virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder
virtual void move( LLFolderViewModelItem* parent_listener ) = 0;
- virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed
+ virtual BOOL isItemRemovable( bool check_worn = true ) const = 0; // Can be destroyed
virtual BOOL removeItem() = 0;
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) = 0;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 940cf398c0..96fa57b5a6 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -95,6 +95,7 @@ LLLineEditor::Params::Params()
commit_on_focus_lost("commit_on_focus_lost", true),
ignore_tab("ignore_tab", true),
is_password("is_password", false),
+ allow_emoji("allow_emoji"),
cursor_color("cursor_color"),
use_bg_color("use_bg_color", false),
bg_color("bg_color"),
@@ -141,6 +142,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
mIgnoreArrowKeys( FALSE ),
mIgnoreTab( p.ignore_tab ),
mDrawAsterixes( p.is_password ),
+ mAllowEmoji( p.allow_emoji ),
mSpellCheck( p.spellcheck ),
mSpellCheckStart(-1),
mSpellCheckEnd(-1),
@@ -413,8 +415,13 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit
all_selected = all_selected || (len == 0 && hasFocus() && mSelectAllonFocusReceived);
std::string truncated_utf8 = new_text;
+ if (!mAllowEmoji)
+ {
+ // Cut emoji symbols if exist
+ utf8str_remove_emojis(truncated_utf8);
+ }
if (use_size_limit && truncated_utf8.size() > (U32)mMaxLengthBytes)
- {
+ {
truncated_utf8 = utf8str_truncate(new_text, mMaxLengthBytes);
}
mText.assign(truncated_utf8);
@@ -586,13 +593,21 @@ void LLLineEditor::replaceWithSuggestion(U32 index)
{
if ( (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) )
{
+ LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
+ if (!mAllowEmoji)
+ {
+ // Cut emoji symbols if exist
+ wstring_remove_emojis(suggestion);
+ }
+ if (suggestion.empty())
+ return;
+
deselect();
// Delete the misspelled word
mText.erase(it->first, it->second - it->first);
// Insert the suggestion in its place
- LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
mText.insert(it->first, suggestion);
setCursor(it->first + (S32)suggestion.length());
@@ -955,9 +970,11 @@ void LLLineEditor::removeChar()
}
}
-
void LLLineEditor::addChar(const llwchar uni_char)
{
+ if (!mAllowEmoji && LLStringOps::isEmoji(uni_char))
+ return;
+
llwchar new_c = uni_char;
if (hasSelection())
{
@@ -1257,6 +1274,11 @@ void LLLineEditor::pasteHelper(bool is_primary)
if (!paste.empty())
{
+ if (!mAllowEmoji)
+ {
+ wstring_remove_emojis(paste);
+ }
+
if (!prevalidateInput(paste))
return;
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index ae4e05c065..8e5735acb4 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -92,6 +92,7 @@ public:
ignore_tab,
bg_image_always_focused,
is_password,
+ allow_emoji,
use_bg_color;
// colors
@@ -238,6 +239,7 @@ public:
void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; }
void setIgnoreTab(BOOL b) { mIgnoreTab = b; }
void setPassDelete(BOOL b) { mPassDelete = b; }
+ void setAllowEmoji(BOOL b) { mAllowEmoji = b; }
void setDrawAsterixes(BOOL b);
// get the cursor position of the beginning/end of the prev/next word in the text
@@ -396,6 +398,7 @@ protected:
BOOL mShowImageFocused;
+ bool mAllowEmoji;
bool mUseBgColor;
LLWString mPreeditWString;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index cebca70b59..10da3fb7e0 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -66,8 +66,8 @@
LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL;
view_listener_t::listener_map_t view_listener_t::sListeners;
-S32 MENU_BAR_HEIGHT = 0;
-S32 MENU_BAR_WIDTH = 0;
+S32 MENU_BAR_HEIGHT = 18;
+S32 MENU_BAR_WIDTH = 410;
///============================================================================
/// Local function declarations, constants, enums, and typedefs
@@ -3229,10 +3229,9 @@ void LLMenuGL::draw( void )
}
if (mDropShadowed && !mTornOff)
{
- static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow");
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
- color_drop_shadow, drop_shadow_floater );
+ color_drop_shadow, DROP_SHADOW_FLOATER);
}
if( mBgVisible )
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 3e5978eb59..22d98469ec 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -284,10 +284,9 @@ BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )
void LLModalDialog::draw()
{
static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
- static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 0);
gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
- shadow_color, shadow_lines);
+ shadow_color, DROP_SHADOW_FLOATER);
LLFloater::draw();
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index d736aa6634..464ef576a7 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -88,6 +88,7 @@ LLNotificationForm::FormInput::FormInput()
: type("type"),
text("text"),
max_length_chars("max_length_chars"),
+ allow_emoji("allow_emoji"),
width("width", 0),
value("value")
{}
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 921398a693..0729c00946 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -201,6 +201,7 @@ public:
Mandatory<std::string> type;
Optional<S32> width;
Optional<S32> max_length_chars;
+ Optional<bool> allow_emoji;
Optional<std::string> text;
Optional<std::string> value;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 76b9e448a1..024444e1c9 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -225,7 +225,8 @@ LLTabContainer::Params::Params()
tabs_flashing_color("tabs_flashing_color"),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
use_ellipses("use_ellipses"),
- font_halign("halign")
+ font_halign("halign"),
+ use_tab_offset("use_tab_offset", false)
{}
LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
@@ -264,7 +265,8 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mTabIconCtrlPad(p.tab_icon_ctrl_pad),
mEnableTabsFlashing(p.enable_tabs_flashing),
mTabsFlashingColor(p.tabs_flashing_color),
- mUseTabEllipses(p.use_ellipses)
+ mUseTabEllipses(p.use_ellipses),
+ mUseTabOffset(p.use_tab_offset)
{
static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
@@ -1023,11 +1025,10 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
}
else
{
- tab_panel_rect = LLRect(LLPANEL_BORDER_WIDTH * 3,
- tab_panel_top,
- getRect().getWidth() - LLPANEL_BORDER_WIDTH * 2,
- tab_panel_bottom );
- }
+ S32 left_offset = mUseTabOffset ? LLPANEL_BORDER_WIDTH * 3 : LLPANEL_BORDER_WIDTH;
+ S32 right_offset = mUseTabOffset ? LLPANEL_BORDER_WIDTH * 2 : LLPANEL_BORDER_WIDTH;
+ tab_panel_rect = LLRect(left_offset, tab_panel_top, getRect().getWidth() - right_offset, tab_panel_bottom);
+ }
child->setFollowsAll();
child->translate( tab_panel_rect.mLeft - child->getRect().mLeft, tab_panel_rect.mBottom - child->getRect().mBottom);
child->reshape( tab_panel_rect.getWidth(), tab_panel_rect.getHeight(), TRUE );
@@ -1516,25 +1517,23 @@ BOOL LLTabContainer::selectTab(S32 which)
LLTabTuple* selected_tuple = getTab(which);
if (!selected_tuple)
- {
return FALSE;
- }
-
+
LLSD cbdata;
if (selected_tuple->mTabPanel)
cbdata = selected_tuple->mTabPanel->getName();
- BOOL res = FALSE;
- if( !mValidateSignal || (*mValidateSignal)( this, cbdata ) )
+ BOOL result = FALSE;
+ if (!mValidateSignal || (*mValidateSignal)(this, cbdata))
{
- res = setTab(which);
- if (res && mCommitSignal)
+ result = setTab(which);
+ if (result && mCommitSignal)
{
(*mCommitSignal)(this, cbdata);
}
}
-
- return res;
+
+ return result;
}
// private
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index aa4a08c4ff..7d6fd15927 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -121,6 +121,8 @@ public:
*/
Optional<S32> tab_icon_ctrl_pad;
+ Optional<bool> use_tab_offset;
+
Params();
};
@@ -321,6 +323,8 @@ private:
S32 mTabIconCtrlPad;
bool mUseTabEllipses;
LLFrameTimer mMouseDownTimer;
+
+ bool mUseTabOffset;
};
#endif // LL_TABCONTAINER_H
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 2707f7a15c..58ecf3e603 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -1134,8 +1134,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
BOOL handled = FALSE;
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
- static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3);
- if (mouse_distance_squared > drag_threshold * drag_threshold
+ if (mouse_distance_squared > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD
&& hasMouseCapture() &&
mStartDragItemCallback && mHandleDragItemCallback)
{
diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp
index 5da722a72b..ecd065a4ef 100644
--- a/indra/llui/lltransutil.cpp
+++ b/indra/llui/lltransutil.cpp
@@ -44,8 +44,8 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
if (!success)
{
- gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
- LL_ERRS() << "Couldn't load string table " << xml_filename << ". Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
+ //gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
+ LL_ERRS() << "Couldn't load string table " << xml_filename << " " << errno << ". Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
return false;
}
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 30dbd7248f..868e1d21a6 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -53,7 +53,7 @@ class LLWindow;
class LLView;
class LLHelp;
-
+const S32 DRAG_N_DROP_DISTANCE_THRESHOLD = 3;
// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim)
enum EDragAndDropType
{
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index be1c7dd0b6..ef295976a2 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -41,6 +41,7 @@
const BOOL TAKE_FOCUS_YES = TRUE;
const BOOL TAKE_FOCUS_NO = FALSE;
+const S32 DROP_SHADOW_FLOATER = 5;
class LLUICtrl
: public LLView, public boost::signals2::trackable
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index ac4848579f..45049e1539 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -196,7 +196,13 @@ public:
// windows only DirectInput8 for joysticks
virtual void* getDirectInput8() { return NULL; };
- virtual bool getInputDevices(U32 device_type_filter, void * devices_callback, void* userdata) { return false; };
+ virtual bool getInputDevices(U32 device_type_filter,
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback,
+ void* win_callback,
+ void* userdata)
+ {
+ return false;
+ };
virtual S32 getRefreshRate() { return mRefreshRate; }
protected:
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 690fe058db..2e75d309ea 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -27,6 +27,7 @@
#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
+#include <errno.h>
#include "llopenglview-objc.h"
#include "llwindowmacosx-objc.h"
#include "llappdelegate-objc.h"
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 2c841d4703..aa87a6803f 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -43,6 +43,13 @@
#include <CoreServices/CoreServices.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
+#include <IOKit/IOCFPlugIn.h>
+#include <IOKit/IOKitLib.h>
+#include <IOKit/IOMessage.h>
+#include <IOKit/hid/IOHIDUsageTables.h>
+#include <IOKit/hid/IOHIDLib.h>
+#include <IOKit/usb/IOUSBLib.h>
+
extern BOOL gDebugWindowProc;
BOOL gHiDPISupport = TRUE;
@@ -212,13 +219,16 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask, wchar_t character)
{
- if((key == gKeyboard->inverseTranslateKey('Z')) && (character == 'y'))
- {
- key = gKeyboard->inverseTranslateKey('Y');
- }
- else if ((key == gKeyboard->inverseTranslateKey('Y')) && (character == 'z'))
+ //if (mask!=MASK_NONE)
{
- key = gKeyboard->inverseTranslateKey('Z');
+ if((key == gKeyboard->inverseTranslateKey('Z')) && (character == 'y'))
+ {
+ key = gKeyboard->inverseTranslateKey('Y');
+ }
+ else if ((key == gKeyboard->inverseTranslateKey('Y')) && (character == 'z'))
+ {
+ key = gKeyboard->inverseTranslateKey('Z');
+ }
}
mRawKeyEvent = event;
@@ -1803,6 +1813,488 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
}
}
+// String should match ndof, so string mapping code was copied as is
+static char mapChar( char c )
+{
+ unsigned char uc = ( unsigned char ) c;
+
+ switch( uc )
+ {
+ case '/': return '-'; // use dash instead of slash
+
+ case 0x7F: return ' ';
+ case 0x80: return 'A';
+ case 0x81: return 'A';
+ case 0x82: return 'C';
+ case 0x83: return 'E';
+ case 0x84: return 'N';
+ case 0x85: return 'O';
+ case 0x86: return 'U';
+ case 0x87: return 'a';
+ case 0x88: return 'a';
+ case 0x89: return 'a';
+ case 0x8A: return 'a';
+ case 0x8B: return 'a';
+ case 0x8C: return 'a';
+ case 0x8D: return 'c';
+ case 0x8E: return 'e';
+ case 0x8F: return 'e';
+ case 0x90: return ' ';
+ case 0x91: return ' '; // ? '
+ case 0x92: return ' '; // ? '
+ case 0x93: return ' '; // ? "
+ case 0x94: return ' '; // ? "
+ case 0x95: return ' ';
+ case 0x96: return ' ';
+ case 0x97: return ' ';
+ case 0x98: return ' ';
+ case 0x99: return ' ';
+ case 0x9A: return ' ';
+ case 0x9B: return 0x27;
+ case 0x9C: return 0x22;
+ case 0x9D: return ' ';
+ case 0x9E: return ' ';
+ case 0x9F: return ' ';
+ case 0xA0: return ' ';
+ case 0xA1: return ' ';
+ case 0xA2: return ' ';
+ case 0xA3: return ' ';
+ case 0xA4: return ' ';
+ case 0xA5: return ' ';
+ case 0xA6: return ' ';
+ case 0xA7: return ' ';
+ case 0xA8: return ' ';
+ case 0xA9: return ' ';
+ case 0xAA: return ' ';
+ case 0xAB: return ' ';
+ case 0xAC: return ' ';
+ case 0xAD: return ' ';
+ case 0xAE: return ' ';
+ case 0xAF: return ' ';
+ case 0xB0: return ' ';
+ case 0xB1: return ' ';
+ case 0xB2: return ' ';
+ case 0xB3: return ' ';
+ case 0xB4: return ' ';
+ case 0xB5: return ' ';
+ case 0xB6: return ' ';
+ case 0xB7: return ' ';
+ case 0xB8: return ' ';
+ case 0xB9: return ' ';
+ case 0xBA: return ' ';
+ case 0xBB: return ' ';
+ case 0xBC: return ' ';
+ case 0xBD: return ' ';
+ case 0xBE: return ' ';
+ case 0xBF: return ' ';
+ case 0xC0: return ' ';
+ case 0xC1: return ' ';
+ case 0xC2: return ' ';
+ case 0xC3: return ' ';
+ case 0xC4: return ' ';
+ case 0xC5: return ' ';
+ case 0xC6: return ' ';
+ case 0xC7: return ' ';
+ case 0xC8: return ' ';
+ case 0xC9: return ' ';
+ case 0xCA: return ' ';
+ case 0xCB: return 'A';
+ case 0xCC: return 'A';
+ case 0xCD: return 'O';
+ case 0xCE: return ' ';
+ case 0xCF: return ' ';
+ case 0xD0: return '-';
+ case 0xD1: return '-';
+ case 0xD2: return 0x22;
+ case 0xD3: return 0x22;
+ case 0xD4: return 0x27;
+ case 0xD5: return 0x27;
+ case 0xD6: return '-'; // use dash instead of slash
+ case 0xD7: return ' ';
+ case 0xD8: return 'y';
+ case 0xD9: return 'Y';
+ case 0xDA: return '-'; // use dash instead of slash
+ case 0xDB: return ' ';
+ case 0xDC: return '<';
+ case 0xDD: return '>';
+ case 0xDE: return ' ';
+ case 0xDF: return ' ';
+ case 0xE0: return ' ';
+ case 0xE1: return ' ';
+ case 0xE2: return ',';
+ case 0xE3: return ',';
+ case 0xE4: return ' ';
+ case 0xE5: return 'A';
+ case 0xE6: return 'E';
+ case 0xE7: return 'A';
+ case 0xE8: return 'E';
+ case 0xE9: return 'E';
+ case 0xEA: return 'I';
+ case 0xEB: return 'I';
+ case 0xEC: return 'I';
+ case 0xED: return 'I';
+ case 0xEE: return 'O';
+ case 0xEF: return 'O';
+ case 0xF0: return ' ';
+ case 0xF1: return 'O';
+ case 0xF2: return 'U';
+ case 0xF3: return 'U';
+ case 0xF4: return 'U';
+ case 0xF5: return '|';
+ case 0xF6: return ' ';
+ case 0xF7: return ' ';
+ case 0xF8: return ' ';
+ case 0xF9: return ' ';
+ case 0xFA: return '.';
+ case 0xFB: return ' ';
+ case 0xFC: return ' ';
+ case 0xFD: return 0x22;
+ case 0xFE: return ' ';
+ case 0xFF: return ' ';
+ }
+ return c;
+}
+
+// String should match ndof for manufacturer based search to work
+static void sanitizeString( char* inCStr )
+{
+ char* charIt = inCStr;
+ while ( *charIt )
+ {
+ *charIt = mapChar( *charIt );
+ charIt++;
+ }
+}
+
+struct HidDevice
+{
+ long mAxis;
+ long mLocalID;
+ char mProduct[256];
+ char mManufacturer[256];
+ long mUsage;
+ long mUsagePage;
+};
+
+static void populate_device_info( io_object_t io_obj_p, CFDictionaryRef device_dic, HidDevice* devicep )
+{
+ CFMutableDictionaryRef io_properties = nil;
+ io_registry_entry_t entry1;
+ io_registry_entry_t entry2;
+ kern_return_t rc;
+
+ // Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also
+ // get dictionary for usb properties: step up two levels and get CF dictionary for USB properties
+ // try to get parent1
+ rc = IORegistryEntryGetParentEntry( io_obj_p, kIOServicePlane, &entry1 );
+ if ( KERN_SUCCESS == rc )
+ {
+ rc = IORegistryEntryGetParentEntry( entry1, kIOServicePlane, &entry2 );
+
+ IOObjectRelease( entry1 );
+
+ if ( KERN_SUCCESS == rc )
+ {
+ rc = IORegistryEntryCreateCFProperties( entry2, &io_properties, kCFAllocatorDefault, kNilOptions );
+ // either way, release parent2
+ IOObjectRelease( entry2 );
+ }
+ }
+ if ( KERN_SUCCESS == rc )
+ {
+ // IORegistryEntryCreateCFProperties() succeeded
+ if ( io_properties != nil )
+ {
+ CFTypeRef dict_element = 0;
+ // get device info
+ // try hid dictionary first, if fail then go to usb dictionary
+
+
+ dict_element = CFDictionaryGetValue( device_dic, CFSTR(kIOHIDProductKey) );
+ if ( !dict_element )
+ {
+ dict_element = CFDictionaryGetValue( io_properties, CFSTR( "USB Product Name" ) );
+ }
+ if ( dict_element )
+ {
+ bool res = CFStringGetCString((CFStringRef)dict_element, devicep->mProduct, 256, kCFStringEncodingUTF8);
+ sanitizeString(devicep->mProduct);
+ if ( !res )
+ {
+ LL_WARNS("Joystick") << "Failed to populate mProduct" << LL_ENDL;
+ }
+ }
+
+ dict_element = CFDictionaryGetValue( device_dic, CFSTR( kIOHIDManufacturerKey ) );
+ if ( !dict_element )
+ {
+ dict_element = CFDictionaryGetValue( io_properties, CFSTR( "USB Vendor Name" ) );
+ }
+ if ( dict_element )
+ {
+ bool res = CFStringGetCString( (CFStringRef)dict_element, devicep->mManufacturer, 256, kCFStringEncodingUTF8 );
+ sanitizeString(devicep->mManufacturer);
+ if ( !res )
+ {
+ LL_WARNS("Joystick") << "Failed to populate mManufacturer" << LL_ENDL;
+ }
+ }
+
+ dict_element = CFDictionaryGetValue( device_dic, CFSTR( kIOHIDLocationIDKey ) );
+ if ( !dict_element )
+ {
+ dict_element = CFDictionaryGetValue( io_properties, CFSTR( "locationID" ) );
+ }
+ if ( dict_element )
+ {
+ bool res = CFNumberGetValue( (CFNumberRef)dict_element, kCFNumberLongType, &devicep->mLocalID );
+ if ( !res )
+ {
+ LL_WARNS("Joystick") << "Failed to populate mLocalID" << LL_ENDL;
+ }
+ }
+
+ dict_element = CFDictionaryGetValue( device_dic, CFSTR( kIOHIDPrimaryUsagePageKey ) );
+ if ( dict_element )
+ {
+ bool res = CFNumberGetValue( (CFNumberRef)dict_element, kCFNumberLongType, &devicep->mUsagePage );
+ if ( !res )
+ {
+ LL_WARNS("Joystick") << "Failed to populate mUsagePage" << LL_ENDL;
+ }
+ dict_element = CFDictionaryGetValue( device_dic, CFSTR( kIOHIDPrimaryUsageKey ) );
+ if ( dict_element )
+ {
+ if ( !CFNumberGetValue( (CFNumberRef)dict_element, kCFNumberLongType, &devicep->mUsage ) )
+ {
+ LL_WARNS("Joystick") << "Failed to populate mUsage" << LL_ENDL;
+ }
+ }
+ }
+
+ //Add axis, because ndof lib checks sutability by axises as well as other elements
+ devicep->mAxis = 0;
+ CFTypeRef hid_elements = CFDictionaryGetValue( device_dic, CFSTR( kIOHIDElementKey ) );
+ if ( hid_elements && CFGetTypeID( hid_elements ) == CFArrayGetTypeID( ) )
+ {
+ long count = CFArrayGetCount( (CFArrayRef) hid_elements );
+ for (int i = 0; i < count; ++i)
+ {
+ CFTypeRef element = CFArrayGetValueAtIndex((CFArrayRef) hid_elements, i);
+ if (element && CFGetTypeID( element ) == CFDictionaryGetTypeID( ))
+ {
+ long type = 0, usage_page = 0, usage = 0;
+
+ CFTypeRef ref_value = CFDictionaryGetValue( (CFDictionaryRef) element, CFSTR( kIOHIDElementTypeKey ) );
+ if ( ref_value )
+ {
+ CFNumberGetValue( (CFNumberRef)ref_value, kCFNumberLongType, &type );
+ }
+
+ ref_value = CFDictionaryGetValue( (CFDictionaryRef) element, CFSTR( kIOHIDElementUsagePageKey ) );
+ if ( ref_value )
+ {
+ CFNumberGetValue( (CFNumberRef)ref_value, kCFNumberLongType, &usage_page );
+ }
+
+ ref_value = CFDictionaryGetValue( (CFDictionaryRef) element, CFSTR( kIOHIDElementUsageKey ) );
+ if ( ref_value )
+ {
+ CFNumberGetValue( (CFNumberRef)ref_value, kCFNumberLongType, &usage );
+ }
+ if ( type != 0
+ && type != kIOHIDElementTypeCollection
+ && usage_page == kHIDPage_GenericDesktop)
+ {
+ switch( usage )
+ {
+ case kHIDUsage_GD_X:
+ case kHIDUsage_GD_Y:
+ case kHIDUsage_GD_Z:
+ case kHIDUsage_GD_Rx:
+ case kHIDUsage_GD_Ry:
+ case kHIDUsage_GD_Rz:
+ devicep->mAxis++;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ CFRelease(io_properties);
+ }
+ else
+ {
+ LL_WARNS("Joystick") << "Failed to populate fields" << LL_ENDL;
+ }
+ }
+}
+
+HidDevice populate_device( io_object_t io_obj )
+{
+ void* interfacep = nullptr;
+ HidDevice device;
+ memset( &device, 0, sizeof( HidDevice ) );
+ CFMutableDictionaryRef device_dic = 0;
+ kern_return_t result = IORegistryEntryCreateCFProperties( io_obj, &device_dic, kCFAllocatorDefault, kNilOptions );
+
+ if ( KERN_SUCCESS == result
+ && device_dic )
+ {
+ IOReturn io_result = kIOReturnSuccess;
+ HRESULT query_result = S_OK;
+ SInt32 the_score = 0;
+ IOCFPlugInInterface **the_interface = NULL;
+
+
+ io_result = IOCreatePlugInInterfaceForService( io_obj, kIOHIDDeviceUserClientTypeID,
+ kIOCFPlugInInterfaceID, &the_interface, &the_score );
+ if ( io_result == kIOReturnSuccess )
+ {
+ query_result = ( *the_interface )->QueryInterface( the_interface, CFUUIDGetUUIDBytes( kIOHIDDeviceInterfaceID ), ( LPVOID * ) & ( interfacep ) );
+ if ( query_result != S_OK )
+ {
+ LL_WARNS("Joystick") << "QueryInterface failed" << LL_ENDL;
+ }
+ IODestroyPlugInInterface( the_interface );
+ }
+ else
+ {
+ LL_WARNS("Joystick") << "IOCreatePlugInInterfaceForService failed" << LL_ENDL;
+ }
+
+ if ( interfacep )
+ {
+ result = ( *( IOHIDDeviceInterface** )interfacep )->open( interfacep, 0 );
+
+ if ( result != kIOReturnSuccess)
+ {
+ LL_WARNS("Joystick") << "open failed" << LL_ENDL;
+ }
+ }
+ // extract needed fields
+ populate_device_info( io_obj, device_dic, &device );
+
+ // Release interface
+ if ( interfacep )
+ {
+ ( *( IOHIDDeviceInterface** ) interfacep )->close( interfacep );
+
+ ( *( IOHIDDeviceInterface** ) interfacep )->Release( interfacep );
+
+ interfacep = NULL;
+ }
+
+ CFRelease( device_dic );
+ }
+ else
+ {
+ LL_WARNS("Joystick") << "populate_device failed" << LL_ENDL;
+ }
+
+ return device;
+}
+
+static void get_devices(std::list<HidDevice> &list_of_devices,
+ io_iterator_t inIODeviceIterator)
+{
+ IOReturn result = kIOReturnSuccess; // assume success( optimist! )
+ io_object_t io_obj = 0;
+
+ while ( 0 != (io_obj = IOIteratorNext( inIODeviceIterator ) ) )
+ {
+ HidDevice device = populate_device( io_obj );
+
+ if (debugLoggingEnabled("Joystick"))
+ {
+ list_of_devices.push_back(device);
+ LL_DEBUGS("Joystick") << "Device axises: " << (S32)device.mAxis
+ << "Device HIDUsepage: " << (S32)device.mUsagePage
+ << "Device HIDUsage: " << (S32)device.mUsage
+ << LL_ENDL;
+ }
+ else
+ {
+ // Should match ndof
+ if (device.mAxis >= 3
+ || (device.mUsagePage == kHIDPage_GenericDesktop
+ && (device.mUsage == kHIDUsage_GD_MultiAxisController
+ || device.mUsage == kHIDUsage_GD_GamePad
+ || device.mUsage == kHIDUsage_GD_Joystick))
+ || (device.mUsagePage == kHIDPage_Game
+ && device.mUsage == kHIDUsage_Game_3DGameController)
+ || strstr(device.mManufacturer, "3Dconnexion"))
+ {
+ list_of_devices.push_back(device);
+ }
+ }
+
+
+ // release the device object, it is no longer needed
+ result = IOObjectRelease( io_obj );
+ if ( KERN_SUCCESS != result )
+ {
+ LL_WARNS("Joystick") << "IOObjectRelease failed" << LL_ENDL;
+ }
+ }
+}
+
+bool LLWindowMacOSX::getInputDevices(U32 device_type_filter,
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback,
+ void* win_callback,
+ void* userdata)
+{
+ bool return_value = false;
+ CFMutableDictionaryRef device_dict_ref;
+ IOReturn result = kIOReturnSuccess; // assume success( optimist! )
+
+ // Set up matching dictionary to search the I/O Registry for HID devices we are interested in. Dictionary reference is NULL if error.
+
+ // A dictionary to match devices to?
+ device_dict_ref = IOServiceMatching( kIOHIDDeviceKey );
+
+ // BUG FIX! one reference is consumed by IOServiceGetMatchingServices
+ CFRetain( device_dict_ref );
+ io_iterator_t io_iter = 0;
+
+ // create an IO object iterator
+ result = IOServiceGetMatchingServices( kIOMasterPortDefault, device_dict_ref, &io_iter );
+ if ( kIOReturnSuccess != result )
+ {
+ LL_WARNS("Joystick") << "IOServiceGetMatchingServices failed" << LL_ENDL;
+ }
+
+ if ( io_iter )
+ {
+ // add all existing devices
+ std::list<HidDevice> device_list;
+
+ get_devices(device_list, io_iter);
+
+ std::list<HidDevice>::iterator iter;
+
+ for (iter = device_list.begin(); iter != device_list.end(); ++iter)
+ {
+ std::string label(iter->mProduct);
+ LLSD data;
+ data["manufacturer"] = std::string(iter->mManufacturer);
+ data["product"] = label;
+
+ if (osx_callback(label, data, userdata))
+ {
+ break; //found device
+ }
+ }
+ return_value = true;
+ }
+
+ CFRelease( device_dict_ref );
+ return return_value;
+}
+
LLSD LLWindowMacOSX::getNativeKeyData()
{
LLSD result = LLSD::emptyMap();
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 851c860017..19136aa3de 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -112,6 +112,11 @@ public:
void interruptLanguageTextInput() override;
void spawnWebBrowser(const std::string& escaped_url, bool async) override;
F32 getSystemUISize() override;
+
+ bool getInputDevices(U32 device_type_filter,
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback,
+ void* win_callback,
+ void* userdata) override;
static std::vector<std::string> getDisplaysResolutionList();
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 2e560ddb0a..694f010ef3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -4495,7 +4495,10 @@ void* LLWindowWin32::getDirectInput8()
return &gDirectInput8;
}
-bool LLWindowWin32::getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata)
+bool LLWindowWin32::getInputDevices(U32 device_type_filter,
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback,
+ void * di8_devices_callback,
+ void* userdata)
{
if (gDirectInput8 != NULL)
{
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index b391acc12d..b0d5c557b8 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -129,7 +129,10 @@ public:
static void setDPIAwareness();
/*virtual*/ void* getDirectInput8();
- /*virtual*/ bool getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata);
+ /*virtual*/ bool getInputDevices(U32 device_type_filter,
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback,
+ void* win_callback,
+ void* userdata);
U32 getRawWParam() { return mRawWParam; }
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 2960ecf829..27e17ec4bb 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -1497,8 +1497,6 @@ DECL_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
LLSD test_llsd = LLSD()["testing1"] = LLSD()["testing2"];
DECL_LLCC(LLSD, test_llsd);
-static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hahahahahha", "Not the real comment");
-
void test_cached_control()
{
#define TEST_LLCC(T, V) if((T)mySetting_##T != V) LL_ERRS() << "Fail "#T << LL_ENDL
@@ -1515,8 +1513,6 @@ void test_cached_control()
TEST_LLCC(LLColor3, LLColor3(1.0f, 0.f, 0.5f));
TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
//There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd);
-
- if((std::string)test_BrowserHomePage != "http://www.secondlife.com") LL_ERRS() << "Fail BrowserHomePage" << LL_ENDL;
}
#endif // TEST_CACHED_CONTROL
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 455df13e48..43d4adbc26 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -837,7 +837,7 @@ bool LLXMLNode::getLayeredXMLNode(LLXMLNodePtr& root,
if (!LLXMLNode::parseFile(filename, root, NULL))
{
- LL_WARNS() << "Problem reading UI description file: " << filename << LL_ENDL;
+ LL_WARNS() << "Problem reading UI description file: " << filename << " " << errno << LL_ENDL;
return false;
}
diff --git a/indra/newview/app_settings/camera/Front.xml b/indra/newview/app_settings/camera/Front.xml
index 39f44e11a8..f96d3bc779 100644
--- a/indra/newview/app_settings/camera/Front.xml
+++ b/indra/newview/app_settings/camera/Front.xml
@@ -1,16 +1,5 @@
<llsd>
<map>
- <key>AppearanceCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering appearance editing mode, camera zooms in on currently selected portion of avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AvatarSitRotation</key>
<map>
<key>Comment</key>
@@ -90,17 +79,6 @@
<key>Value</key>
<real>0.90322577953338623</real>
</map>
- <key>EditCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering build mode, camera moves up above avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FocusOffsetRearView</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml
index 8dc36353ce..7eda566e48 100644
--- a/indra/newview/app_settings/camera/Rear.xml
+++ b/indra/newview/app_settings/camera/Rear.xml
@@ -1,16 +1,5 @@
<llsd>
<map>
- <key>AppearanceCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering appearance editing mode, camera zooms in on currently selected portion of avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AvatarSitRotation</key>
<map>
<key>Comment</key>
@@ -90,17 +79,6 @@
<key>Value</key>
<real>0.90322577953338623</real>
</map>
- <key>EditCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering build mode, camera moves up above avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FocusOffsetRearView</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/camera/Side.xml b/indra/newview/app_settings/camera/Side.xml
index 089ab93a8f..77f73f1df1 100644
--- a/indra/newview/app_settings/camera/Side.xml
+++ b/indra/newview/app_settings/camera/Side.xml
@@ -1,16 +1,5 @@
<llsd>
<map>
- <key>AppearanceCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering appearance editing mode, camera zooms in on currently selected portion of avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AvatarSitRotation</key>
<map>
<key>Comment</key>
@@ -90,17 +79,6 @@
<key>Value</key>
<real>0.90322577953338623</real>
</map>
- <key>EditCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>When entering build mode, camera moves up above avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FocusOffsetRearView</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 28d84aba21..3e17c434a3 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -137,17 +137,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>AdvanceOutfitSnapshot</key>
- <map>
- <key>Comment</key>
- <string>Display advanced parameter settings in outfit snaphot interface</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AgentPause</key>
<map>
<key>Comment</key>
@@ -214,17 +203,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>AnimationDebug</key>
- <map>
- <key>Comment</key>
- <string>Show active animations in a bubble above avatars head</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>AppearanceCameraMovement</key>
<map>
<key>Comment</key>
@@ -269,17 +247,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AskedAboutCrashReports</key>
- <map>
- <key>Comment</key>
- <string>Turns off dialog asking if you want to enable crash reporting</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>AuctionShowFence</key>
<map>
<key>Comment</key>
@@ -302,17 +269,6 @@
<key>Value</key>
<real>0.5</real>
</map>
- <key>AudioLevelDoppler</key>
- <map>
- <key>Comment</key>
- <string>Scale of doppler effect on moving audio sources (1.0 = normal, &lt;1.0 = diminished doppler effect, &gt;1.0 = enhanced doppler effect)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
<key>AudioLevelMaster</key>
<map>
<key>Comment</key>
@@ -357,28 +313,6 @@
<key>Value</key>
<real>0.3</real>
</map>
- <key>AudioLevelRolloff</key>
- <map>
- <key>Comment</key>
- <string>Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
- <key>AudioLevelUnderwaterRolloff</key>
- <map>
- <key>Comment</key>
- <string>Controls the distance-based dropoff of audio volume underwater(fraction or multiple of default audio rolloff)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>5.0</real>
- </map>
<key>AudioLevelSFX</key>
<map>
<key>Comment</key>
@@ -412,17 +346,6 @@
<key>Value</key>
<real>0.5</real>
</map>
- <key>AudioLevelWind</key>
- <map>
- <key>Comment</key>
- <string>Audio level of wind noise when standing still</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.5</real>
- </map>
<key>AudioStreamingMedia</key>
<map>
<key>Comment</key>
@@ -456,7 +379,7 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AutoAcceptNewInventory</key>
+ <key>AutoAcceptNewInventory</key>
<map>
<key>Comment</key>
<string>Automatically accept new notecards/textures/landmarks</string>
@@ -478,17 +401,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>AutoLoadWebProfiles</key>
- <map>
- <key>Comment</key>
- <string>Automatically load ALL profile webpages without asking first.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>AutoLogin</key>
<map>
<key>Comment</key>
@@ -676,17 +588,6 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>AvatarBacklight</key>
- <map>
- <key>Comment</key>
- <string>Add rim lighting to avatar rendering to approximate shininess of skin</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AvatarFeathering</key>
<map>
<key>Comment</key>
@@ -698,32 +599,6 @@
<key>Value</key>
<real>16.0</real>
</map>
- <key>AvatarPickerSortOrder</key>
- <map>
- <key>Comment</key>
- <string>Specifies sort key for textures in avatar picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
- <key>AvatarPosFinalOffset</key>
- <map>
- <key>Comment</key>
- <string>After-everything-else fixup for avatar position.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- </map>
<key>AvatarPickerURL</key>
<map>
<key>Comment</key>
@@ -735,50 +610,6 @@
<key>Value</key>
<string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
</map>
- <key>AvatarRotateThresholdSlow</key>
- <map>
- <key>Comment</key>
- <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving slowly (degrees)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <integer>60</integer>
- </map>
- <key>AvatarRotateThresholdFast</key>
- <map>
- <key>Comment</key>
- <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving fast (degrees)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
- <key>AvatarBakedTextureUploadTimeout</key>
- <map>
- <key>Comment</key>
- <string>Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance. Set to 0 to disable and wait until all baked textures are at highest resolution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>60</integer>
- </map>
- <key>AvatarBakedLocalTextureUpdateTimeout</key>
- <map>
- <key>Comment</key>
- <string>Specifes the maximum time in seconds to wait before updating your appearance during appearance mode.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>10</integer>
- </map>
<key>AvatarPhysics</key>
<map>
<key>Comment</key>
@@ -812,28 +643,6 @@
<key>Value</key>
<integer>40</integer>
</map>
- <key>BottomPanelNew</key>
- <map>
- <key>Comment</key>
- <string>Enable the new bottom panel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>BrowserHomePage</key>
- <map>
- <key>Comment</key>
- <string>[NOT USED]</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>http://www.secondlife.com</string>
- </map>
<key>BrowserIgnoreSSLCertErrors</key>
<map>
<key>Comment</key>
@@ -867,17 +676,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>BlockSomeAvatarAppearanceVisualParams</key>
- <map>
- <key>Comment</key>
- <string>Drop around 50% of VisualParam occurances in appearance messages (for simulating Ruth)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>BrowserProxyAddress</key>
<map>
<key>Comment</key>
@@ -900,17 +698,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>BrowserProxyExclusions</key>
- <map>
- <key>Comment</key>
- <string>[NOT USED]</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
<key>BrowserProxyPort</key>
<map>
<key>Comment</key>
@@ -922,17 +709,6 @@
<key>Value</key>
<integer>3128</integer>
</map>
- <key>BrowserProxySocks45</key>
- <map>
- <key>Comment</key>
- <string>[NOT USED]</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>5</integer>
- </map>
<key>Socks5ProxyEnabled</key>
<map>
<key>Comment</key>
@@ -1307,39 +1083,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ButtonHPad</key>
- <map>
- <key>Comment</key>
- <string>Default horizontal spacing between buttons (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>4</integer>
- </map>
- <key>ButtonHeight</key>
- <map>
- <key>Comment</key>
- <string>Default height for normal buttons (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>23</integer>
- </map>
- <key>ButtonHeightSmall</key>
- <map>
- <key>Comment</key>
- <string>Default height for small buttons (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>23</integer>
- </map>
<key>EnableDiskCacheDebugInfo</key>
<map>
<key>Comment</key>
@@ -1395,17 +1138,6 @@
<key>Value</key>
<string />
</map>
- <key>CacheNumberOfRegionsForObjects</key>
- <map>
- <key>Comment</key>
- <string>Controls number of regions to be cached for objects.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>128</integer>
- </map>
<key>CacheSize</key>
<map>
<key>Comment</key>
@@ -1491,51 +1223,6 @@
<real>0.75</real>
</array>
</map>
- <key>CameraOffsetFrontView</key>
- <map>
- <key>Comment</key>
- <string>Initial camera offset from avatar in Front View</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>2.2</real>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- </map>
- <key>CameraOffsetGroupView</key>
- <map>
- <key>Comment</key>
- <string>Initial camera offset from avatar in Group View</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>-1.0</real>
- <real>0.7</real>
- <real>0.5</real>
- </array>
- </map>
- <key>CameraOffsetCustomPreset</key>
- <map>
- <key>Comment</key>
- <string>Initial camera offset from avatar for the custom camera preset</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>-3.0</real>
- <real>0.0</real>
- <real>0.75</real>
- </array>
- </map>
<key>CameraOffsetScale</key>
<map>
<key>Comment</key>
@@ -1690,17 +1377,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatBarStealsFocus</key>
- <map>
- <key>Comment</key>
- <string>Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>LetterKeysFocusChatBar</key>
<map>
<key>Comment</key>
@@ -1745,17 +1421,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatHistoryTornOff</key>
- <map>
- <key>Comment</key>
- <string>Show chat history window separately from Communicate window.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ChatLoadGroupMaxMembers</key>
<map>
<key>Comment</key>
@@ -1767,17 +1432,6 @@
<key>Value</key>
<integer>100</integer>
</map>
- <key>ChatLoadGroupTimeout</key>
- <map>
- <key>Comment</key>
- <string>Time we give the server to send group participants before we hit the server for group info (seconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>10.0</real>
- </map>
<key>ChatOnlineNotification</key>
<map>
<key>Comment</key>
@@ -1789,28 +1443,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatPersistTime</key>
- <map>
- <key>Comment</key>
- <string>Time for which chat stays visible in console (seconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>20.0</real>
- </map>
- <key>ChatShowTimestamps</key>
- <map>
- <key>Comment</key>
- <string>Show timestamps in chat</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>CheesyBeacon</key>
<map>
<key>Comment</key>
@@ -1833,50 +1465,6 @@
<key>Value</key>
<string />
</map>
- <key>ContextConeInAlpha</key>
- <map>
- <key>Comment</key>
- <string>Cone In Alpha</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.0</real>
- </map>
- <key>ContextConeOutAlpha</key>
- <map>
- <key>Comment</key>
- <string>Cone Out Alpha</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
- <key>ContextConeFadeTime</key>
- <map>
- <key>Comment</key>
- <string>Cone Fade Time</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>.08</real>
- </map>
- <key>ConversationHistoryPageSize</key>
- <map>
- <key>Comment</key>
- <string>Chat history of conversation opened from call log is displayed by pages. So this is number of entries per page.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>100</integer>
- </map>
<key>ConversationSortOrder</key>
<map>
<key>Comment</key>
@@ -2055,17 +1643,6 @@
<key>Value</key>
<integer>40</integer>
</map>
- <key>ContactsTornOff</key>
- <map>
- <key>Comment</key>
- <string>Show contacts window separately from Communicate window.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>CookiesEnabled</key>
<map>
<key>Comment</key>
@@ -2110,17 +1687,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatBarCustomWidth</key>
- <map>
- <key>Comment</key>
- <string>Stores customized width of chat bar.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>CoroutineStackSize</key>
<map>
<key>Comment</key>
@@ -2187,17 +1753,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>CurlMaximumNumberOfHandles</key>
- <map>
- <key>Comment</key>
- <string>Maximum number of handles curl can use (requires restart)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>256</integer>
- </map>
<key>CurlRequestTimeOut</key>
<map>
<key>Comment</key>
@@ -2209,17 +1764,6 @@
<key>Value</key>
<real>120.0</real>
</map>
- <key>CurlUseMultipleThreads</key>
- <map>
- <key>Comment</key>
- <string>Use background threads for executing curl_multi_perform (requires restart)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>Cursor3D</key>
<map>
<key>Comment</key>
@@ -2242,17 +1786,6 @@
<key>Value</key>
<string></string>
</map>
- <key>CustomServer</key>
- <map>
- <key>Comment</key>
- <string>Specifies IP address or hostname of grid to which you connect</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
<key>DebugAnimatedObjects</key>
<map>
<key>Comment</key>
@@ -2275,17 +1808,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AnimatedObjectsIgnoreLimits</key>
- <map>
- <key>Comment</key>
- <string>Ignore server-enforced limits on animated objects. This is only useful for server testing.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>AnimatedObjectsAllowLeftClick</key>
<map>
<key>Comment</key>
@@ -2297,17 +1819,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AnimatedObjectsGlobalScale</key>
- <map>
- <key>Comment</key>
- <string>Temporary testing: allow an extra scale factor to be forced on animated objects.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.00</real>
- </map>
<key>AnimatedObjectsMaxLegalOffset</key>
<map>
<key>Comment</key>
@@ -2330,17 +1841,6 @@
<key>Value</key>
<real>64.0</real>
</map>
- <key>AvatarBoundingBoxComplexity</key>
- <map>
- <key>Comment</key>
- <string>How many aspects to consider for avatar bounding box</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>3</integer>
- </map>
<key>DebugAvatarAppearanceMessage</key>
<map>
<key>Comment</key>
@@ -2451,17 +1951,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>DebugInventoryFilters</key>
- <map>
- <key>Comment</key>
- <string>Turn on debugging display for inventory filtering</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>DebugPermissions</key>
<map>
<key>Comment</key>
@@ -2528,18 +2017,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>DebugShowPrivateMem</key>
- <!-- deprecated (see MAINT-8091) -->
- <map>
- <key>Comment</key>
- <string>(Deprecated) Show Private Mem Info</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>DebugShowRenderInfo</key>
<map>
<key>Comment</key>
@@ -2606,435 +2083,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>DebugSlshareLogTag</key>
- <map>
- <key>Comment</key>
- <string>Request slshare-service debug logging</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string/>
- </map>
- <key>DebugStatModeFPS</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeBandwidth</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModePacketLoss</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatMode</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeKTrisDrawnFr</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeKTrisDrawnSec</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeTotalObjs</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeNewObjs</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeTextureCount</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeRawCount</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeGLMem</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeFormattedMem</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeRawMem</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeBoundMem</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModePacketsIn</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModePacketsOut</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeObjects</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeTexture</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeAsset</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeLayers</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeActualIn</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeActualOut</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeTimeDialation</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimFPS</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModePhysicsFPS</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModePinnedObjects</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeLowLODObjects</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeMemoryAllocated</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeAgentUpdatesSec</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeMainAgents</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeChildAgents</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimObjects</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimActiveObjects</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimActiveScripts</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimScriptEvents</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimInPPS</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimOutPPS</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
- <key>DebugStatModeSimPendingDownloads</key>
- <map>
- <key>Comment</key>
- <string>Mode of stat in Statistics floater</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
<key>SimPendingUploads</key>
<map>
<key>Comment</key>
@@ -3222,17 +2270,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>DefaultBlankNormalTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Blank' in texture picker for normal maps. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>5b53359e-59dd-d8a2-04c3-9e65134da47a</string>
- </map>
<key>DefaultFemaleAvatar</key>
<map>
<key>Comment</key>
@@ -3266,28 +2303,6 @@
<key>Value</key>
<string>Male Shape &amp; Outfit</string>
</map>
- <key>DefaultObjectNormalTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Default' in texture picker for normal map. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>85f28839-7a1c-b4e3-d71d-967792970a7b</string>
- </map>
- <key>DefaultObjectSpecularTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Default' in texture picker for specular map. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>87e0e8f7-8729-1ea8-cfc9-8915773009db</string>
- </map>
<key>DefaultObjectTexture</key>
<map>
<key>Comment</key>
@@ -3299,17 +2314,6 @@
<key>Value</key>
<string>89556747-24cb-43ed-920b-47caed15465f</string>
</map>
- <key>DefaultUploadCost</key>
- <map>
- <key>Comment</key>
- <string>Default sound/image/file upload cost(in case economy data is not available).</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>10</integer>
- </map>
<key>DestinationGuideURL</key>
<map>
<key>Comment</key>
@@ -3409,94 +2413,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnableIMChatPopups</key>
- <map>
- <key>Comment</key>
- <string>Enable Incoming IM Chat Popups</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayAvatarAgentTarget</key>
- <map>
- <key>Comment</key>
- <string>Show avatar positioning locators (animation debug)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>DisplayChat</key>
- <map>
- <key>Comment</key>
- <string>Display Latest Chat message on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayDebug</key>
- <map>
- <key>Comment</key>
- <string>Display Network Information on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayDebugConsole</key>
- <map>
- <key>Comment</key>
- <string>Display Console Debug Information on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayIM</key>
- <map>
- <key>Comment</key>
- <string>Display Latest IM message on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayLinden</key>
- <map>
- <key>Comment</key>
- <string>Display Account Information on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>DisplayRegion</key>
- <map>
- <key>Comment</key>
- <string>Display Location information on LCD</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>DisplayTimecode</key>
<map>
<key>Comment</key>
@@ -3530,28 +2446,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ClickActionBuyEnabled</key>
- <map>
- <key>Comment</key>
- <string>Enable click to buy actions in tool pie menu</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ClickActionPayEnabled</key>
- <map>
- <key>Comment</key>
- <string>Enable click to pay actions in tool pie menu</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>DoubleClickAutoPilot</key>
<map>
<key>Comment</key>
@@ -3585,72 +2479,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>DragAndDropToolTipDelay</key>
- <map>
- <key>Comment</key>
- <string>Seconds before displaying tooltip when performing drag and drop operation</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.10000000149</real>
- </map>
- <key>DragAndDropDistanceThreshold</key>
- <map>
- <key>Comment</key>
- <string>Number of pixels that mouse should move before triggering drag and drop mode</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>3</integer>
- </map>
- <key>DropShadowButton</key>
- <map>
- <key>Comment</key>
- <string>Drop shadow width for buttons (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
- <key>DropShadowFloater</key>
- <map>
- <key>Comment</key>
- <string>Drop shadow width for floaters (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>5</integer>
- </map>
- <key>DropShadowSlider</key>
- <map>
- <key>Comment</key>
- <string>Drop shadow width for sliders (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>3</integer>
- </map>
- <key>DropShadowTooltip</key>
- <map>
- <key>Comment</key>
- <string>Drop shadow width for tooltips (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>4</integer>
- </map>
<key>DynamicCameraStrength</key>
<map>
<key>Comment</key>
@@ -3684,17 +2512,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>IncludeEnhancedSkeleton</key>
- <map>
- <key>Comment</key>
- <string>Include extended skeleton joints when rendering skinned meshes.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>MinObjectsForUnlinkConfirm</key>
<map>
<key>Comment</key>
@@ -3794,39 +2611,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnergyFromTop</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>20</integer>
- </map>
- <key>EnergyHeight</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>40</integer>
- </map>
- <key>EnergyWidth</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>175</integer>
- </map>
<key>EventURL</key>
<map>
<key>Comment</key>
@@ -3838,61 +2622,6 @@
<key>Value</key>
<string>http://events.[GRID]/viewer/embed/event/[EVENT_ID]</string>
</map>
- <key>FastCacheFetchEnabled</key>
- <map>
- <key>Comment</key>
- <string>Enable texture fast cache fetching if set</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <string>1</string>
- </map>
- <key>FeatureManagerHTTPTable</key>
- <map>
- <key>Comment</key>
- <string>Deprecated</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string></string>
- </map>
- <key>FPSLogFrequency</key>
- <map>
- <key>Comment</key>
- <string>Seconds between display of FPS in log (0 for never)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>10.0</real>
- </map>
- <key>FilterItemsMaxTimePerFrameVisible</key>
- <map>
- <key>Comment</key>
- <string>Max time devoted to items filtering per frame for visible inventory listings (in milliseconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>10</integer>
- </map>
- <key>FilterItemsMaxTimePerFrameUnvisible</key>
- <map>
- <key>Comment</key>
- <string>Max time devoted to items filtering per frame for non visible inventory listings (in milliseconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>MainWorkTime</key>
<map>
<key>Comment</key>
@@ -3904,72 +2633,6 @@
<key>Value</key>
<real>0.1</real>
</map>
- <key>QueueInventoryFetchTimeout</key>
- <map>
- <key>Comment</key>
- <string>Max time llcompilequeue will wait for inventory fetch to complete (in seconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>300.0</real>
- </map>
- <key>FindLandArea</key>
- <map>
- <key>Comment</key>
- <string>Enables filtering of land search results by area</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>FindLandPrice</key>
- <map>
- <key>Comment</key>
- <string>Enables filtering of land search results by price</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>FindLandType</key>
- <map>
- <key>Comment</key>
- <string>Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale")</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>All</string>
- </map>
- <key>FindPeopleOnline</key>
- <map>
- <key>Comment</key>
- <string>Limits people search to only users who are logged on</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>FindPlacesPictures</key>
- <map>
- <key>Comment</key>
- <string>Display only results of find places that have pictures</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>FirstName</key>
<map>
<key>Comment</key>
@@ -4361,17 +3024,6 @@
<key>Value</key>
<real>16.0</real>
</map>
- <key>FlycamZoomDirect</key>
- <map>
- <key>Comment</key>
- <string>Map flycam zoom axis directly to camera zoom.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FlyingAtExit</key>
<map>
<key>Comment</key>
@@ -4398,51 +3050,6 @@
<real>1.0</real>
</array>
</map>
- <key>FocusOffsetFrontView</key>
- <map>
- <key>Comment</key>
- <string>Initial focus point offset relative to avatar for the camera preset Front View</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3D</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- </map>
- <key>FocusOffsetGroupView</key>
- <map>
- <key>Comment</key>
- <string>Initial focus point offset relative to avatar for the camera preset Group View</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3D</string>
- <key>Value</key>
- <array>
- <real>1.5</real>
- <real>0.7</real>
- <real>1.0</real>
- </array>
- </map>
- <key>FocusOffsetCustomPreset</key>
- <map>
- <key>Comment</key>
- <string>Initial focus point offset relative to avatar for the custom camera preset (x-axis is forward)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3D</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
<key>AvatarSitRotation</key>
<map>
<key>Comment</key>
@@ -4485,17 +3092,6 @@
<key>Value</key>
<real>0.75</real>
</map>
- <key>FolderLoadingMessageWaitTime</key>
- <map>
- <key>Comment</key>
- <string>Seconds to wait before showing the LOADING... text in folder views</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.5</real>
- </map>
<key>FontScreenDPI</key>
<map>
<key>Comment</key>
@@ -4551,17 +3147,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ForceMandatoryUpdate</key>
- <map>
- <key>Comment</key>
- <string>For QA: On next startup, forces the auto-updater to run</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FreezeTime</key>
<map>
<key>Comment</key>
@@ -4683,28 +3268,6 @@
<key>Value</key>
<integer>32</integer>
</map>
- <key>GroupNotifyBoxHeight</key>
- <map>
- <key>Comment</key>
- <string>Height of group notice messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>260</integer>
- </map>
- <key>GroupNotifyBoxWidth</key>
- <map>
- <key>Comment</key>
- <string>Width of group notice messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>305</integer>
- </map>
<key>HelpURLFormat</key>
<map>
<key>Comment</key>
@@ -4793,17 +3356,6 @@
<key>Value</key>
<string />
</map>
- <key>HtmlHelpLastPage</key>
- <map>
- <key>Comment</key>
- <string>Last URL visited via help system</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
<key>HttpPipelining</key>
<map>
<key>Comment</key>
@@ -4826,17 +3378,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>IMShowTimestamps</key>
- <map>
- <key>Comment</key>
- <string>Show timestamps in IM</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>IMShowControlPanel</key>
<map>
<key>Comment</key>
@@ -4848,17 +3389,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>IMShowContentPanel</key>
- <map>
- <key>Comment</key>
- <string>Show Toolbar and Body Panels</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>IgnoreFOVZoomForLODs</key>
<map>
<key>Comment</key>
@@ -4925,28 +3455,6 @@
<key>Value</key>
<real>0.0</real>
</map>
- <key>InspectorFadeTime</key>
- <map>
- <key>Comment</key>
- <string>Fade out timing for inspectors</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.5</real>
- </map>
- <key>InspectorShowTime</key>
- <map>
- <key>Comment</key>
- <string>Stay timing for inspectors</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>3.0</real>
- </map>
<key>InstallLanguage</key>
<map>
<key>Comment</key>
@@ -5013,17 +3521,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>InventoryOutboxDisplayBoth</key>
- <map>
- <key>Comment</key>
- <string>(Deprecated) Show the legacy Merchant Outbox UI as well as the Marketplace Listings UI</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>InventoryOutboxLogging</key>
<map>
<key>Comment</key>
@@ -5273,7 +3770,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>String</string>
+ <string>LLSD</string>
<key>Value</key>
<string />
</map>
@@ -5354,17 +3851,6 @@
<key>Value</key>
<real>2.0</real>
</map>
- <key>LCDDestination</key>
- <map>
- <key>Comment</key>
- <string>Which LCD to use</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>LeapCommand</key>
<map>
<key>Comment</key>
@@ -5575,105 +4061,6 @@
<string>0.0.0</string>
</map>
- <key>LastSnapshotToProfileHeight</key>
- <map>
- <key>Comment</key>
- <string>The height of the last profile snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>768</integer>
- </map>
- <key>LastSnapshotToEmailHeight</key>
- <map>
- <key>Comment</key>
- <string>The height of the last email snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>768</integer>
- </map>
- <key>LastSnapshotToProfileWidth</key>
- <map>
- <key>Comment</key>
- <string>The width of the last profile snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1024</integer>
- </map>
- <key>LastSnapshotToEmailWidth</key>
- <map>
- <key>Comment</key>
- <string>The width of the last email snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1024</integer>
- </map>
- <key>LastSnapshotToDiskHeight</key>
- <map>
- <key>Comment</key>
- <string>The height of the last disk snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>768</integer>
- </map>
- <key>LastSnapshotToDiskWidth</key>
- <map>
- <key>Comment</key>
- <string>The width of the last disk snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1024</integer>
- </map>
- <key>LastSnapshotToInventoryHeight</key>
- <map>
- <key>Comment</key>
- <string>The height of the last texture snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>512</integer>
- </map>
- <key>LastSnapshotToInventoryWidth</key>
- <map>
- <key>Comment</key>
- <string>The width of the last texture snapshot, in px</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>512</integer>
- </map>
- <key>LeftClickShowMenu</key>
- <map>
- <key>Comment</key>
- <string>Unused obsolete setting</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>LimitDragDistance</key>
<map>
<key>Comment</key>
@@ -5840,17 +4227,6 @@
<key>Value</key>
<real>40.0</real>
</map>
- <key>LoginSRVPump</key>
- <map>
- <key>Comment</key>
- <string>(Deprecated) Name of the message pump that handles SRV request)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>LLAres</string>
- </map>
<key>LogMessages</key>
<map>
<key>Comment</key>
@@ -5939,17 +4315,6 @@
<key>Value</key>
<real>60.0</real>
</map>
- <key>MapOverlayIndex</key>
- <map>
- <key>Comment</key>
- <string>Currently selected world map type</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>MapScale</key>
<map>
<key>Comment</key>
@@ -6689,28 +5054,6 @@
<key>Value</key>
<real>0.25</real>
</map>
- <key>MenuBarHeight</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>18</integer>
- </map>
- <key>MenuBarWidth</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>410</integer>
- </map>
<key>MePanelOpened</key>
<map>
<key>Comment</key>
@@ -7165,28 +5508,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>NotifyBoxHeight</key>
- <map>
- <key>Comment</key>
- <string>Height of notification messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>200</integer>
- </map>
- <key>NotifyBoxWidth</key>
- <map>
- <key>Comment</key>
- <string>Width of notification messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>305</integer>
- </map>
<key>NotificationConferenceIMOptions</key>
<map>
<key>Comment</key>
@@ -7364,17 +5685,6 @@
<key>Value</key>
<integer>90</integer>
</map>
- <key>ChannelBottomPanelMargin</key>
- <map>
- <key>Comment</key>
- <string>Space from a lower toast to the Bottom Tray</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>35</integer>
- </map>
<key>NotificationChannelRightMargin</key>
<map>
<key>Comment</key>
@@ -8053,17 +6363,6 @@
<key>Value</key>
<real>6.0</real>
</map>
- <key>ClothingLoadingDelay</key>
- <map>
- <key>Comment</key>
- <string>Time to wait for avatar appearance to resolve before showing world (seconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>10.0</real>
- </map>
<key>PreferredMaturity</key>
<map>
<key>Comment</key>
@@ -8506,17 +6805,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RadioLandBrushSize</key>
- <map>
- <key>Comment</key>
- <string>Size of land modification brush (0 = small, 1 = medium, 2 = large)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>LandBrushForce</key>
<map>
<key>Comment</key>
@@ -8528,17 +6816,6 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>MediaBrowserWindowLimit</key>
- <map>
- <key>Comment</key>
- <string>Maximum number of media brower windows that can be open at once in the media browser floater (0 for no limit)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>5</integer>
- </map>
<key>WebContentWindowLimit</key>
<map>
<key>Comment</key>
@@ -8817,17 +7094,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RenderAvatar</key>
- <map>
- <key>Comment</key>
- <string>Render Avatars</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>RenderAvatarCloth</key>
<map>
<key>Comment</key>
@@ -11203,17 +9469,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>SecondLifeEnterprise</key>
- <map>
- <key>Comment</key>
- <string>Enables Second Life Enterprise features</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SelectMovableOnly</key>
<map>
<key>Comment</key>
@@ -11467,17 +9722,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowEmptyFoldersWhenSearching</key>
- <map>
- <key>Comment</key>
- <string>Shows folders that do not have any visible contents when applying a filter to inventory</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowEventRecorderMenuItems</key>
<map>
<key>Comment</key>
@@ -11819,136 +10063,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ShowPGSearchAll</key>
- <map>
- <key>Comment</key>
- <string>Display results of search All that are flagged as general</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowMatureSearchAll</key>
- <map>
- <key>Comment</key>
- <string>Display results of search All that are flagged as moderate</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowAdultSearchAll</key>
- <map>
- <key>Comment</key>
- <string>Display results of search All that are flagged as adult</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowPGGroups</key>
- <map>
- <key>Comment</key>
- <string>Display results of find groups that are flagged as general</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowMatureGroups</key>
- <map>
- <key>Comment</key>
- <string>Display results of find groups that are flagged as moderate</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowAdultGroups</key>
- <map>
- <key>Comment</key>
- <string>Display results of find groups that are flagged as adult</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowPGClassifieds</key>
- <map>
- <key>Comment</key>
- <string>Display results of find classifieds that are flagged as general</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowMatureClassifieds</key>
- <map>
- <key>Comment</key>
- <string>Display results of find classifieds that are flagged as moderate</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowAdultClassifieds</key>
- <map>
- <key>Comment</key>
- <string>Display results of find classifieds that are flagged as adult</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowPGEvents</key>
- <map>
- <key>Comment</key>
- <string>Display results of find events that are flagged as general</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>HideFromEditor</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ShowMatureEvents</key>
<map>
<key>Comment</key>
@@ -12185,17 +10299,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowToolBar</key>
- <map>
- <key>Comment</key>
- <string>Show toolbar at bottom of screen</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ShowTutorial</key>
<map>
<key>Comment</key>
@@ -12791,28 +10894,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>TexturePickerShowFolders</key>
- <map>
- <key>Comment</key>
- <string>Show folders with no texures in texture picker</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>TexturePickerSortOrder</key>
- <map>
- <key>Comment</key>
- <string>Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
<key>TextureReverseByteRange</key>
<map>
<key>Comment</key>
@@ -12860,17 +10941,6 @@
<key>Value</key>
<real>3000.0</real>
</map>
- <key>UpdaterMaximumBandwidth</key>
- <map>
- <key>Comment</key>
- <string>Obsolete: this parameter is no longer used.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>500.0</real>
- </map>
<key>ToolTipDelay</key>
<map>
<key>Comment</key>
@@ -13003,17 +11073,6 @@
<key>Value</key>
<string></string>
</map>
- <key>BingTranslateAPIKey</key>
- <map>
- <key>Comment</key>
- <string>(Deprecated) Bing AppID to use with the Microsoft Translator API</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string></string>
- </map>
<key>AzureTranslateAPIKey</key>
<map>
<key>Comment</key>
@@ -13080,28 +11139,6 @@
<key>Value</key>
<integer>6</integer>
</map>
- <key>UICheckboxctrlBtnSize</key>
- <map>
- <key>Comment</key>
- <string>UI Checkbox Control Button Size</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>13</integer>
- </map>
- <key>UICheckboxctrlHeight</key>
- <map>
- <key>Comment</key>
- <string>UI Checkbox Control Height</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>16</integer>
- </map>
<key>UICheckboxctrlHPad</key>
<map>
<key>Comment</key>
@@ -13333,61 +11370,6 @@
<key>Value</key>
<string>5748decc-f629-461c-9a36-a35a221fe21f</string>
</map>
- <key>StartUpChannelUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>B56AF90D-6684-48E4-B1E4-722D3DEB2CB6</string>
- </map>
- <key>NearByChatChannelUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>E1158BD6-661C-4981-9DAD-4DCBFF062502</string>
- </map>
- <key>NotificationChannelUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>AEED3193-8709-4693-8558-7452CCA97AE5</string>
- </map>
- <key>AlertChannelUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>F3E07BC8-A973-476D-8C7F-F3B7293975D1</string>
- </map>
- <key>UIImgWhiteUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
- </map>
<key>UILineEditorCursorThickness</key>
<map>
<key>Comment</key>
@@ -13564,17 +11546,6 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>LastSystemUIScaleFactor</key>
- <map>
- <key>Comment</key>
- <string>OBSOLETE: System UI scale factor is now automatically and independently from UIScaleFactor applied</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
<key>UIScrollbarSize</key>
<map>
<key>Comment</key>
@@ -13894,17 +11865,6 @@
<key>Value</key>
<integer>16</integer>
</map>
- <key>UISpinctrlDefaultLabelWidth</key>
- <map>
- <key>Comment</key>
- <string>UI spin control default label width</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>10</integer>
- </map>
<key>UISpinctrlSpacing</key>
<map>
<key>Comment</key>
@@ -14026,39 +11986,6 @@
<key>Value</key>
<integer>3</integer>
</map>
- <key>UpdaterServiceCheckPeriod</key>
- <map>
- <key>Comment</key>
- <string>Obsolete; no longer used.</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>3600</integer>
- </map>
- <key>UpdaterServiceURL</key>
- <map>
- <key>Comment</key>
- <string>Obsolete; no longer used.</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>https://update.secondlife.com</string>
- </map>
- <key>UpdaterServicePath</key>
- <map>
- <key>Comment</key>
- <string>Obsolete: no longer used</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>update</string>
- </map>
<key>UpdaterWillingToTest</key>
<map>
<key>Comment</key>
@@ -14191,17 +12118,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>UseEnvironmentFromRegion</key>
- <map>
- <key>Comment</key>
- <string>Choose whether to use the region's environment settings, or override them with the local settings.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnvironmentPersistAcrossLogin</key>
<map>
<key>Comment</key>
@@ -14213,62 +12129,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>UseDayCycle</key>
- <map>
- <key>Comment</key>
- <string>Whether to use use a day cycle or a fixed sky.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>WaterPresetName</key>
- <map>
- <key>Comment</key>
- <string>Water preset to use. May be superseded by region settings.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>Default</string>
- </map>
- <key>SkyPresetName</key>
- <map>
- <key>Comment</key>
- <string>Sky preset to use. May be superseded by region settings or by a day cycle (see DayCycleName).</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>Default</string>
- </map>
- <key>DayCycleName</key>
- <map>
- <key>Comment</key>
- <string>Day cycle to use. May be superseded by region settings.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>Default</string>
- </map>
- <key>UseExternalBrowser</key>
- <!-- deprecated (see MAINT-4127) -->
- <map>
- <key>Comment</key>
- <string>(Deprecated) Use default browser when opening web pages instead of in-world browser.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <boolean>1</boolean>
- </map>
<key>PreferredBrowserBehavior</key>
<map>
<key>Comment</key>
@@ -14324,17 +12184,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>SocialPhotoResolution</key>
- <map>
- <key>Comment</key>
- <string>Default resolution when sharing photo using the social floaters</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>[i800,i600]</string>
- </map>
<key>sourceid</key>
<map>
<key>Comment</key>
@@ -15129,17 +12978,6 @@
<key>Value</key>
<real>-1.0</real>
</map>
- <key>ForcePeriodicRenderingTime</key>
- <map>
- <key>Comment</key>
- <string>Periodically enable all rendering masks for a single frame.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>-1.0</real>
- </map>
<key>ZoomDirect</key>
<map>
<key>Comment</key>
@@ -15305,17 +13143,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AssetStorageLogFrequency</key>
- <map>
- <key>Comment</key>
- <string>Seconds between display of AssetStorage info in log (0 for never)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>60.0</real>
- </map>
<key>LogWearableAssetSave</key>
<map>
<key>Comment</key>
@@ -15553,28 +13380,6 @@
<key>Value</key>
<real>120.0</real>
</map>
- <key>DestinationGuideHintTimeout</key>
- <map>
- <key>Comment</key>
- <string>Number of seconds to wait before telling resident about destination guide.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1200.0</real>
- </map>
- <key>SidePanelHintTimeout</key>
- <map>
- <key>Comment</key>
- <string>Number of seconds to wait before telling resident about side panel.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>300.0</real>
- </map>
<key>GroupMembersSortOrder</key>
<map>
<key>Comment</key>
@@ -15619,17 +13424,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AvatarInspectorTooltipDelay</key>
- <map>
- <key>Comment</key>
- <string>Seconds before displaying avatar inspector tooltip</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.35</real>
- </map>
<key>ObjectInspectorTooltipDelay</key>
<map>
<key>Comment</key>
@@ -15663,17 +13457,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnableGroupInfo</key>
- <map>
- <key>Comment</key>
- <string>Enable viewing and editing of group info from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnablePlaceProfile</key>
<map>
<key>Comment</key>
@@ -15685,28 +13468,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnablePicks</key>
- <map>
- <key>Comment</key>
- <string>Enable editing of picks from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>EnableWorldMap</key>
- <map>
- <key>Comment</key>
- <string>Enable opening world map from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnableAvatarPay</key>
<map>
<key>Comment</key>
@@ -15718,17 +13479,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnableVoiceCall</key>
- <map>
- <key>Comment</key>
- <string>Enable voice calls from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnableAvatarShare</key>
<map>
<key>Comment</key>
@@ -15751,17 +13501,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnableSearch</key>
- <map>
- <key>Comment</key>
- <string>Enable opening search from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnableAppearance</key>
<map>
<key>Comment</key>
@@ -15839,17 +13578,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AllowBottomTrayButtonReordering</key>
- <map>
- <key>Comment</key>
- <string>Allow user to move and hide bottom tray buttons</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AllowSelectAvatar</key>
<map>
<key>Comment</key>
@@ -16653,28 +14381,6 @@
<key>Value</key>
<integer>1000</integer>
</map>
- <key>FMODExStreamBufferSize</key>
- <map>
- <key>Comment</key>
- <string>Sets the streaming buffer size (in milliseconds) for FMOD Ex or FMOD Studio</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>7000</integer>
- </map>
- <key>DisablePrecacheDelayAfterTeleporting</key>
- <map>
- <key>Comment</key>
- <string>Disables the artificial delay in the viewer that precaches some incoming assets</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>VersionChannelName</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 962d6c060c..d8c6831145 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -397,8 +397,18 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
# Other shortcuts
SetOutPath "$INSTDIR"
-CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
+
+Push $0
+${GetParameters} $COMMANDLINE
+${GetOptionsS} $COMMANDLINE "/marker" $0
+# Returns error if option does not exist
+IfErrors 0 DESKTOP_SHORTCUT_DONE
+ # "/marker" is set by updater, do not recreate desktop shortcut
+ CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
"$INSTDIR\$VIEWER_EXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE"
+
+DESKTOP_SHORTCUT_DONE:
+Pop $0
CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
"$INSTDIR\$VIEWER_EXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE"
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index d2fe570069..adea8a2bb4 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1919,7 +1919,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
}
else
{
- target_lag = vel * gSavedSettings.getF32("DynamicCameraStrength") / 30.f;
+ LLCachedControl<F32> dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength");
+ target_lag = vel * dynamic_camera_strength / 30.f;
}
mCameraLag = lerp(mCameraLag, target_lag, lag_interp);
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 799060eeab..0b72f1ee4d 100644
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -49,10 +49,10 @@ public:
void sendAgentPicksRequest()
{
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(gAgent.getID());
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgent.getID());
}
- typedef boost::function<void(LLAvatarPicks*)> server_respond_callback_t;
+ typedef boost::function<void(LLAvatarData*)> server_respond_callback_t;
void setServerRespondCallback(const server_respond_callback_t& cb)
{
@@ -61,10 +61,10 @@ public:
virtual void processProperties(void* data, EAvatarProcessorType type)
{
- if(APT_PICKS == type)
+ if(APT_PROPERTIES == type)
{
- LLAvatarPicks* picks = static_cast<LLAvatarPicks*>(data);
- if(picks && gAgent.getID() == picks->target_id)
+ LLAvatarData* picks = static_cast<LLAvatarData*>(data);
+ if(picks && gAgent.getID() == picks->avatar_id)
{
if(mServerRespondCallback)
{
@@ -115,7 +115,7 @@ bool LLAgentPicksInfo::isPickLimitReached()
return getNumberOfPicks() >= getMaxNumberOfPicks();
}
-void LLAgentPicksInfo::onServerRespond(LLAvatarPicks* picks)
+void LLAgentPicksInfo::onServerRespond(LLAvatarData* picks)
{
if(!picks)
{
diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h
index 21df036cb7..56e7bd0775 100644
--- a/indra/newview/llagentpicksinfo.h
+++ b/indra/newview/llagentpicksinfo.h
@@ -29,7 +29,7 @@
#include "llsingleton.h"
-struct LLAvatarPicks;
+struct LLAvatarData;
/**
* Class that provides information about Agent Picks
@@ -74,7 +74,7 @@ public:
void decrementNumberOfPicks() { --mNumberOfPicks; }
- void onServerRespond(LLAvatarPicks* picks);
+ void onServerRespond(LLAvatarData* picks);
private:
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 8010b84c20..8673dc6a33 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -4117,7 +4117,7 @@ void LLAppearanceMgr::wearBaseOutfit()
updateCOF(base_outfit_id);
}
-void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
+void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nullary_func_t post_update_func)
{
LL_DEBUGS("UIUsage") << "removeItemsFromAvatar" << LL_ENDL;
LLUIUsage::instance().logCommand("Avatar.RemoveItem");
@@ -4127,7 +4127,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL;
return;
}
- LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
+ LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy(true, true, post_update_func);
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
{
const LLUUID& id_to_remove = *it;
@@ -4146,11 +4146,11 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
}
}
-void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
+void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove, nullary_func_t post_update_func)
{
uuid_vec_t ids_to_remove;
ids_to_remove.push_back(id_to_remove);
- removeItemsFromAvatar(ids_to_remove);
+ removeItemsFromAvatar(ids_to_remove, post_update_func);
}
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 43839e47a6..80d6587ad3 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -195,8 +195,8 @@ public:
bool updateBaseOutfit();
//Remove clothing or detach an object from the agent (a bodypart cannot be removed)
- void removeItemsFromAvatar(const uuid_vec_t& item_ids);
- void removeItemFromAvatar(const LLUUID& item_id);
+ void removeItemsFromAvatar(const uuid_vec_t& item_ids, nullary_func_t post_update_func = no_op);
+ void removeItemFromAvatar(const LLUUID& item_id, nullary_func_t post_update_func = no_op);
void onOutfitFolderCreated(const LLUUID& folder_id, bool show_panel);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5763ebe721..7ac756b703 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -528,13 +528,6 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
// or for things that are performance critical. JC
static void settings_to_globals()
{
- LLBUTTON_H_PAD = gSavedSettings.getS32("ButtonHPad");
- BTN_HEIGHT_SMALL = gSavedSettings.getS32("ButtonHeightSmall");
- BTN_HEIGHT = gSavedSettings.getS32("ButtonHeight");
-
- MENU_BAR_HEIGHT = gSavedSettings.getS32("MenuBarHeight");
- MENU_BAR_WIDTH = gSavedSettings.getS32("MenuBarWidth");
-
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile");
@@ -4273,7 +4266,8 @@ bool LLAppViewer::initCache()
LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
- LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion());
+ const U32 CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS = 128;
+ LLVOCache::getInstance()->initCache(LL_PATH_CACHE, CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS, getObjectCacheVersion());
return true;
}
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index c131dc641b..43d83da5ab 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -245,7 +245,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
// messages. People API already hits the user table.
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
app->addObserver(mAvatarId, this);
- app->sendAvatarPropertiesRequest(mAvatarId);
+ app->sendAvatarLegacyPropertiesRequest(mAvatarId);
}
}
}
@@ -294,9 +294,9 @@ bool LLAvatarIconCtrl::updateFromCache()
//virtual
void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
{
- if (APT_PROPERTIES == type)
+ if (APT_PROPERTIES_LEGACY == type)
{
- LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ LLAvatarLegacyData* avatar_data = static_cast<LLAvatarLegacyData*>(data);
if (avatar_data)
{
if (avatar_data->avatar_id != mAvatarId)
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index dd0d06a8c8..5b28e9f4c6 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -52,24 +52,23 @@ LLAvatarPropertiesProcessor::~LLAvatarPropertiesProcessor()
void LLAvatarPropertiesProcessor::addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
{
+ if (!observer)
+ return;
+
// Check if that observer is already in mObservers for that avatar_id
- observer_multimap_t::iterator it;
+ using pair = std::pair<LLUUID, LLAvatarPropertiesObserver*>;
+ observer_multimap_t::iterator begin = mObservers.begin();
+ observer_multimap_t::iterator end = mObservers.end();
+ observer_multimap_t::iterator it = std::find_if(begin, end, [&](const pair& p)
+ {
+ return p.first == avatar_id && p.second == observer;
+ });
// IAN BUG this should update the observer's UUID if this is a dupe - sent to PE
- it = mObservers.find(avatar_id);
- while (it != mObservers.end())
+ if (it == end)
{
- if (it->second == observer)
- {
- return;
- }
- else
- {
- ++it;
- }
+ mObservers.emplace(avatar_id, observer);
}
-
- mObservers.insert(std::pair<LLUUID, LLAvatarPropertiesObserver*>(avatar_id, observer));
}
void LLAvatarPropertiesProcessor::removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
@@ -79,19 +78,18 @@ void LLAvatarPropertiesProcessor::removeObserver(const LLUUID& avatar_id, LLAvat
return;
}
- observer_multimap_t::iterator it;
- it = mObservers.find(avatar_id);
- while (it != mObservers.end())
- {
- if (it->second == observer)
- {
- mObservers.erase(it);
- break;
- }
- else
+ // Check if that observer is in mObservers for that avatar_id
+ using pair = std::pair<LLUUID, LLAvatarPropertiesObserver*>;
+ observer_multimap_t::iterator begin = mObservers.begin();
+ observer_multimap_t::iterator end = mObservers.end();
+ observer_multimap_t::iterator it = std::find_if(begin, end, [&](const pair& p)
{
- ++it;
- }
+ return p.first == avatar_id && p.second == observer;
+ });
+
+ if (it != end)
+ {
+ mObservers.erase(it);
}
}
@@ -116,32 +114,30 @@ void LLAvatarPropertiesProcessor::sendRequest(const LLUUID& avatar_id, EAvatarPr
return;
}
- std::string cap;
-
- switch (type)
+ // Try to send HTTP request if cap_url is available
+ if (type == APT_PROPERTIES)
{
- case APT_PROPERTIES:
- // indicate we're going to make a request
- sendAvatarPropertiesRequestMessage(avatar_id);
- // can use getRegionCapability("AgentProfile"), but it is heavy
- // initAgentProfileCapRequest(avatar_id, cap);
- break;
- case APT_PICKS:
- case APT_GROUPS:
- case APT_NOTES:
- if (cap.empty())
+ std::string cap_url = gAgent.getRegionCapability("AgentProfile");
+ if (!cap_url.empty())
{
- // indicate we're going to make a request
- sendGenericRequest(avatar_id, type, method);
+ initAgentProfileCapRequest(avatar_id, cap_url, type);
}
else
{
- initAgentProfileCapRequest(avatar_id, cap);
+ // Don't sent UDP request for APT_PROPERTIES
+ LL_WARNS() << "No cap_url for APT_PROPERTIES, request for " << avatar_id << " is not sent" << LL_ENDL;
}
- break;
- default:
+ return;
+ }
+
+ // Send UDP request
+ if (type == APT_PROPERTIES_LEGACY)
+ {
+ sendAvatarPropertiesRequestMessage(avatar_id);
+ }
+ else
+ {
sendGenericRequest(avatar_id, type, method);
- break;
}
}
@@ -150,33 +146,29 @@ void LLAvatarPropertiesProcessor::sendGenericRequest(const LLUUID& avatar_id, EA
// indicate we're going to make a request
addPendingRequest(avatar_id, type);
- std::vector<std::string> strings;
- strings.push_back(avatar_id.asString());
+ std::vector<std::string> strings{ avatar_id.asString() };
send_generic_message(method, strings);
}
void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequestMessage(const LLUUID& avatar_id)
{
- addPendingRequest(avatar_id, APT_PROPERTIES);
+ addPendingRequest(avatar_id, APT_PROPERTIES_LEGACY);
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_AgentID, gAgentID);
+ msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
msg->addUUIDFast(_PREHASH_AvatarID, avatar_id);
gAgent.sendReliableMessage();
}
-void LLAvatarPropertiesProcessor::initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url)
+void LLAvatarPropertiesProcessor::initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url, EAvatarProcessorType type)
{
- addPendingRequest(avatar_id, APT_PROPERTIES);
- addPendingRequest(avatar_id, APT_PICKS);
- addPendingRequest(avatar_id, APT_GROUPS);
- addPendingRequest(avatar_id, APT_NOTES);
+ addPendingRequest(avatar_id, type);
LLCoros::instance().launch("requestAgentUserInfoCoro",
- boost::bind(requestAvatarPropertiesCoro, cap_url, avatar_id));
+ [cap_url, avatar_id, type]() { requestAvatarPropertiesCoro(cap_url, avatar_id, type); });
}
void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id)
@@ -184,19 +176,9 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avat
sendRequest(avatar_id, APT_PROPERTIES, "AvatarPropertiesRequest");
}
-void LLAvatarPropertiesProcessor::sendAvatarPicksRequest(const LLUUID& avatar_id)
+void LLAvatarPropertiesProcessor::sendAvatarLegacyPropertiesRequest(const LLUUID& avatar_id)
{
- sendGenericRequest(avatar_id, APT_PICKS, "avatarpicksrequest");
-}
-
-void LLAvatarPropertiesProcessor::sendAvatarNotesRequest(const LLUUID& avatar_id)
-{
- sendGenericRequest(avatar_id, APT_NOTES, "avatarnotesrequest");
-}
-
-void LLAvatarPropertiesProcessor::sendAvatarGroupsRequest(const LLUUID& avatar_id)
-{
- sendGenericRequest(avatar_id, APT_GROUPS, "avatargroupsrequest");
+ sendRequest(avatar_id, APT_PROPERTIES_LEGACY, "AvatarPropertiesRequest");
}
void LLAvatarPropertiesProcessor::sendAvatarTexturesRequest(const LLUUID& avatar_id)
@@ -211,42 +193,6 @@ void LLAvatarPropertiesProcessor::sendAvatarClassifiedsRequest(const LLUUID& ava
sendGenericRequest(avatar_id, APT_CLASSIFIEDS, "avatarclassifiedsrequest");
}
-void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props)
-{
- if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null))
- {
- LL_WARNS() << "Sending avatarinfo update DENIED - invalid agent" << LL_ENDL;
- return;
- }
-
- LL_WARNS() << "Sending avatarinfo update. This trims profile descriptions!!!" << LL_ENDL;
-
- // This value is required by sendAvatarPropertiesUpdate method.
- //A profile should never be mature. (From the original code)
- BOOL mature = FALSE;
-
- LLMessageSystem *msg = gMessageSystem;
-
- msg->newMessageFast (_PREHASH_AvatarPropertiesUpdate);
- msg->nextBlockFast (_PREHASH_AgentData);
- msg->addUUIDFast (_PREHASH_AgentID, gAgent.getID() );
- msg->addUUIDFast (_PREHASH_SessionID, gAgent.getSessionID() );
- msg->nextBlockFast (_PREHASH_PropertiesData);
-
- msg->addUUIDFast (_PREHASH_ImageID, avatar_props->image_id);
- msg->addUUIDFast (_PREHASH_FLImageID, avatar_props->fl_image_id);
- msg->addStringFast (_PREHASH_AboutText, avatar_props->about_text);
- msg->addStringFast (_PREHASH_FLAboutText, avatar_props->fl_about_text);
-
- msg->addBOOL(_PREHASH_AllowPublish, avatar_props->allow_publish);
- msg->addBOOL(_PREHASH_MaturePublish, mature);
- msg->addString(_PREHASH_ProfileURL, avatar_props->profile_url);
-
- gAgent.sendReliableMessage();
-}
-
-
-
//static
std::string LLAvatarPropertiesProcessor::accountType(const LLAvatarData* avatar_data)
{
@@ -271,19 +217,21 @@ std::string LLAvatarPropertiesProcessor::accountType(const LLAvatarData* avatar_
std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_data)
{
// Special accounts like M Linden don't have payment info revealed.
- if (!avatar_data->caption_text.empty()) return "";
+ if (!avatar_data->caption_text.empty())
+ return "";
// Linden employees don't have payment info revealed
- const S32 LINDEN_EMPLOYEE_INDEX = 3;
- if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return "";
+ constexpr S32 LINDEN_EMPLOYEE_INDEX = 3;
+ if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
+ return "";
- BOOL transacted = (avatar_data->flags & AVATAR_TRANSACTED);
- BOOL identified = (avatar_data->flags & AVATAR_IDENTIFIED);
+ bool transacted = (avatar_data->flags & AVATAR_TRANSACTED);
+ bool identified = (avatar_data->flags & AVATAR_IDENTIFIED);
// Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations
//BOOL age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED);
const char* payment_text;
- if(transacted)
+ if (transacted)
{
payment_text = "PaymentInfoUsed";
}
@@ -302,17 +250,19 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_
bool LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(const LLAvatarData* avatar_data)
{
// Special accounts like M Linden don't have payment info revealed.
- if (!avatar_data->caption_text.empty()) return true;
+ if (!avatar_data->caption_text.empty())
+ return true;
// Linden employees don't have payment info revealed
- const S32 LINDEN_EMPLOYEE_INDEX = 3;
- if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return true;
+ constexpr S32 LINDEN_EMPLOYEE_INDEX = 3;
+ if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
+ return true;
return ((avatar_data->flags & AVATAR_TRANSACTED) || (avatar_data->flags & AVATAR_IDENTIFIED));
}
// static
-void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id)
+void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_url, LLUUID avatar_id, EAvatarProcessorType type)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -323,102 +273,101 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setFollowRedirects(true);
- std::string finalUrl = cap_url + "/" + agent_id.asString();
+ std::string finalUrl = cap_url + "/" + avatar_id.asString();
LLSD result = httpAdapter->getAndSuspend(httpRequest, finalUrl, httpOpts, httpHeaders);
+ // Response is being processed, no longer pending is required
+ getInstance()->removePendingRequest(avatar_id, type);
+
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
if (!status
|| !result.has("id")
- || agent_id != result["id"].asUUID())
+ || avatar_id != result["id"].asUUID())
{
- LL_WARNS("AvatarProperties") << "Failed to get agent information for id " << agent_id << LL_ENDL;
- LLAvatarPropertiesProcessor* self = getInstance();
- self->removePendingRequest(agent_id, APT_PROPERTIES);
- self->removePendingRequest(agent_id, APT_PICKS);
- self->removePendingRequest(agent_id, APT_GROUPS);
- self->removePendingRequest(agent_id, APT_NOTES);
+ LL_WARNS("AvatarProperties") << "Failed to get agent information for id " << avatar_id
+ << (!status ? " (no HTTP status)" : !result.has("id") ? " (no result.id)" :
+ std::string(" (result.id=") + result["id"].asUUID().asString() + ")")
+ << LL_ENDL;
return;
}
- // Avatar Data
-
LLAvatarData avatar_data;
+
std::string birth_date;
- avatar_data.agent_id = agent_id;
- avatar_data.avatar_id = agent_id;
+ avatar_data.agent_id = gAgentID;
+ avatar_data.avatar_id = avatar_id;
avatar_data.image_id = result["sl_image_id"].asUUID();
avatar_data.fl_image_id = result["fl_image_id"].asUUID();
avatar_data.partner_id = result["partner_id"].asUUID();
avatar_data.about_text = result["sl_about_text"].asString();
avatar_data.fl_about_text = result["fl_about_text"].asString();
avatar_data.born_on = result["member_since"].asDate();
- avatar_data.profile_url = getProfileURL(agent_id.asString());
+ // TODO: SL-20163 Remove the "has" check when SRV-684 is done
+ // and the field "hide_age" is included to the http response
+ avatar_data.hide_age = !result.has("hide_age") || result["hide_age"].asBoolean();
+ avatar_data.profile_url = getProfileURL(avatar_id.asString());
+ avatar_data.customer_type = result["customer_type"].asString();
+ avatar_data.notes = result["notes"].asString();
avatar_data.flags = 0;
- avatar_data.caption_index = 0;
-
- LLAvatarPropertiesProcessor* self = getInstance();
- // Request processed, no longer pending
- self->removePendingRequest(agent_id, APT_PROPERTIES);
- self->notifyObservers(agent_id, &avatar_data, APT_PROPERTIES);
-
- // Picks
-
- LLSD picks_array = result["picks"];
- LLAvatarPicks avatar_picks;
- avatar_picks.agent_id = agent_id; // Not in use?
- avatar_picks.target_id = agent_id;
-
- for (LLSD::array_const_iterator it = picks_array.beginArray(); it != picks_array.endArray(); ++it)
+ if (result["online"].asBoolean())
{
- const LLSD& pick_data = *it;
- avatar_picks.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
+ avatar_data.flags |= AVATAR_ONLINE;
+ }
+ if (result["allow_publish"].asBoolean())
+ {
+ avatar_data.flags |= AVATAR_ALLOW_PUBLISH;
+ }
+ if (result["identified"].asBoolean())
+ {
+ avatar_data.flags |= AVATAR_IDENTIFIED;
+ }
+ if (result["transacted"].asBoolean())
+ {
+ avatar_data.flags |= AVATAR_TRANSACTED;
}
- // Request processed, no longer pending
- self->removePendingRequest(agent_id, APT_PICKS);
- self->notifyObservers(agent_id, &avatar_picks, APT_PICKS);
+ avatar_data.caption_index = 0;
+ if (result.has("charter_member")) // won't be present if "caption" is set
+ {
+ avatar_data.caption_index = result["charter_member"].asInteger();
+ }
+ else if (result.has("caption"))
+ {
+ avatar_data.caption_text = result["caption"].asString();
+ }
// Groups
-
LLSD groups_array = result["groups"];
- LLAvatarGroups avatar_groups;
- avatar_groups.agent_id = agent_id; // Not in use?
- avatar_groups.avatar_id = agent_id; // target_id
-
for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it)
{
const LLSD& group_info = *it;
- LLAvatarGroups::LLGroupData group_data;
+ LLAvatarData::LLGroupData group_data;
group_data.group_powers = 0; // Not in use?
group_data.group_title = group_info["name"].asString(); // Missing data, not in use?
group_data.group_id = group_info["id"].asUUID();
group_data.group_name = group_info["name"].asString();
group_data.group_insignia_id = group_info["image_id"].asUUID();
- avatar_groups.group_list.push_back(group_data);
+ avatar_data.group_list.push_back(group_data);
}
- self->removePendingRequest(agent_id, APT_GROUPS);
- self->notifyObservers(agent_id, &avatar_groups, APT_GROUPS);
-
- // Notes
- LLAvatarNotes avatar_notes;
-
- avatar_notes.agent_id = agent_id;
- avatar_notes.target_id = agent_id;
- avatar_notes.notes = result["notes"].asString();
+ // Picks
+ LLSD picks_array = result["picks"];
+ for (LLSD::array_const_iterator it = picks_array.beginArray(); it != picks_array.endArray(); ++it)
+ {
+ const LLSD& pick_data = *it;
+ avatar_data.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
+ }
- // Request processed, no longer pending
- self->removePendingRequest(agent_id, APT_NOTES);
- self->notifyObservers(agent_id, &avatar_notes, APT_NOTES);
+ getInstance()->notifyObservers(avatar_id, &avatar_data, type);
}
-void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**)
+void LLAvatarPropertiesProcessor::processAvatarLegacyPropertiesReply(LLMessageSystem* msg, void**)
{
LLAvatarData avatar_data;
std::string birth_date;
@@ -434,51 +383,25 @@ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem*
msg->getString( _PREHASH_PropertiesData, _PREHASH_ProfileURL, avatar_data.profile_url);
msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_Flags, avatar_data.flags);
-
LLDateUtil::dateFromPDTString(avatar_data.born_on, birth_date);
+ // Since field 'hide_age' is not supported by msg system we'd better hide the age here
+ avatar_data.hide_age = true;
avatar_data.caption_index = 0;
S32 charter_member_size = 0;
charter_member_size = msg->getSize(_PREHASH_PropertiesData, _PREHASH_CharterMember);
- if(1 == charter_member_size)
+ if (1 == charter_member_size)
{
msg->getBinaryData(_PREHASH_PropertiesData, _PREHASH_CharterMember, &avatar_data.caption_index, 1);
}
- else if(1 < charter_member_size)
+ else if (1 < charter_member_size)
{
msg->getString(_PREHASH_PropertiesData, _PREHASH_CharterMember, avatar_data.caption_text);
}
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
- self->removePendingRequest(avatar_data.avatar_id, APT_PROPERTIES);
- self->notifyObservers(avatar_data.avatar_id,&avatar_data,APT_PROPERTIES);
-}
-
-void LLAvatarPropertiesProcessor::processAvatarInterestsReply(LLMessageSystem* msg, void**)
-{
-/*
- AvatarInterestsReply is automatically sent by the server in response to the
- AvatarPropertiesRequest sent when the panel is opened (in addition to the AvatarPropertiesReply message).
- If the interests panel is no longer part of the design (?) we should just register the message
- to a handler function that does nothing.
- That will suppress the warnings and be compatible with old server versions.
- WARNING: LLTemplateMessageReader::decodeData: Message from 216.82.37.237:13000 with no handler function received: AvatarInterestsReply
-*/
-
- LLInterestsData interests_data;
-
- msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, interests_data.agent_id );
- msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, interests_data.avatar_id );
- msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_WantToMask, interests_data.want_to_mask );
- msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_WantToText, interests_data.want_to_text );
- msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_SkillsMask, interests_data.skills_mask );
- msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_SkillsText, interests_data.skills_text );
- msg->getString( _PREHASH_PropertiesData, _PREHASH_LanguagesText, interests_data.languages_text );
-
- LLAvatarPropertiesProcessor* self = getInstance();
- // Request processed, no longer pending
- self->removePendingRequest(interests_data.avatar_id, APT_INTERESTS_INFO);
- self->notifyObservers(interests_data.avatar_id, &interests_data, APT_INTERESTS_INFO);
+ self->removePendingRequest(avatar_data.avatar_id, APT_PROPERTIES_LEGACY);
+ self->notifyObservers(avatar_data.avatar_id, &avatar_data, APT_PROPERTIES_LEGACY);
}
void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem* msg, void**)
@@ -497,7 +420,7 @@ void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem*
msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, data.classified_id, n);
msg->getString(_PREHASH_Data, _PREHASH_Name, data.name, n);
- classifieds.classifieds_list.push_back(data);
+ classifieds.classifieds_list.emplace_back(data);
}
LLAvatarPropertiesProcessor* self = getInstance();
@@ -534,44 +457,6 @@ void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* ms
self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO);
}
-
-void LLAvatarPropertiesProcessor::processAvatarNotesReply(LLMessageSystem* msg, void**)
-{
- LLAvatarNotes avatar_notes;
-
- msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_notes.agent_id);
- msg->getUUID(_PREHASH_Data, _PREHASH_TargetID, avatar_notes.target_id);
- msg->getString(_PREHASH_Data, _PREHASH_Notes, avatar_notes.notes);
-
- LLAvatarPropertiesProcessor* self = getInstance();
- // Request processed, no longer pending
- self->removePendingRequest(avatar_notes.target_id, APT_NOTES);
- self->notifyObservers(avatar_notes.target_id,&avatar_notes,APT_NOTES);
-}
-
-void LLAvatarPropertiesProcessor::processAvatarPicksReply(LLMessageSystem* msg, void**)
-{
- LLAvatarPicks avatar_picks;
- msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_picks.agent_id);
- msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, avatar_picks.target_id);
-
- S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);
- for (int block = 0; block < block_count; ++block)
- {
- LLUUID pick_id;
- std::string pick_name;
-
- msg->getUUID(_PREHASH_Data, _PREHASH_PickID, pick_id, block);
- msg->getString(_PREHASH_Data, _PREHASH_PickName, pick_name, block);
-
- avatar_picks.picks_list.push_back(std::make_pair(pick_id,pick_name));
- }
- LLAvatarPropertiesProcessor* self = getInstance();
- // Request processed, no longer pending
- self->removePendingRequest(avatar_picks.target_id, APT_PICKS);
- self->notifyObservers(avatar_picks.target_id,&avatar_picks,APT_PICKS);
-}
-
void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, void**)
{
LLPickData pick_data;
@@ -602,46 +487,18 @@ void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, voi
self->notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO);
}
-void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg, void**)
-{
- LLAvatarGroups avatar_groups;
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, avatar_groups.agent_id );
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AvatarID, avatar_groups.avatar_id );
-
- S32 group_count = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
- for(S32 i = 0; i < group_count; ++i)
- {
- LLAvatarGroups::LLGroupData group_data;
-
- msg->getU64( _PREHASH_GroupData, _PREHASH_GroupPowers, group_data.group_powers, i );
- msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupTitle, group_data.group_title, i );
- msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupID, group_data.group_id, i);
- msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupName, group_data.group_name, i );
- msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupInsigniaID, group_data.group_insignia_id, i );
-
- avatar_groups.group_list.push_back(group_data);
- }
-
- LLAvatarPropertiesProcessor* self = getInstance();
- self->removePendingRequest(avatar_groups.avatar_id, APT_GROUPS);
- self->notifyObservers(avatar_groups.avatar_id,&avatar_groups,APT_GROUPS);
-}
-
-void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type)
+void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id, void* data, EAvatarProcessorType type)
{
// Copy the map (because observers may delete themselves when updated?)
LLAvatarPropertiesProcessor::observer_multimap_t observers = mObservers;
- observer_multimap_t::iterator oi = observers.begin();
- observer_multimap_t::iterator end = observers.end();
- for (; oi != end; ++oi)
+ for (const auto& [agent_id, observer] : observers)
{
// only notify observers for the same agent, or if the observer
// didn't know the agent ID and passed a NULL id.
- const LLUUID &agent_id = oi->first;
if (agent_id == id || agent_id.isNull())
{
- oi->second->processProperties(data,type);
+ observer->processProperties(data, type);
}
}
}
@@ -655,8 +512,8 @@ void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32
// setup message header
msg->newMessageFast(_PREHASH_GrantUserRights);
msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlockFast(_PREHASH_Rights);
msg->addUUID(_PREHASH_AgentRelated, avatar_id);
@@ -666,34 +523,13 @@ void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32
}
}
-void LLAvatarPropertiesProcessor::sendNotes(const LLUUID& avatar_id, const std::string notes)
-{
- if(!avatar_id.isNull())
- {
- LLMessageSystem* msg = gMessageSystem;
-
- // setup message header
- msg->newMessageFast(_PREHASH_AvatarNotesUpdate);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
-
- msg->nextBlockFast(_PREHASH_Data);
- msg->addUUID(_PREHASH_TargetID, avatar_id);
- msg->addString(_PREHASH_Notes, notes);
-
- gAgent.sendReliableMessage();
- }
-}
-
-
void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id )
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_PickDelete);
msg->nextBlock(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, pick_id);
gAgent.sendReliableMessage();
@@ -709,8 +545,8 @@ void LLAvatarPropertiesProcessor::sendClassifiedDelete(const LLUUID& classified_
msg->newMessage(_PREHASH_ClassifiedDelete);
msg->nextBlock(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, classified_id);
@@ -718,39 +554,17 @@ void LLAvatarPropertiesProcessor::sendClassifiedDelete(const LLUUID& classified_
gAgent.sendReliableMessage();
}
-void LLAvatarPropertiesProcessor::sendInterestsInfoUpdate(const LLInterestsData* interests_data)
-{
- if(!interests_data)
- {
- return;
- }
-
- LLMessageSystem* msg = gMessageSystem;
-
- msg->newMessage(_PREHASH_AvatarInterestsUpdate);
- msg->nextBlockFast( _PREHASH_AgentData);
- msg->addUUIDFast( _PREHASH_AgentID, gAgent.getID() );
- msg->addUUIDFast( _PREHASH_SessionID, gAgent.getSessionID() );
- msg->nextBlockFast( _PREHASH_PropertiesData);
- msg->addU32Fast( _PREHASH_WantToMask, interests_data->want_to_mask);
- msg->addStringFast( _PREHASH_WantToText, interests_data->want_to_text);
- msg->addU32Fast( _PREHASH_SkillsMask, interests_data->skills_mask);
- msg->addStringFast( _PREHASH_SkillsText, interests_data->skills_text);
- msg->addString( _PREHASH_LanguagesText, interests_data->languages_text);
-
- gAgent.sendReliableMessage();
-}
-
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
{
- if (!new_pick) return;
+ if (!new_pick)
+ return;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_PickInfoUpdate);
msg->nextBlock(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, new_pick->pick_id);
@@ -787,8 +601,8 @@ void LLAvatarPropertiesProcessor::sendClassifiedInfoUpdate(const LLAvatarClassif
msg->newMessage(_PREHASH_ClassifiedInfoUpdate);
msg->nextBlock(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, c_data->classified_id);
@@ -809,9 +623,7 @@ void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id,
{
// Must ask for a pick based on the creator id because
// the pick database is distributed to the inventory cluster. JC
- std::vector<std::string> request_params;
- request_params.push_back(creator_id.asString() );
- request_params.push_back(pick_id.asString() );
+ std::vector<std::string> request_params{ creator_id.asString(), pick_id.asString() };
send_generic_message("pickinforequest", request_params);
}
@@ -822,8 +634,8 @@ void LLAvatarPropertiesProcessor::sendClassifiedInfoRequest(const LLUUID& classi
msg->newMessage(_PREHASH_ClassifiedInfoRequest);
msg->nextBlock(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUID(_PREHASH_AgentID, gAgentID);
+ msg->addUUID(_PREHASH_SessionID, gAgentSessionID);
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, classified_id);
@@ -840,7 +652,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
if (it == mRequestTimestamps.end()) return false;
// We found a request, check if it has timed out
- U32 now = time(NULL);
+ U32 now = time(nullptr);
const U32 REQUEST_EXPIRE_SECS = 5;
U32 expires = it->second + REQUEST_EXPIRE_SECS;
@@ -854,7 +666,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
void LLAvatarPropertiesProcessor::addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
{
timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
- U32 now = time(NULL);
+ U32 now = time(nullptr);
// Add or update existing (expired) request
mRequestTimestamps[ key ] = now;
}
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index 10cde35f9c..1bf07704a9 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -50,54 +50,71 @@ class LLMessageSystem;
enum EAvatarProcessorType
{
- APT_PROPERTIES,
- APT_NOTES,
- APT_GROUPS,
- APT_PICKS,
+ APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request (Truncates data!!!)
+ APT_PROPERTIES, // APT_PROPERTIES via http request
APT_PICK_INFO,
APT_TEXTURES,
- APT_INTERESTS_INFO,
APT_CLASSIFIEDS,
APT_CLASSIFIED_INFO
};
-struct LLInterestsData
+// legacy data is supposed to match AvatarPropertiesReply,
+// but it is obsolete, fields like about_text will truncate
+// data, if you need them, use AgenProfile cap.
+// Todo: remove it once once icon ids get moved elsewhere,
+// since AgentProfile is too large for bulk icon requests
+struct LLAvatarLegacyData
{
- LLUUID agent_id;
- LLUUID avatar_id; //target id
- U32 want_to_mask;
- std::string want_to_text;
- U32 skills_mask;
- std::string skills_text;
- std::string languages_text;
+ LLUUID agent_id;
+ LLUUID avatar_id; //target id
+ LLUUID image_id;
+ LLUUID fl_image_id;
+ LLUUID partner_id;
+ std::string about_text;
+ std::string fl_about_text;
+ LLDate born_on;
+ std::string profile_url;
+ U8 caption_index;
+ std::string caption_text;
+ std::string customer_type;
+ U32 flags;
};
struct LLAvatarData
{
- LLUUID agent_id;
- LLUUID avatar_id; //target id
- LLUUID image_id;
- LLUUID fl_image_id;
- LLUUID partner_id;
- std::string about_text;
- std::string fl_about_text;
- LLDate born_on;
- std::string profile_url;
- U8 caption_index;
- std::string caption_text;
+ LLUUID agent_id;
+ LLUUID avatar_id; //target id
+ LLUUID image_id;
+ LLUUID fl_image_id;
+ LLUUID partner_id;
+ std::string about_text;
+ std::string fl_about_text;
+ LLDate born_on;
+ std::string profile_url;
+ U8 caption_index;
+ std::string caption_text;
std::string customer_type;
- U32 flags;
- BOOL allow_publish;
+ U32 flags;
+ bool hide_age;
+ std::string notes;
+
+ struct LLGroupData;
+ typedef std::list<LLGroupData> group_list_t;
+ group_list_t group_list;
+
+ typedef std::pair<LLUUID, std::string> pick_data_t;
+ typedef std::list< pick_data_t> picks_list_t;
+ picks_list_t picks_list;
};
-struct LLAvatarPicks
+struct LLAvatarData::LLGroupData
{
- LLUUID agent_id;
- LLUUID target_id; //target id
-
- typedef std::pair<LLUUID,std::string> pick_data_t;
- typedef std::list< pick_data_t> picks_list_t;
- picks_list_t picks_list;
+ U64 group_powers;
+ BOOL accept_notices;
+ std::string group_title;
+ LLUUID group_id;
+ std::string group_name;
+ LLUUID group_insignia_id;
};
struct LLPickData
@@ -121,36 +138,6 @@ struct LLPickData
//used only in write (update) requests
LLUUID session_id;
-
-};
-
-struct LLAvatarNotes
-{
- LLUUID agent_id;
- LLUUID target_id; //target id
- std::string notes;
-};
-
-struct LLAvatarGroups
-{
- LLUUID agent_id;
- LLUUID avatar_id; //target id
- BOOL list_in_profile;
-
- struct LLGroupData;
- typedef std::list<LLGroupData> group_list_t;
-
- group_list_t group_list;
-
- struct LLGroupData
- {
- U64 group_powers;
- BOOL accept_notices;
- std::string group_title;
- LLUUID group_id;
- std::string group_name;
- LLUUID group_insignia_id;
- };
};
struct LLAvatarClassifieds
@@ -211,9 +198,7 @@ public:
// Request various types of avatar data. Duplicate requests will be
// suppressed while waiting for a response from the network.
void sendAvatarPropertiesRequest(const LLUUID& avatar_id);
- void sendAvatarPicksRequest(const LLUUID& avatar_id);
- void sendAvatarNotesRequest(const LLUUID& avatar_id);
- void sendAvatarGroupsRequest(const LLUUID& avatar_id);
+ void sendAvatarLegacyPropertiesRequest(const LLUUID& avatar_id);
void sendAvatarTexturesRequest(const LLUUID& avatar_id);
void sendAvatarClassifiedsRequest(const LLUUID& avatar_id);
@@ -222,22 +207,16 @@ public:
void sendClassifiedInfoRequest(const LLUUID& classified_id);
- void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props);
-
void sendPickInfoUpdate(const LLPickData* new_pick);
void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data);
void sendFriendRights(const LLUUID& avatar_id, S32 rights);
- void sendNotes(const LLUUID& avatar_id, const std::string notes);
-
void sendPickDelete(const LLUUID& pick_id);
void sendClassifiedDelete(const LLUUID& classified_id);
- void sendInterestsInfoUpdate(const LLInterestsData* interests_data);
-
// Returns translated, human readable string for account type, such
// as "Resident" or "Linden Employee". Used for profiles, inspectors.
static std::string accountType(const LLAvatarData* avatar_data);
@@ -249,30 +228,23 @@ public:
static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data);
- static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id);
-
- static void processAvatarPropertiesReply(LLMessageSystem* msg, void**);
+ static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID avatar_id, EAvatarProcessorType type);
- static void processAvatarInterestsReply(LLMessageSystem* msg, void**);
+ // Processing of UDP variant of properties, truncates certain fields!
+ static void processAvatarLegacyPropertiesReply(LLMessageSystem* msg, void**);
static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**);
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
- static void processAvatarGroupsReply(LLMessageSystem* msg, void**);
-
- static void processAvatarNotesReply(LLMessageSystem* msg, void**);
-
- static void processAvatarPicksReply(LLMessageSystem* msg, void**);
-
static void processPickInfoReply(LLMessageSystem* msg, void**);
protected:
- void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method);
+ void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method);
void sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method);
void sendAvatarPropertiesRequestMessage(const LLUUID& avatar_id);
- void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url);
+ void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url, EAvatarProcessorType type);
void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type);
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 9e7a8ba95c..934b852a41 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -88,7 +88,7 @@ LLScreenChannel* LLChannelManager::createNotificationChannel()
{
// creating params for a channel
LLScreenChannelBase::Params p;
- p.id = LLUUID(gSavedSettings.getString("NotificationChannelUUID"));
+ p.id = NOTIFICATION_CHANNEL_UUID;
p.channel_align = CA_RIGHT;
p.toast_align = NA_TOP;
@@ -108,7 +108,7 @@ void LLChannelManager::onLoginCompleted()
if (!channel) continue;
// don't calc notifications for Nearby Chat
- if(channel->getChannelID() == LLUUID(gSavedSettings.getString("NearByChatChannelUUID")))
+ if(channel->getChannelID() == NEARBY_CHAT_CHANNEL_UUID)
{
continue;
}
@@ -130,7 +130,7 @@ void LLChannelManager::onLoginCompleted()
{
// create a channel for the StartUp Toast
LLScreenChannelBase::Params p;
- p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
+ p.id = STARTUP_CHANNEL_UUID;
p.channel_align = CA_RIGHT;
mStartUpChannel = createChannel(p);
@@ -143,9 +143,8 @@ void LLChannelManager::onLoginCompleted()
gViewerWindow->getRootView()->addChild(mStartUpChannel);
// init channel's position and size
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ mStartUpChannel->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4));
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
@@ -164,7 +163,7 @@ void LLChannelManager::onStartUpToastClose()
{
mStartUpChannel->setVisible(FALSE);
mStartUpChannel->closeStartUpToast();
- removeChannelByID(LLUUID(gSavedSettings.getString("StartUpChannelUUID")));
+ removeChannelByID(STARTUP_CHANNEL_UUID);
mStartUpChannel = NULL;
}
@@ -258,12 +257,12 @@ LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChann
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
- findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ findChannelByID(NOTIFICATION_CHANNEL_UUID));
if (channel == NULL)
{
- LL_WARNS() << "Can't find screen channel by NotificationChannelUUID" << LL_ENDL;
- llassert(!"Can't find screen channel by NotificationChannelUUID");
+ LL_WARNS() << "Can't find screen channel by Notification Channel UUID" << LL_ENDL;
+ llassert(!"Can't find screen channel by Notification Channel UUID");
}
return channel;
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index aa2ba752b7..b138db48b5 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -142,7 +142,7 @@ protected:
registrar.add("Attachment.Touch", boost::bind(handleMultiple, handle_attachment_touch, mUUIDs));
registrar.add("Attachment.Edit", boost::bind(handleMultiple, handle_item_edit, mUUIDs));
- registrar.add("Attachment.Detach", boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs));
+ registrar.add("Attachment.Detach", boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs, no_op));
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
enable_registrar.add("Attachment.OnEnable", boost::bind(&CofAttachmentContextMenu::onEnable, this, _2));
@@ -195,7 +195,7 @@ protected:
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
LLUUID selected_id = mUUIDs.back();
- registrar.add("Clothing.TakeOff", boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs));
+ registrar.add("Clothing.TakeOff", boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs, no_op));
registrar.add("Clothing.Replace", boost::bind(replaceWearable, selected_id));
registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id));
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 9031ea5b1b..6826ba06db 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -66,6 +66,7 @@ namespace
{
const std::string QUEUE_EVENTPUMP_NAME("ScriptActionQueue");
+ const F32 QUEUE_INVENTORY_FETCH_TIMEOUT = 300.f;
// ObjectIventoryFetcher is an adapter between the LLVOInventoryListener::inventoryChanged
// callback mechanism and the LLEventPump coroutine architecture allowing the
@@ -359,8 +360,6 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
// Dereferencing floater may fail. If they do they throw LLExeceptionStaleHandle.
// which is caught in objectScriptProcessingQueueCoro
bool monocompile = floater->mMono;
- F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout");
-
// Initial test to see if we can (or should) attempt to compile the script.
LLInventoryItem *item = dynamic_cast<LLInventoryItem *>(inventory);
@@ -385,7 +384,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
LLExperienceCache::instance().fetchAssociatedExperience(inventory->getParentUUID(), inventory->getUUID(),
boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _1));
- result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout,
+ result = llcoro::suspendUntilEventOnWithTimeout(pump, QUEUE_INVENTORY_FETCH_TIMEOUT,
LLSDMap("timeout", LLSD::Boolean(true)));
floater.check();
@@ -435,7 +434,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
&LLFloaterCompileQueue::handleScriptRetrieval,
&userData);
- result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout,
+ result = llcoro::suspendUntilEventOnWithTimeout(pump, QUEUE_INVENTORY_FETCH_TIMEOUT,
LLSDMap("timeout", LLSD::Boolean(true)));
}
@@ -481,7 +480,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo);
}
- result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSDMap("timeout", LLSD::Boolean(true)));
+ result = llcoro::suspendUntilEventOnWithTimeout(pump, QUEUE_INVENTORY_FETCH_TIMEOUT, LLSDMap("timeout", LLSD::Boolean(true)));
floater.check();
@@ -736,8 +735,6 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L
// Dereferencing floater may fail. If they do they throw LLExeceptionStaleHandle.
// This is expected if the dialog closes.
LLEventMailDrop maildrop(QUEUE_EVENTPUMP_NAME, true);
- F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout");
-
try
{
@@ -759,7 +756,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L
args["[OBJECT_NAME]"] = (*itObj).mObjectName;
floater->addStringMessage(floater->getString("LoadingObjInv", args));
- LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout,
+ LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, QUEUE_INVENTORY_FETCH_TIMEOUT,
LLSDMap("timeout", LLSD::Boolean(true)));
if (result.has("timeout"))
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 91031034c6..000c2c625b 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -99,21 +99,6 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_scale_fixup) const
{
-
- F32 max_legal_offset = MAX_LEGAL_OFFSET;
- if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
- {
- max_legal_offset = gSavedSettings.getF32("AnimatedObjectsMaxLegalOffset");
- }
- max_legal_offset = llmax(max_legal_offset,0.f);
-
- F32 max_legal_size = MAX_LEGAL_SIZE;
- if (gSavedSettings.getControl("AnimatedObjectsMaxLegalSize"))
- {
- max_legal_size = gSavedSettings.getF32("AnimatedObjectsMaxLegalSize");
- }
- max_legal_size = llmax(max_legal_size, 1.f);
-
new_pos_fixup = LLVector3();
new_scale_fixup = 1.0f;
LLVector3 vol_pos = mRootVolp->getRenderPosition();
@@ -138,9 +123,9 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
{
LLVector3 pos_box_offset = point_to_box_offset(vol_pos, unshift_extents);
F32 offset_dist = pos_box_offset.length();
- if (offset_dist > max_legal_offset && offset_dist > 0.f)
+ if (offset_dist > MAX_LEGAL_OFFSET && offset_dist > 0.f)
{
- F32 target_dist = (offset_dist - max_legal_offset);
+ F32 target_dist = (offset_dist - MAX_LEGAL_OFFSET);
new_pos_fixup = (target_dist/offset_dist)*pos_box_offset;
}
if (new_pos_fixup != mPositionConstraintFixup)
@@ -153,11 +138,11 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
}
}
- if (box_size/mScaleConstraintFixup > max_legal_size)
+ if (box_size/mScaleConstraintFixup > MAX_LEGAL_SIZE)
{
- new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size;
+ new_scale_fixup = mScaleConstraintFixup* MAX_LEGAL_SIZE /box_size;
LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup "
- << mScaleConstraintFixup << " max legal " << max_legal_size
+ << mScaleConstraintFixup << " max legal " << MAX_LEGAL_SIZE
<< " -> new scale " << new_scale_fixup << LL_ENDL;
}
}
@@ -202,8 +187,7 @@ void LLControlAvatar::matchVolumeTransform()
mRoot->setWorldRotation(obj_rot * joint_rot);
setRotation(mRoot->getRotation());
- F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");
- setGlobalScale(global_scale * mScaleConstraintFixup);
+ setGlobalScale(mScaleConstraintFixup);
}
else
{
@@ -253,8 +237,7 @@ void LLControlAvatar::matchVolumeTransform()
}
mRoot->setPosition(vol_pos + mPositionConstraintFixup);
- F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");
- setGlobalScale(global_scale * mScaleConstraintFixup);
+ setGlobalScale(mScaleConstraintFixup);
}
}
}
@@ -379,6 +362,7 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
void LLControlAvatar::markDead()
{
+ mRootVolp = NULL;
super::markDead();
mControlAVBridge = NULL;
}
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 3f607d434e..6b2fecdc61 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -82,7 +82,7 @@ public:
virtual BOOL isItemRenameable() const { return TRUE; }
virtual BOOL renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return TRUE; }
virtual BOOL isItemMovable( void ) const { return FALSE; }
- virtual BOOL isItemRemovable( void ) const { return FALSE; }
+ virtual BOOL isItemRemovable(bool check_worn = true) const { return FALSE; }
virtual BOOL isItemInTrash( void) const { return FALSE; }
virtual BOOL removeItem() { return FALSE; }
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) { }
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index bb4174d3b6..d8be4c3bd5 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -763,19 +763,6 @@ void LLDrawable::movePartition()
if (part)
{
part->move(this, getSpatialGroup());
-
- // SL-18251 "On-screen animesh characters using pelvis offset animations
- // disappear when root goes off-screen"
- //
- // Update extents of the root node when Control Avatar changes it's bounds
- if (mRenderType == LLPipeline::RENDER_TYPE_CONTROL_AV && isRoot())
- {
- LLControlAvatar* controlAvatar = dynamic_cast<LLControlAvatar*>(getVObj().get());
- if (controlAvatar && controlAvatar->mControlAVBridge)
- {
- ((LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0))->setState(LLViewerOctreeGroup::DIRTY);
- }
- }
}
}
diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp
index 5b74264dab..77de386040 100644
--- a/indra/newview/lldrawpoolground.cpp
+++ b/indra/newview/lldrawpoolground.cpp
@@ -53,11 +53,11 @@ void LLDrawPoolGround::prerender()
void LLDrawPoolGround::render(S32 pass)
{
- if (mDrawFace.empty() || !gSavedSettings.getBOOL("RenderGround"))
+ if (mDrawFace.empty() || !LLGLSLShader::sCurBoundShaderPtr || !gSavedSettings.getBOOL("RenderGround"))
{
return;
- }
-
+ }
+
LLGLSPipelineDepthTestSkyBox gls_skybox(true, false);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 05c7decfbd..c562a5f512 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -2061,7 +2061,7 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
{
LL_WARNS("ENVIRONMENT") << "Couldn't retrieve environment settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
}
- else if (LLApp::isExiting())
+ else if (LLApp::isExiting() || gDisconnected)
{
return;
}
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index f1f156c2e0..e416172eb2 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -599,6 +599,9 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
switch(filter)
{
case FFLOAD_ALL:
+ case FFLOAD_EXE:
+ allowedv->push_back("app");
+ allowedv->push_back("exe");
allowedv->push_back("wav");
allowedv->push_back("bvh");
allowedv->push_back("anim");
@@ -617,9 +620,6 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
allowedv->push_back("tpic");
allowedv->push_back("png");
break;
- case FFLOAD_EXE:
- allowedv->push_back("app");
- allowedv->push_back("exe");
break;
case FFLOAD_WAV:
allowedv->push_back("wav");
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 2422596f60..7b91d31d02 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -107,15 +107,11 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)
mCloseOnSelect(FALSE),
mExcludeAgentFromSearchResults(FALSE),
mContextConeOpacity (0.f),
- mContextConeInAlpha(0.f),
- mContextConeOutAlpha(0.f),
- mContextConeFadeTime(0.f)
+ mContextConeInAlpha(CONTEXT_CONE_IN_ALPHA),
+ mContextConeOutAlpha(CONTEXT_CONE_OUT_ALPHA),
+ mContextConeFadeTime(CONTEXT_CONE_FADE_TIME)
{
mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this));
-
- mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha");
- mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha");
- mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime");
}
BOOL LLFloaterAvatarPicker::postBuild()
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index ba91277c79..1672969e82 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -102,9 +102,9 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
mActive ( TRUE ),
mCanApplyImmediately ( show_apply_immediate ),
mContextConeOpacity ( 0.f ),
- mContextConeInAlpha ( 0.f ),
- mContextConeOutAlpha ( 0.f ),
- mContextConeFadeTime ( 0.f )
+ mContextConeInAlpha (CONTEXT_CONE_IN_ALPHA),
+ mContextConeOutAlpha (CONTEXT_CONE_OUT_ALPHA),
+ mContextConeFadeTime (CONTEXT_CONE_FADE_TIME)
{
buildFromFile ( "floater_color_picker.xml");
@@ -116,10 +116,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
mApplyImmediateCheck->setEnabled(FALSE);
mApplyImmediateCheck->set(FALSE);
}
-
- mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha");
- mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha");
- mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime");
}
LLFloaterColorPicker::~LLFloaterColorPicker()
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 580a3f2610..97327da81a 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -37,13 +37,14 @@
const std::string LL_FCP_COMPLETE_NAME("complete_name");
const std::string LL_FCP_ACCOUNT_NAME("user_name");
+const S32 CONVERSATION_HISTORY_PAGE_SIZE = 100;
LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_id)
: LLFloater(session_id),
mChatHistory(NULL),
mSessionID(session_id.asUUID()),
mCurrentPage(0),
- mPageSize(gSavedSettings.getS32("ConversationHistoryPageSize")),
+ mPageSize(CONVERSATION_HISTORY_PAGE_SIZE),
mAccountName(session_id[LL_FCP_ACCOUNT_NAME]),
mCompleteName(session_id[LL_FCP_COMPLETE_NAME]),
mMutex(),
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index 95d6a2d652..0b270103cc 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -114,7 +114,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
- getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
+ getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE);
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); });
refresh();
diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp
index c642da7b83..fe7854b3a5 100644
--- a/indra/newview/llfloaterexperiencepicker.cpp
+++ b/indra/newview/llfloaterexperiencepicker.cpp
@@ -88,13 +88,10 @@ LLFloaterExperiencePicker::LLFloaterExperiencePicker( const LLSD& key )
:LLFloater(key)
,mSearchPanel(NULL)
,mContextConeOpacity(0.f)
- ,mContextConeInAlpha(0.f)
- ,mContextConeOutAlpha(0.f)
- ,mContextConeFadeTime(0.f)
+ ,mContextConeInAlpha(CONTEXT_CONE_IN_ALPHA)
+ ,mContextConeOutAlpha(CONTEXT_CONE_OUT_ALPHA)
+ ,mContextConeFadeTime(CONTEXT_CONE_FADE_TIME)
{
- mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha");
- mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha");
- mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime");
}
LLFloaterExperiencePicker::~LLFloaterExperiencePicker()
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 2720b7fcf7..011ad67011 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -289,6 +289,9 @@ void LLFloaterIMContainer::onOpen(const LLSD& key)
LLMultiFloater::onOpen(key);
reSelectConversation();
assignResizeLimits();
+
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(mSelectedSession);
+ session_floater->onOpen(key);
}
// virtual
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index bb4cc9bca3..80dd1c8566 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -260,7 +260,8 @@ void LLFloaterIMNearbyChat::loadHistory()
void LLFloaterIMNearbyChat::removeScreenChat()
{
- LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+ LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(
+ LLNotificationsUI::NEARBY_CHAT_CHANNEL_UUID);
if(chat_channel)
{
chat_channel->removeToastsFromChannel();
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 4cd91c53d8..be731c8043 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -459,7 +459,7 @@ LLFloaterIMNearbyChatHandler::LLFloaterIMNearbyChatHandler()
{
// Getting a Channel for our notifications
LLFloaterIMNearbyChatScreenChannel::Params p;
- p.id = LLUUID(gSavedSettings.getString("NearByChatChannelUUID"));
+ p.id = NEARBY_CHAT_CHANNEL_UUID;
LLFloaterIMNearbyChatScreenChannel* channel = new LLFloaterIMNearbyChatScreenChannel(p);
LLFloaterIMNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel;
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index ee9dc35283..5ac7b4a654 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -651,7 +651,7 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock)
// update notification channel state
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
- findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID));
if(!isChatMultiTab())
{
@@ -687,7 +687,7 @@ void LLFloaterIMSession::setVisible(BOOL visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
- findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID));
LLFloaterIMSessionTab::setVisible(visible);
@@ -865,7 +865,7 @@ void LLFloaterIMSession::updateMessages()
// remove embedded notification from channel
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
- findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID));
if (getVisible())
{
// toast will be automatically closed since it is not storable toast
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index af4e7f5aff..0b0dce29fb 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -986,6 +986,8 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key)
}
mInputButtonPanel->setVisible(isTornOff());
+
+ setFocus(TRUE);
}
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 558b14bba7..d3add020cf 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -250,6 +250,13 @@ void LLFloaterJoystick::refresh()
initFromSettings();
}
+bool LLFloaterJoystick::addDeviceCallback(std::string &name, LLSD& value, void* userdata)
+{
+ LLFloaterJoystick * floater = (LLFloaterJoystick*)userdata;
+ floater->mJoysticksCombo->add(name, value, ADD_BOTTOM, 1);
+ return false; // keep searching
+}
+
void LLFloaterJoystick::addDevice(std::string &name, LLSD& value)
{
mJoysticksCombo->add(name, value, ADD_BOTTOM, 1);
@@ -264,19 +271,21 @@ void LLFloaterJoystick::refreshListOfDevices()
mHasDeviceList = false;
+ void* win_calback = nullptr;
// di8_devices_callback callback is immediate and happens in scope of getInputDevices()
#if LL_WINDOWS && !LL_MESA_HEADLESS
// space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
U32 device_type = DI8DEVCLASS_GAMECTRL;
- void* callback = &di8_list_devices_callback;
+ win_calback = di8_list_devices_callback;
+#elif LL_DARWIN
+ U32 device_type = 0;
#else
- // MAC doesn't support device search yet
- // On MAC there is an ndof_idsearch and it is possible to specify product
- // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
+ // On MAC it is possible to specify product
+ // and manufacturer in NDOF_Device for
+ // ndof_init_first to pick specific device
U32 device_type = 0;
- void* callback = NULL;
#endif
- if (gViewerWindow->getWindow()->getInputDevices(device_type, callback, this))
+ if (gViewerWindow->getWindow()->getInputDevices(device_type, addDeviceCallback, win_calback, this))
{
mHasDeviceList = true;
}
@@ -418,10 +427,11 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
joystick->toggleFlycam();
}
}
-
- std::string device_id = LLViewerJoystick::getInstance()->getDeviceUUIDString();
- gSavedSettings.setString("JoystickDeviceUUID", device_id);
- LL_DEBUGS("Joystick") << "Selected " << device_id << " as joystick." << LL_ENDL;
+
+ LLViewerJoystick::getInstance()->saveDeviceIdToSettings();
+
+ std::string device_string = LLViewerJoystick::getInstance()->getDeviceUUIDString();
+ LL_DEBUGS("Joystick") << "Selected " << device_string << " as joystick." << LL_ENDL;
self->refreshListOfDevices();
}
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index 1d46efd3f6..ff889c804b 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -46,6 +46,7 @@ public:
virtual void draw();
static void setSNDefaults();
+ static bool addDeviceCallback(std::string &name, LLSD& value, void* userdata);
void addDevice(std::string &name, LLSD& value);
protected:
diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp
index d1679fd936..2ff6c5618c 100644
--- a/indra/newview/llfloaternotificationstabbed.cpp
+++ b/indra/newview/llfloaternotificationstabbed.cpp
@@ -154,7 +154,7 @@ LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id, std::stri
void LLFloaterNotificationsTabbed::initChannel()
{
LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(
- LLUUID(gSavedSettings.getString("NotificationChannelUUID")));
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID);
mChannel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>(channel);
if(NULL == mChannel)
{
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 9ea49e935f..ba61668d26 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -330,9 +330,9 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType type )
{
- if ( APT_PROPERTIES == type )
+ if ( APT_PROPERTIES_LEGACY == type )
{
- const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData );
+ const LLAvatarLegacyData* pAvatarData = static_cast<const LLAvatarLegacyData*>( pData );
if (pAvatarData && (gAgent.getID() == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null))
{
mAllowPublish = (bool)(pAvatarData->flags & AVATAR_ALLOW_PUBLISH);
@@ -471,9 +471,7 @@ BOOL LLFloaterPreference::postBuild()
void LLFloaterPreference::updateDeleteTranscriptsButton()
{
- std::vector<std::string> list_of_transcriptions_file_names;
- LLLogChat::getListOfTranscriptFiles(list_of_transcriptions_file_names);
- getChild<LLButton>("delete_transcripts")->setEnabled(list_of_transcriptions_file_names.size() > 0);
+ getChild<LLButton>("delete_transcripts")->setEnabled(LLLogChat::transcriptFilesExist());
}
void LLFloaterPreference::onDoNotDisturbResponseChanged()
@@ -638,7 +636,6 @@ void LLFloaterPreference::cancel()
void LLFloaterPreference::onOpen(const LLSD& key)
{
-
// this variable and if that follows it are used to properly handle do not disturb mode response message
static bool initialized = FALSE;
// if user is logged in and we haven't initialized do not disturb mode response yet, do it
@@ -665,7 +662,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
(gAgent.isMature() || gAgent.isGodlike());
LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox");
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() );
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarLegacyPropertiesRequest( gAgent.getID() );
if (can_choose_maturity)
{
// if they're not adult or a god, they shouldn't see the adult selection, so delete it
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 37ae80fa8f..a6ab61cbb9 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -48,12 +48,6 @@ public:
LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_CLICK_ONLY) { }
bool handle(const LLSD& tokens, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)
{
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableSearch"))
- {
- LLNotificationsUtil::add("NoSearch", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
const size_t parts = tokens.size();
// get the (optional) category for the search
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 8f3ec8af05..42031bb0c5 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -129,12 +129,6 @@ public:
const std::string& grid,
LLMediaCtrl* web)
{
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableWorldMap"))
- {
- LLNotificationsUtil::add("NoWorldMap", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
if (params.size() == 0)
{
// support the secondlife:///app/worldmap SLapp
@@ -170,12 +164,6 @@ public:
const std::string& grid,
LLMediaCtrl* web)
{
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableWorldMap"))
- {
- LLNotificationsUtil::add("NoWorldMap", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
//Make sure we have some parameters
if (params.size() == 0)
{
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index c0f773968d..3679b0b73d 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -58,6 +58,9 @@
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 30.f;
+// Longest time, in seconds, to wait for a key release.
+// This should be relatively long, but not too long. 10 minutes is enough
+const F32 MAX_WAIT_KEY_SECS = 60.f * 10.f;
// Lightweight constructor.
// init() does the heavy lifting.
@@ -528,12 +531,13 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset
LLGestureMgr::instance().replaceGesture(base_item_id, gesture, new_asset_id);
}
-void LLGestureMgr::playGesture(LLMultiGesture* gesture)
+void LLGestureMgr::playGesture(LLMultiGesture* gesture, bool fromKeyPress)
{
if (!gesture) return;
// Reset gesture to first step
gesture->mCurrentStep = 0;
+ gesture->mTriggeredByKey = fromKeyPress;
// Add to list of playing
gesture->mPlaying = TRUE;
@@ -731,7 +735,8 @@ BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
if (!gesture) continue;
if (gesture->mKey == key
- && gesture->mMask == mask)
+ && gesture->mMask == mask
+ && gesture->mWaitingKeyRelease == FALSE)
{
matching.push_back(gesture);
}
@@ -744,13 +749,38 @@ BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask)
LLMultiGesture* gesture = matching[random];
- playGesture(gesture);
+ playGesture(gesture, TRUE);
return TRUE;
}
return FALSE;
}
+BOOL LLGestureMgr::triggerGestureRelease(KEY key, MASK mask)
+{
+ std::vector <LLMultiGesture *> matching;
+ item_map_t::iterator it;
+
+ // collect matching gestures
+ for (it = mActive.begin(); it != mActive.end(); ++it)
+ {
+ LLMultiGesture* gesture = (*it).second;
+
+ // asset data might not have arrived yet
+ if (!gesture) continue;
+
+ if (gesture->mKey == key
+ && gesture->mMask == mask)
+ {
+ gesture->mKeyReleased = TRUE;
+ }
+ }
+
+ //If we found one, block. Otherwise tell them it's free to go.
+ return matching.size() > 0;
+}
+
+
S32 LLGestureMgr::getPlayingCount() const
{
return mPlaying.size();
@@ -899,6 +929,32 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
continue;
}
+ // If we're waiting a fixed amount of time, check for timer
+ // expiration.
+ if (gesture->mWaitingKeyRelease)
+ {
+ // We're waiting for a certain amount of time to pass
+ if (gesture->mKeyReleased)
+ {
+ // wait is done, continue execution
+ gesture->mWaitingKeyRelease = FALSE;
+ gesture->mCurrentStep++;
+ }
+ else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_KEY_SECS)
+ {
+ LL_INFOS("GestureMgr") << "Waited too long for key release, continuing gesture."
+ << LL_ENDL;
+ gesture->mWaitingAnimations = FALSE;
+ gesture->mCurrentStep++;
+ }
+ else
+ {
+ // we're waiting, so execution is done for now
+ waiting = TRUE;
+ }
+ continue;
+ }
+
// If we're waiting on our animations to stop, poll for
// completion.
if (gesture->mWaitingAnimations)
@@ -1015,7 +1071,18 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
case STEP_WAIT:
{
LLGestureStepWait* wait_step = (LLGestureStepWait*)step;
- if (wait_step->mFlags & WAIT_FLAG_TIME)
+ if (gesture->mTriggeredByKey // Only wait here IF we were triggered by a key!
+ && gesture->mKeyReleased == FALSE // We can only do this once! Prevent gestures infinitely running
+ && wait_step->mFlags & WAIT_FLAG_KEY_RELEASE)
+ {
+ // Lets wait for the key release first so we don't hold up re-presses
+
+ gesture->mWaitingKeyRelease = TRUE;
+ // Use the wait timer as a deadlock breaker for key release
+ // waits.
+ gesture->mWaitTimer.reset();
+ }
+ else if (wait_step->mFlags & WAIT_FLAG_TIME)
{
gesture->mWaitingTimer = TRUE;
gesture->mWaitTimer.reset();
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 7c8e8279c2..e805c91145 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -102,7 +102,10 @@ public:
const item_map_t& getActiveGestures() const { return mActive; }
// Force a gesture to be played, for example, if it is being
// previewed.
- void playGesture(LLMultiGesture* gesture);
+ void playGesture(LLMultiGesture* gesture, bool fromKeyPress);
+ void playGesture(LLMultiGesture* gesture) {
+ playGesture(gesture, FALSE);
+ }
void playGesture(const LLUUID& item_id);
// Stop all requested or playing anims for this gesture
@@ -118,10 +121,14 @@ public:
{
mCallbackMap[inv_item_id] = cb;
}
- // Trigger the first gesture that matches this key.
+ // Trigger a random gesture that matches this key.
// Returns TRUE if it finds a gesture bound to that key.
BOOL triggerGesture(KEY key, MASK mask);
+ // Trigger release wait on all gestures that matches this key.
+ // Returns TRUE if it finds a gesture bound to that key.
+ BOOL triggerGestureRelease(KEY key, MASK mask);
+
// Trigger all gestures referenced as substrings in this string
BOOL triggerAndReviseString(const std::string &str, std::string *revised_string = NULL);
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 043316ccca..1cdac686d7 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -88,12 +88,6 @@ public:
return true;
}
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableGroupInfo"))
- {
- LLNotificationsUtil::add("NoGroupInfo", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
if (tokens.size() < 1)
{
return false;
@@ -372,7 +366,16 @@ void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id)
args["GROUP"] = gdatap->mName;
LLSD payload;
payload["group_id"] = group_id;
- LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
+ if (gdatap->mMembershipFee > 0)
+ {
+ args["COST"] = gdatap->mMembershipFee;
+ LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
+ }
+ else
+ {
+ LLNotificationsUtil::add("GroupLeaveConfirmMemberNoFee", args, payload, onLeaveGroup);
+ }
+
}
// static
@@ -404,7 +407,7 @@ void LLGroupActions::inspect(const LLUUID& group_id)
}
// static
-void LLGroupActions::show(const LLUUID& group_id)
+void LLGroupActions::show(const LLUUID &group_id, bool expand_notices_tab)
{
if (group_id.isNull())
return;
@@ -412,6 +415,10 @@ void LLGroupActions::show(const LLUUID& group_id)
LLSD params;
params["group_id"] = group_id;
params["open_tab_name"] = "panel_group_info_sidetray";
+ if (expand_notices_tab)
+ {
+ params["action"] = "show_notices";
+ }
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
LLFloater *floater = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people");
diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h
index afc4686dd7..44513199c1 100644
--- a/indra/newview/llgroupactions.h
+++ b/indra/newview/llgroupactions.h
@@ -57,7 +57,7 @@ public:
/**
* Show group information panel.
*/
- static void show(const LLUUID& group_id);
+ static void show(const LLUUID& group_id, bool expand_notices_tab = false);
/**
* Show group inspector floater.
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 32af2592d3..14310536b2 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -303,6 +303,7 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL
item->getChildView("info_btn")->setVisible( false);
item->getChildView("profile_btn")->setVisible( false);
+ item->getChildView("notices_btn")->setVisible(false);
item->setGroupIconVisible(mShowIcons);
if (!mShowIcons)
{
@@ -403,6 +404,7 @@ mGroupIcon(NULL),
mGroupNameBox(NULL),
mInfoBtn(NULL),
mProfileBtn(NULL),
+mNoticesBtn(NULL),
mVisibilityHideBtn(NULL),
mVisibilityShowBtn(NULL),
mGroupID(LLUUID::null),
@@ -435,6 +437,9 @@ BOOL LLGroupListItem::postBuild()
mProfileBtn = getChild<LLButton>("profile_btn");
mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); });
+ mNoticesBtn = getChild<LLButton>("notices_btn");
+ mNoticesBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onNoticesBtnClick(); });
+
mVisibilityHideBtn = findChild<LLButton>("visibility_hide_btn");
if (mVisibilityHideBtn)
{
@@ -470,13 +475,17 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
mInfoBtn->setVisible(true);
mProfileBtn->setVisible(true);
- if (mForAgent && mVisibilityHideBtn)
+ if (mForAgent)
{
LLGroupData agent_gdatap;
if (gAgent.getGroupData(mGroupID, agent_gdatap))
{
- mVisibilityHideBtn->setVisible(agent_gdatap.mListInProfile);
- mVisibilityShowBtn->setVisible(!agent_gdatap.mListInProfile);
+ if (mVisibilityHideBtn)
+ {
+ mVisibilityHideBtn->setVisible(agent_gdatap.mListInProfile);
+ mVisibilityShowBtn->setVisible(!agent_gdatap.mListInProfile);
+ }
+ mNoticesBtn->setVisible(true);
}
}
}
@@ -489,6 +498,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask)
getChildView("hovered_icon")->setVisible( false);
mInfoBtn->setVisible(false);
mProfileBtn->setVisible(false);
+ mNoticesBtn->setVisible(false);
if (mVisibilityHideBtn)
{
mVisibilityHideBtn->setVisible(false);
@@ -583,6 +593,11 @@ void LLGroupListItem::onProfileBtnClick()
LLGroupActions::show(mGroupID);
}
+void LLGroupListItem::onNoticesBtnClick()
+{
+ LLGroupActions::show(mGroupID, true);
+}
+
void LLGroupListItem::onVisibilityBtnClick(bool new_visibility)
{
LLGroupData agent_gdatap;
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index 5cbabb712f..1bc2caff33 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -123,6 +123,7 @@ private:
void setBold(bool bold);
void onInfoBtnClick();
void onProfileBtnClick();
+ void onNoticesBtnClick();
void onVisibilityBtnClick(bool new_visibility);
LLTextBox* mGroupNameBox;
@@ -130,6 +131,7 @@ private:
LLGroupIconCtrl* mGroupIcon;
LLButton* mInfoBtn;
LLButton* mProfileBtn;
+ LLButton* mNoticesBtn;
LLButton* mVisibilityHideBtn;
LLButton* mVisibilityShowBtn;
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index 0fa3dc1110..99be4dc92b 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -54,9 +54,8 @@ LLIMHandler::~LLIMHandler()
//--------------------------------------------------------------------------
void LLIMHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ mChannel.get()->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 61a01d7418..17a28e84bb 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -581,6 +581,12 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from,
return;
}
+ if (LLApp::isExiting() || gDisconnected)
+ {
+ LL_DEBUGS("ChatHistory") << "Ignoring chat history response, shutting down" << LL_ENDL;
+ return;
+ }
+
// Add history to IM session
LLSD history = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_CONTENT];
@@ -3915,6 +3921,12 @@ public:
const LLSD& context,
const LLSD& input) const
{
+ if (LLApp::isExiting() || gDisconnected)
+ {
+ LL_DEBUGS("ChatHistory") << "Ignoring ChatterBox session, Shutting down" << LL_ENDL;
+ return;
+ }
+
LLSD body;
LLUUID temp_session_id;
LLUUID session_id;
diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp
index f382b5985f..0da0609ff7 100644
--- a/indra/newview/llinspect.cpp
+++ b/indra/newview/llinspect.cpp
@@ -45,8 +45,8 @@ LLInspect::~LLInspect()
// virtual
void LLInspect::draw()
{
- static LLCachedControl<F32> FADE_TIME(*LLUI::getInstance()->mSettingGroups["config"], "InspectorFadeTime", 1.f);
- static LLCachedControl<F32> STAY_TIME(*LLUI::getInstance()->mSettingGroups["config"], "InspectorShowTime", 1.f);
+ const F32 FADE_TIME = 0.5f;
+ const F32 STAY_TIME = 3.f;
if (mOpenTimer.getStarted())
{
LLFloater::draw();
@@ -59,7 +59,7 @@ void LLInspect::draw()
}
else if (mCloseTimer.getStarted())
{
- F32 alpha = clamp_rescale(mCloseTimer.getElapsedTimeF32(), 0.f, FADE_TIME(), 1.f, 0.f);
+ F32 alpha = clamp_rescale(mCloseTimer.getElapsedTimeF32(), 0.f, FADE_TIME, 1.f, 0.f);
LLViewDrawContext context(alpha);
LLFloater::draw();
if (mCloseTimer.getElapsedTimeF32() > FADE_TIME)
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index b11c440015..ca18dc343d 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -261,12 +261,15 @@ void LLInspectAvatar::requestUpdate()
void LLInspectAvatar::processAvatarData(LLAvatarData* data)
{
LLStringUtil::format_map_t args;
- {
- std::string birth_date = LLTrans::getString("AvatarBirthDateFormat");
- LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) data->born_on.secondsSinceEpoch()));
- args["[BORN_ON]"] = birth_date;
- }
- args["[AGE]"] = LLDateUtil::ageFromDate(data->born_on, LLDate::now());
+
+ std::string birth_date = LLTrans::getString(data->hide_age ?
+ "AvatarBirthDateFormatShort" :
+ "AvatarBirthDateFormatFull");
+ LLStringUtil::format(birth_date, LLSD().with("datetime", (S32)data->born_on.secondsSinceEpoch()));
+ args["[BORN_ON]"] = birth_date;
+ args["[AGE]"] = data->hide_age ?
+ LLStringUtilBase<char>::null :
+ LLDateUtil::ageFromDate(data->born_on, LLDate::now());
args["[SL_PROFILE]"] = data->about_text;
args["[RW_PROFILE"] = data->fl_about_text;
args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(data);
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index 6f93a78ca6..21cdde0bea 100644
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -60,8 +60,8 @@ private:
LLInspectToast::LLInspectToast(const LLSD& notification_id) :
LLInspect(LLSD()), mPanel(NULL)
{
- LLScreenChannelBase* channel = LLChannelManager::getInstance()->findChannelByID(
- LLUUID(gSavedSettings.getString("NotificationChannelUUID")));
+ LLScreenChannelBase* channel = LLChannelManager::getInstance()->findChannelByID(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID);
mScreenChannel = dynamic_cast<LLScreenChannel*>(channel);
if(NULL == mScreenChannel)
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 73005d6903..a12c4f7f76 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -90,6 +90,7 @@
void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
const F32 SOUND_GAIN = 1.0f;
+const F32 FOLDER_LOADING_MESSAGE_DELAY = 0.5f; // Seconds to wait before showing the LOADING... text in folder views
using namespace LLOldEvents;
@@ -308,9 +309,9 @@ void LLInvFVBridge::setCreationDate(time_t creation_date_utc)
// Can be destroyed (or moved to trash)
-BOOL LLInvFVBridge::isItemRemovable() const
+BOOL LLInvFVBridge::isItemRemovable(bool check_worn) const
{
- return get_is_item_removable(getInventoryModel(), mUUID);
+ return get_is_item_removable(getInventoryModel(), mUUID, check_worn);
}
// Can be moved to another folder
@@ -765,7 +766,7 @@ void hide_context_entries(LLMenuGL& menu,
// descend into split menus:
LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item);
- if ((name == "More") && branchp)
+ if (((name == "More") || (name == "create_new")) && branchp)
{
hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries);
}
@@ -820,7 +821,7 @@ void hide_context_entries(LLMenuGL& menu,
// so that some other UI element from multi-select doesn't later set this invisible.
menu_item->pushVisible(TRUE);
- bool enabled = (menu_item->getEnabled() == TRUE);
+ bool enabled = true;
for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2)
{
enabled &= (*itor2 != name);
@@ -1062,7 +1063,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
items.push_back(std::string("Delete"));
- if (!isItemRemovable() || isPanelActive("Favorite Items"))
+ if (!isItemRemovable(false) || isPanelActive("Favorite Items"))
{
disabled_items.push_back(std::string("Delete"));
}
@@ -1764,7 +1765,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
}
else if ("show_in_main_panel" == action)
{
- LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+ LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
return;
}
else if ("cut" == action)
@@ -2404,20 +2405,21 @@ void LLFolderBridge::update()
class LLIsItemRemovable : public LLFolderViewFunctor
{
public:
- LLIsItemRemovable() : mPassed(TRUE) {}
+ LLIsItemRemovable(bool check_worn = true) : mPassed(TRUE), mCheckWorn(check_worn) {}
virtual void doFolder(LLFolderViewFolder* folder)
{
- mPassed &= folder->getViewModelItem()->isItemRemovable();
+ mPassed &= folder->getViewModelItem()->isItemRemovable(mCheckWorn);
}
virtual void doItem(LLFolderViewItem* item)
{
- mPassed &= item->getViewModelItem()->isItemRemovable();
+ mPassed &= item->getViewModelItem()->isItemRemovable(mCheckWorn);
}
BOOL mPassed;
+ bool mCheckWorn;
};
// Can be destroyed (or moved to trash)
-BOOL LLFolderBridge::isItemRemovable() const
+BOOL LLFolderBridge::isItemRemovable(bool check_worn) const
{
if (!get_is_category_removable(getInventoryModel(), mUUID))
{
@@ -2428,7 +2430,7 @@ BOOL LLFolderBridge::isItemRemovable() const
LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getItemByID(mUUID) : NULL);
if (folderp)
{
- LLIsItemRemovable folder_test;
+ LLIsItemRemovable folder_test(check_worn);
folderp->applyFunctorToChildren(folder_test);
if (!folder_test.mPassed)
{
@@ -3395,7 +3397,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
}
else if ("show_in_main_panel" == action)
{
- LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+ LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
return;
}
else if ("cut" == action)
@@ -4268,6 +4270,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
disabled_items.push_back(std::string("New Folder"));
disabled_items.push_back(std::string("upload_def"));
+ disabled_items.push_back(std::string("create_new"));
}
if (favorites == mUUID)
{
@@ -4290,6 +4293,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
{
disabled_items.push_back(std::string("New Folder"));
disabled_items.push_back(std::string("upload_def"));
+ disabled_items.push_back(std::string("create_new"));
}
if (marketplace_listings_id == mUUID)
{
@@ -4351,6 +4355,17 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
if (!isMarketplaceListingsFolder())
{
items.push_back(std::string("upload_def"));
+ items.push_back(std::string("create_new"));
+ items.push_back(std::string("New Script"));
+ items.push_back(std::string("New Note"));
+ items.push_back(std::string("New Gesture"));
+ items.push_back(std::string("New Clothes"));
+ items.push_back(std::string("New Body Parts"));
+ items.push_back(std::string("New Settings"));
+ if (!LLEnvironment::instance().isInventoryEnabled())
+ {
+ disabled_items.push_back("New Settings");
+ }
}
}
getClipboardEntries(false, items, disabled_items, flags);
@@ -4489,7 +4504,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
return;
}
- if (!isItemRemovable())
+ if (!isItemRemovable(false))
{
disabled_items.push_back(std::string("Delete"));
}
@@ -4902,9 +4917,7 @@ LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(BOOL is_open) c
std::string LLMarketplaceFolderBridge::getLabelSuffix() const
{
- static LLCachedControl<F32> folder_loading_message_delay(gSavedSettings, "FolderLoadingMessageWaitTime", 0.5f);
-
- if (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= folder_loading_message_delay())
+ if (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= FOLDER_LOADING_MESSAGE_DELAY)
{
return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str());
}
@@ -6613,6 +6626,26 @@ LLInventoryObject* LLObjectBridge::getObject() const
return object;
}
+LLViewerInventoryItem* LLObjectBridge::getItem() const
+{
+ LLInventoryModel* model = getInventoryModel();
+ if (model)
+ {
+ return model->getItem(mUUID);
+ }
+ return NULL;
+}
+
+LLViewerInventoryCategory* LLObjectBridge::getCategory() const
+{
+ LLInventoryModel* model = getInventoryModel();
+ if (model)
+ {
+ return model->getCategory(mUUID);
+ }
+ return NULL;
+}
+
// virtual
void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)
{
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index decaee7db3..0d87e2b97c 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -114,7 +114,7 @@ public:
virtual BOOL isItemRenameable() const { return TRUE; }
virtual BOOL isMultiPreviewAllowed() { return TRUE; }
//virtual BOOL renameItem(const std::string& new_name) {}
- virtual BOOL isItemRemovable() const;
+ virtual BOOL isItemRemovable(bool check_worn = true) const;
virtual BOOL isItemMovable() const;
virtual BOOL isItemInTrash() const;
virtual bool isItemInOutfits() const;
@@ -321,7 +321,7 @@ public:
void* cargo_data,
std::string& tooltip_msg);
- virtual BOOL isItemRemovable() const;
+ virtual BOOL isItemRemovable(bool check_worn = true) const;
virtual BOOL isItemMovable() const ;
virtual BOOL isUpToDate() const;
virtual bool isItemCopyable(bool can_copy_as_link = true) const;
@@ -524,6 +524,8 @@ public:
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual BOOL renameItem(const std::string& new_name);
LLInventoryObject* getObject() const;
+ LLViewerInventoryItem* getItem() const;
+ LLViewerInventoryCategory* getCategory() const;
protected:
static LLUUID sContextMenuItemID; // Only valid while the context menu is open.
U32 mAttachPt;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 4aeacae6ed..c2cbf4b8ac 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -579,9 +579,8 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id)
return FALSE;
}
-BOOL get_is_item_worn(const LLUUID& id)
+BOOL get_is_item_worn(const LLUUID& id, const LLViewerInventoryItem* item)
{
- const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
@@ -619,6 +618,21 @@ BOOL get_is_item_worn(const LLUUID& id)
return FALSE;
}
+BOOL get_is_item_worn(const LLUUID& id)
+{
+ const LLViewerInventoryItem* item = gInventory.getItem(id);
+ return get_is_item_worn(item);
+}
+
+BOOL get_is_item_worn(const LLViewerInventoryItem* item)
+{
+ if (!item)
+ {
+ return FALSE;
+ }
+ return get_is_item_worn(item->getUUID(), item);
+}
+
BOOL get_can_item_be_worn(const LLUUID& id)
{
const LLViewerInventoryItem* item = gInventory.getItem(id);
@@ -682,17 +696,17 @@ BOOL get_can_item_be_worn(const LLUUID& id)
return FALSE;
}
-BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
+bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id, bool check_worn)
{
if (!model)
{
- return FALSE;
+ return false;
}
// Can't delete an item that's in the library.
if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID()))
{
- return FALSE;
+ return false;
}
// Disable delete from COF folder; have users explicitly choose "detach/take off",
@@ -701,20 +715,20 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
{
if (get_is_item_worn(id))
{
- return FALSE;
+ return false;
}
}
const LLInventoryObject *obj = model->getItem(id);
if (obj && obj->getIsLinkType())
{
- return TRUE;
+ return true;
}
- if (get_is_item_worn(id))
+ if (check_worn && get_is_item_worn(id))
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool get_is_item_editable(const LLUUID& inv_item_id)
@@ -2759,7 +2773,7 @@ bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventory
{
if (item)
{
- return !get_is_item_removable(&gInventory, item->getUUID());
+ return !get_is_item_removable(&gInventory, item->getUUID(), true);
}
if (cat)
{
@@ -3024,6 +3038,8 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
bool marketplacelistings_item = false;
+ bool has_worn = false;
+ bool needs_replacement = false;
LLAllDescendentsPassedFilter f;
for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
{
@@ -3032,14 +3048,69 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
folder->applyFunctorRecursively(f);
}
LLFolderViewModelItemInventory * viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*it)->getViewModelItem());
- if (viewModel && gInventory.isObjectDescendentOf(viewModel->getUUID(), marketplacelistings_id))
+ LLUUID obj_id = viewModel->getUUID();
+ if (viewModel && gInventory.isObjectDescendentOf(obj_id, marketplacelistings_id))
{
marketplacelistings_item = true;
break;
}
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(obj_id);
+ if (cat)
+ {
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+
+ gInventory.collectDescendents(obj_id, categories, items, FALSE);
+
+ for (LLInventoryModel::item_array_t::value_type& item : items)
+ {
+ if (get_is_item_worn(item))
+ {
+ has_worn = true;
+ LLWearableType::EType type = item->getWearableType();
+ if (type == LLWearableType::WT_SHAPE
+ || type == LLWearableType::WT_SKIN
+ || type == LLWearableType::WT_HAIR
+ || type == LLWearableType::WT_EYES)
+ {
+ needs_replacement = true;
+ break;
+ }
+ }
+ }
+ if (needs_replacement)
+ {
+ break;
+ }
+ }
+ LLViewerInventoryItem* item = gInventory.getItem(obj_id);
+ if (item && get_is_item_worn(item))
+ {
+ has_worn = true;
+ LLWearableType::EType type = item->getWearableType();
+ if (type == LLWearableType::WT_SHAPE
+ || type == LLWearableType::WT_SKIN
+ || type == LLWearableType::WT_HAIR
+ || type == LLWearableType::WT_EYES)
+ {
+ needs_replacement = true;
+ break;
+ }
+ }
}
// Fall through to the generic confirmation if the user choose to ignore the specialized one
- if ( (!f.allDescendentsPassedFilter()) && !marketplacelistings_item && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
+ if (needs_replacement)
+ {
+ LLNotificationsUtil::add("CantDeleteRequiredClothing");
+ }
+ else if (has_worn)
+ {
+ LLSD payload;
+ payload["has_worn"] = true;
+ LLNotificationsUtil::add("DeleteWornItems", LLSD(), payload, boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ }
+ else if ( (!f.allDescendentsPassedFilter()) && !marketplacelistings_item && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
{
LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
}
@@ -3362,11 +3433,81 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0 && !root.isDead() && !root.get()->isDead())
{
+ bool has_worn = notification["payload"]["has_worn"].asBoolean();
LLFolderView* folder_root = root.get();
//Need to remove item from DND before item is removed from root folder view
//because once removed from root folder view the item is no longer a selected item
removeItemFromDND(folder_root);
- folder_root->removeSelectedItems();
+
+ // removeSelectedItems will change selection, collect worn items beforehand
+ uuid_vec_t worn;
+ uuid_vec_t item_deletion_list;
+ uuid_vec_t cat_deletion_list;
+ if (has_worn)
+ {
+ //Get selected items
+ LLFolderView::selected_items_t selectedItems = folder_root->getSelectedItems();
+
+ //If user is in DND and deletes item, make sure the notification is not displayed by removing the notification
+ //from DND history and .xml file. Once this is done, upon exit of DND mode the item deleted will not show a notification.
+ for (LLFolderView::selected_items_t::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it)
+ {
+ LLFolderViewModelItemInventory* viewModel = dynamic_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem());
+
+ LLUUID obj_id = viewModel->getUUID();
+ LLViewerInventoryCategory* cat = gInventory.getCategory(obj_id);
+ bool cat_has_worn = false;
+ if (cat)
+ {
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+
+ gInventory.collectDescendents(obj_id, categories, items, FALSE);
+
+ for (LLInventoryModel::item_array_t::value_type& item : items)
+ {
+ if (get_is_item_worn(item))
+ {
+ worn.push_back(item->getUUID());
+ cat_has_worn = true;
+ }
+ }
+ if (cat_has_worn)
+ {
+ cat_deletion_list.push_back(obj_id);
+ }
+ }
+ LLViewerInventoryItem* item = gInventory.getItem(obj_id);
+ if (item && get_is_item_worn(item))
+ {
+ worn.push_back(obj_id);
+ item_deletion_list.push_back(obj_id);
+ }
+ }
+ }
+
+ // removeSelectedItems will check if items are worn before deletion,
+ // don't 'unwear' yet to prevent race conditions from unwearing
+ // and removing simultaneously
+ folder_root->removeSelectedItems();
+
+ // unwear then delete the rest
+ if (!worn.empty())
+ {
+ // should fire once after every item gets detached
+ LLAppearanceMgr::instance().removeItemsFromAvatar(worn,
+ [item_deletion_list, cat_deletion_list]()
+ {
+ for (const LLUUID& id : item_deletion_list)
+ {
+ remove_inventory_item(id, NULL);
+ }
+ for (const LLUUID& id : cat_deletion_list)
+ {
+ remove_inventory_category(id, NULL);
+ }
+ });
+ }
// Update the marketplace listings that have been affected by the operation
updateMarketplaceFolders();
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 925217dda3..a8a9bb9735 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -47,11 +47,12 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id);
// Is this item or its baseitem is worn, attached, etc...
BOOL get_is_item_worn(const LLUUID& id);
+BOOL get_is_item_worn(const LLViewerInventoryItem* item);
// Could this item be worn (correct type + not already being worn)
BOOL get_can_item_be_worn(const LLUUID& id);
-BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id);
+bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id, bool check_worn);
// Performs the appropiate edit action (if one exists) for this item
bool get_is_item_editable(const LLUUID& inv_item_id);
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 845ea01f56..d5fce2cda7 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -58,6 +58,7 @@
static LLPanelInjector<LLInventoryGallery> t_inventory_gallery("inventory_gallery");
const S32 GALLERY_ITEMS_PER_ROW_MIN = 2;
+const S32 FAST_LOAD_THUMBNAIL_TRSHOLD = 50; // load folders below this value immediately
// Helper dnd functions
BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, BOOL drop, std::string& tooltip_msg, BOOL is_link);
@@ -106,6 +107,7 @@ LLInventoryGallery::LLInventoryGallery(const LLInventoryGallery::Params& p)
mGalleryWidthFactor(p.gallery_width_factor),
mIsInitialized(false),
mRootDirty(false),
+ mLoadThumbnailsImmediately(true),
mNeedsArrange(false),
mSearchType(LLInventoryFilter::SEARCHTYPE_NAME),
mSortOrder(LLInventoryFilter::SO_DATE)
@@ -540,6 +542,12 @@ void LLInventoryGallery::addToGallery(LLInventoryGalleryItem* item)
int n_prev = n - 1;
int row_count_prev = (n_prev % mItemsInRow) == 0 ? n_prev / mItemsInRow : n_prev / mItemsInRow + 1;
+ // Avoid loading too many items.
+ // Intent is for small folders to display all content fast
+ // and for large folders to load content mostly as needed
+ // Todo: ideally needs to unload images outside visible area
+ mLoadThumbnailsImmediately = mItemsAddedCount < FAST_LOAD_THUMBNAIL_TRSHOLD;
+
bool add_row = row_count != row_count_prev;
int pos = 0;
if (add_row)
@@ -573,6 +581,8 @@ void LLInventoryGallery::removeFromGalleryLast(LLInventoryGalleryItem* item, boo
mItemsAddedCount--;
mIndexToItemMap.erase(mItemsAddedCount);
+ mLoadThumbnailsImmediately = mItemsAddedCount < FAST_LOAD_THUMBNAIL_TRSHOLD;
+
bool remove_row = row_count != row_count_prev;
removeFromLastRow(mItems[mItemsAddedCount]);
mItems.pop_back();
@@ -636,6 +646,7 @@ LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, L
gitem->setUUID(item_id);
gitem->setGallery(this);
gitem->setType(type, inventory_type, flags, is_link);
+ gitem->setLoadImmediately(mLoadThumbnailsImmediately);
gitem->setThumbnail(thumbnail_id);
gitem->setWorn(is_worn);
gitem->setCreatorName(get_searchable_creator_name(&gInventory, item_id));
@@ -997,6 +1008,7 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id)
if (mItemMap[item_id])
{
+ mItemMap[item_id]->setLoadImmediately(mLoadThumbnailsImmediately);
mItemMap[item_id]->setThumbnail(thumbnail_id);
bool passes_filter = checkAgainstFilters(mItemMap[item_id], mFilterSubString);
@@ -1673,7 +1685,7 @@ BOOL LLInventoryGallery::canCut() const
return FALSE;
}
}
- else if (!get_is_item_removable(&gInventory, id))
+ else if (!get_is_item_removable(&gInventory, id, true))
{
return FALSE;
}
@@ -1852,42 +1864,149 @@ void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
- for (const LLUUID& id : selected_ids)
+ bool has_worn = notification["payload"]["has_worn"].asBoolean();
+ uuid_vec_t worn;
+ uuid_vec_t item_deletion_list;
+ uuid_vec_t cat_deletion_list;
+ for (const LLUUID& obj_id : selected_ids)
{
- LLInventoryObject* obj = gInventory.getObject(id);
- if (!obj)
- {
- return;
- }
- if (obj->getType() == LLAssetType::AT_CATEGORY)
+ LLViewerInventoryCategory* cat = gInventory.getCategory(obj_id);
+ if (cat)
{
- if (get_is_category_removable(&gInventory, id))
+ bool cat_has_worn = false;
+ if (has_worn)
+ {
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+
+ gInventory.collectDescendents(obj_id, categories, items, FALSE);
+
+ for (LLInventoryModel::item_array_t::value_type& item : items)
+ {
+ if (get_is_item_worn(item))
+ {
+ worn.push_back(item->getUUID());
+ cat_has_worn = true;
+ }
+ }
+ }
+ if (cat_has_worn)
+ {
+ cat_deletion_list.push_back(obj_id);
+ }
+ else
{
- gInventory.removeCategory(id);
+ gInventory.removeCategory(obj_id);
}
}
- else
+ LLViewerInventoryItem* item = gInventory.getItem(obj_id);
+ if (item)
{
- if (get_is_item_removable(&gInventory, id))
+ if (has_worn && get_is_item_worn(item))
+ {
+ worn.push_back(item->getUUID());
+ item_deletion_list.push_back(item->getUUID());
+ }
+ else
{
- gInventory.removeItem(id);
+ gInventory.removeItem(obj_id);
}
}
}
+
+ if (!worn.empty())
+ {
+ // should fire once after every item gets detached
+ LLAppearanceMgr::instance().removeItemsFromAvatar(worn,
+ [item_deletion_list, cat_deletion_list]()
+ {
+ for (const LLUUID& id : item_deletion_list)
+ {
+ remove_inventory_item(id, NULL);
+ }
+ for (const LLUUID& id : cat_deletion_list)
+ {
+ remove_inventory_category(id, NULL);
+ }
+ });
+ }
}
}
void LLInventoryGallery::deleteSelection()
{
- if (!LLInventoryAction::sDeleteConfirmationDisplayed) // ask for the confirmation at least once per session
+ bool has_worn = false;
+ bool needs_replacement = false;
+ for (const LLUUID& id : mSelectedItemIDs)
{
- LLNotifications::instance().setIgnored("DeleteItems", false);
- LLInventoryAction::sDeleteConfirmationDisplayed = true;
+ LLViewerInventoryCategory* cat = gInventory.getCategory(id);
+ if (cat)
+ {
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+
+ gInventory.collectDescendents(id, categories, items, FALSE);
+
+ for (LLInventoryModel::item_array_t::value_type& item : items)
+ {
+ if (get_is_item_worn(item))
+ {
+ has_worn = true;
+ LLWearableType::EType type = item->getWearableType();
+ if (type == LLWearableType::WT_SHAPE
+ || type == LLWearableType::WT_SKIN
+ || type == LLWearableType::WT_HAIR
+ || type == LLWearableType::WT_EYES)
+ {
+ needs_replacement = true;
+ break;
+ }
+ }
+ }
+ if (needs_replacement)
+ {
+ break;
+ }
+ }
+
+ LLViewerInventoryItem* item = gInventory.getItem(id);
+ if (item && get_is_item_worn(item))
+ {
+ has_worn = true;
+ LLWearableType::EType type = item->getWearableType();
+ if (type == LLWearableType::WT_SHAPE
+ || type == LLWearableType::WT_SKIN
+ || type == LLWearableType::WT_HAIR
+ || type == LLWearableType::WT_EYES)
+ {
+ needs_replacement = true;
+ break;
+ }
+ }
+ }
+
+ if (needs_replacement)
+ {
+ LLNotificationsUtil::add("CantDeleteRequiredClothing");
}
+ else if (has_worn)
+ {
+ LLSD payload;
+ payload["has_worn"] = true;
+ LLNotificationsUtil::add("DeleteWornItems", LLSD(), payload, boost::bind(&LLInventoryGallery::onDelete, _1, _2, mSelectedItemIDs));
+ }
+ else
+ {
+ if (!LLInventoryAction::sDeleteConfirmationDisplayed) // ask for the confirmation at least once per session
+ {
+ LLNotifications::instance().setIgnored("DeleteItems", false);
+ LLInventoryAction::sDeleteConfirmationDisplayed = true;
+ }
- LLSD args;
- args["QUESTION"] = LLTrans::getString("DeleteItem");
- LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryGallery::onDelete, _1, _2, mSelectedItemIDs));
+ LLSD args;
+ args["QUESTION"] = LLTrans::getString("DeleteItem");
+ LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryGallery::onDelete, _1, _2, mSelectedItemIDs));
+ }
}
bool LLInventoryGallery::canDeleteSelection()
@@ -1913,7 +2032,7 @@ bool LLInventoryGallery::canDeleteSelection()
return false;
}
}
- else if (!get_is_item_removable(&gInventory, id))
+ else if (!get_is_item_removable(&gInventory, id, true))
{
return false;
}
@@ -2420,9 +2539,7 @@ void LLInventoryGallery::startDrag()
ids.push_back(selected_id);
}
}
- // We must have set this for some reason, but it's causing compile errors
- (void)src;
- LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, LLToolDragAndDrop::SOURCE_AGENT);
+ LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, src);
}
bool LLInventoryGallery::areViewsInitialized()
@@ -2570,6 +2687,7 @@ BOOL LLInventoryGalleryItem::postBuild()
{
mNameText = getChild<LLTextBox>("item_name");
mTextBgPanel = getChild<LLPanel>("text_bg_panel");
+ mThumbnailCtrl = getChild<LLThumbnailCtrl>("preview_thumbnail");
return TRUE;
}
@@ -2645,14 +2763,19 @@ void LLInventoryGalleryItem::setThumbnail(LLUUID id)
mDefaultImage = id.isNull();
if(mDefaultImage)
{
- getChild<LLThumbnailCtrl>("preview_thumbnail")->clearTexture();
+ mThumbnailCtrl->clearTexture();
}
else
{
- getChild<LLThumbnailCtrl>("preview_thumbnail")->setValue(id);
+ mThumbnailCtrl->setValue(id);
}
}
+void LLInventoryGalleryItem::setLoadImmediately(bool val)
+{
+ mThumbnailCtrl->setInitImmediately(val);
+}
+
void LLInventoryGalleryItem::draw()
{
if (isFadeItem())
@@ -2667,7 +2790,7 @@ void LLInventoryGalleryItem::draw()
// Draw border
LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "MenuItemHighlightBgColor" : "TextFgTentativeColor", LLColor4::white);
- LLRect border = getChildView("preview_thumbnail")->getRect();
+ LLRect border = mThumbnailCtrl->getRect();
border.mRight = border.mRight + 1;
border.mTop = border.mTop + 1;
gl_rect_2d(border, border_color.get(), FALSE);
@@ -2889,7 +3012,7 @@ void LLInventoryGalleryItem::updateNameText()
mNameText->setFont(getTextFont());
mNameText->setText(mItemName + mPermSuffix + mWornSuffix);
mNameText->setToolTip(mItemName + mPermSuffix + mWornSuffix);
- getChild<LLThumbnailCtrl>("preview_thumbnail")->setToolTip(mItemName + mPermSuffix + mWornSuffix);
+ mThumbnailCtrl->setToolTip(mItemName + mPermSuffix + mWornSuffix);
}
bool LLInventoryGalleryItem::isFadeItem()
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index 9b3f12701f..0c52e7b713 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -39,6 +39,7 @@ class LLInventoryGalleryItem;
class LLScrollContainer;
class LLTextBox;
class LLThumbnailsObserver;
+class LLThumbnailCtrl;
class LLGalleryGestureObserver;
class LLInventoryGalleryContextMenu;
@@ -246,6 +247,7 @@ private:
int mRowCount;
int mItemsAddedCount;
bool mGalleryCreated;
+ bool mLoadThumbnailsImmediately;
bool mNeedsArrange;
/* Params */
@@ -342,6 +344,7 @@ public:
LLAssetType::EType getAssetType() { return mType; }
void setThumbnail(LLUUID id);
void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; }
+ void setLoadImmediately(bool val);
bool isFolder() { return mIsFolder; }
bool isLink() { return mIsLink; }
EInventorySortGroup getSortGroup() { return mSortGroup; }
@@ -354,6 +357,7 @@ private:
LLUUID mUUID;
LLTextBox* mNameText;
LLPanel* mTextBgPanel;
+ LLThumbnailCtrl* mThumbnailCtrl;
bool mSelected;
bool mWorn;
bool mDefaultImage;
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 5f4b816b99..2bca33dec4 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -388,6 +388,43 @@ bool is_inbox_folder(LLUUID item_id)
return gInventory.isObjectDescendentOf(item_id, inbox_id);
}
+bool is_category_removable(const LLUUID &folder_id, bool check_worn)
+{
+ if (!get_is_category_removable(&gInventory, folder_id))
+ {
+ return false;
+ }
+
+ // check children
+ LLInventoryModel::cat_array_t* cat_array;
+ LLInventoryModel::item_array_t* item_array;
+ gInventory.getDirectDescendentsOf(folder_id, cat_array, item_array);
+
+ for (LLInventoryModel::item_array_t::value_type& item : *item_array)
+ {
+ if (!get_is_item_removable(&gInventory, item->getUUID(), check_worn))
+ {
+ return false;
+ }
+ }
+
+ for (LLInventoryModel::cat_array_t::value_type& cat : *cat_array)
+ {
+ if (!is_category_removable(cat->getUUID(), check_worn))
+ {
+ return false;
+ }
+ }
+
+ const LLUUID mp_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ if (mp_id.notNull() && gInventory.isObjectDescendentOf(folder_id, mp_id))
+ {
+ return false;
+ }
+
+ return true;
+}
+
void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* menu)
{
LLUUID selected_id = mUUIDs.front();
@@ -495,7 +532,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
}
items.push_back(std::string("Purge Item"));
- if (is_folder && !get_is_category_removable(&gInventory, selected_id))
+ if (is_folder && !is_category_removable(selected_id, true))
{
disabled_items.push_back(std::string("Purge Item"));
}
@@ -542,11 +579,16 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
items.push_back(std::string("Cut"));
items.push_back(std::string("Delete"));
- if(!get_is_category_removable(&gInventory, selected_id))
+
+ if(!is_category_removable(selected_id, false))
{
disabled_items.push_back(std::string("Delete"));
disabled_items.push_back(std::string("Cut"));
}
+ else if (!is_category_removable(selected_id, true))
+ {
+ disabled_items.push_back(std::string("Cut"));
+ }
if(!is_inbox)
{
@@ -577,11 +619,15 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
{
items.push_back(std::string("Delete"));
}
- if(!get_is_item_removable(&gInventory, selected_id))
+ if (!get_is_item_removable(&gInventory, selected_id, false))
{
disabled_items.push_back(std::string("Delete"));
disabled_items.push_back(std::string("Cut"));
}
+ else if(!get_is_item_removable(&gInventory, selected_id, true))
+ {
+ disabled_items.push_back(std::string("Cut"));
+ }
if (selected_item && (selected_item->getInventoryType() != LLInventoryType::IT_CALLINGCARD) && !is_inbox && selected_item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
{
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 23129f7d44..cac859387c 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -240,7 +240,7 @@ void LLInventoryItemsList::refresh()
case REFRESH_LIST_SORT:
{
// Filter, sort, rearrange and notify parent about shape changes
- filterItems();
+ filterItems(true, true);
if (mAddedItems.size() == 0)
{
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index ce41105f98..5b83298bb9 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -51,20 +51,20 @@ public:
/**
* Let list know items need to be refreshed in next doIdle()
*/
- void setNeedsRefresh(bool needs_refresh){ mRefreshState = needs_refresh ? REFRESH_ALL : REFRESH_COMPLETE; }
+ void setNeedsRefresh(bool needs_refresh) { mRefreshState = needs_refresh ? REFRESH_ALL : REFRESH_COMPLETE; }
- U32 getNeedsRefresh(){ return mRefreshState; }
+ U32 getNeedsRefresh() { return mRefreshState; }
/**
* Sets the flag indicating that the list needs to be refreshed even if it is
* not currently visible.
*/
- void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; }
+ void setForceRefresh(bool force_refresh) { mForceRefresh = force_refresh; }
/**
* If refreshes when invisible.
*/
- bool getForceRefresh(){ return mForceRefresh; }
+ bool getForceRefresh() { return mForceRefresh; }
virtual bool selectItemByValue(const LLSD& value, bool select = true);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 54f91451ac..a7d39b1ef6 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1922,46 +1922,52 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
}
//static
-void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL use_main_panel, BOOL take_keyboard_focus, BOOL reset_filter)
+void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id,
+ bool use_main_panel, bool take_keyboard_focus, bool reset_filter)
{
LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
sidepanel_inventory->showInventoryPanel();
- bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX)));
-
- if (!in_inbox && (use_main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected()))
+ LLUUID cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
+ bool in_inbox = gInventory.isObjectDescendentOf(obj_id, cat_id);
+ if (!in_inbox && use_main_panel)
{
sidepanel_inventory->selectAllItemsPanel();
}
- LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
- if(!auto_open && inventory_floater && inventory_floater->getVisible())
+ if (!auto_open)
{
- LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
- LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
- if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+ LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
+ if (inventory_floater && inventory_floater->getVisible())
{
- LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL;
- main_panel->setGallerySelection(obj_id);
- return;
+ LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
+ LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
+ if (main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+ {
+ LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL;
+ main_panel->setGallerySelection(obj_id);
+ return;
+ }
}
}
- LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
- if (main_inventory && main_inventory->isSingleFolderMode()
- && use_main_panel)
+ if (use_main_panel)
{
- const LLInventoryObject *obj = gInventory.getObject(obj_id);
- if (obj)
+ LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (main_inventory && main_inventory->isSingleFolderMode())
{
- LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL;
- main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
- main_inventory->setGallerySelection(obj_id);
- return;
+ const LLInventoryObject *obj = gInventory.getObject(obj_id);
+ if (obj)
+ {
+ LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL;
+ main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
+ main_inventory->setGallerySelection(obj_id);
+ return;
+ }
}
}
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel)
{
LL_DEBUGS("Messaging", "Inventory") << "Highlighting" << obj_id << LL_ENDL;
@@ -1973,11 +1979,8 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
if (in_inbox)
{
-
- LLInventoryPanel * inventory_panel = NULL;
sidepanel_inventory->openInbox();
- inventory_panel = sidepanel_inventory->getInboxPanel();
-
+ LLInventoryPanel* inventory_panel = sidepanel_inventory->getInboxPanel();
if (inventory_panel)
{
inventory_panel->setSelection(obj_id, take_keyboard_focus);
@@ -2002,7 +2005,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id)
{
-
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
{
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 341be0cf86..2c35bdcd11 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -244,12 +244,12 @@ public:
// "Auto_open" determines if we open an inventory panel if none are open.
static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
- static void openInventoryPanelAndSetSelection(BOOL auto_open,
+ static void openInventoryPanelAndSetSelection(bool auto_open,
const LLUUID& obj_id,
- BOOL use_main_panel = FALSE,
- BOOL take_keyboard_focus = TAKE_FOCUS_YES,
- BOOL reset_filter = FALSE);
- static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
+ bool use_main_panel = false,
+ bool take_keyboard_focus = true,
+ bool reset_filter = false);
+ static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index d6f3068610..9925a552ce 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -230,10 +230,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
// Can't access old mTextEntry fields as they are protected, so lets build new params
// That is C&P from LLComboBox::createLineEditor function
- static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0;
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
- text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button;
+ text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW;
LLLineEditor::Params params = p.combo_editor;
params.rect(text_entry_rect);
@@ -706,7 +705,7 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
value["item_type"] = LANDMARK;
value["AssetUUID"] = landmark_items[i]->getAssetUUID();
- add(landmark_items[i]->getName(), value);
+ addLocationHistoryEntry(landmark_items[i]->getName(), value);
}
//Let's add teleport history items
@@ -731,7 +730,7 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
std::string region_name = result->mTitle.substr(0, result->mTitle.find(','));
//TODO*: add Surl to teleportitem or parse region name from title
value["tooltip"] = LLSLURL(region_name, result->mGlobalPos).getSLURLString();
- add(result->getTitle(), value);
+ addLocationHistoryEntry(result->getTitle(), value);
}
result = std::find_if(result + 1, th_items.end(), boost::bind(
&LLLocationInputCtrl::findTeleportItemsByTitle, this,
@@ -984,6 +983,17 @@ void LLLocationInputCtrl::positionMaturityButton()
mMaturityButton->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad);
}
+void LLLocationInputCtrl::addLocationHistoryEntry(const std::string& title, const LLSD& value)
+{
+ // SL-20286 : Duplication of autocomplete results occurs when entering some search queries in the navigation bar
+ // Exclude visual duplicates (items with the same titles) in the dropdown list
+ LLScrollListItem* item = mList->getItemByLabel(title);
+ if (!item)
+ {
+ add(title, value);
+ }
+}
+
void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter)
{
LLLocationHistory::location_list_t filtered_items;
@@ -1008,7 +1018,7 @@ void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter)
//location history can contain only typed locations
value["item_type"] = TYPED_REGION_SLURL;
value["global_pos"] = it->mGlobalPos.getValue();
- add(it->getLocation(), value);
+ addLocationHistoryEntry(it->getLocation(), value);
}
}
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index af2a9f6afd..cbc05602ce 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -145,6 +145,7 @@ private:
void refreshMaturityButton();
void positionMaturityButton();
+ void addLocationHistoryEntry(const std::string& title, const LLSD& value);
void rebuildLocationHistory(const std::string& filter = LLStringUtil::null);
bool findTeleportItemsByTitle(const LLTeleportHistoryItem& item, const std::string& filter);
void setText(const LLStringExplicit& text);
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 8c03292361..5f3ad7c58f 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -59,7 +59,7 @@
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/local_time_adjustor.hpp>
-const S32 LOG_RECALL_SIZE = 2048;
+const S32 LOG_RECALL_SIZE = 20480;
const std::string LL_IM_TIME("time");
const std::string LL_IM_DATE_TIME("datetime");
@@ -651,6 +651,27 @@ std::string LLLogChat::oldLogFileName(std::string filename)
return scanResult;
}
+bool LLLogChat::transcriptFilesExist()
+{
+ std::string pattern = "*." + LL_TRANSCRIPT_FILE_EXTENSION;
+ // get Users log directory
+ std::string dirname = gDirUtilp->getPerAccountChatLogsDir();
+
+ // add final OS dependent delimiter
+ dirname += gDirUtilp->getDirDelimiter();
+
+ LLDirIterator iter(dirname, pattern);
+ std::string filename;
+ while (iter.next(filename))
+ {
+ std::string fullname = gDirUtilp->add(dirname, filename);
+ if (isTranscriptFileFound(fullname))
+ {
+ return true;
+ }
+ }
+ return false;
+}
// static
void LLLogChat::findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions)
{
diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h
index 5dce8ab1d2..9e2e060de2 100644
--- a/indra/newview/lllogchat.h
+++ b/indra/newview/lllogchat.h
@@ -103,6 +103,7 @@ public:
const std::string& from,
const LLUUID& from_id,
const std::string& line);
+ static bool transcriptFilesExist();
static void findTranscriptFiles(std::string pattern, std::vector<std::string>& list_of_transcriptions);
static void getListOfTranscriptFiles(std::vector<std::string>& list);
static void getListOfTranscriptBackupFiles(std::vector<std::string>& list_of_transcriptions);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index d6eba6b4bf..549962ea86 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -5446,7 +5446,7 @@ void on_new_single_inventory_upload_complete(
}
else
{
- LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE);
+ LLInventoryPanel::openInventoryPanelAndSetSelection(true, server_response["new_inventory_item"].asUUID(), true, false, true);
}
// restore keyboard focus
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index f5ee1171d9..61448828d1 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -352,10 +352,9 @@ void LLNavigationBar::draw()
{
if (isBackgroundVisible())
{
- static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow");
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
- color_drop_shadow, drop_shadow_floater );
+ color_drop_shadow, DROP_SHADOW_FLOATER);
}
LLPanel::draw();
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 90b9cdc133..df8ab84663 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -46,7 +46,7 @@ LLAlertHandler::LLAlertHandler(const std::string& name, const std::string& notif
mIsModal(is_modal)
{
LLScreenChannelBase::Params p;
- p.id = LLUUID(gSavedSettings.getString("AlertChannelUUID"));
+ p.id = ALERT_CHANNEL_UUID;
p.display_toasts_always = true;
p.toast_align = NA_CENTRE;
p.channel_align = CA_CENTRE;
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index f87ebf219b..3c3d96f72c 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -56,9 +56,8 @@ LLGroupHandler::~LLGroupHandler()
//--------------------------------------------------------------------------
void LLGroupHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ mChannel.get()->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 3f22467544..0e7222838d 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -63,8 +63,7 @@ LLOfferHandler::~LLOfferHandler()
void LLOfferHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel.get()->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index bb39d8f362..2f7dfa8e77 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -61,9 +61,8 @@ LLScriptHandler::~LLScriptHandler()
//--------------------------------------------------------------------------
void LLScriptHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ mChannel.get()->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 91f93067de..dc24e651cb 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -60,9 +60,8 @@ LLTipHandler::~LLTipHandler()
//--------------------------------------------------------------------------
void LLTipHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ mChannel.get()->init(channel_right_bound - NOTIFY_BOX_WIDTH, channel_right_bound);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index de988555c5..e621c32911 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -433,8 +433,7 @@ bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2)
}
void LLOutfitGallery::reArrangeRows(S32 row_diff)
-{
-
+{
std::vector<LLOutfitGalleryItem*> buf_items = mItems;
for (std::vector<LLOutfitGalleryItem*>::const_reverse_iterator it = buf_items.rbegin(); it != buf_items.rend(); ++it)
{
@@ -446,16 +445,24 @@ void LLOutfitGallery::reArrangeRows(S32 row_diff)
}
mHiddenItems.clear();
- mItemsInRow+= row_diff;
+ mItemsInRow += row_diff;
updateGalleryWidth();
std::sort(buf_items.begin(), buf_items.end(), compareGalleryItem);
-
+
+ std::string cur_filter = getFilterSubString();
+ LLStringUtil::toUpper(cur_filter);
+
for (std::vector<LLOutfitGalleryItem*>::const_iterator it = buf_items.begin(); it != buf_items.end(); ++it)
{
- (*it)->setHidden(false);
- applyFilter(*it,sFilterSubString);
+ std::string outfit_name = (*it)->getItemName();
+ LLStringUtil::toUpper(outfit_name);
+
+ bool hidden = (std::string::npos == outfit_name.find(cur_filter));
+ (*it)->setHidden(hidden);
+
addToGallery(*it);
}
+
updateMessageVisibility();
}
@@ -725,9 +732,9 @@ LLOutfitGallery::~LLOutfitGallery()
}
}
-void LLOutfitGallery::setFilterSubString(const std::string& string)
+// virtual
+void LLOutfitGallery::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
{
- sFilterSubString = string;
reArrangeRows();
}
@@ -743,20 +750,6 @@ void LLOutfitGallery::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id)
}
}
-void LLOutfitGallery::applyFilter(LLOutfitGalleryItem* item, const std::string& filter_substring)
-{
- if (!item) return;
-
- std::string outfit_name = item->getItemName();
- LLStringUtil::toUpper(outfit_name);
-
- std::string cur_filter = filter_substring;
- LLStringUtil::toUpper(cur_filter);
-
- bool hidden = (std::string::npos == outfit_name.find(cur_filter));
- item->setHidden(hidden);
-}
-
void LLOutfitGallery::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
{
}
@@ -904,11 +897,11 @@ bool LLOutfitGallery::hasDefaultImage(const LLUUID& outfit_cat_id)
void LLOutfitGallery::updateMessageVisibility()
{
- if(mItems.empty())
+ if (mItems.empty())
{
mMessageTextBox->setVisible(TRUE);
mScrollPanel->setVisible(FALSE);
- std::string message = sFilterSubString.empty()? getString("no_outfits_msg") : getString("no_matched_outfits_msg");
+ std::string message = getString(getFilterSubString().empty() ? "no_outfits_msg" : "no_matched_outfits_msg");
mMessageTextBox->setValue(message);
}
else
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 9915752962..f2366e6494 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -90,7 +90,7 @@ public:
void wearSelectedOutfit();
- /*virtual*/ void setFilterSubString(const std::string& string);
+ /*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
/*virtual*/ void getCurrentCategories(uuid_vec_t& vcur);
/*virtual*/ void updateAddedCategory(LLUUID cat_id);
@@ -117,8 +117,6 @@ protected:
/*virtual*/ void onExpandAllFolders() {}
/*virtual*/ LLOutfitListGearMenuBase* createGearMenu();
- void applyFilter(LLOutfitGalleryItem* item, const std::string& filter_substring);
-
private:
LLUUID getPhotoAssetId(const LLUUID& outfit_id);
LLUUID getDefaultPhoto();
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 5c7792b0df..27d73fc4ae 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -188,7 +188,7 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
list->setCommitCallback(boost::bind(&LLOutfitsList::onListSelectionChange, this, _1));
// Setting list refresh callback to apply filter on list change.
- list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1));
+ list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onRefreshComplete, this, _1));
list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3));
@@ -199,19 +199,17 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
// Further list updates will be triggered by the category observer.
list->updateList(cat_id);
- // If filter is currently applied we store the initial tab state and
- // open it to show matched items if any.
- if (!sFilterSubString.empty())
+ // If filter is currently applied we store the initial tab state.
+ if (!getFilterSubString().empty())
{
tab->notifyChildren(LLSD().with("action", "store_state"));
- tab->setDisplayChildren(true);
// Setting mForceRefresh flag will make the list refresh its contents
// even if it is not currently visible. This is required to apply the
// filter to the newly added list.
list->setForceRefresh(true);
- list->setFilterSubString(sFilterSubString);
+ list->setFilterSubString(getFilterSubString(), false);
}
}
@@ -314,14 +312,6 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
}
// virtual
-void LLOutfitsList::setFilterSubString(const std::string& string)
-{
- applyFilter(string);
-
- sFilterSubString = string;
-}
-
-// virtual
bool LLOutfitListBase::isActionEnabled(const LLSD& userdata)
{
if (mSelectedOutfitUUID.isNull()) return false;
@@ -494,9 +484,9 @@ void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID
}
}
-void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
+void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl)
{
- if (!ctrl || sFilterSubString.empty())
+ if (!ctrl || getFilterSubString().empty())
return;
for (outfits_map_t::iterator
@@ -510,57 +500,50 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (list != ctrl) continue;
- applyFilterToTab(iter->first, tab, sFilterSubString);
+ applyFilterToTab(iter->first, tab, getFilterSubString());
}
}
-void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
+// virtual
+void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
{
- mAccordion->setFilterSubString(new_filter_substring);
+ mAccordion->setFilterSubString(new_string);
- for (outfits_map_t::iterator
- iter = mOutfitsMap.begin(),
- iter_end = mOutfitsMap.end();
- iter != iter_end; ++iter)
+ outfits_map_t::iterator iter = mOutfitsMap.begin(), iter_end = mOutfitsMap.end();
+ while (iter != iter_end)
{
- LLAccordionCtrlTab* tab = iter->second;
+ const LLUUID& category_id = iter->first;
+ LLAccordionCtrlTab* tab = iter++->second;
if (!tab) continue;
- bool more_restrictive = sFilterSubString.size() < new_filter_substring.size() && !new_filter_substring.substr(0, sFilterSubString.size()).compare(sFilterSubString);
-
- // Restore tab visibility in case of less restrictive filter
- // to compare it with updated string if it was previously hidden.
- if (!more_restrictive)
- {
- tab->setVisible(TRUE);
- }
-
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (list)
{
- list->setFilterSubString(new_filter_substring);
+ list->setFilterSubString(new_string, tab->getDisplayChildren());
}
- if(sFilterSubString.empty() && !new_filter_substring.empty())
+ if (old_string.empty())
{
- //store accordion tab state when filter is not empty
- tab->notifyChildren(LLSD().with("action","store_state"));
+ // Store accordion tab state when filter is not empty
+ tab->notifyChildren(LLSD().with("action", "store_state"));
}
- if (!new_filter_substring.empty())
+ if (!new_string.empty())
{
- applyFilterToTab(iter->first, tab, new_filter_substring);
+ applyFilterToTab(category_id, tab, new_string);
}
else
{
- // restore tab title when filter is empty
+ tab->setVisible(TRUE);
+
+ // Restore tab title when filter is empty
tab->setTitle(tab->getTitle());
- //restore accordion state after all those accodrion tab manipulations
- tab->notifyChildren(LLSD().with("action","restore_state"));
+ // Restore accordion state after all those accodrion tab manipulations
+ tab->notifyChildren(LLSD().with("action", "restore_state"));
// Try restoring the tab selection.
- restoreOutfitSelection(tab, iter->first);
+ restoreOutfitSelection(tab, category_id);
}
}
@@ -586,11 +569,11 @@ void LLOutfitsList::applyFilterToTab(
if (std::string::npos == title.find(cur_filter))
{
- // hide tab if its title doesn't pass filter
- // and it has no visible items
+ // Hide tab if its title doesn't pass filter
+ // and it has no matched items
tab->setVisible(list->hasMatchedItems());
- // remove title highlighting because it might
+ // Remove title highlighting because it might
// have been previously highlighted by less restrictive filter
tab->setTitle(tab->getTitle());
@@ -602,18 +585,6 @@ void LLOutfitsList::applyFilterToTab(
// Try restoring the tab selection.
restoreOutfitSelection(tab, category_id);
}
-
- if (tab->getVisible())
- {
- // Open tab if it has passed the filter.
- tab->setDisplayChildren(true);
- }
- else
- {
- // Set force refresh flag to refresh not visible list
- // when some changes occur in it.
- list->setForceRefresh(true);
- }
}
bool LLOutfitsList::canWearSelected()
@@ -698,11 +669,10 @@ void LLOutfitsList::onCOFChanged()
// These links UUIDs are not the same UUIDs that we have in each wearable items list.
// So we collect base items' UUIDs to find them or links that point to them in wearable
// items lists and update their worn state there.
- for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
- iter != item_array.end();
- ++iter)
+ LLInventoryModel::item_array_t::const_iterator array_iter = item_array.begin(), array_end = item_array.end();
+ while (array_iter < array_end)
{
- vnew.push_back((*iter)->getLinkedUUID());
+ vnew.push_back((*(array_iter++))->getLinkedUUID());
}
// We need to update only items that were added or removed from COF.
@@ -711,20 +681,20 @@ void LLOutfitsList::onCOFChanged()
// Store the ids of items currently linked from COF.
mCOFLinkedItems = vnew;
- for (outfits_map_t::iterator iter = mOutfitsMap.begin();
- iter != mOutfitsMap.end();
- ++iter)
+ // Append removed ids to added ids because we should update all of them.
+ vadded.reserve(vadded.size() + vremoved.size());
+ vadded.insert(vadded.end(), vremoved.begin(), vremoved.end());
+ vremoved.clear();
+
+ outfits_map_t::iterator map_iter = mOutfitsMap.begin(), map_end = mOutfitsMap.end();
+ while (map_iter != map_end)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLAccordionCtrlTab* tab = (map_iter++)->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (!list) continue;
- // Append removed ids to added ids because we should update all of them.
- vadded.reserve(vadded.size() + vremoved.size());
- vadded.insert(vadded.end(), vremoved.begin(), vremoved.end());
-
// Every list updates the labels of changed items or
// the links that point to these items.
list->updateChangedItems(vadded);
@@ -835,7 +805,6 @@ void LLOutfitListBase::onOpen(const LLSD& info)
// arrive.
category->fetch();
refreshList(outfits);
- highlightBaseOutfit();
mIsInitialized = true;
}
@@ -843,6 +812,9 @@ void LLOutfitListBase::onOpen(const LLSD& info)
void LLOutfitListBase::refreshList(const LLUUID& category_id)
{
+ bool wasNull = mRefreshListState.CategoryUUID.isNull();
+ mRefreshListState.CategoryUUID.setNull();
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
@@ -855,27 +827,81 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
LLInventoryModel::EXCLUDE_TRASH,
is_category);
- uuid_vec_t vadded;
- uuid_vec_t vremoved;
+ // Memorize item names for each UUID
+ std::map<LLUUID, std::string> names;
+ for (const LLPointer<LLViewerInventoryCategory>& cat : cat_array)
+ {
+ names.emplace(std::make_pair(cat->getUUID(), cat->getName()));
+ }
+
+ // Fill added and removed items vectors.
+ mRefreshListState.Added.clear();
+ mRefreshListState.Removed.clear();
+ computeDifference(cat_array, mRefreshListState.Added, mRefreshListState.Removed);
+ // Sort added items vector by item name.
+ std::sort(mRefreshListState.Added.begin(), mRefreshListState.Added.end(),
+ [names](const LLUUID& a, const LLUUID& b)
+ {
+ return LLStringUtil::compareDict(names.at(a), names.at(b)) < 0;
+ });
+ // Initialize iterators for added and removed items vectors.
+ mRefreshListState.AddedIterator = mRefreshListState.Added.begin();
+ mRefreshListState.RemovedIterator = mRefreshListState.Removed.begin();
+
+ LL_INFOS() << "added: " << mRefreshListState.Added.size() <<
+ ", removed: " << mRefreshListState.Removed.size() <<
+ ", changed: " << gInventory.getChangedIDs().size() <<
+ LL_ENDL;
+
+ mRefreshListState.CategoryUUID = category_id;
+ if (wasNull)
+ {
+ gIdleCallbacks.addFunction(onIdle, this);
+ }
+}
+
+// static
+void LLOutfitListBase::onIdle(void* userdata)
+{
+ LLOutfitListBase* self = (LLOutfitListBase*)userdata;
- // Create added and removed items vectors.
- computeDifference(cat_array, vadded, vremoved);
+ self->onIdleRefreshList();
+}
+
+void LLOutfitListBase::onIdleRefreshList()
+{
+ if (mRefreshListState.CategoryUUID.isNull())
+ return;
+
+ const F64 MAX_TIME = 0.05f;
+ F64 curent_time = LLTimer::getTotalSeconds();
+ const F64 end_time = curent_time + MAX_TIME;
// Handle added tabs.
- for (uuid_vec_t::const_iterator iter = vadded.begin();
- iter != vadded.end();
- ++iter)
+ while (mRefreshListState.AddedIterator < mRefreshListState.Added.end())
{
- const LLUUID cat_id = (*iter);
+ const LLUUID cat_id = (*mRefreshListState.AddedIterator++);
updateAddedCategory(cat_id);
+
+ curent_time = LLTimer::getTotalSeconds();
+ if (curent_time >= end_time)
+ return;
}
+ mRefreshListState.Added.clear();
+ mRefreshListState.AddedIterator = mRefreshListState.Added.end();
// Handle removed tabs.
- for (uuid_vec_t::const_iterator iter = vremoved.begin(); iter != vremoved.end(); ++iter)
+ while (mRefreshListState.RemovedIterator < mRefreshListState.Removed.end())
{
- const LLUUID cat_id = (*iter);
+ const LLUUID cat_id = (*mRefreshListState.RemovedIterator++);
updateRemovedCategory(cat_id);
+
+ curent_time = LLTimer::getTotalSeconds();
+ if (curent_time >= end_time)
+ return;
}
+ mRefreshListState.Removed.clear();
+ mRefreshListState.RemovedIterator = mRefreshListState.Removed.end();
// Get changed items from inventory model and update outfit tabs
// which might have been renamed.
@@ -888,9 +914,9 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
if (!cat)
{
LLInventoryObject* obj = gInventory.getObject(*items_iter);
- if(!obj || (obj->getType() != LLAssetType::AT_CATEGORY))
+ if (!obj || (obj->getType() != LLAssetType::AT_CATEGORY))
{
- return;
+ break;
}
cat = (LLViewerInventoryCategory*)obj;
}
@@ -900,6 +926,12 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
}
sortOutfits();
+ highlightBaseOutfit();
+
+ gIdleCallbacks.deleteFunction(onIdle, this);
+ mRefreshListState.CategoryUUID.setNull();
+
+ LL_INFOS() << "done" << LL_ENDL;
}
void LLOutfitListBase::computeDifference(
@@ -936,7 +968,6 @@ void LLOutfitListBase::highlightBaseOutfit()
mHighlightedOutfitUUID = base_id;
onHighlightBaseOutfit(base_id, prev_id);
}
-
}
void LLOutfitListBase::removeSelected()
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 66b3165169..43c3ba75b5 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -116,8 +116,20 @@ protected:
void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
virtual void onChangeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) = 0;
+ static void onIdle(void* userdata);
+ void onIdleRefreshList();
+
+ struct
+ {
+ LLUUID CategoryUUID;
+ uuid_vec_t Added;
+ uuid_vec_t Removed;
+ uuid_vec_t::const_iterator AddedIterator;
+ uuid_vec_t::const_iterator RemovedIterator;
+ } mRefreshListState;
+
bool mIsInitialized;
- LLInventoryCategoriesObserver* mCategoriesObserver;
+ LLInventoryCategoriesObserver* mCategoriesObserver;
LLUUID mSelectedOutfitUUID;
// id of currently highlited outfit
LLUUID mHighlightedOutfitUUID;
@@ -225,7 +237,7 @@ public:
//void performAction(std::string action);
- /*virtual*/ void setFilterSubString(const std::string& string);
+ /*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
/*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const;
@@ -295,12 +307,7 @@ private:
* Called upon list refresh event to update tab visibility depending on
* the results of applying filter to the title and list items of the tab.
*/
- void onFilteredWearableItemsListRefresh(LLUICtrl* ctrl);
-
- /**
- * Highlights filtered items and hides tabs which haven't passed filter.
- */
- void applyFilter(const std::string& new_filter_substring);
+ void onRefreshComplete(LLUICtrl* ctrl);
/**
* Applies filter to the given tab
diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp
index 8fa8867c69..16bd8a1380 100644
--- a/indra/newview/llpanelappearancetab.cpp
+++ b/indra/newview/llpanelappearancetab.cpp
@@ -28,12 +28,35 @@
#include "llpanelappearancetab.h"
-
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llviewerinventory.h"
-//virtual
+std::string LLPanelAppearanceTab::sRecentFilterSubString;
+
+void LLPanelAppearanceTab::setFilterSubString(const std::string& new_string)
+{
+ if (new_string != mFilterSubString)
+ {
+ std::string old_string = mFilterSubString;
+ mFilterSubString = new_string;
+ onFilterSubStringChanged(mFilterSubString, old_string);
+ }
+
+ sRecentFilterSubString = new_string;
+}
+
+void LLPanelAppearanceTab::checkFilterSubString()
+{
+ if (sRecentFilterSubString != mFilterSubString)
+ {
+ std::string old_string = mFilterSubString;
+ mFilterSubString = sRecentFilterSubString;
+ onFilterSubStringChanged(mFilterSubString, old_string);
+ }
+}
+
+// virtual
bool LLPanelAppearanceTab::canTakeOffSelected()
{
uuid_vec_t selected_uuids;
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
index 2ed6b00497..e81394dd3c 100644
--- a/indra/newview/llpanelappearancetab.h
+++ b/indra/newview/llpanelappearancetab.h
@@ -35,13 +35,17 @@ public:
LLPanelAppearanceTab() : LLPanel() {}
virtual ~LLPanelAppearanceTab() {}
- virtual void setFilterSubString(const std::string& string) = 0;
+ void setFilterSubString(const std::string& new_string);
+
+ void checkFilterSubString();
+
+ virtual void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string) = 0;
virtual bool isActionEnabled(const LLSD& userdata) = 0;
virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {}
- static const std::string& getFilterSubString() { return sFilterSubString; }
+ const std::string& getFilterSubString() { return mFilterSubString; }
protected:
@@ -50,7 +54,10 @@ protected:
*/
bool canTakeOffSelected();
- static std::string sFilterSubString;
+private:
+ std::string mFilterSubString;
+
+ static std::string sRecentFilterSubString;
};
#endif //LL_LLPANELAPPEARANCETAB_H
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index ff33efe4aa..ad8ed7c144 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -127,6 +127,48 @@ void LLPanelProfileTab::setApplyProgress(bool started)
}
}
+static void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data)
+{
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+ httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
+ LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCore::HttpHeaders::ptr_t httpHeaders;
+
+ LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpOpts->setFollowRedirects(true);
+
+ std::string finalUrl = cap_url + "/" + agent_id.asString();
+
+ LLSD result = httpAdapter->putAndSuspend(httpRequest, finalUrl, data, httpOpts, httpHeaders);
+
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ if (!status)
+ {
+ LL_WARNS("AvatarProperties") << "Failed to put agent information " << data << " for id " << agent_id << LL_ENDL;
+ return;
+ }
+
+ LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Data: " << data << " Result: " << httpResults << LL_ENDL;
+}
+
+bool LLPanelProfileTab::saveAgentUserInfoCoro(std::string name, LLSD value) const
+{
+ std::string cap_url = gAgent.getRegionCapability("AgentProfile");
+ if (cap_url.empty())
+ {
+ LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
+ return false;
+ }
+
+ LLCoros::instance().launch("putAgentUserInfoCoro",
+ boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with(name, value)));
+
+ return true;
+}
+
LLPanelProfilePropertiesProcessorTab::LLPanelProfilePropertiesProcessorTab()
: LLPanelProfileTab()
{
@@ -152,3 +194,13 @@ void LLPanelProfilePropertiesProcessorTab::setAvatarId(const LLUUID & avatar_id)
LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
}
}
+
+void LLPanelProfilePropertiesProcessorTab::updateData()
+{
+ LLUUID avatar_id = getAvatarId();
+ if (!getStarted() && avatar_id.notNull())
+ {
+ setIsLoading();
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(getAvatarId());
+ }
+}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index f182660c8e..1106c44734 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -92,17 +92,17 @@ public:
/**
* Returns avatar ID.
*/
- virtual const LLUUID& getAvatarId() { return mAvatarId; }
+ virtual const LLUUID& getAvatarId() const { return mAvatarId; }
/**
* Sends update data request to server.
*/
- virtual void updateData() {};
+ virtual void updateData(){};
/**
* Clears panel data if viewing avatar info for first time and sends update data request.
*/
- virtual void onOpen(const LLSD& key);
+ virtual void onOpen(const LLSD& key) override;
/**
* Clears all data received from server.
@@ -133,6 +133,8 @@ protected:
const bool getSelfProfile() const { return mSelfProfile; }
+ bool saveAgentUserInfoCoro(std::string name, LLSD value) const;
+
public:
void setIsLoading() { mLoadingState = PROFILE_LOADING; }
void resetLoading() { mLoadingState = PROFILE_INIT; }
@@ -158,12 +160,14 @@ public:
LLPanelProfilePropertiesProcessorTab();
~LLPanelProfilePropertiesProcessorTab();
- /*virtual*/ void setAvatarId(const LLUUID& avatar_id);
+ void setAvatarId(const LLUUID& avatar_id) override;
+
+ void updateData() override;
/**
* Processes data received from server via LLAvatarPropertiesObserver.
*/
- virtual void processProperties(void* data, EAvatarProcessorType type) = 0;
+ virtual void processProperties(void* data, EAvatarProcessorType type) override = 0;
};
#endif // LL_LLPANELAVATAR_H
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 183000ceac..e926ed2b3c 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -104,6 +104,11 @@ LLPanelClassifiedInfo::LLPanelClassifiedInfo()
LLPanelClassifiedInfo::~LLPanelClassifiedInfo()
{
sAllPanels.remove(this);
+
+ if (getAvatarId().notNull())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+ }
}
BOOL LLPanelClassifiedInfo::postBuild()
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index a09964e17d..fc9ca4e47e 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -89,7 +89,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
- mTxtNormalMap->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+ mTxtNormalMap->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE);
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index cbb87f63bb..eb392b3032 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -190,7 +190,7 @@ BOOL LLPanelFace::postBuild()
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
if(mTextureCtrl)
{
- mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
+ mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
@@ -207,7 +207,7 @@ BOOL LLPanelFace::postBuild()
mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
if(mShinyTextureCtrl)
{
- mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectSpecularTexture" )));
+ mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR_TEXTURE);
mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
@@ -224,8 +224,8 @@ BOOL LLPanelFace::postBuild()
mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
if(mBumpyTextureCtrl)
{
- mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectNormalTexture" )));
- mBumpyTextureCtrl->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+ mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL_TEXTURE);
+ mBumpyTextureCtrl->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE);
mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
@@ -3797,7 +3797,7 @@ void LLPanelFace::onCopyTexture()
LLUUID id = mat_data["NormMap"].asUUID();
if (id.notNull() && !get_can_copy_texture(id))
{
- mat_data["NormMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+ mat_data["NormMap"] = DEFAULT_OBJECT_TEXTURE;
mat_data["NormMapNoCopy"] = true;
}
@@ -3807,7 +3807,7 @@ void LLPanelFace::onCopyTexture()
LLUUID id = mat_data["SpecMap"].asUUID();
if (id.notNull() && !get_can_copy_texture(id))
{
- mat_data["SpecMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+ mat_data["SpecMap"] = DEFAULT_OBJECT_TEXTURE;
mat_data["SpecMapNoCopy"] = true;
}
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index ab255d5215..0ab0d85c78 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -134,6 +134,15 @@ void LLPanelGroup::onOpen(const LLSD& key)
if(panel_notices)
panel_notices->refreshNotices();
}
+ if (str_action == "show_notices")
+ {
+ setGroupID(group_id);
+
+ LLAccordionCtrl *tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
+ tab_ctrl->collapseAllTabs();
+ getChild<LLAccordionCtrlTab>("group_notices_tab")->setDisplayChildren(true);
+ tab_ctrl->arrange();
+ }
}
@@ -264,8 +273,15 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data)
void LLPanelGroup::onBtnJoin()
{
- LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
- LLGroupActions::join(mID);
+ if (LLGroupActions::isInGroup(mID))
+ {
+ LLGroupActions::leave(mID);
+ }
+ else
+ {
+ LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
+ LLGroupActions::join(mID);
+ }
}
void LLPanelGroup::changed(LLGroupChange gc)
@@ -303,12 +319,17 @@ void LLPanelGroup::update(LLGroupChange gc)
LLGroupData agent_gdatap;
bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery();
- bool join_btn_visible = !is_member && gdatap->mOpenEnrollment;
+ bool join_btn_visible = is_member || gdatap->mOpenEnrollment;
mButtonJoin->setVisible(join_btn_visible);
mJoinText->setVisible(join_btn_visible);
- if(join_btn_visible)
+ if (is_member)
+ {
+ mJoinText->setValue(getString("group_member"));
+ mButtonJoin->setLabel(getString("leave_txt"));
+ }
+ else if(join_btn_visible)
{
LLStringUtil::format_map_t string_args;
std::string fee_buff;
@@ -323,6 +344,7 @@ void LLPanelGroup::update(LLGroupChange gc)
fee_buff = getString("group_join_free", string_args);
}
mJoinText->setValue(fee_buff);
+ mButtonJoin->setLabel(getString("join_txt"));
}
}
}
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index ab32ea3956..8e4c195013 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -249,6 +249,7 @@ BOOL LLPanelGroupNotices::postBuild()
mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse);
mNoticesList->setCommitOnSelectionChange(TRUE);
mNoticesList->setCommitCallback(onSelectNotice, this);
+ mNoticesList->sortByColumn("date", false);
mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
mBtnNewMessage->setClickedCallback(onClickNewMessage, this);
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 2da431955f..c8256640f2 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -244,7 +244,7 @@ BOOL LLPanelObject::postBuild()
mCtrlSculptTexture = getChild<LLTextureCtrl>("sculpt texture control");
if (mCtrlSculptTexture)
{
- mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE));
+ mCtrlSculptTexture->setDefaultImageAssetID(SCULPT_DEFAULT_TEXTURE);
mCtrlSculptTexture->setCommitCallback( boost::bind(&LLPanelObject::onCommitSculpt, this, _2 ));
mCtrlSculptTexture->setOnCancelCallback( boost::bind(&LLPanelObject::onCancelSculpt, this, _2 ));
mCtrlSculptTexture->setOnSelectCallback( boost::bind(&LLPanelObject::onSelectSculpt, this, _2 ));
@@ -2026,7 +2026,7 @@ void LLPanelObject::onCancelSculpt(const LLSD& data)
if(mSculptTextureRevert == LLUUID::null)
{
- mSculptTextureRevert = LLUUID(SCULPT_DEFAULT_TEXTURE);
+ mSculptTextureRevert = SCULPT_DEFAULT_TEXTURE;
}
mTextureCtrl->setImageAssetID(mSculptTextureRevert);
@@ -2269,7 +2269,7 @@ void LLPanelObject::onCopyParams()
}
else
{
- mClipboardParams["sculpt"]["id"] = LLUUID(SCULPT_DEFAULT_TEXTURE);
+ mClipboardParams["sculpt"]["id"] = SCULPT_DEFAULT_TEXTURE;
}
mClipboardParams["sculpt"]["type"] = sculpt_params->getSculptType();
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index a3bbd00601..922dccf7be 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -129,7 +129,7 @@ public:
virtual BOOL isItemRenameable() const;
virtual BOOL renameItem(const std::string& new_name);
virtual BOOL isItemMovable() const;
- virtual BOOL isItemRemovable() const;
+ virtual BOOL isItemRemovable(bool check_worn = true) const;
virtual BOOL removeItem();
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch);
virtual void move(LLFolderViewModelItem* parent_listener);
@@ -335,7 +335,7 @@ BOOL LLTaskInvFVBridge::isItemMovable() const
return TRUE;
}
-BOOL LLTaskInvFVBridge::isItemRemovable() const
+BOOL LLTaskInvFVBridge::isItemRemovable(bool check_worn) const
{
const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object
@@ -587,7 +587,7 @@ public:
virtual BOOL isItemRenameable() const;
// virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL isItemRemovable() const;
+ virtual BOOL isItemRemovable(bool check_worn = true) const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual bool hasChildren() const;
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
@@ -647,7 +647,7 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
return FALSE;
}
-BOOL LLTaskCategoryBridge::isItemRemovable() const
+BOOL LLTaskCategoryBridge::isItemRemovable(bool check_worn) const
{
return FALSE;
}
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 4a755a6e93..c7ae4eb0d9 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -733,7 +733,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
if (mSearchString == "")
{
mInventoryItemsPanel->setFilterSubString(LLStringUtil::null);
- mWearableItemsList->setFilterSubString(LLStringUtil::null);
+ mWearableItemsList->setFilterSubString(LLStringUtil::null, true);
// re-open folders that were initially open
mSavedFolderState->setApply(TRUE);
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
@@ -763,8 +763,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
// set new filter string
mInventoryItemsPanel->setFilterSubString(mSearchString);
- mWearableItemsList->setFilterSubString(mSearchString);
-
+ mWearableItemsList->setFilterSubString(mSearchString, true);
}
void LLPanelOutfitEdit::onPlusBtnClicked(void)
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index d8c34d5c40..af06de379d 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -28,19 +28,19 @@
#include "llpaneloutfitsinventory.h"
-#include "llnotificationsutil.h"
-#include "lltabcontainer.h"
-
+#include "llagentwearables.h"
+#include "llappearancemgr.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
-#include "llagentwearables.h"
-#include "llappearancemgr.h"
-#include "lloutfitobserver.h"
+#include "llnotificationsutil.h"
#include "lloutfitgallery.h"
+#include "lloutfitobserver.h"
#include "lloutfitslist.h"
+#include "llpanelappearancetab.h"
#include "llpanelwearing.h"
#include "llsidepanelappearance.h"
+#include "lltabcontainer.h"
#include "llviewercontrol.h"
#include "llviewerfoldertype.h"
@@ -159,25 +159,12 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
{
if (!mActivePanel) return;
- mFilterSubString = string;
-
- if (string == "")
- {
- mActivePanel->setFilterSubString(LLStringUtil::null);
- }
-
if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted())
{
llassert(false); // this should have been done on startup
LLInventoryModelBackgroundFetch::instance().start();
}
- if (mActivePanel->getFilterSubString().empty() && string.empty())
- {
- // current filter and new filter empty, do nothing
- return;
- }
-
// set new filter string
mActivePanel->setFilterSubString(string);
}
@@ -302,6 +289,7 @@ bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
{
return mActivePanel && mActivePanel->isActionEnabled(userdata);
}
+
// List Commands //
//////////////////////////////////////////////////////////////////////////////////
@@ -330,7 +318,7 @@ void LLPanelOutfitsInventory::onTabChange()
mActivePanel = dynamic_cast<LLPanelAppearanceTab*>(mAppearanceTabs->getCurrentPanel());
if (!mActivePanel) return;
- mActivePanel->setFilterSubString(mFilterSubString);
+ mActivePanel->checkFilterSubString();
mActivePanel->onOpen(LLSD());
updateVerbs();
@@ -357,8 +345,6 @@ bool LLPanelOutfitsInventory::isOutfitsGalleryPanelActive() const
return mActivePanel->getName() == OUTFIT_GALLERY_TAB_NAME;
}
-
-
void LLPanelOutfitsInventory::setWearablesLoading(bool val)
{
updateVerbs();
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 50d7074d4b..91873a427a 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -66,7 +66,6 @@ protected:
private:
LLTabContainer* mAppearanceTabs;
- std::string mFilterSubString;
//////////////////////////////////////////////////////////////////////////////////
// tab panels //
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3333c832d2..eb62627278 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -102,210 +102,6 @@ static const std::string PROFILE_IMAGE_UPLOAD_CAP = "UploadAgentProfileImage";
//////////////////////////////////////////////////////////////////////////
-void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("request_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders;
-
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- httpOpts->setFollowRedirects(true);
-
- std::string finalUrl = cap_url + "/" + agent_id.asString();
-
- LLSD result = httpAdapter->getAndSuspend(httpRequest, finalUrl, httpOpts, httpHeaders);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Result: " << httpResults << LL_ENDL;
-
- if (!status
- || !result.has("id")
- || agent_id != result["id"].asUUID())
- {
- LL_WARNS("AvatarProperties") << "Failed to get agent information for id " << agent_id << LL_ENDL;
- return;
- }
-
- LLFloater* floater_profile = LLFloaterReg::findInstance("profile", LLSD().with("id", agent_id));
- if (!floater_profile)
- {
- // floater is dead, so panels are dead as well
- return;
- }
-
- LLPanel *panel = floater_profile->findChild<LLPanel>(PANEL_PROFILE_VIEW, TRUE);
- LLPanelProfile *panel_profile = dynamic_cast<LLPanelProfile*>(panel);
- if (!panel_profile)
- {
- LL_WARNS() << PANEL_PROFILE_VIEW << " not found" << LL_ENDL;
- return;
- }
-
-
- // Avatar Data
-
- LLAvatarData *avatar_data = &panel_profile->mAvatarData;
- std::string birth_date;
-
- avatar_data->agent_id = agent_id;
- avatar_data->avatar_id = agent_id;
- avatar_data->image_id = result["sl_image_id"].asUUID();
- avatar_data->fl_image_id = result["fl_image_id"].asUUID();
- avatar_data->partner_id = result["partner_id"].asUUID();
- avatar_data->about_text = result["sl_about_text"].asString();
- avatar_data->fl_about_text = result["fl_about_text"].asString();
- avatar_data->born_on = result["member_since"].asDate();
- avatar_data->profile_url = getProfileURL(agent_id.asString());
- avatar_data->customer_type = result["customer_type"].asString();
-
- avatar_data->flags = 0;
-
- if (result["online"].asBoolean())
- {
- avatar_data->flags |= AVATAR_ONLINE;
- }
- if (result["allow_publish"].asBoolean())
- {
- avatar_data->flags |= AVATAR_ALLOW_PUBLISH;
- }
- if (result["identified"].asBoolean())
- {
- avatar_data->flags |= AVATAR_IDENTIFIED;
- }
- if (result["transacted"].asBoolean())
- {
- avatar_data->flags |= AVATAR_TRANSACTED;
- }
-
- avatar_data->caption_index = 0;
- if (result.has("charter_member")) // won't be present if "caption" is set
- {
- avatar_data->caption_index = result["charter_member"].asInteger();
- }
- else if (result.has("caption"))
- {
- avatar_data->caption_text = result["caption"].asString();
- }
-
- panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
- LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
- if (panel_sl)
- {
- panel_sl->processProfileProperties(avatar_data);
- }
-
- panel = floater_profile->findChild<LLPanel>(PANEL_WEB, TRUE);
- LLPanelProfileWeb *panel_web = dynamic_cast<LLPanelProfileWeb*>(panel);
- if (panel_web)
- {
- panel_web->setLoaded();
- }
-
- panel = floater_profile->findChild<LLPanel>(PANEL_FIRSTLIFE, TRUE);
- LLPanelProfileFirstLife *panel_first = dynamic_cast<LLPanelProfileFirstLife*>(panel);
- if (panel_first)
- {
- panel_first->processProperties(avatar_data);
- }
-
- // Picks
-
- LLSD picks_array = result["picks"];
- LLAvatarPicks avatar_picks;
- avatar_picks.agent_id = agent_id; // Not in use?
- avatar_picks.target_id = agent_id;
-
- for (LLSD::array_const_iterator it = picks_array.beginArray(); it != picks_array.endArray(); ++it)
- {
- const LLSD& pick_data = *it;
- avatar_picks.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
- }
-
- panel = floater_profile->findChild<LLPanel>(PANEL_PICKS, TRUE);
- LLPanelProfilePicks *panel_picks = dynamic_cast<LLPanelProfilePicks*>(panel);
- if (panel_picks)
- {
- // Refresh pick limit before processing
- LLAgentPicksInfo::getInstance()->onServerRespond(&avatar_picks);
- panel_picks->processProperties(&avatar_picks);
- }
-
- // Groups
-
- LLSD groups_array = result["groups"];
- LLAvatarGroups avatar_groups;
- avatar_groups.agent_id = agent_id; // Not in use?
- avatar_groups.avatar_id = agent_id; // target_id
-
- for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it)
- {
- const LLSD& group_info = *it;
- LLAvatarGroups::LLGroupData group_data;
- group_data.group_powers = 0; // Not in use?
- group_data.group_title = group_info["name"].asString(); // Missing data, not in use?
- group_data.group_id = group_info["id"].asUUID();
- group_data.group_name = group_info["name"].asString();
- group_data.group_insignia_id = group_info["image_id"].asUUID();
-
- avatar_groups.group_list.push_back(group_data);
- }
-
- if (panel_sl)
- {
- panel_sl->processGroupProperties(&avatar_groups);
- }
-
- // Notes
- LLAvatarNotes avatar_notes;
-
- avatar_notes.agent_id = agent_id;
- avatar_notes.target_id = agent_id;
- avatar_notes.notes = result["notes"].asString();
-
- panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE);
- LLPanelProfileNotes *panel_notes = dynamic_cast<LLPanelProfileNotes*>(panel);
- if (panel_notes)
- {
- panel_notes->processProperties(&avatar_notes);
- }
-}
-
-//TODO: changes take two minutes to propagate!
-// Add some storage that holds updated data for two minutes
-// for new instances to reuse the data
-// Profile data is only relevant to won avatar, but notes
-// are for everybody
-void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders;
-
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- httpOpts->setFollowRedirects(true);
-
- std::string finalUrl = cap_url + "/" + agent_id.asString();
-
- LLSD result = httpAdapter->putAndSuspend(httpRequest, finalUrl, data, httpOpts, httpHeaders);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- LL_WARNS("AvatarProperties") << "Failed to put agent information " << data << " for id " << agent_id << LL_ENDL;
- return;
- }
-
- LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Data: " << data << " Result: " << httpResults << LL_ENDL;
-}
-
LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::string path_to_image, LLHandle<LLPanel> *handle)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
@@ -342,7 +138,6 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri
}
// Upload the image
-
LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders);
LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions);
@@ -884,11 +679,12 @@ void LLFloaterProfilePermissions::onCancel()
// LLPanelProfileSecondLife
LLPanelProfileSecondLife::LLPanelProfileSecondLife()
- : LLPanelProfileTab()
+ : LLPanelProfilePropertiesProcessorTab()
, mAvatarNameCacheConnection()
, mHasUnsavedDescriptionChanges(false)
, mWaitingForImageUpload(false)
, mAllowPublish(false)
+ , mHideAge(false)
{
}
@@ -914,6 +710,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
{
mGroupList = getChild<LLGroupList>("group_list");
mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
+ mHideAgeCombo = getChild<LLComboBox>("hide_age");
mSecondLifePic = getChild<LLThumbnailCtrl>("2nd_life_pic");
mSecondLifePicLayout = getChild<LLPanel>("image_panel");
mDescriptionEdit = getChild<LLTextEditor>("sl_description_edit");
@@ -928,6 +725,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
mCantEditObjectsIcon = getChild<LLIconCtrl>("cant_edit_objects");
mShowInSearchCombo->setCommitCallback([this](LLUICtrl*, void*) { onShowInSearchCallback(); }, nullptr);
+ mHideAgeCombo->setCommitCallback([this](LLUICtrl*, void*) { onHideAgeCallback(); }, nullptr);
mGroupList->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { LLPanelProfileSecondLife::openGroupProfile(); });
mGroupList->setReturnCallback([this](LLUICtrl*, const LLSD&) { LLPanelProfileSecondLife::openGroupProfile(); });
mSaveDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveDescriptionChanges(); }, nullptr);
@@ -998,26 +796,6 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCache, this, _1, _2));
}
-void LLPanelProfileSecondLife::updateData()
-{
- LLUUID avatar_id = getAvatarId();
- if (!getStarted() && avatar_id.notNull())
- {
- setIsLoading();
-
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("requestAgentUserInfoCoro",
- boost::bind(request_avatar_properties_coro, cap_url, avatar_id));
- }
- else
- {
- LL_WARNS() << "Failed to update profile data, no cap found" << LL_ENDL;
- }
- }
-}
-
void LLPanelProfileSecondLife::refreshName()
{
if (!mAvatarNameCacheConnection.connected())
@@ -1061,6 +839,18 @@ void LLPanelProfileSecondLife::resetData()
childSetVisible("partner_spacer_layout", TRUE);
}
+void LLPanelProfileSecondLife::processProperties(void* data, EAvatarProcessorType type)
+{
+ if (APT_PROPERTIES == type)
+ {
+ LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ if (avatar_data && getAvatarId() == avatar_data->avatar_id)
+ {
+ processProfileProperties(avatar_data);
+ }
+ }
+}
+
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
{
const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
@@ -1080,22 +870,18 @@ void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avat
fillAccountStatus(avatar_data);
- setLoaded();
-}
-
-void LLPanelProfileSecondLife::processGroupProperties(const LLAvatarGroups* avatar_groups)
-{
-
- LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
- const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
+ LLAvatarData::group_list_t::const_iterator it = avatar_data->group_list.begin();
+ const LLAvatarData::group_list_t::const_iterator it_end = avatar_data->group_list.end();
for (; it_end != it; ++it)
{
- LLAvatarGroups::LLGroupData group_data = *it;
+ LLAvatarData::LLGroupData group_data = *it;
mGroups[group_data.group_name] = group_data.group_id;
}
mGroupList->setGroups(mGroups);
+
+ setLoaded();
}
void LLPanelProfileSecondLife::openGroupProfile()
@@ -1202,7 +988,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
// and to make sure icons in text will be up to date
LLAvatarIconIDCache::getInstance()->add(avatar_data->avatar_id, avatar_data->image_id);
- fillAgeData(avatar_data->born_on);
+ fillAgeData(avatar_data);
setDescriptionText(avatar_data->about_text);
@@ -1237,7 +1023,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
if (getSelfProfile())
{
mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH;
- mShowInSearchCombo->setValue((BOOL)mAllowPublish);
+ mShowInSearchCombo->setValue(mAllowPublish ? TRUE : FALSE);
}
}
@@ -1362,21 +1148,45 @@ void LLPanelProfileSecondLife::fillRightsData()
}
}
-void LLPanelProfileSecondLife::fillAgeData(const LLDate &born_on)
+void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)
{
// Date from server comes already converted to stl timezone,
// so display it as an UTC + 0
- std::string name_and_date = getString("date_format");
+ bool hide_age = avatar_data->hide_age && !getSelfProfile();
+ std::string name_and_date = getString(hide_age ? "date_format_short" : "date_format_full");
LLSD args_name;
- args_name["datetime"] = (S32)born_on.secondsSinceEpoch();
+ args_name["datetime"] = (S32)avatar_data->born_on.secondsSinceEpoch();
LLStringUtil::format(name_and_date, args_name);
getChild<LLUICtrl>("sl_birth_date")->setValue(name_and_date);
- std::string register_date = getString("age_format");
- LLSD args_age;
- args_age["[AGE]"] = LLDateUtil::ageFromDate(born_on, LLDate::now());
- LLStringUtil::format(register_date, args_age);
- getChild<LLUICtrl>("user_age")->setValue(register_date);
+ LLUICtrl* userAgeCtrl = getChild<LLUICtrl>("user_age");
+ if (hide_age)
+ {
+ userAgeCtrl->setVisible(FALSE);
+ }
+ else
+ {
+ std::string register_date = getString("age_format");
+ LLSD args_age;
+ args_age["[AGE]"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now());
+ LLStringUtil::format(register_date, args_age);
+ userAgeCtrl->setValue(register_date);
+ }
+
+ if (getSelfProfile())
+ {
+ F64 birth = avatar_data->born_on.secondsSinceEpoch();
+ F64 now = LLDate::now().secondsSinceEpoch();
+ if (now - birth > 365 * 24 * 60 * 60)
+ {
+ mHideAge = avatar_data->hide_age;
+ mHideAgeCombo->setValue(mHideAge ? TRUE : FALSE);
+ }
+ else
+ {
+ mHideAgeCombo->setVisible(FALSE);
+ }
+ }
}
void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)
@@ -1451,7 +1261,7 @@ void LLPanelProfileSecondLife::setAvatarId(const LLUUID& avatar_id)
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
}
- LLPanelProfileTab::setAvatarId(avatar_id);
+ LLPanelProfilePropertiesProcessorTab::setAvatarId(avatar_id);
if (LLAvatarActions::isFriend(getAvatarId()))
{
@@ -1493,6 +1303,10 @@ void LLPanelProfileSecondLife::setLoaded()
if (getSelfProfile())
{
mShowInSearchCombo->setEnabled(TRUE);
+ if (mHideAgeCombo->getVisible())
+ {
+ mHideAgeCombo->setEnabled(TRUE);
+ }
mDescriptionEdit->setEnabled(TRUE);
}
}
@@ -1820,39 +1634,28 @@ void LLPanelProfileSecondLife::onSetDescriptionDirty()
void LLPanelProfileSecondLife::onShowInSearchCallback()
{
- S32 value = mShowInSearchCombo->getValue().asInteger();
- if (mAllowPublish == (bool)value)
- {
+ bool value = mShowInSearchCombo->getValue().asInteger();
+ if (value == mAllowPublish)
return;
- }
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- mAllowPublish = value;
- LLSD data;
- data["allow_publish"] = mAllowPublish;
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), data));
- }
- else
- {
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
- }
+
+ mAllowPublish = value;
+ saveAgentUserInfoCoro("allow_publish", value);
+}
+
+void LLPanelProfileSecondLife::onHideAgeCallback()
+{
+ bool value = mHideAgeCombo->getValue().asInteger();
+ if (value == mHideAge)
+ return;
+
+ mHideAge = value;
+ saveAgentUserInfoCoro("hide_age", value);
}
void LLPanelProfileSecondLife::onSaveDescriptionChanges()
{
mDescriptionText = mDescriptionEdit->getValue().asString();
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("sl_about_text", mDescriptionText)));
- }
- else
- {
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
- }
+ saveAgentUserInfoCoro("sl_about_text", mDescriptionText);
mSaveDescriptionChanges->setEnabled(FALSE);
mDiscardDescriptionChanges->setEnabled(FALSE);
@@ -1987,46 +1790,34 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)
{
if (mImageId == id)
- {
return;
- }
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
+ if (!saveAgentUserInfoCoro("sl_image_id", id))
+ return;
+
+ mImageId = id;
+ if (mImageId == LLUUID::null)
+ {
+ mSecondLifePic->setValue("Generic_Person_Large");
+ }
+ else
{
- LLSD params;
- params["sl_image_id"] = id;
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params));
+ mSecondLifePic->setValue(mImageId);
+ }
- mImageId = id;
+ LLFloater *floater = mFloaterProfileTextureHandle.get();
+ if (floater)
+ {
+ LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
if (mImageId == LLUUID::null)
{
- mSecondLifePic->setValue("Generic_Person_Large");
+ texture_view->resetAsset();
}
else
{
- mSecondLifePic->setValue(mImageId);
- }
-
- LLFloater *floater = mFloaterProfileTextureHandle.get();
- if (floater)
- {
- LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
- if (mImageId == LLUUID::null)
- {
- texture_view->resetAsset();
- }
- else
- {
- texture_view->loadAsset(mImageId);
- }
+ texture_view->loadAsset(mImageId);
}
}
- else
- {
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
- }
}
//////////////////////////////////////////////////////////////////////////
@@ -2157,6 +1948,8 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
LLStringUtil::format_map_t args;
args["[TIME]"] = llformat("%.2f", mPerformanceTimer.getElapsedTimeF32());
childSetValue("status_text", LLSD( getString("LoadTime", args)) );
+
+ setLoaded();
}
break;
@@ -2172,7 +1965,7 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
//////////////////////////////////////////////////////////////////////////
LLPanelProfileFirstLife::LLPanelProfileFirstLife()
- : LLPanelProfileTab()
+ : LLPanelProfilePropertiesProcessorTab()
, mHasUnsavedChanges(false)
{
}
@@ -2324,34 +2117,22 @@ void LLPanelProfileFirstLife::onRemovePhoto()
void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id)
{
if (mImageId == id)
- {
return;
- }
-
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLSD params;
- params["fl_image_id"] = id;
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params));
- mImageId = id;
- if (mImageId.notNull())
- {
- mPicture->setValue(mImageId);
- }
- else
- {
- mPicture->setValue("Generic_Person_Large");
- }
+ if (!saveAgentUserInfoCoro("fl_image_id", id))
+ return;
- mRemovePhoto->setEnabled(mImageId.notNull());
+ mImageId = id;
+ if (mImageId.notNull())
+ {
+ mPicture->setValue(mImageId);
}
else
{
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
+ mPicture->setValue("Generic_Person_Large");
}
+
+ mRemovePhoto->setEnabled(mImageId.notNull());
}
void LLPanelProfileFirstLife::setDescriptionText(const std::string &text)
@@ -2374,16 +2155,7 @@ void LLPanelProfileFirstLife::onSetDescriptionDirty()
void LLPanelProfileFirstLife::onSaveDescriptionChanges()
{
mCurrentDescription = mDescriptionEdit->getValue().asString();
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("fl_about_text", mCurrentDescription)));
- }
- else
- {
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
- }
+ saveAgentUserInfoCoro("fl_about_text", mCurrentDescription);
mSaveChanges->setEnabled(FALSE);
mDiscardChanges->setEnabled(FALSE);
@@ -2395,6 +2167,18 @@ void LLPanelProfileFirstLife::onDiscardDescriptionChanges()
setDescriptionText(mCurrentDescription);
}
+void LLPanelProfileFirstLife::processProperties(void* data, EAvatarProcessorType type)
+{
+ if (APT_PROPERTIES == type)
+ {
+ LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ if (avatar_data && getAvatarId() == avatar_data->avatar_id)
+ {
+ processProperties(avatar_data);
+ }
+ }
+}
+
void LLPanelProfileFirstLife::processProperties(const LLAvatarData* avatar_data)
{
setDescriptionText(avatar_data->fl_about_text);
@@ -2443,7 +2227,7 @@ void LLPanelProfileFirstLife::setLoaded()
//////////////////////////////////////////////////////////////////////////
LLPanelProfileNotes::LLPanelProfileNotes()
-: LLPanelProfileTab()
+: LLPanelProfilePropertiesProcessorTab()
, mHasUnsavedChanges(false)
{
@@ -2453,22 +2237,6 @@ LLPanelProfileNotes::~LLPanelProfileNotes()
{
}
-void LLPanelProfileNotes::updateData()
-{
- LLUUID avatar_id = getAvatarId();
- if (!getStarted() && avatar_id.notNull())
- {
- setIsLoading();
-
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("requestAgentUserInfoCoro",
- boost::bind(request_avatar_properties_coro, cap_url, avatar_id));
- }
- }
-}
-
void LLPanelProfileNotes::commitUnsavedChanges()
{
if (mHasUnsavedChanges)
@@ -2517,16 +2285,7 @@ void LLPanelProfileNotes::onSetNotesDirty()
void LLPanelProfileNotes::onSaveNotesChanges()
{
mCurrentNotes = mNotesEditor->getValue().asString();
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes)));
- }
- else
- {
- LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
- }
+ saveAgentUserInfoCoro("notes", mCurrentNotes);
mSaveChanges->setEnabled(FALSE);
mDiscardChanges->setEnabled(FALSE);
@@ -2538,9 +2297,21 @@ void LLPanelProfileNotes::onDiscardNotesChanges()
setNotesText(mCurrentNotes);
}
-void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes)
+void LLPanelProfileNotes::processProperties(void* data, EAvatarProcessorType type)
{
- setNotesText(avatar_notes->notes);
+ if (APT_PROPERTIES == type)
+ {
+ LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
+ if (avatar_data && getAvatarId() == avatar_data->avatar_id)
+ {
+ processProperties(avatar_data);
+ }
+ }
+}
+
+void LLPanelProfileNotes::processProperties(const LLAvatarData* avatar_data)
+{
+ setNotesText(avatar_data->notes);
mNotesEditor->setEnabled(TRUE);
setLoaded();
}
@@ -2551,14 +2322,6 @@ void LLPanelProfileNotes::resetData()
setNotesText(std::string());
}
-void LLPanelProfileNotes::setAvatarId(const LLUUID& avatar_id)
-{
- if (avatar_id.notNull())
- {
- LLPanelProfileTab::setAvatarId(avatar_id);
- }
-}
-
//////////////////////////////////////////////////////////////////////////
// LLPanelProfile
@@ -2635,12 +2398,7 @@ void LLPanelProfile::updateData()
mPanelFirstlife->setIsLoading();
mPanelNotes->setIsLoading();
- std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
- if (!cap_url.empty())
- {
- LLCoros::instance().launch("requestAgentUserInfoCoro",
- boost::bind(request_avatar_properties_coro, cap_url, avatar_id));
- }
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(getAvatarId());
}
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 11632a10ae..221a576a65 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -68,7 +68,7 @@ class LLViewerFetchedTexture;
* Panel for displaying Avatar's second life related info.
*/
class LLPanelProfileSecondLife
- : public LLPanelProfileTab
+ : public LLPanelProfilePropertiesProcessorTab
, public LLFriendObserver
, public LLVoiceClientStatusObserver
{
@@ -93,10 +93,6 @@ public:
void resetData() override;
- /**
- * Sends update data request to server.
- */
- void updateData() override;
void refreshName();
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
@@ -107,7 +103,7 @@ public:
bool hasUnsavedChanges() override;
void commitUnsavedChanges() override;
- friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id);
+ void processProperties(void* data, EAvatarProcessorType type) override;
protected:
/**
@@ -116,11 +112,6 @@ protected:
void processProfileProperties(const LLAvatarData* avatar_data);
/**
- * Processes group related data received from server.
- */
- void processGroupProperties(const LLAvatarGroups* avatar_groups);
-
- /**
* Fills common for Avatar profile and My Profile fields.
*/
void fillCommonData(const LLAvatarData* avatar_data);
@@ -143,7 +134,7 @@ protected:
/**
* Fills user name, display name, age.
*/
- void fillAgeData(const LLDate &born_on);
+ void fillAgeData(const LLAvatarData* avatar_data);
void onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep);
static void onImageLoaded(BOOL success,
@@ -179,6 +170,7 @@ private:
void setDescriptionText(const std::string &text);
void onSetDescriptionDirty();
void onShowInSearchCallback();
+ void onHideAgeCallback();
void onSaveDescriptionChanges();
void onDiscardDescriptionChanges();
void onShowAgentPermissionsDialog();
@@ -193,6 +185,7 @@ private:
LLGroupList* mGroupList;
LLComboBox* mShowInSearchCombo;
+ LLComboBox* mHideAgeCombo;
LLThumbnailCtrl* mSecondLifePic;
LLPanel* mSecondLifePicLayout;
LLTextEditor* mDescriptionEdit;
@@ -214,6 +207,7 @@ private:
bool mVoiceStatus;
bool mWaitingForImageUpload;
bool mAllowPublish;
+ bool mHideAge;
std::string mDescriptionText;
LLUUID mImageId;
@@ -247,8 +241,6 @@ public:
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
- friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id);
-
protected:
void onCommitLoad(LLUICtrl* ctrl);
@@ -267,7 +259,7 @@ private:
* Panel for displaying Avatar's first life related info.
*/
class LLPanelProfileFirstLife
- : public LLPanelProfileTab
+ : public LLPanelProfilePropertiesProcessorTab
{
public:
LLPanelProfileFirstLife();
@@ -277,6 +269,7 @@ public:
BOOL postBuild() override;
+ void processProperties(void* data, EAvatarProcessorType type) override;
void processProperties(const LLAvatarData* avatar_data);
void resetData() override;
@@ -287,8 +280,6 @@ public:
bool hasUnsavedChanges() override { return mHasUnsavedChanges; }
void commitUnsavedChanges() override;
- friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id);
-
protected:
void setLoaded() override;
@@ -320,24 +311,21 @@ protected:
* Panel for displaying Avatar's notes and modifying friend's rights.
*/
class LLPanelProfileNotes
- : public LLPanelProfileTab
+ : public LLPanelProfilePropertiesProcessorTab
{
public:
LLPanelProfileNotes();
/*virtual*/ ~LLPanelProfileNotes();
- void setAvatarId(const LLUUID& avatar_id) override;
-
void onOpen(const LLSD& key) override;
BOOL postBuild() override;
- void processProperties(LLAvatarNotes* avatar_notes);
+ void processProperties(void* data, EAvatarProcessorType type) override;
+ void processProperties(const LLAvatarData* avatar_data);
void resetData() override;
- void updateData() override;
-
bool hasUnsavedChanges() override { return mHasUnsavedChanges; }
void commitUnsavedChanges() override;
@@ -384,10 +372,6 @@ public:
void showClassified(const LLUUID& classified_id = LLUUID::null, bool edit = false);
void createClassified();
- LLAvatarData getAvatarData() { return mAvatarData; };
-
- friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id);
-
private:
void onTabChange();
@@ -398,13 +382,6 @@ private:
LLPanelProfileFirstLife* mPanelFirstlife;
LLPanelProfileNotes* mPanelNotes;
LLTabContainer* mTabContainer;
-
- // Todo: due to server taking minutes to update this needs a more long term storage
- // to reuse recently saved values if user opens floater again
- // Storage implementation depends onto how a cap will be implemented, if cap will be
- // enought to fully update LLAvatarPropertiesProcessor, then this storage can be
- // implemented there.
- LLAvatarData mAvatarData;
};
#endif //LL_LLPANELPROFILE_H
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 0535036cb0..13c35a27a0 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -97,12 +97,6 @@ public:
return true;
}
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnablePicks"))
- {
- LLNotificationsUtil::add("NoPicks", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
// handle app/pick/create urls first
if (params.size() == 1 && params[0].asString() == "create")
{
@@ -295,17 +289,21 @@ void LLPanelProfilePicks::callbackDeletePick(const LLSD& notification, const LLS
void LLPanelProfilePicks::processProperties(void* data, EAvatarProcessorType type)
{
- if (APT_PICKS == type)
+ if (APT_PROPERTIES == type)
{
- LLAvatarPicks* avatar_picks = static_cast<LLAvatarPicks*>(data);
- if (avatar_picks && getAvatarId() == avatar_picks->target_id)
+ LLAvatarData* avatar_picks = static_cast<LLAvatarData*>(data);
+ if (avatar_picks && getAvatarId() == avatar_picks->avatar_id)
{
+ if (getSelfProfile())
+ {
+ LLAgentPicksInfo::getInstance()->onServerRespond(avatar_picks);
+ }
processProperties(avatar_picks);
}
}
}
-void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks)
+void LLPanelProfilePicks::processProperties(const LLAvatarData* avatar_picks)
{
LLUUID selected_id = mPickToSelectOnLoad;
bool has_selection = false;
@@ -323,7 +321,7 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks)
mTabContainer->deleteAllTabs();
- LLAvatarPicks::picks_list_t::const_iterator it = avatar_picks->picks_list.begin();
+ LLAvatarData::picks_list_t::const_iterator it = avatar_picks->picks_list.begin();
for (; avatar_picks->picks_list.end() != it; ++it)
{
LLUUID pick_id = it->first;
@@ -427,7 +425,7 @@ void LLPanelProfilePicks::updateData()
{
setIsLoading();
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(avatar_id);
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(avatar_id);
}
if (!getIsLoaded())
{
diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h
index f84463cc9b..79a5ace865 100644
--- a/indra/newview/llpanelprofilepicks.h
+++ b/indra/newview/llpanelprofilepicks.h
@@ -58,7 +58,7 @@ public:
void selectPick(const LLUUID& pick_id);
void processProperties(void* data, EAvatarProcessorType type) override;
- void processProperties(const LLAvatarPicks* avatar_picks);
+ void processProperties(const LLAvatarData* avatar_picks);
void resetData() override;
@@ -77,8 +77,6 @@ public:
bool hasUnsavedChanges() override;
void commitUnsavedChanges() override;
- friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id);
-
private:
void onClickNewBtn();
void onClickDelete();
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 5242c4fef9..35eba16afe 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -110,9 +110,9 @@ protected:
registrar.add("Wearing.EditOutfit", boost::bind(&edit_outfit));
registrar.add("Wearing.ShowOriginal", boost::bind(show_item_original, mUUIDs.front()));
registrar.add("Wearing.TakeOff",
- boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs));
+ boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs, no_op));
registrar.add("Wearing.Detach",
- boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs));
+ boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs, no_op));
LLContextMenu* menu = createFromFile("menu_wearing_tab.xml");
updateMenuItemsVisibility(menu);
@@ -209,8 +209,6 @@ protected:
//////////////////////////////////////////////////////////////////////////
-std::string LLPanelAppearanceTab::sFilterSubString = LLStringUtil::null;
-
static LLPanelInjector<LLPanelWearing> t_panel_wearing("panel_wearing");
LLPanelWearing::LLPanelWearing()
@@ -328,10 +326,11 @@ void LLPanelWearing::startUpdateTimer()
}
// virtual
-void LLPanelWearing::setFilterSubString(const std::string& string)
+void LLPanelWearing::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
{
- sFilterSubString = string;
- mCOFItemsList->setFilterSubString(sFilterSubString);
+ mCOFItemsList->setFilterSubString(new_string, true);
+
+ mAccordionCtrl->arrange();
}
// virtual
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 18e543eec6..2f3f14956a 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -61,7 +61,7 @@ public:
/*virtual*/ void onOpen(const LLSD& info);
- /*virtual*/ void setFilterSubString(const std::string& string);
+ /*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
/*virtual*/ bool isActionEnabled(const LLSD& userdata);
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index 9bf771db8a..ec537e216b 100644
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -115,7 +115,7 @@ void LLPersistentNotificationStorage::loadNotifications()
using namespace LLNotificationsUI;
LLScreenChannel* notification_channel = dynamic_cast<LLScreenChannel*>(LLChannelManager::getInstance()->
- findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ findChannelByID(LLNotificationsUI::NOTIFICATION_CHANNEL_UUID));
LLNotifications& instance = LLNotifications::instance();
S32 processed_notifications = 0;
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 30d0a22ef0..bc77588b9f 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -254,8 +254,6 @@ void LLPresetsManager::getControlNames(std::vector<std::string>& names)
// From panel_preferences_move.xml
("CameraAngle")
("CameraOffsetScale")
- ("EditCameraMovement")
- ("AppearanceCameraMovement")
// From llagentcamera.cpp
("CameraOffsetBuild")
("TrackFocusObject")
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 759e7859f2..5d5010e27e 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -433,6 +433,11 @@ BOOL LLPreviewGesture::postBuild()
edit->setIgnoreTab(TRUE);
mChatEditor = edit;
+ check = getChild<LLCheckBoxCtrl>( "wait_key_release_check");
+ check->setVisible(FALSE);
+ check->setCommitCallback(onCommitWait, this);
+ mWaitKeyReleaseCheck = check;
+
check = getChild<LLCheckBoxCtrl>( "wait_anim_check");
check->setVisible(FALSE);
check->setCommitCallback(onCommitWait, this);
@@ -638,6 +643,7 @@ void LLPreviewGesture::refresh()
mAnimationRadio->setEnabled(FALSE);
mSoundCombo->setEnabled(FALSE);
mChatEditor->setEnabled(FALSE);
+ mWaitKeyReleaseCheck->setEnabled(FALSE);
mWaitAnimCheck->setEnabled(FALSE);
mWaitTimeCheck->setEnabled(FALSE);
mWaitTimeEditor->setEnabled(FALSE);
@@ -660,6 +666,7 @@ void LLPreviewGesture::refresh()
mAnimationRadio->setEnabled(modifiable);
mSoundCombo->setEnabled(modifiable);
mChatEditor->setEnabled(modifiable);
+ mWaitKeyReleaseCheck->setEnabled(modifiable);
mWaitAnimCheck->setEnabled(modifiable);
mWaitTimeCheck->setEnabled(modifiable);
mWaitTimeEditor->setEnabled(modifiable);
@@ -695,6 +702,7 @@ void LLPreviewGesture::refresh()
mAnimationRadio->setVisible(FALSE);
mSoundCombo->setVisible(FALSE);
mChatEditor->setVisible(FALSE);
+ mWaitKeyReleaseCheck->setVisible(FALSE);
mWaitAnimCheck->setVisible(FALSE);
mWaitTimeCheck->setVisible(FALSE);
mWaitTimeEditor->setVisible(FALSE);
@@ -739,6 +747,8 @@ void LLPreviewGesture::refresh()
{
LLGestureStepWait* wait_step = (LLGestureStepWait*)step;
optionstext = getString("step_wait");
+ mWaitKeyReleaseCheck->setVisible(TRUE);
+ mWaitKeyReleaseCheck->set(wait_step->mFlags & WAIT_FLAG_KEY_RELEASE);
mWaitAnimCheck->setVisible(TRUE);
mWaitAnimCheck->set(wait_step->mFlags & WAIT_FLAG_ALL_ANIM);
mWaitTimeCheck->setVisible(TRUE);
@@ -1516,6 +1526,7 @@ void LLPreviewGesture::onCommitWait(LLUICtrl* ctrl, void* data)
LLGestureStepWait* wait_step = (LLGestureStepWait*)step;
U32 flags = 0x0;
+ if (self->mWaitKeyReleaseCheck->get()) flags |= WAIT_FLAG_KEY_RELEASE;
if (self->mWaitAnimCheck->get()) flags |= WAIT_FLAG_ALL_ANIM;
if (self->mWaitTimeCheck->get()) flags |= WAIT_FLAG_TIME;
wait_step->mFlags = flags;
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index f5c47d71b8..d0fddaf49a 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -154,6 +154,7 @@ private:
LLComboBox* mAnimationCombo;
LLComboBox* mSoundCombo;
LLLineEditor* mChatEditor;
+ LLCheckBoxCtrl* mWaitKeyReleaseCheck;
LLCheckBoxCtrl* mWaitAnimCheck;
LLCheckBoxCtrl* mWaitTimeCheck;
LLLineEditor* mWaitTimeEditor;
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 17f2970f99..ea3aa58f94 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -170,8 +170,9 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
void LLScreenChannelBase::updateRect()
{
+ const S32 CHANNEL_BOTTOM_PANEL_MARGIN = 35;
S32 channel_top = getChannelRect().mTop;
- S32 channel_bottom = getChannelRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
+ S32 channel_bottom = getChannelRect().mBottom + CHANNEL_BOTTOM_PANEL_MARGIN;
S32 channel_left = getRect().mLeft;
S32 channel_right = getRect().mRight;
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index e5f4807ab7..d66c8afc22 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -34,6 +34,12 @@
namespace LLNotificationsUI
{
+ const LLUUID ALERT_CHANNEL_UUID("F3E07BC8-A973-476D-8C7F-F3B7293975D1");
+ const LLUUID NOTIFICATION_CHANNEL_UUID("AEED3193-8709-4693-8558-7452CCA97AE5");
+ const LLUUID NEARBY_CHAT_CHANNEL_UUID("E1158BD6-661C-4981-9DAD-4DCBFF062502");
+ const LLUUID STARTUP_CHANNEL_UUID("B56AF90D-6684-48E4-B1E4-722D3DEB2CB6");
+
+ const S32 NOTIFY_BOX_WIDTH = 305;
typedef enum e_notification_toast_alignment
{
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 6a27ff3047..66ee016191 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -335,7 +335,7 @@ void LLScriptFloater::hideToastsIfNeeded()
// find channel
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(LLChannelManager::getInstance()->findChannelByID(
- LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID));
// update notification channel state
if(channel)
{
diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp
index 449e0080f0..66e377cb8d 100644
--- a/indra/newview/llsearchhistory.cpp
+++ b/indra/newview/llsearchhistory.cpp
@@ -75,6 +75,17 @@ bool LLSearchHistory::save()
{
// build filename for each user
std::string resolved_filename = getHistoryFilePath();
+
+ // delete the file if it is empty or contains only empty entries
+ if (std::find_if(mSearchHistory.begin(), mSearchHistory.end(), [](const LLSearchHistoryItem& x)
+ {
+ return !x.search_query.empty();
+ }) == mSearchHistory.end())
+ {
+ remove(resolved_filename.c_str());
+ return true;
+ }
+
// open a file for writing
llofstream file(resolved_filename.c_str());
if (!file.is_open())
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 74844a80e8..dbab7e53b6 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -74,13 +74,10 @@ LLSetKeyBindDialog::LLSetKeyBindDialog(const LLSD& key)
pUpdater(NULL),
mLastMaskKey(0),
mContextConeOpacity(0.f),
- mContextConeInAlpha(0.f),
- mContextConeOutAlpha(0.f),
- mContextConeFadeTime(0.f)
+ mContextConeInAlpha(CONTEXT_CONE_IN_ALPHA),
+ mContextConeOutAlpha(CONTEXT_CONE_OUT_ALPHA),
+ mContextConeFadeTime(CONTEXT_CONE_FADE_TIME)
{
- mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha");
- mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha");
- mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime");
}
LLSetKeyBindDialog::~LLSetKeyBindDialog()
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 1d6b3cd80c..38d6aff383 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -74,6 +74,32 @@ LLSidepanelTaskInfo* LLSidepanelTaskInfo::sActivePanel = NULL;
static LLPanelInjector<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info");
+static std::string click_action_to_string_value(U8 click_action)
+{
+ switch (click_action)
+ {
+ case CLICK_ACTION_TOUCH:
+ return "Touch";
+ case CLICK_ACTION_SIT:
+ return "Sit";
+ case CLICK_ACTION_BUY:
+ return "Buy";
+ case CLICK_ACTION_PAY:
+ return "Pay";
+ case CLICK_ACTION_OPEN:
+ return "Open";
+ case CLICK_ACTION_ZOOM:
+ return "Zoom";
+ case CLICK_ACTION_DISABLED:
+ return "None";
+ case CLICK_ACTION_IGNORE:
+ return "Ignore";
+ default:
+ return "Touch";
+ }
+ return "Touch";
+}
+
// Default constructor
LLSidepanelTaskInfo::LLSidepanelTaskInfo()
: mVisibleDebugPermissions(true) // space was allocated by default
@@ -886,11 +912,7 @@ void LLSidepanelTaskInfo::refresh()
U8 click_action = 0;
if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action))
{
- LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction");
- if (ComboClickAction)
- {
- ComboClickAction->setCurrentByIndex((S32)click_action);
- }
+ getChild<LLComboBox>("clickaction")->setValue(click_action_to_string_value(click_action));
}
getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
@@ -1147,6 +1169,8 @@ static U8 string_value_to_click_action(std::string p_value)
return CLICK_ACTION_ZOOM;
if (p_value == "None")
return CLICK_ACTION_DISABLED;
+ if (p_value == "Ignore")
+ return CLICK_ACTION_IGNORE;
return CLICK_ACTION_TOUCH;
}
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index a3a8247268..e43fb993ce 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file llurlsimstring.cpp (was llsimurlstring.cpp)
* @brief Handles "SLURL fragments" like Ahern/123/45 for
* startup processing, login screen, prefs, etc.
@@ -6,21 +6,21 @@
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -36,7 +36,7 @@
#include "curl/curl.h"
const char* LLSLURL::SLURL_HTTP_SCHEME = "http";
const char* LLSLURL::SLURL_HTTPS_SCHEME = "https";
-const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
+const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
const char* LLSLURL::SLURL_SECONDLIFE_PATH = "secondlife";
const char* LLSLURL::SLURL_COM = "slurl.com";
// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag
@@ -54,473 +54,469 @@ const char* LLSLURL::SIM_LOCATION_LAST = "last";
// resolve a simstring from a slurl
LLSLURL::LLSLURL(const std::string& slurl)
{
- // by default we go to agni.
- mType = INVALID;
-
- if(slurl == SIM_LOCATION_HOME)
- {
- mType = HOME_LOCATION;
- }
- else if(slurl.empty() || (slurl == SIM_LOCATION_LAST))
- {
- mType = LAST_LOCATION;
- }
- else
- {
- LLURI slurl_uri;
- // parse the slurl as a uri
- if(slurl.find(':') == std::string::npos)
- {
- // There may be no scheme ('secondlife:' etc.) passed in. In that case
- // we want to normalize the slurl by putting the appropriate scheme
- // in front of the slurl. So, we grab the appropriate slurl base
- // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or
- // https://<hostname>/region/ for Standalone grid (the word region, not the region name)
- // these slurls are typically passed in from the 'starting location' box on the login panel,
- // where the user can type in <regionname>/<x>/<y>/<z>
- std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase();
-
- // the slurl that was passed in might have a prepended /, or not. So,
- // we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z>
- // or some such.
-
- if(slurl[0] == '/')
- {
- fixed_slurl += slurl.substr(1);
- }
- else
- {
- fixed_slurl += slurl;
- }
- // We then load the slurl into a LLURI form
- slurl_uri = LLURI(fixed_slurl);
- }
- else
- {
- // as we did have a scheme, implying a URI style slurl, we
- // simply parse it as a URI
- slurl_uri = LLURI(slurl);
- }
-
- LLSD path_array = slurl_uri.pathArray();
-
- // determine whether it's a maingrid URI or an Standalone/open style URI
- // by looking at the scheme. If it's a 'secondlife:' slurl scheme or
- // 'sl:' scheme, we know it's maingrid
-
- // At the end of this if/else block, we'll have determined the grid,
- // and the slurl type (APP or LOCATION)
- if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
- {
- // parse a maingrid style slurl. We know the grid is maingrid
- // so grab it.
- // A location slurl for maingrid (with the special schemes) can be in the form
- // secondlife://<regionname>/<x>/<y>/<z>
- // or
- // secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z>
- // where if grid is empty, it specifies Agni
-
- // An app style slurl for maingrid can be
- // secondlife://<Grid>/app/<app parameters>
- // where an empty grid implies Agni
-
- // we'll start by checking the top of the 'path' which will be
- // either 'app', 'secondlife', or <x>.
-
- // default to maingrid
-
- mGrid = MAINGRID;
-
- if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) ||
- (path_array[0].asString() == LLSLURL::SLURL_APP_PATH))
- {
- // it's in the form secondlife://<grid>/(app|secondlife)
- // so parse the grid name to derive the grid ID
- if (!slurl_uri.hostName().empty())
- {
- mGrid = LLGridManager::getInstance()->getGridId(slurl_uri.hostName());
- }
- else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
- {
- // If the slurl is in the form secondlife:///secondlife/<region> form,
- // then we are in fact on maingrid.
- mGrid = MAINGRID;
- }
- else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
- {
- // for app style slurls, where no grid name is specified, assume the currently
- // selected or logged in grid.
- mGrid = LLGridManager::getInstance()->getGridId();
- }
-
- if(mGrid.empty())
- {
- // we couldn't find the grid in the grid manager, so bail
- LL_WARNS("AppInit")<<"unable to find grid"<<LL_ENDL;
- return;
- }
- // set the type as appropriate.
- if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
- {
- mType = LOCATION;
- }
- else
- {
- mType = APP;
- }
- path_array.erase(0);
- }
- else
- {
- if(slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH)
+ // by default we go to agni.
+ mType = INVALID;
+
+ if (slurl.empty() || (slurl == SIM_LOCATION_LAST))
+ {
+ mType = LAST_LOCATION;
+ }
+ else if (slurl == SIM_LOCATION_HOME)
+ {
+ mType = HOME_LOCATION;
+ }
+ else
+ {
+ LLURI slurl_uri;
+ // parse the slurl as a uri
+ if (slurl.find(':') == std::string::npos)
+ {
+ // There may be no scheme ('secondlife:' etc.) passed in. In that case
+ // we want to normalize the slurl by putting the appropriate scheme
+ // in front of the slurl. So, we grab the appropriate slurl base
+ // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or
+ // https://<hostname>/region/ for Standalone grid (the word region, not the region name)
+ // these slurls are typically passed in from the 'starting location' box on the login panel,
+ // where the user can type in <regionname>/<x>/<y>/<z>
+ std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase();
+
+ // the slurl that was passed in might have a prepended /, or not. So,
+ // we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z>
+ // or some such.
+
+ if (slurl[0] == '/')
+ {
+ fixed_slurl += slurl.substr(1);
+ }
+ else
+ {
+ fixed_slurl += slurl;
+ }
+ // We then load the slurl into a LLURI form
+ slurl_uri = LLURI(fixed_slurl);
+ }
+ else
+ {
+ // as we did have a scheme, implying a URI style slurl, we
+ // simply parse it as a URI
+ slurl_uri = LLURI(slurl);
+ }
+
+ LLSD path_array = slurl_uri.pathArray();
+
+ // determine whether it's a maingrid URI or an Standalone/open style URI
+ // by looking at the scheme. If it's a 'secondlife:' slurl scheme or
+ // 'sl:' scheme, we know it's maingrid
+
+ // At the end of this if/else block, we'll have determined the grid,
+ // and the slurl type (APP or LOCATION)
+ if (slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
+ {
+ if (path_array.size() == 0
+ && slurl_uri.authority().empty()
+ && slurl_uri.escapedQuery().empty())
+ {
+ mType = EMPTY;
+ // um, we need a path...
+ return;
+ }
+
+ // parse a maingrid style slurl. We know the grid is maingrid
+ // so grab it.
+ // A location slurl for maingrid (with the special schemes) can be in the form
+ // secondlife://<regionname>/<x>/<y>/<z>
+ // or
+ // secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z>
+ // where if grid is empty, it specifies Agni
+
+ // An app style slurl for maingrid can be
+ // secondlife://<Grid>/app/<app parameters>
+ // where an empty grid implies Agni
+
+ // we'll start by checking the top of the 'path' which will be
+ // either 'app', 'secondlife', or <x>.
+
+ // default to maingrid
+
+ mGrid = MAINGRID;
+
+ if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) ||
+ (path_array[0].asString() == LLSLURL::SLURL_APP_PATH))
+ {
+ // it's in the form secondlife://<grid>/(app|secondlife)
+ // so parse the grid name to derive the grid ID
+ if (!slurl_uri.hostName().empty())
+ {
+ mGrid = LLGridManager::getInstance()->getGridId(slurl_uri.hostName());
+ }
+ else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
+ {
+ // If the slurl is in the form secondlife:///secondlife/<region> form,
+ // then we are in fact on maingrid.
+ mGrid = MAINGRID;
+ }
+ else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+ {
+ // for app style slurls, where no grid name is specified, assume the currently
+ // selected or logged in grid.
+ mGrid = LLGridManager::getInstance()->getGridId();
+ }
+
+ if (mGrid.empty())
+ {
+ // we couldn't find the grid in the grid manager, so bail
+ LL_WARNS("AppInit")<<"unable to find grid"<<LL_ENDL;
+ return;
+ }
+ // set the type as appropriate.
+ if (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
+ {
+ mType = LOCATION;
+ }
+ else
+ {
+ mType = APP;
+ }
+ path_array.erase(0);
+ }
+ else
+ {
+ if (slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH)
{
mType = APP;
}
else
{
// it wasn't a /secondlife/<region> or /app/<params>, so it must be secondlife://<region>
- // therefore the hostname will be the region name, and it's a location type
- mType = LOCATION;
- // 'normalize' it so the region name is in fact the head of the path_array
- path_array.insert(0, slurl_uri.hostName());
+ // therefore the hostname will be the region name, and it's a location type
+ mType = LOCATION;
+ // 'normalize' it so the region name is in fact the head of the path_array
+ path_array.insert(0, slurl_uri.hostName());
+ }
+ }
+ }
+ else if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) ||
+ (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) ||
+ (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME))
+ {
+ // We're dealing with either a Standalone style slurl or slurl.com slurl
+ if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) ||
+ (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) ||
+ (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM))
+ {
+ // slurl.com implies maingrid
+ mGrid = MAINGRID;
+ }
+ else
+ {
+ // Don't try to match any old http://<host>/ URL as a SLurl.
+ // SLE SLurls will have the grid hostname in the URL, so only
+ // match http URLs if the hostname matches the grid hostname
+ // (or its a slurl.com or maps.secondlife.com URL).
+ if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME ||
+ slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) &&
+ slurl_uri.hostName() != LLGridManager::getInstance()->getGrid())
+ {
+ return;
}
- }
- }
- else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) ||
- (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) ||
- (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME))
- {
- // We're dealing with either a Standalone style slurl or slurl.com slurl
- if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) ||
- (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) ||
- (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM))
- {
- // slurl.com implies maingrid
- mGrid = MAINGRID;
- }
- else
- {
- // Don't try to match any old http://<host>/ URL as a SLurl.
- // SLE SLurls will have the grid hostname in the URL, so only
- // match http URLs if the hostname matches the grid hostname
- // (or its a slurl.com or maps.secondlife.com URL).
- if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME ||
- slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) &&
- slurl_uri.hostName() != LLGridManager::getInstance()->getGrid())
- {
- return;
- }
-
- // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open style
- // urls are properly formed, unlike the stinky maingrid style
- mGrid = slurl_uri.hostName();
- }
- if (path_array.size() == 0)
- {
- // um, we need a path...
- return;
- }
-
- // we need to normalize the urls so
- // the path portion starts with the 'command' that we want to do
- // it can either be region or app.
- if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) ||
- (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH))
- {
- // strip off 'region' or 'secondlife'
- path_array.erase(0);
- // it's a location
- mType = LOCATION;
- }
- else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
- {
- mType = APP;
- path_array.erase(0);
- // leave app appended.
- }
- else
- {
- // not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL
- return;
- }
- }
- else
- {
- // invalid scheme, so bail
- return;
- }
-
-
- if(path_array.size() == 0)
- {
- // we gotta have some stuff after the specifier as to whether it's a region or command
- return;
- }
-
- // now that we know whether it's an app slurl or a location slurl,
- // parse the slurl into the proper data structures.
- if(mType == APP)
- {
- // grab the app command type and strip it (could be a command to jump somewhere,
- // or whatever )
- mAppCmd = path_array[0].asString();
- path_array.erase(0);
-
- // Grab the parameters
- mAppPath = path_array;
- // and the query
- mAppQuery = slurl_uri.query();
- mAppQueryMap = slurl_uri.queryMap();
- return;
- }
- else if(mType == LOCATION)
- {
- // at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z
- // are collectively optional
- // are optional
-
- mRegion = LLURI::unescape(path_array[0].asString());
-
- if(LLStringUtil::containsNonprintable(mRegion))
- {
- LLStringUtil::stripNonprintable(mRegion);
- }
-
- path_array.erase(0);
-
- // parse the x, y, and optionally z
- if(path_array.size() >= 2)
- {
-
- mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
- if((F32(mPosition[VX]) < 0.f) ||
- (mPosition[VX] > REGION_WIDTH_METERS) ||
- (F32(mPosition[VY]) < 0.f) ||
- (mPosition[VY] > REGION_WIDTH_METERS) ||
- (F32(mPosition[VZ]) < 0.f) ||
- (mPosition[VZ] > REGION_HEIGHT_METERS))
- {
- mType = INVALID;
- return;
- }
-
- }
- else
- {
- // if x, y and z were not fully passed in, go to the middle of the region.
- // teleport will adjust the actual location to make sure you're on the ground
- // and such
- mPosition = LLVector3(REGION_WIDTH_METERS/2, REGION_WIDTH_METERS/2, 0);
- }
- }
- }
-}
+ // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open style
+ // urls are properly formed, unlike the stinky maingrid style
+ mGrid = slurl_uri.hostName();
+ }
+ if (path_array.size() == 0)
+ {
+ // um, we need a path...
+ return;
+ }
+
+ // we need to normalize the urls so
+ // the path portion starts with the 'command' that we want to do
+ // it can either be region or app.
+ if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) ||
+ (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH))
+ {
+ // strip off 'region' or 'secondlife'
+ path_array.erase(0);
+ // it's a location
+ mType = LOCATION;
+ }
+ else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+ {
+ mType = APP;
+ path_array.erase(0);
+ // leave app appended.
+ }
+ else
+ {
+ // not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL
+ return;
+ }
+ }
+ else
+ {
+ // invalid scheme, so bail
+ return;
+ }
+
+ if (path_array.size() == 0)
+ {
+ // we gotta have some stuff after the specifier as to whether it's a region or command
+ return;
+ }
+
+ // now that we know whether it's an app slurl or a location slurl,
+ // parse the slurl into the proper data structures.
+ if (mType == APP)
+ {
+ // grab the app command type and strip it (could be a command to jump somewhere,
+ // or whatever )
+ mAppCmd = path_array[0].asString();
+ path_array.erase(0);
+
+ // Grab the parameters
+ mAppPath = path_array;
+ // and the query
+ mAppQuery = slurl_uri.query();
+ mAppQueryMap = slurl_uri.queryMap();
+ return;
+ }
+ else if (mType == LOCATION)
+ {
+ // at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z
+ // are collectively optional
+ // are optional
+
+ mRegion = LLURI::unescape(path_array[0].asString());
+
+ if (LLStringUtil::containsNonprintable(mRegion))
+ {
+ LLStringUtil::stripNonprintable(mRegion);
+ }
+
+ path_array.erase(0);
+
+ // parse the x, y, and optionally z
+ if (path_array.size() >= 2)
+ {
+ mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
+ if ((F32(mPosition[VX]) < 0.f) || (mPosition[VX] > REGION_WIDTH_METERS) ||
+ (F32(mPosition[VY]) < 0.f) || (mPosition[VY] > REGION_WIDTH_METERS) ||
+ (F32(mPosition[VZ]) < 0.f) || (mPosition[VZ] > REGION_HEIGHT_METERS))
+ {
+ mType = INVALID;
+ return;
+ }
+ }
+ else
+ {
+ // if x, y and z were not fully passed in, go to the middle of the region.
+ // teleport will adjust the actual location to make sure you're on the ground
+ // and such
+ mPosition = LLVector3(REGION_WIDTH_METERS / 2, REGION_WIDTH_METERS / 2, 0);
+ }
+ }
+ }
+}
// Create a slurl for the middle of the region
-LLSLURL::LLSLURL(const std::string& grid,
- const std::string& region)
+LLSLURL::LLSLURL(const std::string& grid, const std::string& region)
{
- mGrid = grid;
- mRegion = region;
- mType = LOCATION;
- mPosition = LLVector3((F64)REGION_WIDTH_METERS/2, (F64)REGION_WIDTH_METERS/2, 0);
+ mGrid = grid;
+ mRegion = region;
+ mType = LOCATION;
+ mPosition = LLVector3((F64)REGION_WIDTH_METERS / 2, (F64)REGION_WIDTH_METERS / 2, 0);
}
-
-
// create a slurl given the position. The position will be modded with the region
// width handling global positions as well
-LLSLURL::LLSLURL(const std::string& grid,
- const std::string& region,
- const LLVector3& position)
+LLSLURL::LLSLURL(const std::string& grid,
+ const std::string& region,
+ const LLVector3& position)
{
- mGrid = grid;
- mRegion = region;
- S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
- S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
- S32 z = ll_round( (F32)position[VZ] );
- mType = LOCATION;
- mPosition = LLVector3(x, y, z);
+ mGrid = grid;
+ mRegion = region;
+ S32 x = ll_round((F32)fmod(position[VX], (F32)REGION_WIDTH_METERS));
+ S32 y = ll_round((F32)fmod(position[VY], (F32)REGION_WIDTH_METERS));
+ S32 z = ll_round((F32)position[VZ]);
+ mType = LOCATION;
+ mPosition = LLVector3(x, y, z);
}
-
// create a simstring
-LLSLURL::LLSLURL(const std::string& region,
- const LLVector3& position)
+LLSLURL::LLSLURL(const std::string& region,
+ const LLVector3& position)
{
- *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
- region, position);
+ *this = LLSLURL(LLGridManager::getInstance()->getGridId(), region, position);
}
// create a slurl from a global position
-LLSLURL::LLSLURL(const std::string& grid,
- const std::string& region,
- const LLVector3d& global_position)
+LLSLURL::LLSLURL(const std::string& grid,
+ const std::string& region,
+ const LLVector3d& global_position)
{
- *this = LLSLURL(LLGridManager::getInstance()->getGridId(grid),
- region, LLVector3(global_position.mdV[VX],
- global_position.mdV[VY],
- global_position.mdV[VZ]));
+ *this = LLSLURL(LLGridManager::getInstance()->getGridId(grid), region,
+ LLVector3(global_position.mdV[VX], global_position.mdV[VY], global_position.mdV[VZ]));
}
// create a slurl from a global position
-LLSLURL::LLSLURL(const std::string& region,
- const LLVector3d& global_position)
+LLSLURL::LLSLURL(const std::string& region,
+ const LLVector3d& global_position)
{
- *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
- region, global_position);
+ *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
+ region, global_position);
}
LLSLURL::LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb)
{
- mType = APP;
- mAppCmd = command;
- mAppPath = LLSD::emptyArray();
- mAppPath.append(LLSD(id));
- mAppPath.append(LLSD(verb));
+ mType = APP;
+ mAppCmd = command;
+ mAppPath = LLSD::emptyArray();
+ mAppPath.append(LLSD(id));
+ mAppPath.append(LLSD(verb));
}
-
std::string LLSLURL::getSLURLString() const
{
- switch(mType)
- {
- case HOME_LOCATION:
- return SIM_LOCATION_HOME;
- case LAST_LOCATION:
- return SIM_LOCATION_LAST;
- case LOCATION:
- {
- // lookup the grid
- S32 x = ll_round( (F32)mPosition[VX] );
- S32 y = ll_round( (F32)mPosition[VY] );
- S32 z = ll_round( (F32)mPosition[VZ] );
- return LLGridManager::getInstance()->getSLURLBase(mGrid) +
- LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
- }
- case APP:
- {
- std::ostringstream app_url;
- app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd;
- for(LLSD::array_const_iterator i = mAppPath.beginArray();
- i != mAppPath.endArray();
- i++)
- {
- app_url << "/" << i->asString();
- }
- if(mAppQuery.length() > 0)
- {
- app_url << "?" << mAppQuery;
- }
- return app_url.str();
- }
- default:
- LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL;
- return std::string();
- }
+ switch (mType)
+ {
+ case HOME_LOCATION:
+ return SIM_LOCATION_HOME;
+ case LAST_LOCATION:
+ return SIM_LOCATION_LAST;
+ case LOCATION:
+ {
+ // lookup the grid
+ S32 x = ll_round((F32)mPosition[VX]);
+ S32 y = ll_round((F32)mPosition[VY]);
+ S32 z = ll_round((F32)mPosition[VZ]);
+ return LLGridManager::getInstance()->getSLURLBase(mGrid) +
+ LLURI::escape(mRegion) + llformat("/%d/%d/%d", x, y, z);
+ }
+ case APP:
+ {
+ std::ostringstream app_url;
+ app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd;
+ for (LLSD::array_const_iterator i = mAppPath.beginArray();
+ i != mAppPath.endArray();
+ i++)
+ {
+ app_url << "/" << i->asString();
+ }
+ if (mAppQuery.length() > 0)
+ {
+ app_url << "?" << mAppQuery;
+ }
+ return app_url.str();
+ }
+ default:
+ LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL;
+ return std::string();
+ }
}
std::string LLSLURL::getLoginString() const
{
-
- std::stringstream unescaped_start;
- switch(mType)
- {
- case LOCATION:
- unescaped_start << "uri:"
- << mRegion << "&"
- << ll_round(mPosition[0]) << "&"
- << ll_round(mPosition[1]) << "&"
- << ll_round(mPosition[2]);
- break;
- case HOME_LOCATION:
- unescaped_start << "home";
- break;
- case LAST_LOCATION:
- unescaped_start << "last";
- break;
- default:
- LL_WARNS("AppInit") << "Unexpected SLURL type ("<<(int)mType <<")for login string"<< LL_ENDL;
- break;
- }
- return xml_escape_string(unescaped_start.str());
+ std::stringstream unescaped_start;
+ switch (mType)
+ {
+ case LOCATION:
+ unescaped_start << "uri:"
+ << mRegion << "&"
+ << ll_round(mPosition[0]) << "&"
+ << ll_round(mPosition[1]) << "&"
+ << ll_round(mPosition[2]);
+ break;
+ case HOME_LOCATION:
+ unescaped_start << "home";
+ break;
+ case LAST_LOCATION:
+ unescaped_start << "last";
+ break;
+ default:
+ LL_WARNS("AppInit") << "Unexpected SLURL type (" << (int)mType << ")for login string" << LL_ENDL;
+ break;
+ }
+ return xml_escape_string(unescaped_start.str());
}
-bool LLSLURL::operator==(const LLSLURL& rhs)
+bool LLSLURL::operator ==(const LLSLURL& rhs)
{
- if(rhs.mType != mType) return false;
- switch(mType)
- {
- case LOCATION:
- return ((mGrid == rhs.mGrid) &&
- (mRegion == rhs.mRegion) &&
- (mPosition == rhs.mPosition));
- case APP:
- return getSLURLString() == rhs.getSLURLString();
-
- case HOME_LOCATION:
- case LAST_LOCATION:
- return true;
- default:
- return false;
- }
+ if (rhs.mType != mType)
+ return false;
+
+ switch (mType)
+ {
+ case LOCATION:
+ return (mGrid == rhs.mGrid) &&
+ (mRegion == rhs.mRegion) &&
+ (mPosition == rhs.mPosition);
+
+ case APP:
+ return getSLURLString() == rhs.getSLURLString();
+
+ case HOME_LOCATION:
+ case LAST_LOCATION:
+ return true;
+
+ default:
+ return false;
+ }
}
bool LLSLURL::operator !=(const LLSLURL& rhs)
{
- return !(*this == rhs);
+ return !(*this == rhs);
}
std::string LLSLURL::getLocationString() const
{
- return llformat("%s/%d/%d/%d",
- mRegion.c_str(),
- (int)ll_round(mPosition[0]),
- (int)ll_round(mPosition[1]),
- (int)ll_round(mPosition[2]));
+ return llformat("%s/%d/%d/%d",
+ mRegion.c_str(),
+ (int)ll_round(mPosition[0]),
+ (int)ll_round(mPosition[1]),
+ (int)ll_round(mPosition[2]));
}
// static
-const std::string LLSLURL::typeName[NUM_SLURL_TYPES] =
+const std::string LLSLURL::typeName[NUM_SLURL_TYPES] =
{
- "INVALID",
- "LOCATION",
- "HOME_LOCATION",
- "LAST_LOCATION",
- "APP",
- "HELP"
+ "INVALID",
+ "LOCATION",
+ "HOME_LOCATION",
+ "LAST_LOCATION",
+ "APP",
+ "HELP",
+ "EMPTY"
};
-
+
std::string LLSLURL::getTypeString(SLURL_TYPE type)
{
- std::string name;
- if ( type >= INVALID && type < NUM_SLURL_TYPES )
- {
- name = LLSLURL::typeName[type];
- }
- else
- {
- name = llformat("Out of Range (%d)",type);
- }
- return name;
+ std::string name;
+ if (type >= INVALID && type < NUM_SLURL_TYPES)
+ {
+ name = LLSLURL::typeName[type];
+ }
+ else
+ {
+ name = llformat("Out of Range (%d)", type);
+ }
+ return name;
}
-
std::string LLSLURL::asString() const
{
std::ostringstream result;
result
- << " mType: " << LLSLURL::getTypeString(mType)
- << " mGrid: " + getGrid()
- << " mRegion: " + getRegion()
- << " mPosition: " << mPosition
- << " mAppCmd:" << getAppCmd()
- << " mAppPath:" + getAppPath().asString()
- << " mAppQueryMap:" + getAppQueryMap().asString()
- << " mAppQuery: " + getAppQuery()
- ;
-
+ << " mType: " << LLSLURL::getTypeString(mType)
+ << " mGrid: " + getGrid()
+ << " mRegion: " + getRegion()
+ << " mPosition: " << mPosition
+ << " mAppCmd:" << getAppCmd()
+ << " mAppPath:" + getAppPath().asString()
+ << " mAppQueryMap:" + getAppQueryMap().asString()
+ << " mAppQuery: " + getAppQuery()
+ ;
+
return result.str();
}
-
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index b86cf7949b..6132a4a8b0 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -52,13 +52,14 @@ public:
static const char* SLURL_REGION_PATH;
// if you modify this enumeration, update typeName as well
- enum SLURL_TYPE {
- INVALID,
+ enum SLURL_TYPE {
+ INVALID,
LOCATION,
HOME_LOCATION,
LAST_LOCATION,
APP,
HELP,
+ EMPTY,
NUM_SLURL_TYPES // must be last
};
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 17c834326c..e19f8fef41 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -847,6 +847,43 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
assert_states_valid(this);
}
+//virtual
+void LLSpatialGroup::rebound()
+{
+ if (!isDirty())
+ return;
+
+ super::rebound();
+
+ if (mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_CONTROL_AV)
+ {
+ llassert(mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_CONTROL_AV);
+
+ LLSpatialBridge* bridge = getSpatialPartition()->asBridge();
+ if (bridge &&
+ bridge->mDrawable &&
+ bridge->mDrawable->getVObj() &&
+ bridge->mDrawable->getVObj()->isRoot())
+ {
+ LLControlAvatar* controlAvatar = bridge->mDrawable->getVObj()->getControlAvatar();
+ if (controlAvatar &&
+ controlAvatar->mDrawable &&
+ controlAvatar->mControlAVBridge)
+ {
+ llassert(controlAvatar->mControlAVBridge->mOctree);
+
+ LLSpatialGroup* root = (LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0);
+ if (this == root)
+ {
+ const LLVector4a* addingExtents = controlAvatar->mDrawable->getSpatialExtents();
+ const LLXformMatrix* currentTransform = bridge->mDrawable->getXform();
+ expandExtents(addingExtents, *currentTransform);
+ }
+ }
+ }
+ }
+}
+
void LLSpatialGroup::destroyGL(bool keep_occlusion)
{
setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY);
@@ -1300,17 +1337,8 @@ void drawBox(const LLVector4a& c, const LLVector4a& r)
void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
{
-
- llassert(pos.isFinite());
- llassert(size.isFinite());
-
- llassert(!llisnan(pos.mV[0]));
- llassert(!llisnan(pos.mV[1]));
- llassert(!llisnan(pos.mV[2]));
-
- llassert(!llisnan(size.mV[0]));
- llassert(!llisnan(size.mV[1]));
- llassert(!llisnan(size.mV[2]));
+ if (!pos.isFinite() || !size.isFinite())
+ return;
LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));
@@ -1625,6 +1653,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
// - a linked rigged drawable face has the wrong draw order index
bool check_rigged_group(LLDrawable* drawable)
{
+#if 0
if (drawable->isState(LLDrawable::RIGGED))
{
LLSpatialGroup* group = drawable->getSpatialGroup();
@@ -1632,6 +1661,8 @@ bool check_rigged_group(LLDrawable* drawable)
if (root->isState(LLDrawable::RIGGED) && root->getSpatialGroup() != group)
{
+ LL_WARNS() << "[root->isState(LLDrawable::RIGGED) and root->getSpatialGroup() != group] is true"
+ " (" << root->getSpatialGroup() << " != " << group << ")" << LL_ENDL;
llassert(false);
return false;
}
@@ -1641,8 +1672,10 @@ bool check_rigged_group(LLDrawable* drawable)
{
for (auto& face : root->getFaces())
{
- if ((S32) face->getDrawOrderIndex() <= last_draw_index)
+ if ((S32)face->getDrawOrderIndex() <= last_draw_index)
{
+ LL_WARNS() << "[(S32)face->getDrawOrderIndex() <= last_draw_index] is true"
+ " (" << (S32)face->getDrawOrderIndex() << " <= " << last_draw_index << ")" << LL_ENDL;
llassert(false);
return false;
}
@@ -1656,23 +1689,27 @@ bool check_rigged_group(LLDrawable* drawable)
{
for (auto& face : child->mDrawable->getFaces())
{
- if ((S32) face->getDrawOrderIndex() <= last_draw_index)
+ if ((S32)face->getDrawOrderIndex() <= last_draw_index)
{
+ LL_WARNS() << "[(S32)face->getDrawOrderIndex() <= last_draw_index] is true"
+ " (" << (S32)face->getDrawOrderIndex() << " <= " << last_draw_index << ")" << LL_ENDL;
llassert(false);
return false;
}
last_draw_index = face->getDrawOrderIndex();
}
}
-
+
if (child->mDrawable->getSpatialGroup() != group)
{
+ LL_WARNS() << "[child->mDrawable->getSpatialGroup() != group] is true"
+ " (" << child->mDrawable->getSpatialGroup() << " != " << group << ")" << LL_ENDL;
llassert(false);
return false;
}
}
}
-
+#endif
return true;
}
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index cdb591083c..259ea24038 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -205,6 +205,7 @@ public:
LL_ALIGN_PREFIX(64)
class LLSpatialGroup : public LLOcclusionCullingGroup
{
+ using super = LLOcclusionCullingGroup;
friend class LLSpatialPartition;
friend class LLOctreeStateCheck;
public:
@@ -322,6 +323,9 @@ public:
virtual void handleDestruction(const TreeNode* node);
virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
+ // LLViewerOctreeGroup
+ virtual void rebound();
+
public:
LL_ALIGN_16(LLVector4a mViewAngle);
LL_ALIGN_16(LLVector4a mLastUpdateViewAngle);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index ad87fca25b..916848ff5f 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2250,7 +2250,7 @@ bool idle_startup()
static LLFrameTimer wearables_timer;
const F32 wearables_time = wearables_timer.getElapsedTimeF32();
- static LLCachedControl<F32> max_wearables_time(gSavedSettings, "ClothingLoadingDelay");
+ const F32 MAX_WEARABLES_TIME = 10.f;
if (!gAgent.isOutfitChosen() && isAgentAvatarValid())
{
@@ -2269,7 +2269,7 @@ bool idle_startup()
display_startup();
- if (gAgent.isOutfitChosen() && (wearables_time > max_wearables_time))
+ if (gAgent.isOutfitChosen() && (wearables_time > MAX_WEARABLES_TIME))
{
if (gInventory.isInventoryUsable())
{
@@ -2656,18 +2656,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
LLViewerParcelMgr::processParcelDwellReply);
msg->setHandlerFunc("AvatarPropertiesReply",
- &LLAvatarPropertiesProcessor::processAvatarPropertiesReply);
- msg->setHandlerFunc("AvatarInterestsReply",
- &LLAvatarPropertiesProcessor::processAvatarInterestsReply);
- msg->setHandlerFunc("AvatarGroupsReply",
- &LLAvatarPropertiesProcessor::processAvatarGroupsReply);
- // ratings deprecated
- //msg->setHandlerFuncFast(_PREHASH_AvatarStatisticsReply,
- // LLPanelAvatar::processAvatarStatisticsReply);
- msg->setHandlerFunc("AvatarNotesReply",
- &LLAvatarPropertiesProcessor::processAvatarNotesReply);
- msg->setHandlerFunc("AvatarPicksReply",
- &LLAvatarPropertiesProcessor::processAvatarPicksReply);
+ &LLAvatarPropertiesProcessor::processAvatarLegacyPropertiesReply);
msg->setHandlerFunc("AvatarClassifiedReply",
&LLAvatarPropertiesProcessor::processAvatarClassifiedsReply);
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 8f64cff47c..db6d822186 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -127,8 +127,8 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id)
//---------------------------------------------------------------------------------
void LLSysWellWindow::initChannel()
{
- LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(
- LLUUID(gSavedSettings.getString("NotificationChannelUUID")));
+ LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID);
mChannel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>(channel);
if(NULL == mChannel)
{
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 2e137a8e12..9c721de1e8 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -86,10 +86,10 @@ static const S32 LOCAL_TRACKING_ID_COLUMN = 1;
//static
bool get_is_predefined_texture(LLUUID asset_id)
{
- if (asset_id == LLUUID(gSavedSettings.getString("DefaultObjectTexture"))
- || asset_id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID"))
- || asset_id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"))
- || asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE))
+ if (asset_id == DEFAULT_OBJECT_TEXTURE
+ || asset_id == UI_IMAGE_WHITE
+ || asset_id == UI_IMAGE_INVISIBLE
+ || asset_id == SCULPT_DEFAULT_TEXTURE)
{
return true;
}
@@ -1323,8 +1323,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
// Default of defaults is white image for diff tex
//
- LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) );
- setBlankImageAssetID( whiteImage );
+ setBlankImageAssetID(UI_IMAGE_WHITE);
setAllowNoTexture(p.allow_no_texture);
setCanApplyImmediately(p.can_apply_immediately);
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index e2bfe286d3..5e19e130ad 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -71,6 +71,13 @@ enum LLPickerSource
PICKER_UNKNOWN, // on cancel, default ids
};
+const LLUUID DEFAULT_BLANK_NORMAL_TEXTURE("5b53359e-59dd-d8a2-04c3-9e65134da47a");
+const LLUUID DEFAULT_OBJECT_NORMAL_TEXTURE("85f28839-7a1c-b4e3-d71d-967792970a7b");
+const LLUUID DEFAULT_OBJECT_SPECULAR_TEXTURE("87e0e8f7-8729-1ea8-cfc9-8915773009db");
+const LLUUID DEFAULT_OBJECT_TEXTURE("89556747-24cb-43ed-920b-47caed15465f");
+const LLUUID UI_IMAGE_WHITE("5748decc-f629-461c-9a36-a35a221fe21f");
+const LLUUID UI_IMAGE_INVISIBLE("89556747-24cb-43ed-920b-47caed15465f");
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLTextureCtrl
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 84b61fc612..161ca12b55 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -439,14 +439,12 @@ void LLAvatarTexBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
line_num++;
}
- const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureUploadTimeout");
const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
LLColor4 header_color(1.f, 1.f, 1.f, 0.9f);
- const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled";
const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled";
- std::string header_text = llformat("[ Timeout('AvatarBakedTextureUploadTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str());
+ std::string header_text = llformat("[ Timeout:60 ] [ LOD_Override('TextureDiscardLevel'):%s ]", override_tex_discard_level_str.c_str());
LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num,
header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
line_num++;
diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp
index 04130fc724..78204204af 100644
--- a/indra/newview/llthumbnailctrl.cpp
+++ b/indra/newview/llthumbnailctrl.cpp
@@ -57,7 +57,8 @@ LLThumbnailCtrl::LLThumbnailCtrl(const LLThumbnailCtrl::Params& p)
, mFallbackImagep(p.fallback_image)
, mInteractable(p.interactable())
, mShowLoadingPlaceholder(p.show_loading())
-, mPriority(LLGLTexture::BOOST_PREVIEW)
+, mInited(false)
+, mInitImmediately(true)
{
mLoadingPlaceholderString = LLTrans::getString("texture_loading");
@@ -84,6 +85,10 @@ LLThumbnailCtrl::~LLThumbnailCtrl()
void LLThumbnailCtrl::draw()
{
+ if (!mInited)
+ {
+ initImage();
+ }
LLRect draw_rect = getLocalRect();
if (mBorderVisible)
@@ -171,11 +176,19 @@ void LLThumbnailCtrl::draw()
LLUICtrl::draw();
}
+void LLThumbnailCtrl::setVisible(BOOL visible)
+{
+ if (!visible && mInited)
+ {
+ unloadImage();
+ }
+ LLUICtrl::setVisible(visible);
+}
+
void LLThumbnailCtrl::clearTexture()
{
- mImageAssetID = LLUUID::null;
- mTexturep = nullptr;
- mImagep = nullptr;
+ setValue(LLSD());
+ mInited = true; // nothing to do
}
// virtual
@@ -191,34 +204,56 @@ void LLThumbnailCtrl::setValue(const LLSD& value)
LLUICtrl::setValue(tvalue);
- mImageAssetID = LLUUID::null;
- mTexturep = nullptr;
- mImagep = nullptr;
-
- if (tvalue.isUUID())
- {
+ unloadImage();
+
+ if (mInitImmediately)
+ {
+ initImage();
+ }
+}
+
+BOOL LLThumbnailCtrl::handleHover(S32 x, S32 y, MASK mask)
+{
+ if (mInteractable && getEnabled())
+ {
+ getWindow()->setCursor(UI_CURSOR_HAND);
+ return TRUE;
+ }
+ return LLUICtrl::handleHover(x, y, mask);
+}
+
+void LLThumbnailCtrl::initImage()
+{
+ if (mInited)
+ {
+ return;
+ }
+ mInited = true;
+ LLSD tvalue = getValue();
+
+ if (tvalue.isUUID())
+ {
mImageAssetID = tvalue.asUUID();
if (mImageAssetID.notNull())
{
// Should it support baked textures?
- mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
-
- mTexturep->setBoostLevel(mPriority);
+ mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_THUMBNAIL);
+
mTexturep->forceToSaveRawImage(0);
-
+
S32 desired_draw_width = mTexturep->getWidth();
S32 desired_draw_height = mTexturep->getHeight();
-
+
mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
}
- }
+ }
else if (tvalue.isString())
{
mImagep = LLUI::getUIImage(tvalue.asString(), LLGLTexture::BOOST_UI);
if (mImagep)
{
LLViewerFetchedTexture* texture = dynamic_cast<LLViewerFetchedTexture*>(mImagep->getImage().get());
- if(texture)
+ if (texture)
{
mImageAssetID = texture->getID();
}
@@ -226,14 +261,12 @@ void LLThumbnailCtrl::setValue(const LLSD& value)
}
}
-BOOL LLThumbnailCtrl::handleHover(S32 x, S32 y, MASK mask)
+void LLThumbnailCtrl::unloadImage()
{
- if (mInteractable && getEnabled())
- {
- getWindow()->setCursor(UI_CURSOR_HAND);
- return TRUE;
- }
- return LLUICtrl::handleHover(x, y, mask);
+ mImageAssetID = LLUUID::null;
+ mTexturep = nullptr;
+ mImagep = nullptr;
+ mInited = false;
}
diff --git a/indra/newview/llthumbnailctrl.h b/indra/newview/llthumbnailctrl.h
index 686603b373..f84a583271 100644
--- a/indra/newview/llthumbnailctrl.h
+++ b/indra/newview/llthumbnailctrl.h
@@ -64,17 +64,24 @@ public:
virtual ~LLThumbnailCtrl();
virtual void draw() override;
+ void setVisible(BOOL visible) override;
virtual void setValue(const LLSD& value ) override;
+ void setInitImmediately(bool val) { mInitImmediately = val; }
void clearTexture();
virtual BOOL handleHover(S32 x, S32 y, MASK mask) override;
+
+protected:
+ void initImage();
+ void unloadImage();
private:
- S32 mPriority;
bool mBorderVisible;
bool mInteractable;
bool mShowLoadingPlaceholder;
+ bool mInited;
+ bool mInitImmediately;
std::string mLoadingPlaceholderString;
LLUUID mImageAssetID;
LLViewBorder* mBorder;
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index d35833fac9..c84f00bdf4 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -90,6 +90,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
std::string edit_text_contents;
S32 edit_text_max_chars = 0;
bool is_password = false;
+ bool allow_emoji = false;
LLToastPanel::setBackgroundVisible(FALSE);
LLToastPanel::setBackgroundOpaque(TRUE);
@@ -134,6 +135,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
edit_text_contents = (*it)["value"].asString();
edit_text_name = (*it)["name"].asString();
edit_text_max_chars = (*it)["max_length_chars"].asInteger();
+ allow_emoji = (*it)["allow_emoji"].asBoolean();
}
else if (type == "password")
{
@@ -292,6 +294,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight());
mLineEditor->setRect(leditor_rect);
mLineEditor->setMaxTextChars(edit_text_max_chars);
+ mLineEditor->setAllowEmoji(allow_emoji);
mLineEditor->setText(edit_text_contents);
std::string notif_name = mNotification->getName();
@@ -496,10 +499,9 @@ void LLToastAlertPanel::draw()
}
static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
- static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 5);
gl_drop_shadow( 0, LLToastPanel::getRect().getHeight(), LLToastPanel::getRect().getWidth(), 0,
- shadow_color, shadow_lines);
+ shadow_color, DROP_SHADOW_FLOATER);
LLToastPanel::draw();
}
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 78e068f808..14ac9fdb6a 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -298,12 +298,10 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y)
BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y)
{
- static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3);
-
S32 mouse_delta_x = x - mDragStartX;
S32 mouse_delta_y = y - mDragStartY;
- return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > drag_and_drop_threshold * drag_and_drop_threshold;
+ return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD;
}
void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
@@ -566,12 +564,13 @@ BOOL LLToolDragAndDrop::handleKey(KEY key, MASK mask)
BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
{
+ const F32 DRAG_N_DROP_TOOLTIP_DELAY = 0.10000000149f;
if (!mToolTipMsg.empty())
{
LLToolTipMgr::instance().unblockToolTips();
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(mToolTipMsg)
- .delay_time(gSavedSettings.getF32( "DragAndDropToolTipDelay" )));
+ .delay_time(DRAG_N_DROP_TOOLTIP_DELAY));
return TRUE;
}
return FALSE;
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index d99c0ba2a6..e937c499ae 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -223,6 +223,13 @@ BOOL LLVisualParamHint::render()
LLVector3 target_pos = target_joint_pos + (target_offset * avatar_rotation);
F32 cam_angle_radians = mVisualParam->getCameraAngle() * DEG_TO_RAD;
+
+ static LLCachedControl<bool> auto_camera_position(gSavedSettings, "AppearanceCameraMovement");
+ if (!auto_camera_position)
+ {
+ cam_angle_radians += F_PI;
+ }
+
LLVector3 camera_snapshot_offset(
mVisualParam->getCameraDistance() * cosf( cam_angle_radians ),
mVisualParam->getCameraDistance() * sinf( cam_angle_radians ),
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 58011bbde2..d41003ea6e 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -86,8 +86,8 @@ LLToolPie::LLToolPie()
mMouseSteerX(-1),
mMouseSteerY(-1),
mClickAction(0),
- mClickActionBuyEnabled( gSavedSettings.getBOOL("ClickActionBuyEnabled") ),
- mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") ),
+ mClickActionBuyEnabled( TRUE ),
+ mClickActionPayEnabled( TRUE ),
mDoubleClickTimer()
{
}
@@ -765,8 +765,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
S32 delta_x = x - mMouseDownX;
S32 delta_y = y - mMouseDownY;
- S32 threshold = gSavedSettings.getS32("DragAndDropDistanceThreshold");
- if (delta_x * delta_x + delta_y * delta_y > threshold * threshold)
+ if (delta_x * delta_x + delta_y * delta_y > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD)
{
startCameraSteering();
steerCameraWithMouse(x, y);
@@ -1110,6 +1109,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
final_name = LLTrans::getString("TooltipPerson");;
}
+ const F32 INSPECTOR_TOOLTIP_DELAY = 0.35f;
+
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
p.message(final_name);
@@ -1117,7 +1118,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
p.click_callback(boost::bind(showAvatarInspector, hover_object->getID()));
p.visible_time_near(6.f);
p.visible_time_far(3.f);
- p.delay_time(gSavedSettings.getF32("AvatarInspectorTooltipDelay"));
+ p.delay_time(INSPECTOR_TOOLTIP_DELAY);
p.wrap(false);
LLToolTipMgr::instance().show(p);
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 76fb138768..07ea8a4ec6 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -134,6 +134,11 @@ bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl,
LLMediaCtrl* web,
bool trusted_browser)
{
+ // SL-20422 : Clicking the "Bring it back" link on Aditi displays a teleport alert
+ // Stop further processing empty urls like [secondlife:/// Bring it back.]
+ if (slurl.getType() == LLSLURL::EMPTY)
+ return true;
+
const bool right_click = false;
return dispatchCore(slurl, nav_type, right_click, web, trusted_browser);
}
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 13491114b9..036cef5c94 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -847,7 +847,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL));
+ LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, false, !panel);
// restore keyboard focus
gFocusMgr.setKeyboardFocus(focus);
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 6a0edbecb1..48499f0da8 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -48,6 +48,8 @@
#include "llstreamingaudio.h"
/////////////////////////////////////////////////////////
+const U32 FMODEX_DECODE_BUFFER_SIZE = 1000; // in milliseconds
+const U32 FMODEX_STREAM_BUFFER_SIZE = 7000; // in milliseconds
LLViewerAudio::LLViewerAudio() :
mDone(true),
@@ -116,7 +118,7 @@ void LLViewerAudio::startInternetStreamWithAutoFade(const std::string &streamURI
LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl();
if (stream && stream->supportsAdjustableBufferSizes())
- stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"), gSavedSettings.getU32("FMODExDecodeBufferSize"));
+ stream->setBufferSizes(FMODEX_STREAM_BUFFER_SIZE, FMODEX_DECODE_BUFFER_SIZE);
gAudiop->startInternetStream(mNextStreamURI);
}
@@ -183,7 +185,7 @@ bool LLViewerAudio::onIdleUpdate()
LL_DEBUGS("AudioEngine") << "Audio fade in: " << mNextStreamURI << LL_ENDL;
LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl();
if(stream && stream->supportsAdjustableBufferSizes())
- stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"),gSavedSettings.getU32("FMODExDecodeBufferSize"));
+ stream->setBufferSizes(FMODEX_STREAM_BUFFER_SIZE, FMODEX_DECODE_BUFFER_SIZE);
gAudiop->startInternetStream(mNextStreamURI);
}
@@ -418,12 +420,19 @@ void audio_update_volume(bool force_update)
gAudiop->setMasterGain ( master_volume );
- gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler"));
+ const F32 AUDIO_LEVEL_DOPPLER = 1.f;
+ gAudiop->setDopplerFactor(AUDIO_LEVEL_DOPPLER);
- if(!LLViewerCamera::getInstance()->cameraUnderWater())
- gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff"));
+ if(!LLViewerCamera::getInstance()->cameraUnderWater())
+ {
+ const F32 AUDIO_LEVEL_ROLLOFF = 1.f;
+ gAudiop->setRolloffFactor(AUDIO_LEVEL_ROLLOFF);
+ }
else
- gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelUnderwaterRolloff"));
+ {
+ const F32 AUDIO_LEVEL_UNDERWATER_ROLLOFF = 5.f;
+ gAudiop->setRolloffFactor(AUDIO_LEVEL_UNDERWATER_ROLLOFF);
+ }
gAudiop->setMuted(mute_audio || progress_view_visible);
@@ -532,8 +541,8 @@ void audio_update_wind(bool force_update)
// whereas steady-state avatar walk velocity is only 3.2 m/s.
// Without this the world feels desolate on first login when you are
// standing still.
- static LLUICachedControl<F32> wind_level("AudioLevelWind", 0.5f);
- LLVector3 scaled_wind_vec = gWindVec * wind_level;
+ const F32 WIND_LEVEL = 0.5f;
+ LLVector3 scaled_wind_vec = gWindVec * WIND_LEVEL;
// Mix in the avatar's motion, subtract because when you walk north,
// the apparent wind moves south.
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 50d48987ed..60d6bc25f0 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -370,15 +370,6 @@ static bool handleChatFontSizeChanged(const LLSD& newvalue)
return true;
}
-static bool handleChatPersistTimeChanged(const LLSD& newvalue)
-{
- if(gConsole)
- {
- gConsole->setLinePersistTime((F32) newvalue.asReal());
- }
- return true;
-}
-
static bool handleConsoleMaxLinesChanged(const LLSD& newvalue)
{
if(gConsole)
@@ -696,6 +687,12 @@ void handleUserTargetDrawDistanceChanged(const LLSD& newValue)
LLPerfStats::tunables.userTargetDrawDistance = newval;
}
+void handleUserMinDrawDistanceChanged(const LLSD &newValue)
+{
+ const auto newval = gSavedSettings.getF32("AutoTuneRenderFarClipMin");
+ LLPerfStats::tunables.userMinDrawDistance = newval;
+}
+
void handleUserTargetReflectionsChanged(const LLSD& newValue)
{
const auto newval = gSavedSettings.getS32("UserTargetReflections");
@@ -804,7 +801,6 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged);
setting_setup_signal_listener(gSavedSettings, "TextureMemory", handleVideoMemoryChanged);
setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged);
- setting_setup_signal_listener(gSavedSettings, "ChatPersistTime", handleChatPersistTimeChanged);
setting_setup_signal_listener(gSavedSettings, "ConsoleMaxLines", handleConsoleMaxLinesChanged);
setting_setup_signal_listener(gSavedSettings, "UploadBakedTexOld", handleUploadBakedTexOldChanged);
setting_setup_signal_listener(gSavedSettings, "UseOcclusion", handleUseOcclusionChanged);
@@ -815,9 +811,6 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "AudioLevelMusic", handleAudioVolumeChanged);
setting_setup_signal_listener(gSavedSettings, "AudioLevelMedia", handleAudioVolumeChanged);
setting_setup_signal_listener(gSavedSettings, "AudioLevelVoice", handleAudioVolumeChanged);
- setting_setup_signal_listener(gSavedSettings, "AudioLevelDoppler", handleAudioVolumeChanged);
- setting_setup_signal_listener(gSavedSettings, "AudioLevelRolloff", handleAudioVolumeChanged);
- setting_setup_signal_listener(gSavedSettings, "AudioLevelUnderwaterRolloff", handleAudioVolumeChanged);
setting_setup_signal_listener(gSavedSettings, "MuteAudio", handleAudioVolumeChanged);
setting_setup_signal_listener(gSavedSettings, "MuteMusic", handleAudioVolumeChanged);
setting_setup_signal_listener(gSavedSettings, "MuteMedia", handleAudioVolumeChanged);
@@ -910,6 +903,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "PerfStatsCaptureEnabled", handlePerformanceStatsEnabledChanged);
setting_setup_signal_listener(gSavedSettings, "UserTargetReflections", handleUserTargetReflectionsChanged);
setting_setup_signal_listener(gSavedSettings, "AutoTuneRenderFarClipTarget", handleUserTargetDrawDistanceChanged);
+ setting_setup_signal_listener(gSavedSettings, "AutoTuneRenderFarClipMin", handleUserMinDrawDistanceChanged);
setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorFarAwayDistance", handleUserImpostorDistanceChanged);
setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorByDistEnabled", handleUserImpostorByDistEnabledChanged);
setting_setup_signal_listener(gSavedSettings, "TuningFPSStrategy", handleFPSTuningStrategyChanged);
@@ -936,8 +930,6 @@ DECL_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
LLSD test_llsd = LLSD()["testing1"] = LLSD()["testing2"];
DECL_LLCC(LLSD, test_llsd);
-static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hahahahahha", "Not the real comment");
-
void test_cached_control()
{
#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) LL_ERRS() << "Fail "#T << LL_ENDL; } while(0)
@@ -954,8 +946,6 @@ void test_cached_control()
TEST_LLCC(LLColor3, LLColor3(1.0f, 0.f, 0.5f));
TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
//There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd);
-
- if((std::string)test_BrowserHomePage != "http://www.secondlife.com") LL_ERRS() << "Fail BrowserHomePage" << LL_ENDL;
}
#endif // TEST_CACHED_CONTROL
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index b40cf4acec..09b3dd5dc1 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -209,11 +209,11 @@ void display_update_camera()
void display_stats()
{
LL_PROFILE_ZONE_SCOPED
- F32 fps_log_freq = gSavedSettings.getF32("FPSLogFrequency");
- if (fps_log_freq > 0.f && gRecentFPSTime.getElapsedTimeF32() >= fps_log_freq)
+ const F32 FPS_LOG_FREQUENCY = 10.f;
+ if (gRecentFPSTime.getElapsedTimeF32() >= FPS_LOG_FREQUENCY)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - FPS");
- F32 fps = gRecentFrameCount / fps_log_freq;
+ F32 fps = gRecentFrameCount / FPS_LOG_FREQUENCY;
LL_INFOS() << llformat("FPS: %.02f", fps) << LL_ENDL;
gRecentFrameCount = 0;
gRecentFPSTime.reset();
@@ -228,8 +228,8 @@ void display_stats()
LLMemory::logMemoryInfo(TRUE) ;
gRecentMemoryTime.reset();
}
- F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency");
- if (asset_storage_log_freq > 0.f && gAssetStorageLogTime.getElapsedTimeF32() >= asset_storage_log_freq)
+ const F32 ASSET_STORAGE_LOG_FREQUENCY = 60.f;
+ if (gAssetStorageLogTime.getElapsedTimeF32() >= ASSET_STORAGE_LOG_FREQUENCY)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - Asset Storage");
gAssetStorageLogTime.reset();
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index e35cb26ce1..4577f71061 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -227,8 +227,18 @@ std::string string_from_guid(const GUID &guid)
return res;
}
+#elif LL_DARWIN
+
+bool macos_devices_callback(std::string &product_name, LLSD &data, void* userdata)
+{
+ std::string product = data["product"].asString();
+
+ return LLViewerJoystick::getInstance()->initDevice(nullptr, product, data);
+}
+
#endif
+
// -----------------------------------------------------------------------------
void LLViewerJoystick::updateEnabled(bool autoenable)
{
@@ -365,25 +375,48 @@ void LLViewerJoystick::init(bool autoenable)
{
if (mNdofDev)
{
+ U32 device_type = 0;
+ void* win_callback = nullptr;
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback;
// di8_devices_callback callback is immediate and happens in scope of getInputDevices()
#if LL_WINDOWS && !LL_MESA_HEADLESS
// space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
- U32 device_type = DI8DEVCLASS_GAMECTRL;
- void* callback = &di8_devices_callback;
-#else
- // MAC doesn't support device search yet
- // On MAC there is an ndof_idsearch and it is possible to specify product
- // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
- U32 device_type = 0;
- void* callback = NULL;
+ device_type = DI8DEVCLASS_GAMECTRL;
+ win_callback = &di8_devices_callback;
+#elif LL_DARWIN
+ osx_callback = macos_devices_callback;
+
+ if (mLastDeviceUUID.isMap())
+ {
+ std::string manufacturer = mLastDeviceUUID["manufacturer"].asString();
+ std::string product = mLastDeviceUUID["product"].asString();
+
+ strncpy(mNdofDev->manufacturer, manufacturer.c_str(), sizeof(mNdofDev->manufacturer));
+ strncpy(mNdofDev->product, product.c_str(), sizeof(mNdofDev->product));
+
+ if (ndof_init_first(mNdofDev, nullptr))
+ {
+ mDriverState = JDS_INITIALIZING;
+ // Saved device no longer exist
+ // No device found
+ LL_WARNS() << "ndof_init_first FAILED" << LL_ENDL;
+ }
+ else
+ {
+ mDriverState = JDS_INITIALIZED;
+ }
+ }
#endif
- if (!gViewerWindow->getWindow()->getInputDevices(device_type, callback, NULL))
+ if (mDriverState != JDS_INITIALIZED)
{
- LL_INFOS("Joystick") << "Failed to gather devices from window. Falling back to ndof's init" << LL_ENDL;
- // Failed to gather devices from windows, init first suitable one
- mLastDeviceUUID = LLSD();
- void *preffered_device = NULL;
- initDevice(preffered_device);
+ if (!gViewerWindow->getWindow()->getInputDevices(device_type, osx_callback, win_callback, NULL))
+ {
+ LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
+ // Failed to gather devices, init first suitable one
+ mLastDeviceUUID = LLSD();
+ void *preffered_device = NULL;
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -438,27 +471,49 @@ void LLViewerJoystick::initDevice(LLSD &guid)
{
#if LIB_NDOF
mLastDeviceUUID = guid;
-
+ U32 device_type = 0;
+ void* win_callback = nullptr;
+ std::function<bool(std::string&, LLSD&, void*)> osx_callback;
+ mDriverState = JDS_INITIALIZING;
+
#if LL_WINDOWS && !LL_MESA_HEADLESS
// space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
- U32 device_type = DI8DEVCLASS_GAMECTRL;
- void* callback = &di8_devices_callback;
-#else
- // MAC doesn't support device search yet
- // On MAC there is an ndof_idsearch and it is possible to specify product
- // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
- U32 device_type = 0;
- void* callback = NULL;
+ device_type = DI8DEVCLASS_GAMECTRL;
+ win_callback = &di8_devices_callback;
+#elif LL_DARWIN
+ osx_callback = macos_devices_callback;
+ if (mLastDeviceUUID.isMap())
+ {
+ std::string manufacturer = mLastDeviceUUID["manufacturer"].asString();
+ std::string product = mLastDeviceUUID["product"].asString();
+
+ strncpy(mNdofDev->manufacturer, manufacturer.c_str(), sizeof(mNdofDev->manufacturer));
+ strncpy(mNdofDev->product, product.c_str(), sizeof(mNdofDev->product));
+
+ if (ndof_init_first(mNdofDev, nullptr))
+ {
+ mDriverState = JDS_INITIALIZING;
+ // Saved device no longer exist
+ // Np other device present
+ LL_WARNS() << "ndof_init_first FAILED" << LL_ENDL;
+ }
+ else
+ {
+ mDriverState = JDS_INITIALIZED;
+ }
+ }
#endif
- mDriverState = JDS_INITIALIZING;
- if (!gViewerWindow->getWindow()->getInputDevices(device_type, callback, NULL))
+ if (mDriverState != JDS_INITIALIZED)
{
- LL_INFOS("Joystick") << "Failed to gather devices from window. Falling back to ndof's init" << LL_ENDL;
- // Failed to gather devices from windows, init first suitable one
- void *preffered_device = NULL;
- mLastDeviceUUID = LLSD();
- initDevice(preffered_device);
+ if (!gViewerWindow->getWindow()->getInputDevices(device_type, osx_callback, win_callback, NULL))
+ {
+ LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
+ // Failed to gather devices from window, init first suitable one
+ void *preffered_device = NULL;
+ mLastDeviceUUID = LLSD();
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -469,19 +524,37 @@ void LLViewerJoystick::initDevice(LLSD &guid)
#endif
}
-void LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid)
+bool LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid)
{
#if LIB_NDOF
mLastDeviceUUID = guid;
-
+
+#if LL_DARWIN
+ if (guid.isMap())
+ {
+ std::string manufacturer = mLastDeviceUUID["manufacturer"].asString();
+ std::string product = mLastDeviceUUID["product"].asString();
+
+ strncpy(mNdofDev->manufacturer, manufacturer.c_str(), sizeof(mNdofDev->manufacturer));
+ strncpy(mNdofDev->product, product.c_str(), sizeof(mNdofDev->product));
+ }
+ else
+ {
+ mNdofDev->product[0] = '\0';
+ mNdofDev->manufacturer[0] = '\0';
+ }
+#else
strncpy(mNdofDev->product, name.c_str(), sizeof(mNdofDev->product));
mNdofDev->manufacturer[0] = '\0';
+#endif
- initDevice(preffered_device);
+ return initDevice(preffered_device);
+#else
+ return false;
#endif
}
-void LLViewerJoystick::initDevice(void * preffered_device /* LPDIRECTINPUTDEVICE8* */)
+bool LLViewerJoystick::initDevice(void * preffered_device /* LPDIRECTINPUTDEVICE8* */)
{
#if LIB_NDOF
// Different joysticks will return different ranges of raw values.
@@ -511,8 +584,10 @@ void LLViewerJoystick::initDevice(void * preffered_device /* LPDIRECTINPUTDEVICE
else
{
mDriverState = JDS_INITIALIZED;
+ return true;
}
#endif
+ return false;
}
// -----------------------------------------------------------------------------
@@ -1320,6 +1395,8 @@ bool LLViewerJoystick::isDeviceUUIDSet()
#if LL_WINDOWS && !LL_MESA_HEADLESS
// for ease of comparison and to dial less with platform specific variables, we store id as LLSD binary
return mLastDeviceUUID.isBinary();
+#elif LL_DARWIN
+ return mLastDeviceUUID.isMap();
#else
return false;
#endif
@@ -1346,19 +1423,48 @@ std::string LLViewerJoystick::getDeviceUUIDString()
{
return std::string();
}
+#elif LL_DARWIN
+ if (mLastDeviceUUID.isMap())
+ {
+ std::string manufacturer = mLastDeviceUUID["manufacturer"].asString();
+ std::string product = mLastDeviceUUID["product"].asString();
+ return manufacturer + ":" + product;
+ }
+ else
+ {
+ return std::string();
+ }
#else
return std::string();
- // return mLastDeviceUUID;
+#endif
+}
+
+void LLViewerJoystick::saveDeviceIdToSettings()
+{
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // can't save as binary directly,
+ // someone editing the xml will corrupt it
+ // so convert to string first
+ std::string device_string = getDeviceUUIDString();
+ gSavedSettings.setLLSD("JoystickDeviceUUID", LLSD(device_string));
+#else
+ LLSD device_id = getDeviceUUID();
+ gSavedSettings.setLLSD("JoystickDeviceUUID", device_id);
#endif
}
void LLViewerJoystick::loadDeviceIdFromSettings()
{
+ LLSD dev_id = gSavedSettings.getLLSD("JoystickDeviceUUID");
#if LL_WINDOWS && !LL_MESA_HEADLESS
// We can't save binary data to gSavedSettings, somebody editing the file will corrupt it,
// so _GUID data gets converted to string (we probably can convert it to LLUUID with memcpy)
// and here we need to convert it back to binary from string
- std::string device_string = gSavedSettings.getString("JoystickDeviceUUID");
+ std::string device_string;
+ if (dev_id.isString())
+ {
+ device_string = dev_id.asString();
+ }
if (device_string.empty())
{
mLastDeviceUUID = LLSD();
@@ -1372,10 +1478,22 @@ void LLViewerJoystick::loadDeviceIdFromSettings()
LLSD::Binary data; //just an std::vector
data.resize(size);
memcpy(&data[0], &guid /*POD _GUID*/, size);
- // We store this data in LLSD since LLSD is versatile and will be able to handle both GUID2
- // and any data MAC will need for device selection
+ // We store this data in LLSD since it can handle both GUID2 and long
mLastDeviceUUID = LLSD(data);
}
+#elif LL_DARWIN
+ if (!dev_id.isMap())
+ {
+ mLastDeviceUUID = LLSD();
+ }
+ else
+ {
+ std::string manufacturer = mLastDeviceUUID["manufacturer"].asString();
+ std::string product = mLastDeviceUUID["product"].asString();
+ LL_DEBUGS("Joystick") << "Looking for device by manufacturer: " << manufacturer << " and product: " << product << LL_ENDL;
+ // We store this data in LLSD since it can handle both GUID2 and long
+ mLastDeviceUUID = dev_id;
+ }
#else
mLastDeviceUUID = LLSD();
//mLastDeviceUUID = gSavedSettings.getLLSD("JoystickDeviceUUID");
diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h
index 3b4f898710..33579f544c 100644
--- a/indra/newview/llviewerjoystick.h
+++ b/indra/newview/llviewerjoystick.h
@@ -30,6 +30,9 @@
#include "stdtypes.h"
#if LIB_NDOF
+#if LL_DARWIN
+#define TARGET_OS_MAC 1
+#endif
#include "ndofdev_external.h"
#else
#define NDOF_Device void
@@ -52,8 +55,8 @@ class LLViewerJoystick : public LLSingleton<LLViewerJoystick>
public:
void init(bool autoenable);
void initDevice(LLSD &guid);
- void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
- void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
+ bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
+ bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
void terminate();
void updateStatus();
@@ -76,6 +79,7 @@ public:
LLSD getDeviceUUID(); //unconverted, OS dependent value wrapped into LLSD, for comparison/search
std::string getDeviceUUIDString(); // converted readable value for settings
std::string getDescription();
+ void saveDeviceIdToSettings();
protected:
void updateEnabled(bool autoenable);
@@ -103,7 +107,11 @@ private:
bool mCameraUpdated;
bool mOverrideCamera;
U32 mJoystickRun;
- LLSD mLastDeviceUUID; // _GUID as U8 binary map, integer 1 for no device/ndof's device
+
+ // Windows: _GUID as U8 binary map
+ // MacOS: long as an U8 binary map
+ // Else: integer 1 for no device/ndof's default device
+ LLSD mLastDeviceUUID;
static F32 sLastDelta[7];
static F32 sDelta[7];
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f3288a5300..17b56c9d1d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1557,15 +1557,22 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
else
{
- // Highlight item
- const BOOL auto_open =
- gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
- !from_name.empty(); // don't open if it's not from anyone.
- if(auto_open)
+ // Highlight item
+ bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory");
+ bool auto_open =
+ show_in_inventory && // don't open if ShowInInventory is FALSE
+ !from_name.empty(); // don't open if it's not from anyone
+
+ // SL-20419 : Don't change active tab if floater is visible
+ LLFloater* instance = LLFloaterReg::findInstance("inventory");
+ bool use_main_panel = instance && instance->getVisible();
+
+ if (auto_open)
{
LLFloaterReg::showInstance("inventory");
}
- LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
+
+ LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel);
}
}
}
@@ -1641,8 +1648,9 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
const LLUUID& blocked_id;
};
- LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
- gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID,
+ OfferMatcher(blocked_id));
}
@@ -5762,8 +5770,9 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name)
const LLUUID& blocked_id;
};
- LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
- gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(task_id));
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID,
+ OfferMatcher(task_id));
}
static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 9275cfb86d..da75da0b64 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3177,7 +3177,6 @@ void LLViewerObject::unlinkControlAvatar()
if (mControlAvatar)
{
mControlAvatar->markForDeath();
- mControlAvatar->mRootVolp = NULL;
mControlAvatar = NULL;
}
}
@@ -3863,20 +3862,13 @@ F32 LLViewerObject::recursiveGetEstTrianglesMax() const
S32 LLViewerObject::getAnimatedObjectMaxTris() const
{
S32 max_tris = 0;
- if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
+ if (gAgent.getRegion())
{
- max_tris = S32_MAX;
- }
- else
- {
- if (gAgent.getRegion())
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("AnimatedObjects"))
{
- LLSD features;
- gAgent.getRegion()->getSimulatorFeatures(features);
- if (features.has("AnimatedObjects"))
- {
- max_tris = features["AnimatedObjects"]["AnimatedObjectMaxTris"].asInteger();
- }
+ max_tris = features["AnimatedObjects"]["AnimatedObjectMaxTris"].asInteger();
}
}
return max_tris;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 15accd0547..c5426c9382 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1526,6 +1526,12 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
// static
void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **user)
{
+ if (LLApp::isExiting() || gDisconnected)
+ {
+ LL_DEBUGS("ParcelMgr") << "Ignoring parcel properties, shutting down" << LL_ENDL;
+ return;
+ }
+
S32 request_result;
S32 sequence_id;
BOOL snap_selection = FALSE;
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index 4c2fbcf837..ae8163beec 100644
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -186,11 +186,11 @@ BOOL LLViewerTexLayerSetBuffer::isReadyToUpdate() const
// Update if we've hit a timeout. Unlike for uploads, we can make this timeout fairly small
// since render unnecessarily doesn't cost much.
- const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedLocalTextureUpdateTimeout");
- if (texture_timeout != 0)
+ const U32 TEXTURE_TIMEOUT = 10;
+ if (TEXTURE_TIMEOUT != 0)
{
// If we hit our timeout and have textures available at even lower resolution, then update.
- const BOOL is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout;
+ const BOOL is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= TEXTURE_TIMEOUT;
const BOOL has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable();
if (has_lower_lod && is_update_textures_timeout) return TRUE;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index c458c75a40..64d69ae832 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -95,7 +95,8 @@ S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez;
const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128;
-const S32 DEFAULT_ICON_DIMENTIONS = 32;
+const S32 DEFAULT_ICON_DIMENSIONS = 32;
+const S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256;
U32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256.
U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
bool LLViewerTexture::sFreezeImageUpdates = false;
@@ -729,7 +730,8 @@ void LLViewerTexture::setBoostLevel(S32 level)
if(mBoostLevel != LLViewerTexture::BOOST_NONE &&
mBoostLevel != LLViewerTexture::BOOST_ALM &&
mBoostLevel != LLViewerTexture::BOOST_SELECTED &&
- mBoostLevel != LLViewerTexture::BOOST_ICON)
+ mBoostLevel != LLViewerTexture::BOOST_ICON &&
+ mBoostLevel != LLViewerTexture::BOOST_THUMBNAIL)
{
setNoDelete();
}
@@ -1239,8 +1241,19 @@ void LLViewerFetchedTexture::loadFromFastCache()
{
// Shouldn't do anything usefull since texures in fast cache are 16x16,
// it is here in case fast cache changes.
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENSIONS;
+ if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
+ {
+ // scale oversized icon, no need to give more work to gl
+ mRawImage->scale(expected_width, expected_height);
+ }
+ }
+
+ if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ {
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
{
// scale oversized icon, no need to give more work to gl
@@ -1723,7 +1736,7 @@ void LLViewerFetchedTexture::processTextureStats()
{
mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
}
- else if (mDontDiscard && mBoostLevel == LLGLTexture::BOOST_ICON)
+ else if (mDontDiscard && (mBoostLevel == LLGLTexture::BOOST_ICON || mBoostLevel == LLGLTexture::BOOST_THUMBNAIL))
{
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
{
@@ -1826,7 +1839,10 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
// Don't decode anything we don't need
priority = -4.0f;
}
- else if ((mBoostLevel == LLGLTexture::BOOST_UI || mBoostLevel == LLGLTexture::BOOST_ICON) && !have_all_data)
+ else if ((mBoostLevel == LLGLTexture::BOOST_UI
+ || mBoostLevel == LLGLTexture::BOOST_ICON
+ || mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ && !have_all_data)
{
priority = 1.f;
}
@@ -2173,8 +2189,20 @@ bool LLViewerFetchedTexture::updateFetch()
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENSIONS;
+ if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
+ {
+ // scale oversized icon, no need to give more work to gl
+ // since we got mRawImage from thread worker and image may be in use (ex: writing cache), make a copy
+ mRawImage = mRawImage->scaled(expected_width, expected_height);
+ }
+ }
+
+ if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ {
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
{
// scale oversized icon, no need to give more work to gl
@@ -2920,7 +2948,9 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level)
{
- if (mSavedRawDiscardLevel != discard_level && mBoostLevel != BOOST_ICON)
+ if (mSavedRawDiscardLevel != discard_level
+ && mBoostLevel != BOOST_ICON
+ && mBoostLevel != BOOST_THUMBNAIL)
{
mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
mRawImage->copy(getSavedRawImage());
@@ -3026,8 +3056,22 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im
{
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENSIONS;
+ if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+ {
+ mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
+ mCachedRawImage->copyScaled(imageraw);
+ }
+ else
+ {
+ mCachedRawImage = imageraw;
+ }
+ }
+ else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ {
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
{
mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
@@ -3132,8 +3176,22 @@ void LLViewerFetchedTexture::saveRawImage()
mSavedRawDiscardLevel = mRawDiscardLevel;
if (mBoostLevel == LLGLTexture::BOOST_ICON)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENTIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENTIONS;
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENSIONS;
+ if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+ {
+ mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
+ mSavedRawImage->copyScaled(mRawImage);
+ }
+ else
+ {
+ mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
+ }
+ }
+ else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
+ {
+ S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
+ S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
{
mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index f9fe8054a4..7935adb3e2 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -71,7 +71,7 @@ LLViewerTextureList gTextureList;
ETexListType get_element_type(S32 priority)
{
- return (priority == LLViewerFetchedTexture::BOOST_ICON) ? TEX_LIST_SCALE : TEX_LIST_STANDARD;
+ return (priority == LLViewerFetchedTexture::BOOST_ICON || priority == LLViewerFetchedTexture::BOOST_THUMBNAIL) ? TEX_LIST_SCALE : TEX_LIST_STANDARD;
}
///////////////////////////////////////////////////////////////////////////////
@@ -498,7 +498,8 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
{
imagep->dontDiscard();
}
- if (boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ if (boost_priority == LLViewerFetchedTexture::BOOST_ICON
+ || boost_priority == LLViewerFetchedTexture::BOOST_THUMBNAIL)
{
// Agent and group Icons are downloadable content, nothing manages
// icon deletion yet, so they should not persist
@@ -588,7 +589,6 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
LLHost request_from_host)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- static LLCachedControl<bool> fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled", true);
LLPointer<LLViewerFetchedTexture> imagep ;
switch(texture_type)
@@ -616,7 +616,8 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
{
imagep->dontDiscard();
}
- if (boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ if (boost_priority == LLViewerFetchedTexture::BOOST_ICON
+ || boost_priority == LLViewerFetchedTexture::BOOST_THUMBNAIL)
{
// Agent and group Icons are downloadable content, nothing manages
// icon deletion yet, so they should not persist.
@@ -633,11 +634,9 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
imagep->forceActive() ;
}
- if(fast_cache_fetching_enabled)
- {
- mFastCacheList.insert(imagep);
- imagep->setInFastCacheList(true);
- }
+ mFastCacheList.insert(imagep);
+ imagep->setInFastCacheList(true);
+
return imagep ;
}
@@ -1699,8 +1698,9 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
new_imagep->setScaleStyle(scale_style);
- if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON &&
- imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW)
+ if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON
+ && imagep->getBoostLevel() != LLGLTexture::BOOST_THUMBNAIL
+ && imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW)
{
// Don't add downloadable content into this list
// all UI images are non-deletable and list does not support deletion
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e8fd74b37b..8012a934c9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2148,13 +2148,15 @@ void LLViewerWindow::initBase()
gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
+ const F32 CHAT_PERSIST_TIME = 20.f;
+
// Console
llassert( !gConsole );
LLConsole::Params cp;
cp.name("console");
cp.max_lines(gSavedSettings.getS32("ConsoleBufferSize"));
cp.rect(getChatConsoleRect());
- cp.persist_time(gSavedSettings.getF32("ChatPersistTime"));
+ cp.persist_time(CHAT_PERSIST_TIME);
cp.font_size_index(gSavedSettings.getS32("ChatFontSize"));
cp.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
gConsole = LLUICtrlFactory::create<LLConsole>(cp);
@@ -2865,6 +2867,15 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
}
}
+ // Try for a new-format gesture
+ if (LLGestureMgr::instance().triggerGestureRelease(key, mask))
+ {
+ LL_DEBUGS() << "LLviewerWindow::handleKey new gesture release feature" << LL_ENDL;
+ LLViewerEventRecorder::instance().logKeyEvent(key,mask);
+ return TRUE;
+ }
+ //Old format gestures do not support this, so no need to implement it.
+
// don't pass keys on to world when something in ui has focus
return gFocusMgr.childHasKeyboardFocus(mRootView)
|| LLMenuGL::getKeyboardMode()
@@ -3370,11 +3381,13 @@ void LLViewerWindow::updateUI()
if (gLoggedInTime.getStarted())
{
- if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("DestinationGuideHintTimeout"))
+ const F32 DESTINATION_GUIDE_HINT_TIMEOUT = 1200.f;
+ const F32 SIDE_PANEL_HINT_TIMEOUT = 300.f;
+ if (gLoggedInTime.getElapsedTimeF32() > DESTINATION_GUIDE_HINT_TIMEOUT)
{
LLFirstUse::notUsingDestinationGuide();
}
- if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout"))
+ if (gLoggedInTime.getElapsedTimeF32() > SIDE_PANEL_HINT_TIMEOUT)
{
LLFirstUse::notUsingSidePanel();
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 57a78181bd..1078a8b2b3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1351,8 +1351,8 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- static LLCachedControl<S32> box_detail_cache(gSavedSettings, "AvatarBoundingBoxComplexity");
- S32 box_detail = box_detail_cache;
+ const S32 BOX_DETAIL_DEFAULT = 3;
+ S32 box_detail = BOX_DETAIL_DEFAULT;
if (getOverallAppearance() != AOA_NORMAL)
{
if (isControlAvatar())
@@ -4248,10 +4248,10 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
- static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
- static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
+ const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW = 60.0f;
+ const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_FAST = 2.0f;
- F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
+ F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW, AVATAR_PELVIS_ROTATE_THRESHOLD_FAST);
if (self_in_mouselook)
{
@@ -9262,9 +9262,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
- static LLCachedControl<bool> block_some_avatars(gSavedSettings, "BlockSomeAvatarAppearanceVisualParams");
- bool drop_visual_params_debug = block_some_avatars && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
- if( num_blocks > 1 && !drop_visual_params_debug)
+ if( num_blocks > 1)
{
//LL_DEBUGS("Avatar") << avString() << " handle visual params, num_blocks " << num_blocks << LL_ENDL;
@@ -9309,14 +9307,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
}
else
{
- if (drop_visual_params_debug)
- {
- LL_INFOS() << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << LL_ENDL;
- }
- else
- {
- LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
- }
+ LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
}
LLVisualParam* appearance_version_param = getVisualParam(11000);
diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp
index 95e11abd82..c245399622 100644
--- a/indra/newview/llvoicecallhandler.cpp
+++ b/indra/newview/llvoicecallhandler.cpp
@@ -40,12 +40,6 @@ public:
bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)
{
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableVoiceCall"))
- {
- LLNotificationsUtil::add("NoVoiceCall", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit"));
- return true;
- }
-
//Make sure we have some parameters
if (params.size() == 0)
{
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 51cf5f20c6..02f5313db9 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -607,7 +607,7 @@ void LLVOPartGroup::getGeometry(const LLViewerPart& part,
up.setCross3(right, at);
up.normalize3fast();
- if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
+ if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK && !part.mVelocity.isExactlyZero())
{
LLVector4a normvel;
normvel.load3(part.mVelocity.mV);
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 909588367b..cb2f8b6e18 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -767,7 +767,10 @@ bool LLVOSky::updateSky()
mForceUpdate = FALSE;
mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY);
- gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
+ if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GROUND))
+ {
+ gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
+ }
if (mDrawable.notNull() && mDrawable->getFace(0) && !mDrawable->getFace(0)->getVertexBuffer())
{
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 8681f7c14e..49c35c7ad5 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -781,35 +781,27 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)
void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids)
{
// nothing to update
- if (changed_items_uuids.empty()) return;
-
- typedef std::vector<LLPanel*> item_panel_list_t;
-
- item_panel_list_t items;
- getItems(items);
+ if (changed_items_uuids.empty())
+ return;
- for (item_panel_list_t::iterator items_iter = items.begin();
- items_iter != items.end();
- ++items_iter)
+ uuid_vec_t::const_iterator uuids_begin = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end();
+ pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end();
+ while (pairs_iter != pairs_end)
{
- LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter);
- if (!item) continue;
+ LLPanel* panel = (*(pairs_iter++))->first;
+ LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(panel);
+ if (!item)
+ continue;
LLViewerInventoryItem* inv_item = item->getItem();
- if (!inv_item) continue;
-
- LLUUID linked_uuid = inv_item->getLinkedUUID();
+ if (!inv_item)
+ continue;
- for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin();
- iter != changed_items_uuids.end();
- ++iter)
- {
- if (linked_uuid == *iter)
- {
- item->setNeedsRefresh(true);
- break;
- }
- }
+ const LLUUID& linked_uuid = inv_item->getLinkedUUID();
+ if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end)
+ {
+ item->setNeedsRefresh(true);
+ }
}
}
@@ -933,17 +925,17 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id));
registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id));
registrar.add("Wearable.TakeOffDetach",
- boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids));
+ boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op));
// Register handlers for clothing.
registrar.add("Clothing.TakeOff",
- boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids));
+ boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op));
// Register handlers for body parts.
// Register handlers for attachments.
registrar.add("Attachment.Detach",
- boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids));
+ boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), ids, no_op));
registrar.add("Attachment.Touch", boost::bind(handle_attachment_touch, selected_id));
registrar.add("Attachment.Profile", boost::bind(show_item_profile, selected_id));
registrar.add("Object.Attach", boost::bind(LLViewerAttachMenu::attachObjects, ids, _2));
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bbff6c889f..188914f0d5 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5891,7 +5891,7 @@ void LLPipeline::setupAvatarLights(bool for_edit)
light->setSpotExponent(0.f);
light->setSpotCutoff(180.f);
}
- else if (gAvatarBacklight) // Always true (unless overridden in a devs .ini)
+ else if (gAvatarBacklight)
{
LLVector3 light_dir = sun_up ? LLVector3(mSunDir) : LLVector3(mMoonDir);
LLVector3 opposite_pos = -light_dir;
diff --git a/indra/newview/skins/default/textures/icons/Group_Notices.png b/indra/newview/skins/default/textures/icons/Group_Notices.png
new file mode 100644
index 0000000000..601502d374
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Group_Notices.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index aa99fe38cd..615816ed99 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -239,6 +239,8 @@ with the same filename but different name
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
+ <texture name="Group_Notices" file_name="icons/Group_Notices.png" preload="false" />
+
<texture name="Hand" file_name="icons/hand.png" preload="false" />
<texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index ce788654aa..19b3c3160c 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -211,22 +211,12 @@
<button.commit_callback
function="MediaBrowser.OpenWebBrowser" />
</button>
- <check_box
- control_name="UseExternalBrowser"
- follows="bottom|left"
- height="20"
- label="Always open in my web browser"
- layout="topleft"
- left_pad="5"
- name="open_always"
- top_delta="0"
- width="200" />
<button
follows="bottom|right"
height="20"
label="Close"
layout="topleft"
- left_pad="80"
+ left_pad="285"
name="close"
top_delta="0"
width="70">
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index c4ac936334..28b735d297 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="460"
- min_height="460"
+ height="475"
+ min_height="475"
layout="topleft"
name="gesture_preview"
help_topic="gesture_preview"
@@ -297,11 +297,20 @@
<check_box
follows="top|left"
height="20"
+ label="until key is released"
+ layout="topleft"
+ left="28"
+ name="wait_key_release_check"
+ top="330"
+ width="100" />
+ <check_box
+ follows="top|left"
+ height="20"
label="until animations are done"
layout="topleft"
left="28"
name="wait_anim_check"
- top="330"
+ top_delta="20"
width="100" />
<check_box
follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml
index 3b58cd08f6..2101000294 100644
--- a/indra/newview/skins/default/xui/en/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_info.xml
@@ -7,14 +7,16 @@
name="regioninfo"
save_rect="true"
title="REGION/ESTATE"
- width="530">
+ width="637">
<tab_container
bottom="555"
follows="left|right|top|bottom"
layout="topleft"
- left="1"
+ left="0"
name="region_panels"
- right="-1"
- tab_position="top"
+ tab_padding_right="3"
+ tab_position="left"
+ halign="left"
+ tab_width="110"
top="20"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index e650c10603..12707aa8fd 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -144,14 +144,6 @@
parameter="rename" />
</menu_item_call>
<menu_item_call
- label="New Folder"
- layout="topleft"
- name="New Folder">
- <menu_item_call.on_click
- function="Inventory.DoCreate"
- parameter="category" />
- </menu_item_call>
- <menu_item_call
label="New Outfit"
layout="topleft"
name="New Outfit">
@@ -699,6 +691,224 @@
<menu_item_separator
layout="topleft"
name="Subfolder Separator" />
+ <menu
+ label="Create new"
+ layout="topleft"
+ name="create_new">
+ <menu_item_call
+ label="New Folder"
+ layout="topleft"
+ name="New Folder">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="category" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Script"
+ layout="topleft"
+ name="New Script">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="lsl" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Notecard"
+ layout="topleft"
+ name="New Note">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="notecard" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Gesture"
+ layout="topleft"
+ name="New Gesture">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="gesture" />
+ </menu_item_call>
+ <menu
+ label="New Clothes"
+ layout="topleft"
+ name="New Clothes">
+ <menu_item_call
+ label="New Shirt"
+ layout="topleft"
+ name="New Shirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Pants"
+ layout="topleft"
+ name="New Pants">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Shoes"
+ layout="topleft"
+ name="New Shoes">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Socks"
+ layout="topleft"
+ name="New Socks">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Jacket"
+ layout="topleft"
+ name="New Jacket">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skirt"
+ layout="topleft"
+ name="New Skirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Gloves"
+ layout="topleft"
+ name="New Gloves">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Undershirt"
+ layout="topleft"
+ name="New Undershirt">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Underpants"
+ layout="topleft"
+ name="New Underpants">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Alpha Mask"
+ layout="topleft"
+ name="New Alpha Mask">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Tattoo"
+ layout="topleft"
+ name="New Tattoo">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Universal"
+ layout="topleft"
+ name="New Universal">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="universal" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Physics"
+ layout="topleft"
+ name="New Physics">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="physics" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="New Body Parts"
+ layout="topleft"
+ name="New Body Parts">
+ <menu_item_call
+ label="New Shape"
+ layout="topleft"
+ name="New Shape">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="shape" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skin"
+ layout="topleft"
+ name="New Skin">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="skin" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Hair"
+ layout="topleft"
+ name="New Hair">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="hair" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Eyes"
+ layout="topleft"
+ name="New Eyes">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="eyes" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="New Settings"
+ layout="topleft"
+ name="New Settings">
+ <menu_item_call
+ label="New Sky"
+ layout="topleft"
+ name="New Sky">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="sky"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Water"
+ layout="topleft"
+ name="New Water">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="water"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Day Cycle"
+ layout="topleft"
+ name="New Day Cycle">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="daycycle"/>
+ <menu_item_call.on_enable
+ function="Inventory.EnvironmentEnabled" />
+ </menu_item_call>
+ </menu>
+ </menu>
<menu_item_call
label="Create folder from selected"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 810d3fddd5..3de578c2a4 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -64,6 +64,14 @@
function="Floater.ToggleOrBringToFront"
parameter="camera" />
</menu_item_call>
+ <menu_item_call
+ label="Notifications..."
+ name="Notifications"
+ shortcut="alt|shift|N">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="notification_well_window" />
+ </menu_item_call>
<menu_item_separator/>
<menu_item_check
@@ -391,6 +399,16 @@
function="Self.EnableRemoveAllAttachments" />
</menu_item_call>
</menu>
+ <menu_item_call
+ label="Remove selected attachments"
+ layout="topleft"
+ name="Remove Selected Attachments"
+ shortcut="alt|shift|R">
+ <menu_item_call.on_click
+ function="Attachment.Detach" />
+ <menu_item_call.on_enable
+ function="Attachment.EnableDetach" />
+ </menu_item_call>
<menu_item_separator/>
<menu_item_call
label="Complete avatars..."
@@ -742,6 +760,33 @@
function="Floater.Show"
parameter="360capture" />
</menu_item_call>
+ <menu
+ create_jump_keys="true"
+ label="Zoom level"
+ name="Zoom menu"
+ tear_off="true">
+ <menu_item_call
+ label="Zoom out"
+ name="Zoom Out"
+ shortcut="control|8">
+ <menu_item_call.on_click
+ function="View.ZoomOut" />
+ </menu_item_call>
+ <menu_item_call
+ label="Default"
+ name="Zoom Default"
+ shortcut="control|9">
+ <menu_item_call.on_click
+ function="View.ZoomDefault" />
+ </menu_item_call>
+ <menu_item_call
+ label="Zoom in"
+ name="Zoom In"
+ shortcut="control|0">
+ <menu_item_call.on_click
+ function="View.ZoomIn" />
+ </menu_item_call>
+ </menu>
<menu_item_separator/>
<menu_item_call
label="Place profile"
@@ -2325,29 +2370,6 @@ function="World.EnvPreset"
function="View.EnableLastChatter" />
</menu_item_call>
- <menu_item_separator/>
-
- <menu_item_call
- label="Zoom In"
- name="Zoom In"
- shortcut="control|0">
- <menu_item_call.on_click
- function="View.ZoomIn" />
- </menu_item_call>
- <menu_item_call
- label="Zoom Default"
- name="Zoom Default"
- shortcut="control|9">
- <menu_item_call.on_click
- function="View.ZoomDefault" />
- </menu_item_call>
- <menu_item_call
- label="Zoom Out"
- name="Zoom Out"
- shortcut="control|8">
- <menu_item_call.on_click
- function="View.ZoomOut" />
- </menu_item_call>
</menu> <!--Shortcuts-->
<menu_item_separator/>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 204fead7e0..7b1449ea92 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4399,8 +4399,22 @@ Are you sure you want to return the selected objects to their owners? Transferab
icon="alert.tga"
name="GroupLeaveConfirmMember"
type="alert">
-You are currently a member of the group &lt;nolink&gt;[GROUP]&lt;/nolink&gt;.
-Leave Group?
+Leave the group &apos;&lt;nolink&gt;[GROUP]&lt;/nolink&gt;&apos;?
+Currently, the fee to join this &quot;group&quot; is L$ [COST].
+ <tag>group</tag>
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alert.tga"
+ name="GroupLeaveConfirmMemberNoFee"
+ type="alert">
+Leave the group &apos;&lt;nolink&gt;[GROUP]&lt;/nolink&gt;&apos;?
+There is currently no fee to join this group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@@ -6153,6 +6167,33 @@ Are you sure you want to delete them?
notext="Cancel"
yestext="OK"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DeleteWornItems"
+ type="alertmodal">
+ <unique/>
+Some item(s) you wish to delete are being worn on your avatar.
+Remove these items from your avatar?
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="Remove item(s) and delete"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDeleteRequiredClothing"
+ type="alertmodal">
+ <unique/>
+Some item(s) you wish to delete are required clothing layers (skin, shape, hair, eyes).
+You must replace those layers before deleting them.
+ <tag>confirm</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
<notification
icon="alertmodal.tga"
@@ -6441,14 +6482,6 @@ Your trash is overflowing. This may cause problems logging in.
</notification>
<notification
- icon="notifytip.tga"
- name="InventoryLimitReachedAIS"
- type="notifytip">
-Your inventory is experiencing issues. Please, contact support.
- <tag>fail</tag>
- </notification>
-
- <notification
icon="alertmodal.tga"
name="InventoryLimitReachedAISAlert"
type="alertmodal">
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 5eafb5cdf1..472eb319bb 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -65,7 +65,7 @@ Hover your mouse over the options for more help.
width="168" />
<text
font="SansSerifMedium"
- text_color="EmphasisColor"
+ text_color="white"
type="string"
follows="left|top"
height="16"
@@ -75,14 +75,14 @@ Hover your mouse over the options for more help.
top_pad="10"
visible="true"
width="190">
- Free
+ No charge to join
</text>
<button
follows="left|top"
left_delta="0"
top_pad="6"
height="23"
- label="JOIN NOW!"
+ label="Join group"
name="btn_join"
visible="true"
width="120" />
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 05de249d22..d2b0eb4b7c 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -22,10 +22,10 @@ background_visible="true"
name="group_join_btn">
Join (L$[AMOUNT])
</panel.string>
- <panel.string
- name="group_join_free">
- Free
- </panel.string>
+ <panel.string name="group_join_free">No charge to join</panel.string>
+ <panel.string name="group_member">You are a member</panel.string>
+ <panel.string name="join_txt">Join group</panel.string>
+ <panel.string name="leave_txt">Leave</panel.string>
<panel
name="group_info_top"
follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
index e758a8ce30..c8b165e869 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
@@ -49,6 +49,18 @@
value="Unknown"
width="242" />
<button
+ name="notices_btn"
+ tool_tip="Group Notices"
+ top_delta="-4"
+ left_pad="3"
+ right="-53"
+ height="20"
+ width="20"
+ follows="right"
+ image_pressed="Group_Notices"
+ image_unselected="Group_Notices"
+ tab_stop="false"/>
+ <button
follows="right"
height="16"
image_pressed="Info_Press"
@@ -58,7 +70,7 @@
name="info_btn"
tool_tip="More info"
tab_stop="false"
- top_delta="-2"
+ top_delta="2"
width="16" />
<!--*TODO: Should only appear on rollover-->
<button
@@ -71,6 +83,6 @@
name="profile_btn"
tab_stop="false"
tool_tip="View profile"
- top_delta="-2"
+ top_delta="0"
width="20" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
index b72af7221e..9e19588033 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
@@ -54,9 +54,22 @@
use_ellipses="true"
/>
<button
+ name="notices_btn"
+ tool_tip="Group Notices"
+ top_delta="-4"
+ left_pad="3"
+ right="-80"
+ height="20"
+ width="20"
+ follows="right"
+ image_pressed="Group_Notices"
+ image_unselected="Group_Notices"
+ tab_stop="false"
+ visible="false"/>
+ <button
name="visibility_hide_btn"
tool_tip="Hide group on my profile"
- top_delta="-3"
+ top_delta="0"
left_pad="3"
right="-53"
height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index f7a9c552cc..33ae68c5e1 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -217,6 +217,7 @@
tab_height="30"
tab_position="top"
tab_min_width="100"
+ use_tab_offset="true"
top="0">
<inventory_panel
bg_opaque_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
index f899f83ad4..6ae4890777 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
@@ -22,6 +22,7 @@
<thumbnail
name="real_world_pic"
image_name="Generic_Person_Large"
+ show_loading="false"
follows="top|left"
layout="topleft"
top="10"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index fea7d1bcb8..307b7b83ef 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -5,7 +5,7 @@
top="0"
left="0"
height="480"
- width="420"
+ width="440"
follows="all"
layout="topleft"
>
@@ -14,8 +14,11 @@
so display it as an UTC+0
-->
<string
- name="date_format"
+ name="date_format_full"
value="SL birthdate: [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]" />
+ <string
+ name="date_format_short"
+ value="SL birthdate: [mth,datetime,utc] [day,datetime,utc]" />
<string
name="age_format"
value="[AGE]" />
@@ -53,7 +56,7 @@ Account: [ACCTTYPE]
top="8"
left="6"
bottom="-1"
- width="160"
+ width="180"
border_size="0"
follows="left|top|bottom"
layout="topleft"
@@ -71,6 +74,7 @@ Account: [ACCTTYPE]
<thumbnail
name="2nd_life_pic"
image_name="Generic_Person_Large"
+ show_loading="false"
layout="topleft"
follows="all"
interactable="true"
@@ -322,74 +326,81 @@ Account: [ACCTTYPE]
visible="true"/>
</layout_panel>
<layout_panel
+ name="menu_panel"
+ follows="all"
+ layout="topleft"
+ height="55"
+ auto_resize="false"
+ user_resize="false">
+ <menu_button
+ layout="topleft"
+ follows="left|top"
+ left="1"
+ top="25"
+ height="25"
+ width="176"
+ label="Actions"
+ halign="left"
+ image_unselected="DropDown_Off"
+ image_selected="DropDown_On"
+ image_pressed="DropDown_Press"
+ image_pressed_selected="DropDown_Press"
+ image_disabled="DropDown_Disabled"
+ name="agent_actions_menu"/>
+ </layout_panel>
+ <layout_panel
name="settings_panel"
follows="all"
layout="topleft"
- height="50"
+ height="70"
auto_resize="false"
user_resize="false">
<!-- only for self -->
- <text
- name="search_label"
- value="Show my profile in search:"
- top="1"
- left="6"
- right="-1"
- height="16"
- follows="left|top|right"
- layout="topleft"/>
<combo_box
name="show_in_search"
tool_tip="Let people see you in search results"
left="1"
- top="18"
- height="23"
- width="140"
+ top="5"
+ height="25"
+ width="176"
follows="left|top"
layout="topleft"
- visible="true"
enabled="false">
<combo_box.item
- name="Hide"
- label="Hide"
- value="0" />
- <combo_box.item
name="Show"
- label="Show"
+ label="Show me in search"
value="1" />
+ <combo_box.item
+ name="Hide"
+ label="Don't show me in search"
+ value="0" />
</combo_box>
- </layout_panel>
-
- <layout_panel
- name="menu_panel"
- follows="all"
- layout="topleft"
- height="55"
- auto_resize="false"
- user_resize="false"
- >
- <menu_button
- layout="topleft"
- follows="left|top"
+ <combo_box
+ name="hide_age"
+ tool_tip="Let people see your SL age"
left="1"
- top="25"
+ top="40"
height="25"
- width="140"
- label="Actions"
- halign="left"
- image_unselected="DropDown_Off"
- image_selected="DropDown_On"
- image_pressed="DropDown_Press"
- image_pressed_selected="DropDown_Press"
- image_disabled="DropDown_Disabled"
- name="agent_actions_menu" />
+ width="176"
+ follows="left|top"
+ layout="topleft"
+ enabled="false">
+ <combo_box.item
+ name="Show"
+ label="Show birthdate + SL age"
+ value="0"/>
+ <combo_box.item
+ name="Hide"
+ label="Show month + day only"
+ value="1"/>
+ </combo_box>
</layout_panel>
</layout_stack>
<layout_stack
name="main_stack"
top="8"
- left="168"
+ left="188"
bottom="-1"
right="-1"
follows="all"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index faff6185ab..65dad8bca4 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -286,13 +286,13 @@
name="Zoom"
value="Zoom" />
<combo_box.item
- label="Ignore object"
- name="Ignoreobject"
- value="Ignore" />
- <combo_box.item
label="None"
name="None"
value="None" />
+ <combo_box.item
+ label="Ignore object"
+ name="Ignoreobject"
+ value="Ignore" />
</combo_box>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 04b374cb00..3c72fdf249 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3935,7 +3935,8 @@ Abuse Report</string>
<string name="dance8">dance8</string>
<!-- birth date format shared by avatar inspector and profile panels -->
- <string name="AvatarBirthDateFormat">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string>
+ <string name="AvatarBirthDateFormatFull">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string>
+ <string name="AvatarBirthDateFormatShort">[mthnum,datetime,slt]/[day,datetime,slt]</string>
<string name="DefaultMimeType">none/none</string>
<string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string>
@@ -4000,7 +4001,8 @@ Please check http://status.secondlifegrid.net to see if there is a known problem
<string name="EmptyOutfitText">There are no items in this outfit</string>
<!-- External editor status codes -->
- <string name="ExternalEditorNotSet">Select an editor by setting the environment variable LL_SCRIPT_EDITOR or the ExternalEditor setting.</string>
+ <string name="ExternalEditorNotSet">Select an editor by setting the environment variable LL_SCRIPT_EDITOR or the ExternalEditor setting.
+See https://wiki.secondlife.com/wiki/LSL_Alternate_Editors</string>
<string name="ExternalEditorNotFound">Cannot find the external editor you specified.
Try enclosing path to the editor with double quotes.
(e.g. "/path to my/editor" "%s")</string>
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index eabf922875..8d21b6ed69 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -187,6 +187,12 @@ namespace tut
ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(),
"http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ slurl = LLSLURL("secondlife://");
+ ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY);
+
+ slurl = LLSLURL("secondlife:///");
+ ensure_equals("secondlife: slurl, root - type", slurl.getType(), LLSLURL::EMPTY);
+
slurl = LLSLURL("secondlife://myregion");
ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(),