summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.hgtags2
-rwxr-xr-xdoc/contributions.txt8
-rw-r--r--indra/llcharacter/llmotioncontroller.cpp9
-rw-r--r--indra/llcharacter/llmotioncontroller.h2
-rw-r--r--indra/llcommon/llapp.cpp72
-rw-r--r--indra/llcommon/llapp.h16
-rw-r--r--indra/llcommon/llevents.cpp7
-rw-r--r--indra/llcommon/llinitparam.cpp7
-rw-r--r--indra/llcommon/llmetricperformancetester.cpp14
-rw-r--r--indra/llcommon/llmetricperformancetester.h10
-rw-r--r--indra/llcommon/llsdserialize.cpp42
-rw-r--r--indra/llcommon/llstring.h4
-rw-r--r--indra/llcommon/llsys.h5
-rw-r--r--indra/llcorehttp/_httpinternal.h5
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp5
-rw-r--r--indra/llcorehttp/_httpoprequest.h2
-rw-r--r--indra/llcorehttp/_httppolicy.cpp16
-rw-r--r--indra/llcorehttp/httpoptions.cpp12
-rw-r--r--indra/llcorehttp/httpoptions.h22
-rw-r--r--indra/llcrashlogger/llcrashlock.cpp14
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp14
-rw-r--r--indra/llimage/llimage.cpp60
-rw-r--r--indra/llimage/llimage.h3
-rw-r--r--indra/llimage/llimagepng.cpp4
-rw-r--r--indra/llimage/llpngwrapper.cpp8
-rw-r--r--indra/llimage/llpngwrapper.h2
-rw-r--r--indra/llmath/llvolume.cpp14
-rw-r--r--indra/llmessage/lltemplatemessagereader.cpp7
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp9
-rw-r--r--indra/llrender/llgl.cpp2
-rw-r--r--indra/llrender/llgl.h2
-rw-r--r--indra/llrender/llvertexbuffer.cpp4
-rw-r--r--indra/llui/llaccordionctrltab.cpp5
-rw-r--r--indra/llui/llfolderview.cpp12
-rw-r--r--indra/llui/llfolderview.h12
-rw-r--r--indra/llui/llfolderviewitem.cpp5
-rw-r--r--indra/llui/llfolderviewmodel.h4
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/llnotifications.cpp24
-rw-r--r--indra/llui/llnotifications.h8
-rw-r--r--indra/llui/llnotificationtemplate.h3
-rw-r--r--indra/llui/llscrollcontainer.cpp50
-rw-r--r--indra/llui/llscrollcontainer.h6
-rw-r--r--indra/llui/llscrolllistctrl.cpp15
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/llspinctrl.cpp26
-rw-r--r--indra/llui/llspinctrl.h1
-rw-r--r--indra/llui/llxuiparser.cpp36
-rw-r--r--indra/llvfs/lldir.cpp16
-rw-r--r--indra/llvfs/lldiriterator.cpp4
-rw-r--r--indra/llwindow/lldxhardware.cpp155
-rw-r--r--indra/llwindow/lldxhardware.h2
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp1
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/app_settings/settings.xml19
-rw-r--r--indra/newview/installers/windows/installer_template.nsi7
-rw-r--r--indra/newview/installers/windows/lang_de.nsibin8420 -> 9850 bytes
-rw-r--r--indra/newview/installers/windows/lang_es.nsibin8458 -> 9872 bytes
-rw-r--r--indra/newview/installers/windows/lang_fr.nsibin8748 -> 10258 bytes
-rw-r--r--indra/newview/installers/windows/lang_it.nsibin8102 -> 9520 bytes
-rw-r--r--indra/newview/installers/windows/lang_ja.nsibin6514 -> 7204 bytes
-rw-r--r--indra/newview/installers/windows/lang_pt-br.nsibin8522 -> 9864 bytes
-rw-r--r--indra/newview/installers/windows/lang_ru.nsibin7898 -> 9188 bytes
-rw-r--r--indra/newview/installers/windows/lang_tr.nsibin8006 -> 9286 bytes
-rw-r--r--indra/newview/installers/windows/lang_zh.nsibin6576 -> 6846 bytes
-rw-r--r--indra/newview/llaisapi.cpp45
-rw-r--r--indra/newview/llappearancemgr.cpp33
-rw-r--r--indra/newview/llappearancemgr.h3
-rw-r--r--indra/newview/llappviewer.cpp184
-rw-r--r--indra/newview/llappviewer.h10
-rw-r--r--indra/newview/llappviewerwin32.cpp4
-rw-r--r--indra/newview/llavataractions.cpp12
-rw-r--r--indra/newview/llavataractions.h5
-rw-r--r--indra/newview/llchathistory.cpp266
-rw-r--r--indra/newview/llconversationmodel.h3
-rw-r--r--indra/newview/llestateinfomodel.cpp2
-rw-r--r--indra/newview/llexpandabletextbox.cpp3
-rw-r--r--indra/newview/llfasttimerview.cpp10
-rw-r--r--indra/newview/llfeaturemanager.cpp4
-rw-r--r--indra/newview/llfilepicker.cpp15
-rw-r--r--indra/newview/llflexibleobject.cpp77
-rw-r--r--indra/newview/llflexibleobject.h4
-rw-r--r--indra/newview/llfloateravatarpicker.cpp19
-rw-r--r--indra/newview/llfloateravatarrendersettings.cpp7
-rw-r--r--indra/newview/llfloaterimcontainer.cpp22
-rw-r--r--indra/newview/llfloaterimcontainer.h1
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp10
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp5
-rw-r--r--indra/newview/llfloaterland.cpp13
-rw-r--r--indra/newview/llfloaterlinkreplace.cpp22
-rw-r--r--indra/newview/llfloaterlinkreplace.h11
-rw-r--r--indra/newview/llfloatermodeluploadbase.cpp2
-rw-r--r--indra/newview/llfloaterregiondebugconsole.cpp8
-rw-r--r--indra/newview/llfloaterregioninfo.cpp14
-rw-r--r--indra/newview/llfloaterreporter.cpp4
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp35
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp5
-rw-r--r--indra/newview/llfloatersnapshot.cpp4
-rw-r--r--indra/newview/llfloatertools.cpp16
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp9
-rw-r--r--indra/newview/llimview.cpp3
-rw-r--r--indra/newview/llinventorybridge.cpp126
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfilter.cpp86
-rw-r--r--indra/newview/llinventoryfilter.h28
-rw-r--r--indra/newview/llinventoryfunctions.cpp37
-rw-r--r--indra/newview/llinventoryfunctions.h2
-rw-r--r--indra/newview/llinventorymodel.cpp52
-rw-r--r--indra/newview/llinventorymodel.h3
-rw-r--r--indra/newview/llinventoryobserver.cpp5
-rw-r--r--indra/newview/llinventorypanel.cpp37
-rw-r--r--indra/newview/llinventorypanel.h5
-rw-r--r--indra/newview/lllogininstance.cpp40
-rw-r--r--indra/newview/lllogininstance.h3
-rw-r--r--indra/newview/llmachineid.cpp35
-rw-r--r--indra/newview/llmediactrl.h2
-rw-r--r--indra/newview/llmeshrepository.cpp13
-rw-r--r--indra/newview/llmutelist.cpp7
-rw-r--r--indra/newview/llnotificationhandler.h2
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp14
-rw-r--r--indra/newview/llnotificationofferhandler.cpp1
-rw-r--r--indra/newview/llnotificationscripthandler.cpp1
-rw-r--r--indra/newview/llnotificationtiphandler.cpp2
-rw-r--r--indra/newview/lloutfitgallery.cpp101
-rw-r--r--indra/newview/lloutfitgallery.h10
-rw-r--r--indra/newview/llpanelclassified.cpp57
-rw-r--r--indra/newview/llpanelgroup.h2
-rw-r--r--indra/newview/llpanelgrouproles.cpp46
-rw-r--r--indra/newview/llpanelgrouproles.h1
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llpanelmaininventory.cpp146
-rw-r--r--indra/newview/llpanelmaininventory.h7
-rw-r--r--indra/newview/llpanelobject.cpp2
-rw-r--r--indra/newview/llpanelobjectinventory.cpp5
-rw-r--r--indra/newview/llpaneloutfitedit.cpp8
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp1
-rw-r--r--indra/newview/llpanelsnapshotpostcard.cpp2
-rw-r--r--indra/newview/llpanelwearing.cpp2
-rw-r--r--indra/newview/llplacesinventorybridge.cpp2
-rw-r--r--indra/newview/llpreview.cpp3
-rw-r--r--indra/newview/llpreview.h3
-rw-r--r--indra/newview/llpreviewanim.cpp6
-rw-r--r--indra/newview/llpreviewgesture.cpp11
-rw-r--r--indra/newview/llpreviewnotecard.cpp10
-rw-r--r--indra/newview/llpreviewscript.cpp27
-rw-r--r--indra/newview/llpreviewscript.h2
-rw-r--r--indra/newview/llpreviewtexture.cpp81
-rw-r--r--indra/newview/llpreviewtexture.h1
-rw-r--r--indra/newview/llproductinforequest.cpp2
-rw-r--r--indra/newview/llscenemonitor.cpp2
-rw-r--r--indra/newview/llsidepanelinventory.cpp13
-rw-r--r--indra/newview/llsidepanelinventory.h1
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp39
-rw-r--r--indra/newview/llsnapshotlivepreview.h1
-rw-r--r--indra/newview/llspeakers.cpp6
-rw-r--r--indra/newview/llstartup.cpp9
-rw-r--r--indra/newview/lltexturecache.cpp43
-rw-r--r--indra/newview/lltexturecache.h8
-rw-r--r--indra/newview/lltexturefetch.cpp2
-rw-r--r--indra/newview/lltextureinfo.cpp121
-rw-r--r--indra/newview/lltextureinfo.h7
-rw-r--r--indra/newview/lltexturestats.cpp3
-rw-r--r--indra/newview/lltoastalertpanel.cpp15
-rw-r--r--indra/newview/lltooldraganddrop.cpp13
-rw-r--r--indra/newview/lltooldraganddrop.h2
-rw-r--r--indra/newview/lltoolgrab.cpp39
-rw-r--r--indra/newview/lltoolpie.cpp3
-rw-r--r--indra/newview/llviewerinventory.cpp95
-rw-r--r--indra/newview/llviewermedia.cpp29
-rw-r--r--indra/newview/llviewermenu.cpp3
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp30
-rw-r--r--indra/newview/llviewerobject.cpp19
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp7
-rw-r--r--indra/newview/llviewerparcelmedia.cpp2
-rw-r--r--indra/newview/llviewerregion.cpp6
-rw-r--r--indra/newview/llviewerregion.h6
-rw-r--r--indra/newview/llviewerstats.cpp5
-rw-r--r--indra/newview/llviewertexture.cpp26
-rw-r--r--indra/newview/llviewertexture.h2
-rw-r--r--indra/newview/llviewerwindow.cpp21
-rw-r--r--indra/newview/llviewerwindow.h3
-rw-r--r--indra/newview/llvoavatar.cpp64
-rw-r--r--indra/newview/llvoavatarself.cpp6
-rw-r--r--indra/newview/llvocache.cpp12
-rw-r--r--indra/newview/llvocache.h6
-rw-r--r--indra/newview/llvoicevivox.cpp24
-rw-r--r--indra/newview/llvoicevivox.h1
-rw-r--r--indra/newview/llweb.cpp18
-rw-r--r--indra/newview/llwlhandlers.cpp4
-rw-r--r--indra/newview/llxmlrpclistener.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp26
-rw-r--r--indra/newview/llxmlrpctransaction.h2
-rw-r--r--indra/newview/skins/default/xui/de/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_picker.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_grid_status.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml37
-rw-r--r--indra/newview/skins/default/xui/en/floater_tos.xml88
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_icon.xml44
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml73
-rw-r--r--indra/newview/skins/default/xui/en/panel_active_object_row.xml20
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml42
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml3
-rw-r--r--indra/newview/skins/default/xui/en/role_actions.xml3
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/es/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/it/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/it/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/tr/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp107
-rw-r--r--indra/test/test.cpp8
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.cpp2
-rw-r--r--indra/win_crash_logger/win_crash_logger.cpp11
233 files changed, 3002 insertions, 1002 deletions
diff --git a/.hgtags b/.hgtags
index 90a21a647f..9c3a2579fd 100755
--- a/.hgtags
+++ b/.hgtags
@@ -528,3 +528,5 @@ cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release
022709ef76a331cac1ba6ef1a6da8a5e9ef63f5a 5.0.4-release
b4d76b5590fdf8bab72c64442353753a527cbc44 5.0.5-release
3e5035dfd8af49bd4c0009f0a76ef46a15991a45 5.0.6-release
+abcab37e1b29414ab8c03af9ca2ab489d809788a 5.0.7-release
+505a492f30bd925bb48e2e093ae77c3c2b4c740f 5.0.8-release
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 79ff7161f6..6f4e88e836 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -362,6 +362,7 @@ Cinder Roxley
STORM-2053
STORM-2113
STORM-2127
+ STORM-2144
Clara Young
Coaldust Numbers
VWR-1095
@@ -821,6 +822,8 @@ Kitty Barnett
MAINT-6153
MAINT-6154
MAINT-6568
+ STORM-2149
+ MAINT-7581
Kolor Fall
Komiko Okamoto
Korvel Noh
@@ -1036,9 +1039,9 @@ Nicholaz Beresford
VWR-2682
VWR-2684
Nick Rhodes
-NickyD
- MAINT-873
Nicky Dasmijn
+ MAINT-873
+ MAINT-7541
VWR-29228
MAINT-1392
MAINT-873
@@ -1302,6 +1305,7 @@ Sovereign Engineer
MAINT-6218
MAINT-6913
STORM-2143
+ STORM-2148
MAINT-7343
SpacedOut Frye
VWR-34
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index d8185aa693..35e76f1d9d 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -139,7 +139,8 @@ LLMotionController::LLMotionController()
mTimeStep(0.f),
mTimeStepCount(0),
mLastInterp(0.f),
- mIsSelf(FALSE)
+ mIsSelf(FALSE),
+ mLastCountAfterPurge(0)
{
}
@@ -238,10 +239,12 @@ void LLMotionController::purgeExcessMotions()
}
}
- if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
+ U32 loaded_count = mLoadedMotions.size();
+ if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge)
{
- LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL;
+ LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL;
}
+ mLastCountAfterPurge = loaded_count;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index 72de331694..9d9c64f4f0 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -224,6 +224,8 @@ protected:
F32 mLastInterp;
U8 mJointSignature[2][LL_CHARACTER_MAX_ANIMATED_JOINTS];
+private:
+ U32 mLastCountAfterPurge; //for logging and debugging purposes
};
//-----------------------------------------------------------------------------
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 2c76f29020..6cc9e804d4 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -256,6 +256,70 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
return true;
}
+bool LLApp::parseCommandOptions(int argc, wchar_t** wargv)
+{
+ LLSD commands;
+ std::string name;
+ std::string value;
+ for(int ii = 1; ii < argc; ++ii)
+ {
+ if(wargv[ii][0] != '-')
+ {
+ LL_INFOS() << "Did not find option identifier while parsing token: "
+ << wargv[ii] << LL_ENDL;
+ return false;
+ }
+ int offset = 1;
+ if(wargv[ii][1] == '-') ++offset;
+
+#if LL_WINDOWS
+ name.assign(utf16str_to_utf8str(&wargv[ii][offset]));
+#else
+ name.assign(wstring_to_utf8str(&wargv[ii][offset]));
+#endif
+ if(((ii+1) >= argc) || (wargv[ii+1][0] == '-'))
+ {
+ // we found another option after this one or we have
+ // reached the end. simply record that this option was
+ // found and continue.
+ int flag = name.compare("logfile");
+ if (0 == flag)
+ {
+ commands[name] = "log";
+ }
+ else
+ {
+ commands[name] = true;
+ }
+
+ continue;
+ }
+ ++ii;
+
+#if LL_WINDOWS
+ value.assign(utf16str_to_utf8str((wargv[ii])));
+#else
+ value.assign(wstring_to_utf8str((wargv[ii])));
+#endif
+
+#if LL_WINDOWS
+ //Windows changed command line parsing. Deal with it.
+ S32 slen = value.length() - 1;
+ S32 start = 0;
+ S32 end = slen;
+ if (wargv[ii][start]=='"')start++;
+ if (wargv[ii][end]=='"')end--;
+ if (start!=0 || end!=slen)
+ {
+ value = value.substr (start,end);
+ }
+#endif
+
+ commands[name] = value;
+ }
+ setOptionData(PRIORITY_COMMAND_LINE, commands);
+ return true;
+}
void LLApp::manageLiveFile(LLLiveFile* livefile)
{
@@ -354,7 +418,7 @@ void LLApp::setupErrorHandling(bool second_instance)
std::wstring wpipe_name;
wpipe_name = mCrashReportPipeStr + wstringize(getPid());
- const std::wstring wdump_path(wstringize(mDumpPath));
+ const std::wstring wdump_path(utf8str_to_utf16str(mDumpPath));
int retries = 30;
for (; retries > 0; --retries)
@@ -515,9 +579,9 @@ void LLApp::setMiniDumpDir(const std::string &path)
if(mExceptionHandler == 0) return;
#ifdef LL_WINDOWS
- wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
- mbstowcs(buffer, mDumpPath.c_str(), MAX_MINDUMP_PATH_LENGTH);
- mExceptionHandler->set_dump_path(std::wstring(buffer));
+ std::wstring buffer(utf8str_to_utf16str(mDumpPath));
+ if (buffer.size() > MAX_MINDUMP_PATH_LENGTH) buffer.resize(MAX_MINDUMP_PATH_LENGTH);
+ mExceptionHandler->set_dump_path(buffer);
#elif LL_LINUX
//google_breakpad::MinidumpDescriptor desc("/tmp"); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
google_breakpad::MinidumpDescriptor desc(mDumpPath); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index ff9a92b45f..acd829d864 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -106,7 +106,7 @@ public:
LLSD getOption(const std::string& name) const;
/**
- * @brief Parse command line options and insert them into
+ * @brief Parse ASCII command line options and insert them into
* application command line options.
*
* The name inserted into the option will have leading option
@@ -119,6 +119,20 @@ public:
*/
bool parseCommandOptions(int argc, char** argv);
+ /**
+ * @brief Parse Unicode command line options and insert them into
+ * application command line options.
+ *
+ * The name inserted into the option will have leading option
+ * identifiers (a minus or double minus) stripped. All options
+ * with values will be stored as a string, while all options
+ * without values will be stored as true.
+ * @param argc The argc passed into main().
+ * @param wargv The wargv passed into main().
+ * @return Returns true if the parse succeeded.
+ */
+ bool parseCommandOptions(int argc, wchar_t** wargv);
+
/**
* @brief Keep track of live files automatically.
*
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 97270e4931..93db6c0d17 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -316,6 +316,13 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
const NameList& after,
const NameList& before)
{
+ if (!mSignal)
+ {
+ LL_WARNS() << "Can't connect listener" << LL_ENDL;
+ // connect will fail, return dummy
+ return LLBoundListener();
+ }
+
float nodePosition = 1.0;
// if the supplied name is empty we are not interested in the ordering mechanism
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index 1d104cf55d..aa2f4eb289 100644
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -193,12 +193,7 @@ namespace LLInitParam
{
if (!silent)
{
- std::string file_name = p.getCurrentFileName();
- if(!file_name.empty())
- {
- file_name = "in file: " + file_name;
- }
- p.parserWarning(llformat("Failed to parse parameter \"%s\" %s", p.getCurrentElementName().c_str(), file_name.c_str()));
+ p.parserWarning(llformat("Failed to parse parameter \"%s\"", p.getCurrentElementName().c_str()));
}
return false;
}
diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp
index 16fc365da1..f8a93baf45 100644
--- a/indra/llcommon/llmetricperformancetester.cpp
+++ b/indra/llcommon/llmetricperformancetester.cpp
@@ -132,8 +132,8 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
}
// Open baseline and current target, exit if one is inexistent
- std::ifstream base_is(baseline.c_str());
- std::ifstream target_is(target.c_str());
+ llifstream base_is(baseline.c_str());
+ llifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
@@ -151,7 +151,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
target_is.close();
//output comparision
- std::ofstream os(output.c_str());
+ llofstream os(output.c_str());
os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n";
for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ;
@@ -212,7 +212,7 @@ void LLMetricPerformanceTesterBasic::addMetric(std::string str)
}
/*virtual*/
-void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
+void LLMetricPerformanceTesterBasic::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
{
resetCurrentCount() ;
@@ -254,14 +254,14 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD*
}
/*virtual*/
-void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current)
+void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current)
{
*os << llformat(" ,%s, %d, %d, %d, %.4f\n", metric_string.c_str(), v_base, v_current,
v_current - v_base, (v_base != 0) ? 100.f * v_current / v_base : 0) ;
}
/*virtual*/
-void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current)
+void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current)
{
*os << llformat(" ,%s, %.4f, %.4f, %.4f, %.4f\n", metric_string.c_str(), v_base, v_current,
v_current - v_base, (fabs(v_base) > 0.0001f) ? 100.f * v_current / v_base : 0.f ) ;
@@ -293,7 +293,7 @@ LLMetricPerformanceTesterWithSession::~LLMetricPerformanceTesterWithSession()
}
/*virtual*/
-void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
+void LLMetricPerformanceTesterWithSession::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
{
// Load the base session
resetCurrentCount() ;
diff --git a/indra/llcommon/llmetricperformancetester.h b/indra/llcommon/llmetricperformancetester.h
index e6b46be1cf..2e99ed979d 100644
--- a/indra/llcommon/llmetricperformancetester.h
+++ b/indra/llcommon/llmetricperformancetester.h
@@ -60,7 +60,7 @@ public:
* By default, compares the test results against the baseline one by one, item by item,
* in the increasing order of the LLSD record counter, starting from the first one.
*/
- virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
+ virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ;
@@ -93,8 +93,8 @@ protected:
* @param[in] v_base - Base value of the metric.
* @param[in] v_current - Current value of the metric.
*/
- virtual void compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
- virtual void compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
+ virtual void compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
+ virtual void compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
/**
* @brief Reset internal record count. Count starts with 1.
@@ -181,7 +181,7 @@ public:
* This will be loading the base and current sessions and compare them using the virtual
* abstract methods loadTestSession() and compareTestSessions()
*/
- virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
+ virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
protected:
/**
@@ -205,7 +205,7 @@ protected:
* @brief Compare the base session and the target session. Assumes base and current sessions have been loaded.
* @param[out] os - The comparison result as a standard stream
*/
- virtual void compareTestSessions(std::ofstream* os) = 0;
+ virtual void compareTestSessions(llofstream* os) = 0;
LLTestSession* mBaseSessionp;
LLTestSession* mCurrentSessionp;
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 81ba8631c6..3a219eb998 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -2091,7 +2091,18 @@ std::string zip_llsd(LLSD& data)
}
have = CHUNK-strm.avail_out;
- output = (U8*) realloc(output, cur_size+have);
+ U8* new_output = (U8*) realloc(output, cur_size+have);
+ if (new_output == NULL)
+ {
+ LL_WARNS() << "Failed to compress LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ deflateEnd(&strm);
+ if (output)
+ {
+ free(output);
+ }
+ return std::string();
+ }
+ output = new_output;
memcpy(output+cur_size, out, have);
cur_size += have;
}
@@ -2174,7 +2185,19 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
U32 have = CHUNK-strm.avail_out;
- result = (U8*) realloc(result, cur_size + have);
+ U8* new_result = (U8*)realloc(result, cur_size + have);
+ if (new_result == NULL)
+ {
+ LL_WARNS() << "Failed to unzip LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ inflateEnd(&strm);
+ if (result)
+ {
+ free(result);
+ }
+ delete[] in;
+ return false;
+ }
+ result = new_result;
memcpy(result+cur_size, out, have);
cur_size += have;
@@ -2266,7 +2289,20 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
U32 have = CHUNK-strm.avail_out;
- result = (U8*) realloc(result, cur_size + have);
+ U8* new_result = (U8*) realloc(result, cur_size + have);
+ if (new_result == NULL)
+ {
+ LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
+ inflateEnd(&strm);
+ if (result)
+ {
+ free(result);
+ }
+ delete[] in;
+ valid = false;
+ return NULL;
+ }
+ result = new_result;
memcpy(result+cur_size, out, have);
cur_size += have;
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 2255e638c2..abe5fda603 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1325,6 +1325,10 @@ void LLStringUtilBase<T>::removeCRLF(string_type& string)
template<class T>
void LLStringUtilBase<T>::removeWindowsCR(string_type& string)
{
+ if (string.empty())
+ {
+ return;
+ }
const T LF = 10;
const T CR = 13;
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 962367f69f..294d0066ca 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -37,13 +37,14 @@
//
#include "llsd.h"
+#include "llsingleton.h"
#include <iosfwd>
#include <string>
-class LL_COMMON_API LLOSInfo
+class LL_COMMON_API LLOSInfo : public LLSingleton<LLOSInfo>
{
+ LLSINGLETON(LLOSInfo);
public:
- LLOSInfo();
void stream(std::ostream& s) const;
const std::string& getOSString() const;
diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h
index 79c89d6c92..690ebbecd8 100644
--- a/indra/llcorehttp/_httpinternal.h
+++ b/indra/llcorehttp/_httpinternal.h
@@ -127,9 +127,12 @@ const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
// We want to span a few windows to allow transport to slow
// after onset of the throttles and then recover without a final
// failure. Other systems may need other constants.
-const int HTTP_RETRY_COUNT_DEFAULT = 8;
+const int HTTP_RETRY_COUNT_DEFAULT = 5;
const int HTTP_RETRY_COUNT_MIN = 0;
const int HTTP_RETRY_COUNT_MAX = 100;
+const HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1E6L; // 1 sec
+const HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 5E6L; // 5 sec
+const HttpTime HTTP_RETRY_BACKOFF_MAX = 20E6L; // 20 sec
const int HTTP_REDIRECTS_DEFAULT = 10;
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 07cc0e4625..fceed8524b 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -140,6 +140,8 @@ HttpOpRequest::HttpOpRequest()
mPolicy503Retries(0),
mPolicyRetryAt(HttpTime(0)),
mPolicyRetryLimit(HTTP_RETRY_COUNT_DEFAULT),
+ mPolicyMinRetryBackoff(HttpTime(HTTP_RETRY_BACKOFF_MIN_DEFAULT)),
+ mPolicyMaxRetryBackoff(HttpTime(HTTP_RETRY_BACKOFF_MAX_DEFAULT)),
mCallbackSSLVerify(NULL)
{
// *NOTE: As members are added, retry initialization/cleanup
@@ -434,6 +436,9 @@ void HttpOpRequest::setupCommon(HttpRequest::policy_t policy_id,
mPolicyRetryLimit = options->getRetries();
mPolicyRetryLimit = llclamp(mPolicyRetryLimit, HTTP_RETRY_COUNT_MIN, HTTP_RETRY_COUNT_MAX);
mTracing = (std::max)(mTracing, llclamp(options->getTrace(), HTTP_TRACE_MIN, HTTP_TRACE_MAX));
+
+ mPolicyMinRetryBackoff = llclamp(options->getMinBackoff(), HttpTime(0), HTTP_RETRY_BACKOFF_MAX);
+ mPolicyMaxRetryBackoff = llclamp(options->getMaxBackoff(), mPolicyMinRetryBackoff, HTTP_RETRY_BACKOFF_MAX);
}
}
diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h
index dbcc57d0fd..43d49324af 100644
--- a/indra/llcorehttp/_httpoprequest.h
+++ b/indra/llcorehttp/_httpoprequest.h
@@ -232,6 +232,8 @@ public:
int mPolicy503Retries;
HttpTime mPolicyRetryAt;
int mPolicyRetryLimit;
+ HttpTime mPolicyMinRetryBackoff; // initial delay between retries (mcs)
+ HttpTime mPolicyMaxRetryBackoff;
}; // end class HttpOpRequest
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index b2709b53ec..4889cac9bf 100644
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -151,20 +151,16 @@ void HttpPolicy::addOp(const HttpOpRequest::ptr_t &op)
void HttpPolicy::retryOp(const HttpOpRequest::ptr_t &op)
{
- static const HttpTime retry_deltas[] =
- {
- 250000, // 1st retry in 0.25 S, etc...
- 500000,
- 1000000,
- 2000000,
- 5000000 // ... to every 5.0 S.
- };
- static const int delta_max(int(LL_ARRAY_SIZE(retry_deltas)) - 1);
static const HttpStatus error_503(503);
const HttpTime now(totalTime());
const int policy_class(op->mReqPolicy);
- HttpTime delta(retry_deltas[llclamp(op->mPolicyRetries, 0, delta_max)]);
+
+ HttpTime delta_min = op->mPolicyMinRetryBackoff;
+ HttpTime delta_max = op->mPolicyMaxRetryBackoff;
+ // mPolicyRetries limited to 100
+ U32 delta_factor = op->mPolicyRetries <= 10 ? 1 << op->mPolicyRetries : 1024;
+ HttpTime delta = llmin(delta_min * delta_factor, delta_max);
bool external_delta(false);
if (op->mReplyRetryAfter > 0 && op->mReplyRetryAfter < 30)
diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp
index aab447f2dd..df5aa52fa9 100644
--- a/indra/llcorehttp/httpoptions.cpp
+++ b/indra/llcorehttp/httpoptions.cpp
@@ -39,6 +39,8 @@ HttpOptions::HttpOptions() :
mTimeout(HTTP_REQUEST_TIMEOUT_DEFAULT),
mTransferTimeout(HTTP_REQUEST_XFER_TIMEOUT_DEFAULT),
mRetries(HTTP_RETRY_COUNT_DEFAULT),
+ mMinRetryBackoff(HTTP_RETRY_BACKOFF_MIN_DEFAULT),
+ mMaxRetryBackoff(HTTP_RETRY_BACKOFF_MAX_DEFAULT),
mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT),
mFollowRedirects(true),
mVerifyPeer(false),
@@ -81,6 +83,16 @@ void HttpOptions::setRetries(unsigned int retries)
mRetries = retries;
}
+void HttpOptions::setMinBackoff(HttpTime delay)
+{
+ mMinRetryBackoff = delay;
+}
+
+void HttpOptions::setMaxBackoff(HttpTime delay)
+{
+ mMaxRetryBackoff = delay;
+}
+
void HttpOptions::setUseRetryAfter(bool use_retry)
{
mUseRetryAfter = use_retry;
diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h
index 510eaa45bb..8a6de61b04 100644
--- a/indra/llcorehttp/httpoptions.h
+++ b/indra/llcorehttp/httpoptions.h
@@ -101,13 +101,31 @@ public:
/// Sets the number of retries on an LLCore::HTTPRequest before the
/// request fails.
- // Default: 8
+ // Default: 5
void setRetries(unsigned int retries);
unsigned int getRetries() const
{
return mRetries;
}
+ /// Sets minimal delay before request retries. In microseconds.
+ /// HttpPolicy will increase delay from min to max with each retry
+ // Default: 1 000 000 mcs
+ void setMinBackoff(HttpTime delay);
+ HttpTime getMinBackoff() const
+ {
+ return mMinRetryBackoff;
+ }
+
+ /// Sets maximum delay before request retries. In microseconds.
+ /// HttpPolicy will increase delay from min to max with each retry
+ // Default: 5 000 000 mcs
+ void setMaxBackoff(HttpTime delay);
+ HttpTime getMaxBackoff() const
+ {
+ return mMaxRetryBackoff;
+ }
+
// Default: true
void setUseRetryAfter(bool use_retry);
bool getUseRetryAfter() const
@@ -166,6 +184,8 @@ protected:
unsigned int mTimeout;
unsigned int mTransferTimeout;
unsigned int mRetries;
+ HttpTime mMinRetryBackoff;
+ HttpTime mMaxRetryBackoff;
bool mUseRetryAfter;
bool mFollowRedirects;
bool mVerifyPeer;
diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp
index 7dde1fcd69..77abfbcf0f 100644
--- a/indra/llcrashlogger/llcrashlock.cpp
+++ b/indra/llcrashlogger/llcrashlock.cpp
@@ -188,12 +188,22 @@ LLSD LLCrashLock::getProcessList()
//static
bool LLCrashLock::fileExists(std::string filename)
{
- return boost::filesystem::exists(filename.c_str());
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ boost::filesystem::path file_path(utf8str_to_utf16str(filename));
+#else
+ boost::filesystem::path file_path(filename);
+#endif
+ return boost::filesystem::exists(file_path);
}
void LLCrashLock::cleanupProcess(std::string proc_dir)
{
- boost::filesystem::remove_all(proc_dir);
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ boost::filesystem::path dir_path(utf8str_to_utf16str(proc_dir));
+#else
+ boost::filesystem::path dir_path(proc_dir);
+#endif
+ boost::filesystem::remove_all(dir_path);
}
bool LLCrashLock::putProcessList(const LLSD& proc_sd)
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index dca49be051..1d58dba9ab 100644
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -155,9 +155,9 @@ std::string getStartupStateFromLog(std::string& sllog)
bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename )
{
- std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
- std::ifstream log_file(db_file_name.c_str());
-
+ std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
+ llifstream log_file(db_file_name.c_str());
+
// Look for it in the given file
if (log_file.is_open())
{
@@ -186,7 +186,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
{
size_t length=0;
- std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
+ llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
if(minidump_stream.is_open())
{
minidump_stream.seekg(0, std::ios::end);
@@ -287,7 +287,7 @@ void LLCrashLogger::gatherFiles()
if (!file.empty())
{
LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL;
- std::ifstream f(file.c_str());
+ llifstream f(file.c_str());
if(f.is_open())
{
std::stringstream s;
@@ -342,7 +342,7 @@ void LLCrashLogger::gatherFiles()
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
{
std::string fullname = pathname + *iter;
- std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
+ llifstream fdat(fullname.c_str(), std::ifstream::binary);
if (fdat)
{
char buf[5];
@@ -462,7 +462,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
updateApplication("Sending reports...");
- std::ofstream out_file(report_file.c_str());
+ llofstream out_file(report_file.c_str());
LLSDSerialize::toPrettyXML(post_data, out_file);
out_file.flush();
out_file.close();
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index a07ea14621..ad765b6415 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -1436,7 +1436,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
{
S32 components = getComponents();
- if (! ((1 == components) || (3 == components) || (4 == components) ))
+ if (components != 1 && components != 3 && components != 4)
{
LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
return false;
@@ -1512,6 +1512,55 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
return true ;
}
+LLPointer<LLImageRaw> LLImageRaw::scaled(S32 new_width, S32 new_height)
+{
+ LLPointer<LLImageRaw> result;
+
+ S32 components = getComponents();
+ if (components != 1 && components != 3 && components != 4)
+ {
+ LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
+ return result;
+ }
+
+ if (isBufferInvalid())
+ {
+ LL_WARNS() << "Invalid image buffer" << LL_ENDL;
+ return result;
+ }
+
+ S32 old_width = getWidth();
+ S32 old_height = getHeight();
+
+ if ((old_width == new_width) && (old_height == new_height))
+ {
+ result = new LLImageRaw(old_width, old_height, components);
+ if (!result)
+ {
+ LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
+ return result;
+ }
+ memcpy(result->getData(), getData(), getDataSize());
+ }
+ else
+ {
+ S32 new_data_size = new_width * new_height * components;
+
+ if (new_data_size > 0)
+ {
+ result = new LLImageRaw(new_width, new_height, components);
+ if (!result)
+ {
+ LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
+ return result;
+ }
+ bilinear_scale(getData(), old_width, old_height, components, old_width*components, result->getData(), new_width, new_height, components, new_width*components);
+ }
+ }
+
+ return result;
+}
+
void LLImageRaw::copyLineScaled( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step )
{
const S32 components = getComponents();
@@ -1785,10 +1834,13 @@ static std::string find_file(std::string &name, S8 *codec)
#endif
EImageCodec LLImageBase::getCodecFromExtension(const std::string& exten)
{
- for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++)
+ if (!exten.empty())
{
- if (exten == file_extensions[i].exten)
- return file_extensions[i].codec;
+ for (int i = 0; i < (int)(NUM_FILE_EXTENSIONS); i++)
+ {
+ if (exten == file_extensions[i].exten)
+ return file_extensions[i].codec;
+ }
}
return IMG_CODEC_INVALID;
}
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index d0bd4a2aef..958c9fad3d 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -215,7 +215,8 @@ public:
void expandToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
- bool scale( S32 new_width, S32 new_height, bool scale_image = true );
+ bool scale(S32 new_width, S32 new_height, bool scale_image = true);
+ LLPointer<LLImageRaw> scaled(S32 new_width, S32 new_height);
// Fill the buffer with a constant color
void fill( const LLColor4U& color );
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp
index a299602d79..a4823ed859 100644
--- a/indra/llimage/llimagepng.cpp
+++ b/indra/llimage/llimagepng.cpp
@@ -124,12 +124,12 @@ bool LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
// Temporary buffer to hold the encoded image. Note: the final image
// size should be much smaller due to compression.
- U32 bufferSize = getWidth() * getHeight() * getComponents() + 1024;
+ U32 bufferSize = getWidth() * getHeight() * getComponents() + 8192;
U8* tmpWriteBuffer = new U8[ bufferSize ];
// Delegate actual encoding work to wrapper
LLPngWrapper pngWrapper;
- if (! pngWrapper.writePng(raw_image, tmpWriteBuffer))
+ if (!pngWrapper.writePng(raw_image, tmpWriteBuffer, bufferSize))
{
setLastError(pngWrapper.getErrorMessage());
delete[] tmpWriteBuffer;
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp
index da289ea889..eb70b78a36 100644
--- a/indra/llimage/llpngwrapper.cpp
+++ b/indra/llimage/llpngwrapper.cpp
@@ -112,6 +112,11 @@ void LLPngWrapper::readDataCallback(png_structp png_ptr, png_bytep dest, png_siz
void LLPngWrapper::writeDataCallback(png_structp png_ptr, png_bytep src, png_size_t length)
{
PngDataInfo *dataInfo = (PngDataInfo *) png_get_io_ptr(png_ptr);
+ if (dataInfo->mOffset + length > dataInfo->mDataSize)
+ {
+ png_error(png_ptr, "Data write error. Requested data size exceeds available data size.");
+ return;
+ }
U8 *dest = &dataInfo->mData[dataInfo->mOffset];
memcpy(dest, src, length);
dataInfo->mOffset += static_cast<U32>(length);
@@ -272,7 +277,7 @@ void LLPngWrapper::updateMetaData()
// Method to write raw image into PNG at dest. The raw scanline begins
// at the bottom of the image per SecondLife conventions.
-BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest)
+BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize)
{
try
{
@@ -313,6 +318,7 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest)
PngDataInfo dataPtr;
dataPtr.mData = dest;
dataPtr.mOffset = 0;
+ dataPtr.mDataSize = destSize;
png_set_write_fn(mWritePngPtr, &dataPtr, &writeDataCallback, &writeFlush);
// Setup image params
diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h
index 27d7df3bef..8d42317b0f 100644
--- a/indra/llimage/llpngwrapper.h
+++ b/indra/llimage/llpngwrapper.h
@@ -45,7 +45,7 @@ public:
BOOL isValidPng(U8* src);
BOOL readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL);
- BOOL writePng(const LLImageRaw* rawImage, U8* dst);
+ BOOL writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize);
U32 getFinalSize();
const std::string& getErrorMessage();
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 7a54d83b3f..b0ac3c9436 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5311,19 +5311,31 @@ void LLVolumeFace::cacheOptimize()
S32 num_verts = mNumVertices;
S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF;
LLVector4a* pos = (LLVector4a*) ll_aligned_malloc<64>(sizeof(LLVector4a)*2*num_verts+size);
+ if (pos == NULL)
+ {
+ LL_ERRS("LLVOLUME") << "Allocation of positions vector[" << sizeof(LLVector4a) * 2 * num_verts + size << "] failed. " << LL_ENDL;
+ }
LLVector4a* norm = pos + num_verts;
LLVector2* tc = (LLVector2*) (norm + num_verts);
LLVector4a* wght = NULL;
if (mWeights)
{
- wght = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
+ wght = (LLVector4a*)ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
+ if (wght == NULL)
+ {
+ LL_ERRS("LLVOLUME") << "Allocation of weights[" << sizeof(LLVector4a) * num_verts << "] failed" << LL_ENDL;
+ }
}
LLVector4a* binorm = NULL;
if (mTangents)
{
binorm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
+ if (binorm == NULL)
+ {
+ LL_ERRS("LLVOLUME") << "Allocation of binormals[" << sizeof(LLVector4a)*num_verts << "] failed" << LL_ENDL;
+ }
}
//allocate mapping of old indices to new indices
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index 406afadd2f..4e0c53c37e 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -499,9 +499,10 @@ BOOL LLTemplateMessageReader::decodeTemplate(
}
else
{
- LL_WARNS() << "Message #" << std::hex << num << std::dec
- << " received but not registered!" << LL_ENDL;
- gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE);
+ // MAINT-7482 - make viewer more tolerant of unknown messages.
+ LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec
+ << " received but not registered!" << LL_ENDL;
+ //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE);
return(FALSE);
}
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index f1b6fe0a12..680017204c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -224,7 +224,14 @@ void LLPluginClassMedia::idle(void)
void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
// clear texture memory to avoid random screen visual fuzz from uninitialized texture data
- memset( addr, 0x00, newsize );
+ if (addr)
+ {
+ memset( addr, 0x00, newsize );
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Failed to get previously created shared memory address: " << mTextureSharedMemoryName << " size: " << mTextureSharedMemorySize << LL_ENDL;
+ }
// We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
// so it may not be worthwhile.
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 7757198af5..1847c661d7 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -65,7 +65,7 @@ static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
static const std::string HEADLESS_RENDERER_STRING("Headless");
static const std::string HEADLESS_VERSION_STRING("1.0");
-std::ofstream gFailLog;
+llofstream gFailLog;
#if GL_ARB_debug_output
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 75e5fe86ec..aa98b3f6bc 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -47,7 +47,7 @@
extern BOOL gDebugGL;
extern BOOL gDebugSession;
-extern std::ofstream gFailLog;
+extern llofstream gFailLog;
#define LL_GL_ERRS LL_ERRS("RenderState")
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 31dffdd545..607bbf3b3b 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1234,7 +1234,7 @@ void LLVertexBuffer::createGLIndices(U32 size)
void LLVertexBuffer::destroyGLBuffer()
{
- if (mGLBuffer)
+ if (mGLBuffer || mMappedData)
{
if (mMappedDataUsingVBOs)
{
@@ -1254,7 +1254,7 @@ void LLVertexBuffer::destroyGLBuffer()
void LLVertexBuffer::destroyGLIndices()
{
- if (mGLIndices)
+ if (mGLIndices || mMappedIndexData)
{
if (mMappedIndexDataUsingVBOs)
{
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index f8ef5289db..eaf1284237 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -823,6 +823,11 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
void LLAccordionCtrlTab::showAndFocusHeader()
{
+ if (!mHeader)
+ {
+ return;
+ }
+
mHeader->setFocus(true);
mHeader->setSelected(mSelectionEnabled);
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index f9664e0658..895753aeae 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -102,6 +102,18 @@ void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder)
void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
{ }
+//---------------------------------------------------------------------------
+
+void LLAllDescendentsPassedFilter::doFolder(LLFolderViewFolder* folder)
+{
+ mAllDescendentsPassedFilter &= (folder) && (folder->passedFilter()) && (folder->descendantsPassedFilter());
+}
+
+void LLAllDescendentsPassedFilter::doItem(LLFolderViewItem* item)
+{
+ mAllDescendentsPassedFilter &= (item) && (item->passedFilter());
+}
+
///----------------------------------------------------------------------------
/// Class LLFolderViewScrollContainer
///----------------------------------------------------------------------------
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index b5deefd653..2926e160d0 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -400,6 +400,18 @@ public:
virtual void doItem(LLFolderViewItem* item);
};
+class LLAllDescendentsPassedFilter : public LLFolderViewFunctor
+{
+public:
+ LLAllDescendentsPassedFilter() : mAllDescendentsPassedFilter(true) {}
+ /*virtual*/ ~LLAllDescendentsPassedFilter() {}
+ /*virtual*/ void doFolder(LLFolderViewFolder* folder);
+ /*virtual*/ void doItem(LLFolderViewItem* item);
+ bool allDescendentsPassedFilter() const { return mAllDescendentsPassedFilter; }
+protected:
+ bool mAllDescendentsPassedFilter;
+};
+
// Flags for buildContextMenu()
const U32 SUPPRESS_OPEN_ITEM = 0x1;
const U32 FIRST_SELECTED_ITEM = 0x2;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 3d618548c4..0510e472c5 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1176,6 +1176,11 @@ BOOL LLFolderViewFolder::needsArrange()
return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
}
+bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation)
+{
+ return getViewModelItem()->descendantsPassedFilter(filter_generation);
+}
+
// Passes selection information on to children and record selection
// information if necessary.
BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 641241a88c..f71a88c56e 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -147,6 +147,10 @@ public:
virtual const std::string& getDisplayName() const = 0;
virtual const std::string& getSearchableName() const = 0;
+ virtual std::string getSearchableDescription() const = 0;
+ virtual std::string getSearchableCreatorName()const = 0;
+ virtual std::string getSearchableUUIDString() const = 0;
+
virtual LLPointer<LLUIImage> getIcon() const = 0;
virtual LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
virtual LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 022f814bbc..0d42f726fa 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3331,6 +3331,7 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
if (getHighlightedItem())
{
clearHoverItem();
+ LLMenuGL::setKeyboardMode(FALSE);
}
else
{
@@ -3777,10 +3778,10 @@ BOOL LLMenuHolderGL::hideMenus()
{
return FALSE;
}
+ LLMenuGL::setKeyboardMode(FALSE);
BOOL menu_visible = hasVisibleMenu();
if (menu_visible)
{
- LLMenuGL::setKeyboardMode(FALSE);
// clicked off of menu, hide them all
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 604092d536..7bafd711cb 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -67,7 +67,8 @@ LLNotificationForm::FormIgnore::FormIgnore()
: text("text"),
control("control"),
invert_control("invert_control", false),
- save_option("save_option", false)
+ save_option("save_option", false),
+ session_only("session_only", false)
{}
LLNotificationForm::FormButton::FormButton()
@@ -125,6 +126,7 @@ bool handleIgnoredNotification(const LLSD& payload)
switch(form->getIgnoreType())
{
case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE:
+ case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY:
response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
break;
case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
@@ -197,7 +199,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
if (!p.ignore.save_option)
{
- mIgnore = IGNORE_WITH_DEFAULT_RESPONSE;
+ mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE;
}
else
{
@@ -426,6 +428,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mLogToChat(p.log_to_chat),
mLogToIM(p.log_to_im),
mShowToast(p.show_toast),
+ mFadeToast(p.fade_toast),
mSoundName("")
{
if (p.sound.isProvided()
@@ -942,6 +945,11 @@ bool LLNotification::canShowToast() const
return mTemplatep->mShowToast;
}
+bool LLNotification::canFadeToast() const
+{
+ return mTemplatep->mFadeToast;
+}
+
bool LLNotification::hasFormElements() const
{
return mTemplatep->mForm->getNumElements() != 0;
@@ -1792,6 +1800,18 @@ bool LLNotifications::getIgnoreAllNotifications()
{
return mIgnoreAllNotifications;
}
+
+void LLNotifications::setIgnored(const std::string& name, bool ignored)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ templatep->mForm->setIgnored(ignored);
+}
+
+bool LLNotifications::getIgnored(const std::string& name)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) );
+}
bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 024332ee65..ccdfb90054 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -179,6 +179,7 @@ public:
Optional<bool> save_option;
Optional<std::string> control;
Optional<bool> invert_control;
+ Optional<bool> session_only;
FormIgnore();
};
@@ -232,7 +233,8 @@ public:
typedef enum e_ignore_type
{
IGNORE_NO,
- IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY,
IGNORE_WITH_LAST_RESPONSE,
IGNORE_SHOW_AGAIN
} EIgnoreType;
@@ -558,6 +560,7 @@ public:
bool canLogToChat() const;
bool canLogToIM() const;
bool canShowToast() const;
+ bool canFadeToast() const;
bool hasFormElements() const;
void playSound();
@@ -963,6 +966,9 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
+ void setIgnored(const std::string& name, bool ignored);
+ bool getIgnored(const std::string& name);
+
bool isVisibleByRules(LLNotificationPtr pNotification);
private:
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index bed29254d8..20cbc89ede 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -177,6 +177,7 @@ struct LLNotificationTemplate
Optional<bool> persist,
log_to_im,
show_toast,
+ fade_toast,
log_to_chat,
force_urls_external;
Optional<std::string> functor,
@@ -199,6 +200,7 @@ struct LLNotificationTemplate
Params()
: name("name"),
persist("persist", false),
+ fade_toast("fade_toast", true),
log_to_im("log_to_im", false),
show_toast("show_toast", true),
log_to_chat("log_to_chat", true),
@@ -316,6 +318,7 @@ struct LLNotificationTemplate
bool mLogToChat;
bool mLogToIM;
bool mShowToast;
+ bool mFadeToast;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index f70eebc594..6135cc56ad 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -72,6 +72,7 @@ LLScrollContainer::Params::Params()
hide_scrollbar("hide_scrollbar"),
min_auto_scroll_rate("min_auto_scroll_rate", 100),
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
+ max_auto_scroll_zone("max_auto_scroll_zone", 16),
reserve_scroll_corner("reserve_scroll_corner", false),
size("size", -1)
{}
@@ -88,6 +89,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mReserveScrollCorner(p.reserve_scroll_corner),
mMinAutoScrollRate(p.min_auto_scroll_rate),
mMaxAutoScrollRate(p.max_auto_scroll_rate),
+ mMaxAutoScrollZone(p.max_auto_scroll_zone),
mScrolledView(NULL),
mSize(p.size)
{
@@ -290,8 +292,22 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
return TRUE;
}
+bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
+{
+ if (mAutoScrolling)
+ {
+ return true; // already scrolling
+ }
+ return autoScroll(x, y, false);
+}
+
bool LLScrollContainer::autoScroll(S32 x, S32 y)
{
+ return autoScroll(x, y, true);
+}
+
+bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
+{
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
S32 scrollbar_size = (mSize == -1 ? scrollbar_size_control : mSize);
@@ -302,6 +318,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
+ // Note: Will also include scrollers as scroll zones, so opposite
+ // scroll zones might have different size due to visible scrollers
if( mScrollbar[HORIZONTAL]->getVisible() )
{
inner_rect_local.mBottom += scrollbar_size;
@@ -316,8 +334,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
// autoscroll region should take up no more than one third of visible scroller area
- S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10);
- S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10);
+ S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, (S32)mMaxAutoScrollZone);
+ S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, (S32)mMaxAutoScrollZone);
if( mScrollbar[HORIZONTAL]->getVisible() )
{
@@ -325,8 +343,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
left_scroll_rect.mRight = inner_rect_local.mLeft + auto_scroll_region_width;
if( left_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() > 0) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -334,8 +355,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
right_scroll_rect.mLeft = inner_rect_local.mRight - auto_scroll_region_width;
if( right_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() < mScrollbar[HORIZONTAL]->getDocPosMax()) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
@@ -345,8 +369,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
bottom_scroll_rect.mTop = inner_rect_local.mBottom + auto_scroll_region_height;
if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() < mScrollbar[VERTICAL]->getDocPosMax()) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -354,8 +381,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
top_scroll_rect.mBottom = inner_rect_local.mTop - auto_scroll_region_height;
if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() > 0) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index c4c4d0a136..e6c7891397 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -66,6 +66,7 @@ public:
hide_scrollbar;
Optional<F32> min_auto_scroll_rate,
max_auto_scroll_rate;
+ Optional<U32> max_auto_scroll_zone;
Optional<LLUIColor> bg_color;
Optional<LLScrollbar::callback_t> scroll_callback;
Optional<S32> size;
@@ -114,7 +115,8 @@ public:
virtual void draw();
virtual bool addChild(LLView* view, S32 tab_group = 0);
-
+
+ bool canAutoScroll(S32 x, S32 y);
bool autoScroll(S32 x, S32 y);
S32 getSize() const { return mSize; }
@@ -128,6 +130,7 @@ private:
virtual void scrollHorizontal( S32 new_pos );
virtual void scrollVertical( S32 new_pos );
void updateScroll();
+ bool autoScroll(S32 x, S32 y, bool do_scroll);
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
@@ -141,6 +144,7 @@ private:
F32 mAutoScrollRate;
F32 mMinAutoScrollRate;
F32 mMaxAutoScrollRate;
+ U32 mMaxAutoScrollZone;
bool mHideScrollbar;
};
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 0afa8d43f1..7c1f4a4dca 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -345,6 +345,21 @@ S32 LLScrollListCtrl::getItemCount() const
return mItemList.size();
}
+BOOL LLScrollListCtrl::hasSelectedItem() const
+{
+ item_list::iterator iter;
+ for (iter = mItemList.begin(); iter < mItemList.end(); )
+ {
+ LLScrollListItem* itemp = *iter;
+ if (itemp && itemp->getSelected())
+ {
+ return TRUE;
+ }
+ iter++;
+ }
+ return FALSE;
+}
+
// virtual LLScrolListInterface function (was deleteAllItems)
void LLScrollListCtrl::clearRows()
{
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8343750a54..699a8744e1 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -201,6 +201,8 @@ public:
virtual BOOL isSelected(const LLSD& value) const;
+ BOOL hasSelectedItem() const;
+
BOOL handleClick(S32 x, S32 y, MASK mask);
BOOL selectFirstItem();
BOOL selectNthItem( S32 index );
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index d49e216898..f6831c6d5e 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -130,6 +130,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this ));
+ mEditor->setFocusLostCallback( boost::bind(&LLSpinCtrl::onEditorLostFocus, _1, this ));
if (p.allow_digits_only)
{
mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace);
@@ -239,6 +240,31 @@ void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
self->onFocusReceived();
}
+// static
+void LLSpinCtrl::onEditorLostFocus( LLFocusableElement* caller, void *userdata )
+{
+ LLSpinCtrl* self = (LLSpinCtrl*) userdata;
+ llassert( caller == self->mEditor );
+
+ self->onFocusLost();
+
+ std::string text = self->mEditor->getText();
+
+ LLLocale locale(LLLocale::USER_LOCALE);
+ F32 val = (F32)atof(text.c_str());
+
+ F32 saved_val = self->getValueF32();
+ if (saved_val != val && !self->mEditor->isDirty())
+ {
+ // Editor was focused when value update arrived, string
+ // in editor is different from one in spin control.
+ // Since editor is not dirty, it won't commit, so either
+ // attempt to commit value from editor or revert to a more
+ // recent value from spin control
+ self->updateEditor();
+ }
+}
+
void LLSpinCtrl::setValue(const LLSD& value )
{
F32 v = (F32)value.asReal();
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index e34add879d..cab99c35bd 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -93,6 +93,7 @@ public:
void onEditorCommit(const LLSD& data);
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);
+ static void onEditorLostFocus(LLFocusableElement* caller, void *userdata);
static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
void onUpBtn(const LLSD& data);
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 99a0869ce3..138ba8bf02 100644
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -58,10 +58,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
const char* NO_VALUE_MARKER = "no_value";
-#ifdef LL_WINDOWS
-const S32 LINE_NUMBER_HERE = 0;
-#endif
-
struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
{
static void declareValues()
@@ -1313,22 +1309,14 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
void LLXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserWarning(warning_msg);
}
void LLXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserError(error_msg);
}
@@ -1641,22 +1629,14 @@ bool LLSimpleXUIParser::processText()
void LLSimpleXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserWarning(warning_msg);
}
void LLSimpleXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserError(error_msg);
}
bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 924e1166ee..b845de71fa 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -104,8 +104,13 @@ LLDir::~LLDir()
std::vector<std::string> LLDir::getFilesInDir(const std::string &dirname)
{
//Returns a vector of fullpath filenames.
-
- boost::filesystem::path p (dirname);
+
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ boost::filesystem::path p(utf8str_to_utf16str(dirname));
+#else
+ boost::filesystem::path p(dirname);
+#endif
+
std::vector<std::string> v;
if (exists(p))
@@ -193,7 +198,12 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name)
try
{
- boost::filesystem::path dir_path(dir_name);
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ boost::filesystem::path dir_path(utf8str_to_utf16str(dir_name));
+#else
+ boost::filesystem::path dir_path(dir_name);
+#endif
+
if (boost::filesystem::exists (dir_path))
{
if (!boost::filesystem::is_empty (dir_path))
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index 76296ff877..3eb64e69d9 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -51,7 +51,11 @@ private:
LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
: mIsValid(false)
{
+#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
+ fs::path dir_path(utf8str_to_utf16str(dirname));
+#else
fs::path dir_path(dirname);
+#endif
bool is_dir = false;
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index e7afef63f8..d4790f9f29 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -35,6 +35,7 @@
#undef INITGUID
#include <wbemidl.h>
+#include <comdef.h>
#include <boost/tokenizer.hpp>
@@ -206,6 +207,160 @@ HRESULT GetVideoMemoryViaWMI( WCHAR* strInputDeviceID, DWORD* pdwAdapterRam )
return E_FAIL;
}
+//Getting the version of graphics controller driver via WMI
+std::string LLDXHardware::getDriverVersionWMI()
+{
+ std::string mDriverVersion;
+ HRESULT hrCoInitialize = S_OK;
+ HRESULT hres;
+ hrCoInitialize = CoInitialize(0);
+ IWbemLocator *pLoc = NULL;
+
+ hres = CoCreateInstance(
+ CLSID_WbemLocator,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_IWbemLocator, (LPVOID *)&pLoc);
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hres << LL_ENDL;
+ return std::string(); // Program has failed.
+ }
+
+ IWbemServices *pSvc = NULL;
+
+ // Connect to the root\cimv2 namespace with
+ // the current user and obtain pointer pSvc
+ // to make IWbemServices calls.
+ hres = pLoc->ConnectServer(
+ _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace
+ NULL, // User name. NULL = current user
+ NULL, // User password. NULL = current
+ 0, // Locale. NULL indicates current
+ NULL, // Security flags.
+ 0, // Authority (e.g. Kerberos)
+ 0, // Context object
+ &pSvc // pointer to IWbemServices proxy
+ );
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hres << LL_ENDL;
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL;
+
+ // Set security levels on the proxy -------------------------
+ hres = CoSetProxyBlanket(
+ pSvc, // Indicates the proxy to set
+ RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx
+ RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx
+ NULL, // Server principal name
+ RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx
+ RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
+ NULL, // client identity
+ EOAC_NONE // proxy capabilities
+ );
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+ IEnumWbemClassObject* pEnumerator = NULL;
+
+ // Get the data from the query
+ ULONG uReturn = 0;
+ hres = pSvc->ExecQuery(
+ bstr_t("WQL"),
+ bstr_t("SELECT * FROM Win32_VideoController"), //Consider using Availability to filter out disabled controllers
+ WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
+ NULL,
+ &pEnumerator);
+
+ if (FAILED(hres))
+ {
+ LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ while (pEnumerator)
+ {
+ IWbemClassObject *pclsObj = NULL;
+ HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
+ &pclsObj, &uReturn);
+
+ if (0 == uReturn)
+ {
+ break; // If quantity less then 1.
+ }
+
+ VARIANT vtProp;
+
+ // Get the value of the Name property
+ hr = pclsObj->Get(L"DriverVersion", 0, &vtProp, 0, 0);
+
+ if (FAILED(hr))
+ {
+ LL_WARNS("AppInit") << "Query for name property failed." << " Error code = 0x" << hr << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return std::string(); // Program has failed.
+ }
+
+ // use characters in the returned driver version
+ BSTR driverVersion(vtProp.bstrVal);
+
+ //convert BSTR to std::string
+ std::wstring ws(driverVersion, SysStringLen(driverVersion));
+ std::string str(ws.begin(), ws.end());
+ LL_INFOS("AppInit") << " DriverVersion : " << str << LL_ENDL;
+
+ if (mDriverVersion.empty())
+ {
+ mDriverVersion = str;
+ }
+ else if (mDriverVersion != str)
+ {
+ LL_WARNS("DriverVersion") << "Different versions of drivers. Version of second driver : " << str << LL_ENDL;
+ }
+
+ VariantClear(&vtProp);
+ pclsObj->Release();
+ }
+
+ // Cleanup
+ // ========
+ if (pSvc)
+ {
+ pSvc->Release();
+ }
+ if (pLoc)
+ {
+ pLoc->Release();
+ }
+ if (pEnumerator)
+ {
+ pEnumerator->Release();
+ }
+ if (SUCCEEDED(hrCoInitialize))
+ {
+ CoUninitialize();
+ }
+ return mDriverVersion;
+}
+
void get_wstring(IDxDiagContainer* containerp, WCHAR* wszPropName, WCHAR* wszPropValue, int outputSize)
{
HRESULT hr;
diff --git a/indra/llwindow/lldxhardware.h b/indra/llwindow/lldxhardware.h
index 61a32bf0fb..cf33db8b37 100644
--- a/indra/llwindow/lldxhardware.h
+++ b/indra/llwindow/lldxhardware.h
@@ -88,6 +88,8 @@ public:
// vram_only TRUE does a "light" probe.
BOOL getInfo(BOOL vram_only);
+ std::string getDriverVersionWMI();
+
S32 getVRAM() const { return mVRAM; }
LLSD getDisplayInfo();
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 4eb29c98f9..ec1454308c 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -440,6 +440,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else if (message_name == "cleanup")
{
+ mVolumeCatcher.setVolume(0);
mLLCEFLib->requestExit();
}
else if (message_name == "shm_added")
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 00433367c8..bb09d45b57 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-5.0.7
+5.0.9
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c544205df0..9f82eb5b85 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -812,6 +812,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>FramePerSecondLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls upper limit of frames per second</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>120</integer>
+ </map>
<key>BackgroundYieldTime</key>
<map>
<key>Comment</key>
@@ -1382,7 +1393,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>512</integer>
+ <integer>1024</integer>
</map>
<key>CacheValidateCounter</key>
<map>
@@ -4534,7 +4545,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
+ <string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
<key>HighResSnapshot</key>
<map>
@@ -5581,12 +5592,12 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>10.0</real>
+ <real>40.0</real>
</map>
<key>LoginSRVPump</key>
<map>
<key>Comment</key>
- <string>Name of the message pump that handles SRV request</string>
+ <string>Name of the message pump that handles SRV request (deprecated)</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 89317f2793..6ee330619f 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -300,11 +300,6 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' ''
-# Create *.bat file to specify lang params on first run from installer - see MAINT-5259
-FileOpen $9 "$INSTDIR\autorun.bat" w
-FileWrite $9 'start "$INSTDIR\$INSTEXE" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n'
-FileClose $9
-
# Write registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
@@ -700,7 +695,7 @@ Call CheckWindowsServPack # Warn if not on the latest SP before asking to launc
Push $R0 # Option value, unused
StrCmp $SKIP_AUTORUN "true" +2;
# Assumes SetOutPath $INSTDIR
- Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"'
+ Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTSHORTCUT.lnk"'
Pop $R0
FunctionEnd
diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi
index 866accae99..2a868acc89 100644
--- a/indra/newview/installers/windows/lang_de.nsi
+++ b/indra/newview/installers/windows/lang_de.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi
index f4f0786332..1ecf254ffb 100644
--- a/indra/newview/installers/windows/lang_es.nsi
+++ b/indra/newview/installers/windows/lang_es.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi
index 1b5dbfc975..bec5835bed 100644
--- a/indra/newview/installers/windows/lang_fr.nsi
+++ b/indra/newview/installers/windows/lang_fr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi
index a456e6e417..1d2e150525 100644
--- a/indra/newview/installers/windows/lang_it.nsi
+++ b/indra/newview/installers/windows/lang_it.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi
index 5b1c5f4ce9..1bd6526670 100644
--- a/indra/newview/installers/windows/lang_ja.nsi
+++ b/indra/newview/installers/windows/lang_ja.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi
index 9ef252d232..87032fec18 100644
--- a/indra/newview/installers/windows/lang_pt-br.nsi
+++ b/indra/newview/installers/windows/lang_pt-br.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi
index d7c728d3e2..019c66123c 100644
--- a/indra/newview/installers/windows/lang_ru.nsi
+++ b/indra/newview/installers/windows/lang_ru.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi
index 97c602f4fc..1c4e2c2f48 100644
--- a/indra/newview/installers/windows/lang_tr.nsi
+++ b/indra/newview/installers/windows/lang_tr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi
index 39c005a683..355e01a333 100644
--- a/indra/newview/installers/windows/lang_zh.nsi
+++ b/indra/newview/installers/windows/lang_zh.nsi
Binary files differ
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 648212177b..ee49125711 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -394,6 +394,40 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
{
status = LLCore::HttpStatus(HTTP_INTERNAL_ERROR, "Malformed response contents");
}
+ else if (status.getType() == 410) //GONE
+ {
+ // Item does not exist or was already deleted from server.
+ // parent folder is out of sync
+ if (type == REMOVECATEGORY)
+ {
+ LLViewerInventoryCategory *cat = gInventory.getCategory(targetId);
+ if (cat)
+ {
+ LL_WARNS("Inventory") << "Purge failed for '" << cat->getName()
+ << "' local version:" << cat->getVersion()
+ << " since folder no longer exists at server. Descendent count: server == " << cat->getDescendentCount()
+ << ", viewer == " << cat->getViewerDescendentCount()
+ << LL_ENDL;
+ gInventory.fetchDescendentsOf(cat->getParentUUID());
+ // Note: don't delete folder here - contained items will be deparented (or deleted)
+ // and since we are clearly out of sync we can't be sure we won't get rid of something we need.
+ // For example folder could have been moved or renamed with items intact, let it fetch first.
+ }
+ }
+ else if (type == REMOVEITEM)
+ {
+ LLViewerInventoryItem *item = gInventory.getItem(targetId);
+ if (item)
+ {
+ LL_WARNS("Inventory") << "Purge failed for '" << item->getName()
+ << "' since item no longer exists at server." << LL_ENDL;
+ gInventory.fetchDescendentsOf(item->getParentUUID());
+ // since item not on the server and exists at viewer, so it needs an update at the least,
+ // so delete it, in worst case item will be refetched with new params.
+ gInventory.onObjectDeletedFromServer(targetId);
+ }
+ }
+ }
LL_WARNS("Inventory") << "Inventory error: " << status.toString() << LL_ENDL;
LL_WARNS("Inventory") << ll_pretty_print_sd(result) << LL_ENDL;
}
@@ -970,7 +1004,16 @@ void AISUpdate::doUpdate()
// inventory COF is maintained on the viewer through calls to
// LLInventoryModel::accountForUpdate when a changing operation
// is performed. This occasionally gets out of sync however.
- cat->setVersion(version);
+ if (version != LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ cat->setVersion(version);
+ }
+ else
+ {
+ // We do not account for update if version is UNKNOWN, so we shouldn't rise version
+ // either or viewer will get stuck on descendants count -1, try to refetch folder instead
+ cat->fetch();
+ }
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c928cf0601..0fb811a386 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1321,6 +1321,8 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
//=========================================================================
+const std::string LLAppearanceMgr::sExpectedTextureName = "OutfitPreview";
+
const LLUUID LLAppearanceMgr::getCOF() const
{
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -1571,7 +1573,14 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
- if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ if (linked_item != NULL)
+ {
+ if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ {
+ gInventory.removeItem(outfit_item->getUUID());
+ }
+ }
+ else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
{
gInventory.removeItem(outfit_item->getUUID());
}
@@ -3209,6 +3218,7 @@ void appearance_mgr_update_dirty_state()
void update_base_outfit_after_ordering()
{
LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance();
+ app_mgr.setOutfitImage(LLUUID());
LLInventoryModel::cat_array_t sub_cat_array;
LLInventoryModel::item_array_t outfit_item_array;
gInventory.collectDescendents(app_mgr.getBaseOutfitUUID(),
@@ -3218,9 +3228,26 @@ void update_base_outfit_after_ordering()
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
- if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ if (linked_item != NULL)
+ {
+ if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ {
+ app_mgr.setOutfitImage(linked_item->getLinkedUUID());
+ if (linked_item->getName() == LLAppearanceMgr::sExpectedTextureName)
+ {
+ // Images with "appropriate" name take priority
+ break;
+ }
+ }
+ }
+ else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
{
- app_mgr.setOutfitImage(linked_item->getLinkedUUID());
+ app_mgr.setOutfitImage(outfit_item->getUUID());
+ if (outfit_item->getName() == LLAppearanceMgr::sExpectedTextureName)
+ {
+ // Images with "appropriate" name take priority
+ break;
+ }
}
}
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 166c663feb..c274a8b049 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -291,6 +291,9 @@ public:
BOOL getIsInCOF(const LLUUID& obj_id) const;
// Is this in the COF and can the user delete it from the COF?
BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
+
+ // Outfits will prioritize textures with such name to use for preview in gallery
+ static const std::string sExpectedTextureName;
};
class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index cfdc752db4..b7267fbdfe 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -315,8 +315,6 @@ F32SecondsImplicit gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
-U32 gFrameStalls = 0;
-const F64 FRAME_STALL_THRESHOLD = 1.0;
LLTimer gRenderStartTime;
LLFrameTimer gForegroundTime;
@@ -641,7 +639,7 @@ public:
void run()
{
- std::ofstream os(mFile.c_str());
+ llofstream os(mFile.c_str());
while (!LLAppViewer::instance()->isQuitting())
{
@@ -705,7 +703,8 @@ LLAppViewer::LLAppViewer()
mFastTimerLogThread(NULL),
mUpdater(new LLUpdaterService()),
mSettingsLocationList(NULL),
- mIsFirstRun(false)
+ mIsFirstRun(false),
+ mMinMicroSecPerFrame(0.f)
{
if(NULL != sInstance)
{
@@ -734,7 +733,7 @@ LLAppViewer::LLAppViewer()
//
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
- LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
+ LLLoginInstance::instance().setPlatformInfo(gPlatform, LLOSInfo::instance().getOSVersionString(), LLOSInfo::instance().getOSStringSimple());
}
LLAppViewer::~LLAppViewer()
@@ -1249,6 +1248,9 @@ bool LLAppViewer::init()
joystick->setNeedsReset(true);
/*----------------------------------------------------------------------*/
+ gSavedSettings.getControl("FramePerSecondLimit")->getSignal()->connect(boost::bind(&LLAppViewer::onChangeFrameLimit, this, _2));
+ onChangeFrameLimit(gSavedSettings.getLLSD("FramePerSecondLimit"));
+
return true;
}
@@ -1328,9 +1330,6 @@ bool LLAppViewer::frame()
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
LLSD newFrame;
- LLTimer frameTimer,idleTimer;
- LLTimer debugTime;
-
//LLPrivateMemoryPoolTester::getInstance()->run(false) ;
//LLPrivateMemoryPoolTester::getInstance()->run(true) ;
//LLPrivateMemoryPoolTester::destroy() ;
@@ -1371,14 +1370,6 @@ bool LLAppViewer::frame()
gViewerWindow->getWindow()->gatherInput();
}
-#if 1 && !LL_RELEASE_FOR_DOWNLOAD
- // once per second debug info
- if (debugTime.getElapsedTimeF32() > 1.f)
- {
- debugTime.reset();
- }
-
-#endif
//memory leaking simulation
LLFloaterMemLeak* mem_leak_instance =
LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking");
@@ -1432,7 +1423,24 @@ bool LLAppViewer::frame()
{
pingMainloopTimeout("Main:Display");
gGLActive = TRUE;
+
+ static U64 last_call = 0;
+ if (!gTeleportDisplay)
+ {
+ // Frame/draw throttling
+ U64 elapsed_time = LLTimer::getTotalTime() - last_call;
+ if (elapsed_time < mMinMicroSecPerFrame)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_SLEEP);
+ // llclamp for when time function gets funky
+ U64 sleep_time = llclamp(mMinMicroSecPerFrame - elapsed_time, (U64)1, (U64)1e6);
+ micro_sleep(sleep_time, 0);
+ }
+ }
+ last_call = LLTimer::getTotalTime();
+
display();
+
pingMainloopTimeout("Main:Snapshot");
LLFloaterSnapshot::update(); // take snapshots
LLFloaterOutfitSnapshot::update();
@@ -1460,7 +1468,8 @@ bool LLAppViewer::frame()
|| !gFocusMgr.getAppHasFocus())
{
// Sleep if we're not rendering, or the window is minimized.
- S32 milliseconds_to_sleep = llclamp(gSavedSettings.getS32("BackgroundYieldTime"), 0, 1000);
+ static LLCachedControl<S32> s_bacground_yeild_time(gSavedSettings, "BackgroundYieldTime", 40);
+ S32 milliseconds_to_sleep = llclamp((S32)s_bacground_yeild_time, 0, 1000);
// don't sleep when BackgroundYieldTime set to 0, since this will still yield to other threads
// of equal priority on Windows
if (milliseconds_to_sleep > 0)
@@ -1484,7 +1493,6 @@ bool LLAppViewer::frame()
ms_sleep(500);
}
- idleTimer.reset();
S32 total_work_pending = 0;
S32 total_io_pending = 0;
{
@@ -1537,13 +1545,6 @@ bool LLAppViewer::frame()
}
}
- if ((LLStartUp::getStartupState() >= STATE_CLEANUP) &&
- (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD))
- {
- gFrameStalls++;
- }
- frameTimer.reset();
-
resumeMainloopTimeout();
pingMainloopTimeout("Main:End");
@@ -3109,7 +3110,7 @@ void LLAppViewer::initUpdater()
mUpdater->initialize(channel,
version,
gPlatform,
- getOSInfo().getOSVersionString(),
+ LLOSInfo::instance().getOSVersionString(),
unique_id,
willing_to_test
);
@@ -3191,10 +3192,13 @@ bool LLAppViewer::initWindow()
#ifdef LL_DARWIN
- //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
- if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7)
- if ( getOSInfo().mMinorVer == 6 && getOSInfo().mBuild < 8 )
- gViewerWindow->getWindow()->setOldResize(true);
+ //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
+ LLOSInfo& os_info = LLOSInfo::instance();
+ if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7)
+ {
+ if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 )
+ gViewerWindow->getWindow()->setOldResize(true);
+ }
#endif
if (gSavedSettings.getBOOL("WindowMaximized"))
@@ -3336,15 +3340,24 @@ LLSD LLAppViewer::getViewerInfo() const
info["CPU"] = gSysCPU.getCPUString();
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
// Moved hack adjustment to Windows memory size into llsys.cpp
- info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
+ info["OS_VERSION"] = LLOSInfo::instance().getOSString();
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
#if LL_WINDOWS
- LLSD driver_info = gDXHardware.getDisplayInfo();
- if (driver_info.has("DriverVersion"))
+ std::string drvinfo = gDXHardware.getDriverVersionWMI();
+ if (!drvinfo.empty())
+ {
+ info["GRAPHICS_DRIVER_VERSION"] = drvinfo;
+ }
+ else
{
- info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
+ LL_WARNS("Driver version")<< "Cannot get driver version from getDriverVersionWMI" << LL_ENDL;
+ LLSD driver_info = gDXHardware.getDisplayInfo();
+ if (driver_info.has("DriverVersion"))
+ {
+ info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
+ }
}
#endif
@@ -3372,7 +3385,7 @@ LLSD LLAppViewer::getViewerInfo() const
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
bool want_fullname = true;
- info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
+ info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : "Undefined";
if(LLVoiceClient::getInstance()->voiceEnabled())
{
LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion();
@@ -3509,6 +3522,70 @@ std::string LLAppViewer::getViewerInfoString() const
return support.str();
}
+std::string LLAppViewer::getShortViewerInfoString() const
+{
+ std::ostringstream support;
+ LLSD info(getViewerInfo());
+
+ support << LLTrans::getString("APP_NAME") << " " << info["VIEWER_VERSION_STR"].asString();
+ support << " (" << info["CHANNEL"].asString() << ")";
+ if (info.has("BUILD_CONFIG"))
+ {
+ support << "\n" << "Build Configuration " << info["BUILD_CONFIG"].asString();
+ }
+ if (info.has("REGION"))
+ {
+ support << "\n\n" << "You are at " << ll_vector3_from_sd(info["POSITION_LOCAL"]) << " in " << info["REGION"].asString();
+ support << " located at " << info["HOSTNAME"].asString() << " (" << info["HOSTIP"].asString() << ")";
+ support << "\n" << "SLURL: " << info["SLURL"].asString();
+ support << "\n" << "(Global coordinates " << ll_vector3_from_sd(info["POSITION"]) << ")";
+ support << "\n" << info["SERVER_VERSION"].asString();
+ }
+
+ support << "\n\n" << "CPU: " << info["CPU"].asString();
+ support << "\n" << "Memory: " << info["MEMORY_MB"].asString() << " MB";
+ support << "\n" << "OS: " << info["OS_VERSION"].asString();
+ support << "\n" << "Graphics Card: " << info["GRAPHICS_CARD"].asString() << " (" << info["GRAPHICS_CARD_VENDOR"].asString() << ")";
+
+ if (info.has("GRAPHICS_DRIVER_VERSION"))
+ {
+ support << "\n" << "Windows Graphics Driver Version: " << info["GRAPHICS_DRIVER_VERSION"].asString();
+ }
+
+ support << "\n" << "OpenGL Version: " << info["OPENGL_VERSION"].asString();
+
+ support << "\n\n" << "Window size:" << info["WINDOW_WIDTH"].asString() << "x" << info["WINDOW_HEIGHT"].asString();
+ support << "\n" << "Language: " << LLUI::getLanguage();
+ support << "\n" << "Font Size Adjustment: " << info["FONT_SIZE_ADJUSTMENT"].asString() << "pt";
+ support << "\n" << "UI Scaling: " << info["UI_SCALE"].asString();
+ support << "\n" << "Draw distance: " << info["DRAW_DISTANCE"].asString();
+ support << "\n" << "Bandwidth: " << info["NET_BANDWITH"].asString() << "kbit/s";
+ support << "\n" << "LOD factor: " << info["LOD_FACTOR"].asString();
+ support << "\n" << "Render quality: " << info["RENDER_QUALITY"].asString() << " / 7";
+ support << "\n" << "ALM: " << info["GPU_SHADERS"].asString();
+ support << "\n" << "Texture memory: " << info["TEXTURE_MEMORY"].asString() << "MB";
+ support << "\n" << "VFS (cache) creation time: " << info["VFS_TIME"].asString();
+
+ support << "\n\n" << "J2C Decoder: " << info["J2C_VERSION"].asString();
+ support << "\n" << "Audio Driver: " << info["AUDIO_DRIVER_VERSION"].asString();
+ support << "\n" << "LLCEFLib/CEF: " << info["LLCEFLIB_VERSION"].asString();
+ support << "\n" << "LibVLC: " << info["LIBVLC_VERSION"].asString();
+ support << "\n" << "Voice Server: " << info["VOICE_VERSION"].asString();
+
+ if (info.has("PACKETS_IN"))
+ {
+ support << "\n" << "Packets Lost: " << info["PACKETS_LOST"].asInteger() << "/" << info["PACKETS_IN"].asInteger();
+ F32 packets_pct = info["PACKETS_PCT"].asReal();
+ support << " (" << ll_round(packets_pct, 0.001f) << "%)";
+ }
+
+ LLSD substitution;
+ substitution["datetime"] = (S32)time(NULL);
+ support << "\n" << LLTrans::getString("AboutTime", substitution);
+
+ return support.str();
+}
+
void LLAppViewer::cleanupSavedSettings()
{
gSavedSettings.setBOOL("MouseSun", FALSE);
@@ -3585,7 +3662,7 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
- gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
+ gDebugInfo["OSInfo"] = LLOSInfo::instance().getOSStringSimple();
// The user is not logged on yet, but record the current grid choice login url
// which may have been the intended grid.
@@ -3627,8 +3704,8 @@ void LLAppViewer::writeSystemInfo()
// query some system information
LL_INFOS("SystemInfo") << "CPU info:\n" << gSysCPU << LL_ENDL;
LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;
- LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
- LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
+ LL_INFOS("SystemInfo") << "OS: " << LLOSInfo::instance().getOSStringSimple() << LL_ENDL;
+ LL_INFOS("SystemInfo") << "OS info: " << LLOSInfo::instance() << LL_ENDL;
gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName();
@@ -3660,7 +3737,7 @@ void getFileList()
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
{
std::string fullname = pathname + *iter;
- std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
+ llifstream fdat( fullname.c_str(), std::ifstream::binary);
if (fdat)
{
char buf[5];
@@ -4348,6 +4425,7 @@ bool LLAppViewer::initCache()
if (gSavedSettings.getBOOL("PurgeCacheOnStartup") ||
gSavedSettings.getBOOL("PurgeCacheOnNextStartup"))
{
+ LL_INFOS("AppCache") << "Startup cache purge requested: " << (gSavedSettings.getBOOL("PurgeCacheOnStartup") ? "ALWAYS" : "ONCE") << LL_ENDL;
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false);
mPurgeCache = true;
// STORM-1141 force purgeAllTextures to get called to prevent a crash here. -brad
@@ -4362,6 +4440,7 @@ bool LLAppViewer::initCache()
std::string new_cache_location = gSavedSettings.getString("NewCacheLocation");
if (new_cache_location != cache_location)
{
+ LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
purgeCache(); // purge old cache
gSavedSettings.setString("CacheLocation", new_cache_location);
@@ -4387,23 +4466,15 @@ bool LLAppViewer::initCache()
// Init the texture cache
// Allocate 80% of the cache size for textures
const S32 MB = 1024 * 1024;
- const S64 MIN_CACHE_SIZE = 64 * MB;
+ const S64 MIN_CACHE_SIZE = 256 * MB;
const S64 MAX_CACHE_SIZE = 9984ll * MB;
const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB
S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB;
cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
- S64 texture_cache_size = ((cache_size * 8) / 10);
- S64 vfs_size = cache_size - texture_cache_size;
-
- if (vfs_size > MAX_VFS_SIZE)
- {
- // Give the texture cache more space, since the VFS can't be bigger than 1GB.
- // This happens when the user's CacheSize setting is greater than 5GB.
- vfs_size = MAX_VFS_SIZE;
- texture_cache_size = cache_size - MAX_VFS_SIZE;
- }
+ S64 vfs_size = llmin((S64)((cache_size * 2) / 10), MAX_VFS_SIZE);
+ S64 texture_cache_size = cache_size - vfs_size;
S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
texture_cache_size -= extra;
@@ -5576,6 +5647,19 @@ void LLAppViewer::disconnectViewer()
LLUrlEntryParcel::setDisconnected(gDisconnected);
}
+bool LLAppViewer::onChangeFrameLimit(LLSD const & evt)
+{
+ if (evt.asInteger() > 0)
+ {
+ mMinMicroSecPerFrame = 1000000 / evt.asInteger();
+ }
+ else
+ {
+ mMinMicroSecPerFrame = 0;
+ }
+ return false;
+}
+
void LLAppViewer::forceErrorLLError()
{
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 7bb3c32c51..520ff68a02 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -98,11 +98,10 @@ public:
void writeDebugInfo(bool isStatic=true);
- const LLOSInfo& getOSInfo() const { return mSysOSInfo; }
-
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
LLSD getViewerInfo() const;
std::string getViewerInfoString() const;
+ std::string getShortViewerInfoString() const;
// Report true if under the control of a debugger. A null-op default.
virtual bool beingDebugged() { return false; }
@@ -255,6 +254,8 @@ private:
void sendLogoutRequest();
void disconnectViewer();
+ bool onChangeFrameLimit(LLSD const & evt);
+
// *FIX: the app viewer class should be some sort of singleton, no?
// Perhaps its child class is the singleton and this should be an abstract base.
static LLAppViewer* sInstance;
@@ -267,8 +268,6 @@ private:
std::string mLogoutMarkerFileName;
LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running.
-
- LLOSInfo mSysOSInfo;
bool mReportedCrash;
std::string mServerReleaseNotesURL;
@@ -316,6 +315,8 @@ private:
LLAppCoreHttp mAppCoreHttp;
bool mIsFirstRun;
+ U64 mMinMicroSecPerFrame; // frame throttling
+
//---------------------------------------------
//*NOTE: Mani - legacy updater stuff
// Still useable?
@@ -371,7 +372,6 @@ extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4
extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
-extern U32 gFrameStalls;
extern LLTimer gRenderStartTime;
extern LLFrameTimer gForegroundTime;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 5107030476..284a39301b 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -694,10 +694,10 @@ void LLAppViewerWin32::initCrashReporting(bool reportFreeze)
PROCESS_INFORMATION processInfo;
std::wstring exe_wstr;
- exe_wstr=wstringize(exe_path);
+ exe_wstr = utf8str_to_utf16str(exe_path);
std::wstring arg_wstr;
- arg_wstr=wstringize(arg_str);
+ arg_wstr = utf8str_to_utf16str(arg_str);
LL_INFOS("CrashReport") << "Creating crash reporter process " << exe_path << " with params: " << arg_str << LL_ENDL;
if(CreateProcess(exe_wstr.c_str(),
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 219d9da01f..8fe684ad79 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -1005,7 +1005,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
}
// static
-void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
+void LLAvatarActions::toggleMute(const LLUUID& id, U32 flags)
{
LLAvatarName av_name;
LLAvatarNameCache::get(id, &av_name);
@@ -1016,15 +1016,21 @@ void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
LLMute mute(id, av_name.getUserName(), LLMute::AGENT);
if (!is_muted)
{
- mute_list->add(mute, LLMute::flagVoiceChat);
+ mute_list->add(mute, flags);
}
else
{
- mute_list->remove(mute, LLMute::flagVoiceChat);
+ mute_list->remove(mute, flags);
}
}
// static
+void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
+{
+ toggleMute(id, LLMute::flagVoiceChat);
+}
+
+// static
bool LLAvatarActions::canOfferTeleport(const LLUUID& id)
{
// First use LLAvatarTracker::isBuddy()
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 256d44d820..b56d5b0fb9 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -131,6 +131,11 @@ public:
static void toggleBlock(const LLUUID& id);
/**
+ * Mute/unmute avatar.
+ */
+ static void toggleMute(const LLUUID& id, U32 flags);
+
+ /**
* Block/unblock the avatar voice.
*/
static void toggleMuteVoice(const LLUUID& id);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 9798ef3529..a9e8e77a0b 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -38,10 +38,14 @@
#include "llpanel.h"
#include "lluictrlfactory.h"
#include "llscrollcontainer.h"
-#include "llavatariconctrl.h"
-#include "llcallingcard.h" //for LLAvatarTracker
+#include "llagent.h"
#include "llagentdata.h"
#include "llavataractions.h"
+#include "llavatariconctrl.h"
+#include "llcallingcard.h" //for LLAvatarTracker
+#include "llgroupactions.h"
+#include "llgroupmgr.h"
+#include "llspeakers.h" //for LLIMSpeakerMgr
#include "lltrans.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
@@ -49,7 +53,6 @@
#include "llstylemap.h"
#include "llslurl.h"
#include "lllayoutstack.h"
-#include "llagent.h"
#include "llnotificationsutil.h"
#include "lltoastnotifypanel.h"
#include "lltooltip.h"
@@ -61,7 +64,6 @@
#include "llurlaction.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
-#include "llmutelist.h"
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
@@ -187,6 +189,161 @@ public:
return false;
}
+ void banGroupMember(const LLUUID& participant_uuid)
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return;
+ }
+
+ gdatap->banMemberById(participant_uuid);
+ }
+
+ bool canBanInGroup()
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return false;
+ }
+
+ if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ bool canBanGroupMember(const LLUUID& participant_uuid)
+ {
+ LLUUID group_uuid = mSessionID;
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid);
+ if (!gdatap)
+ {
+ // Not a group
+ return false;
+ }
+
+ if (gdatap->mPendingBanRequest)
+ {
+ return false;
+ }
+
+ if (gAgentID == getAvatarId())
+ {
+ //Don't ban self
+ return false;
+ }
+
+ if (gdatap->isRoleMemberDataComplete())
+ {
+ if (gdatap->mMembers.size())
+ {
+ LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(participant_uuid);
+ if (mi != gdatap->mMembers.end())
+ {
+ LLGroupMemberData* member_data = (*mi).second;
+ // Is the member an owner?
+ if (member_data && member_data->isInRole(gdatap->mOwnerRole))
+ {
+ return false;
+ }
+
+ if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+ }
+ }
+ }
+
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(participant_uuid).get();
+
+ if (speakerp
+ && gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER)
+ && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool isGroupModerator()
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (!speaker_mgr)
+ {
+ LL_WARNS() << "Speaker manager is missing" << LL_ENDL;
+ return false;
+ }
+
+ // Is session a group call/chat?
+ if(gAgent.isInGroup(mSessionID))
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(gAgentID).get();
+
+ // Is agent a moderator?
+ return speakerp && speakerp->mIsModerator;
+ }
+
+ return false;
+ }
+
+ bool canModerate(const std::string& userdata)
+ {
+ // only group moderators can perform actions related to this "enable callback"
+ if (!isGroupModerator() || gAgentID == getAvatarId())
+ {
+ return false;
+ }
+
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (!speaker_mgr)
+ {
+ return false;
+ }
+
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (!speakerp)
+ {
+ return false;
+ }
+
+ bool voice_channel = speakerp->isInVoiceChannel();
+
+ if ("can_moderate_voice" == userdata)
+ {
+ return voice_channel;
+ }
+ else if ("can_mute" == userdata)
+ {
+ return voice_channel && (speakerp->mStatus != LLSpeaker::STATUS_MUTED);
+ }
+ else if ("can_unmute" == userdata)
+ {
+ return speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+ }
+ else if ("can_allow_text_chat" == userdata)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
void onAvatarIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -245,11 +402,36 @@ public:
}
else if(level == "block_unblock")
{
- mute(getAvatarId(), LLMute::flagVoiceChat);
+ LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagVoiceChat);
}
else if(level == "mute_unmute")
{
- mute(getAvatarId(), LLMute::flagTextChat);
+ LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagTextChat);
+ }
+ else if(level == "toggle_allow_text_chat")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ speaker_mgr->toggleAllowTextChat(getAvatarId());
+ }
+ else if(level == "group_mute")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ speaker_mgr->moderateVoiceParticipant(getAvatarId(), false);
+ }
+ }
+ else if(level == "group_unmute")
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ speaker_mgr->moderateVoiceParticipant(getAvatarId(), true);
+ }
+ }
+ else if(level == "ban_member")
+ {
+ banGroupMember(getAvatarId());
}
}
@@ -265,24 +447,71 @@ public:
{
return LLMuteList::getInstance()->isMuted(getAvatarId(), LLMute::flagTextChat);
}
+ else if (level == "is_allowed_text_chat")
+ {
+ if (gAgent.isInGroup(mSessionID))
+ {
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if(speaker_mgr)
+ {
+ const LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId());
+ if (NULL != speakerp)
+ {
+ return !speakerp->mModeratorMutedText;
+ }
+ }
+ }
+ return false;
+ }
return false;
}
- void mute(const LLUUID& participant_id, U32 flags)
+ bool onAvatarIconContextMenuItemEnabled(const LLSD& userdata)
{
- BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
- LLAvatarName av_name;
- LLAvatarNameCache::get(participant_id, &av_name);
- LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
+ std::string level = userdata.asString();
- if (!is_muted)
+ if (level == "can_allow_text_chat" || level == "can_mute" || level == "can_unmute")
{
- LLMuteList::getInstance()->add(mute, flags);
+ return canModerate(userdata);
}
- else
+ else if (level == "can_ban_member")
{
- LLMuteList::getInstance()->remove(mute, flags);
+ return canBanGroupMember(getAvatarId());
}
+ return false;
+ }
+
+ bool onAvatarIconContextMenuItemVisible(const LLSD& userdata)
+ {
+ std::string level = userdata.asString();
+
+ if (level == "show_mute")
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (speakerp)
+ {
+ return speakerp->isInVoiceChannel() && speakerp->mStatus != LLSpeaker::STATUS_MUTED;
+ }
+ }
+ return false;
+ }
+ else if (level == "show_unmute")
+ {
+ LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
+ if (speaker_mgr)
+ {
+ LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get();
+ if (speakerp)
+ {
+ return speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+ }
+ }
+ return false;
+ }
+ return false;
}
BOOL postBuild()
@@ -292,6 +521,8 @@ public:
registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
+ registrar_enable.add("AvatarIcon.Enable", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemEnabled, this, _2));
+ registrar_enable.add("AvatarIcon.Visible", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemVisible, this, _2));
registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
@@ -567,9 +798,14 @@ protected:
if(menu)
{
bool is_friend = LLAvatarActions::isFriend(mAvatarID);
+ bool is_group_session = gAgent.isInGroup(mSessionID);
menu->setItemEnabled("Add Friend", !is_friend);
menu->setItemEnabled("Remove Friend", is_friend);
+ menu->setItemVisible("Moderator Options Separator", is_group_session && isGroupModerator());
+ menu->setItemVisible("Moderator Options", is_group_session && isGroupModerator());
+ menu->setItemVisible("Group Ban Separator", is_group_session && canBanInGroup());
+ menu->setItemVisible("BanMember", is_group_session && canBanInGroup());
if(gAgentID == mAvatarID)
{
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index af7b50802c..3868bafae4 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -70,6 +70,9 @@ public:
virtual const std::string& getName() const { return mName; }
virtual const std::string& getDisplayName() const { return mName; }
virtual const std::string& getSearchableName() const { return mName; }
+ virtual std::string getSearchableDescription() const { return LLStringUtil::null; }
+ virtual std::string getSearchableCreatorName() const { return LLStringUtil::null; }
+ virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;}
virtual const LLUUID& getUUID() const { return mUUID; }
virtual time_t getCreationDate() const { return 0; }
virtual LLPointer<LLUIImage> getIcon() const { return NULL; }
diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp
index e422581129..e56a67f8d1 100644
--- a/indra/newview/llestateinfomodel.cpp
+++ b/indra/newview/llestateinfomodel.cpp
@@ -116,7 +116,7 @@ void LLEstateInfoModel::notifyCommit()
// tries to send estate info using a cap; returns true if it succeeded
bool LLEstateInfoModel::commitEstateInfoCaps()
{
- std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
+ std::string url = gAgent.getRegionCapability("EstateChangeInfo");
if (url.empty())
{
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 711a87dc99..d657f04457 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -407,6 +407,7 @@ void LLExpandableTextBox::collapseTextBox()
setRect(mCollapsedRect);
updateTextBoxRect();
+ gViewerWindow->removePopup(this);
}
void LLExpandableTextBox::onFocusLost()
@@ -434,8 +435,6 @@ void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent
mExpanded = false;
LLUICtrl::reshape(width, height, called_from_parent);
updateTextBoxRect();
-
- gViewerWindow->removePopup(this);
}
void LLExpandableTextBox::setValue(const LLSD& value)
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index a69b3b7dc7..4110971fa5 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -463,7 +463,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
{ //read base log into memory
S32 i = 0;
- std::ifstream is(base.c_str());
+ llifstream is(base.c_str());
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
{
base_data[i++] = cur;
@@ -476,7 +476,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
{ //read current log into memory
S32 i = 0;
- std::ifstream is(target.c_str());
+ llifstream is(target.c_str());
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
{
cur_data[i++] = cur;
@@ -821,8 +821,8 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target, std::string output)
{
// Open baseline and current target, exit if one is inexistent
- std::ifstream base_is(baseline.c_str());
- std::ifstream target_is(target.c_str());
+ llifstream base_is(baseline.c_str());
+ llifstream target_is(target.c_str());
if (!base_is.is_open() || !target_is.is_open())
{
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
@@ -840,7 +840,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
target_is.close();
//output comparison
- std::ofstream os(output.c_str());
+ llofstream os(output.c_str());
LLSD::Real session_time = current["SessionTime"].asReal();
os <<
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index d4ba230feb..ae4ce298a0 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -486,7 +486,7 @@ void LLFeatureManager::fetchFeatureTableCoro(std::string tableName)
#if LL_WINDOWS
- std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ std::string os_string = LLOSInfo::instance().getOSStringSimple();
std::string filename;
if (os_string.find("Microsoft Windows XP") == 0)
@@ -767,7 +767,7 @@ void LLFeatureManager::applyBaseMasks()
}
#if LL_DARWIN
- const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo();
+ const LLOSInfo& osInfo = LLOSInfo::instance();
if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7)
{
maskFeatures("OSX_10_6_8");
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index a7236d1778..7e92643b93 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -544,11 +544,18 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
send_agent_pause();
{
// NOTA BENE: hitting the file dialog triggers a window focus event, destroying the selection manager!!
- success = GetSaveFileName(&mOFN);
- if (success)
+ try
{
- std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
- mFiles.push_back(filename);
+ success = GetSaveFileName(&mOFN);
+ if (success)
+ {
+ std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
+ mFiles.push_back(filename);
+ }
+ }
+ catch (...)
+ {
+ LOG_UNHANDLED_EXCEPTION("");
}
gKeyboard->resetKeys();
}
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index b6e61f83b1..e075a311c2 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -43,9 +43,9 @@
#include "llworld.h"
#include "llvoavatar.h"
+static const F32 SEC_PER_FLEXI_FRAME = 1.f / 60.f; // 60 flexi updates per second
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
-std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
@@ -56,7 +56,10 @@ static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// constructor
//-----------------------------------------------
LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectData* attributes) :
- mVO(vo), mAttributes(attributes)
+ mVO(vo),
+ mAttributes(attributes),
+ mLastFrameNum(0),
+ mLastUpdatePeriod(0)
{
static U32 seed = 0;
mID = seed++;
@@ -64,7 +67,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mUpdated = FALSE;
mInitializedRes = -1;
mSimulateRes = 0;
- mFrameNum = 0;
mCollisionSphereRadius = 0.f;
mRenderRes = -1;
@@ -75,7 +77,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mInstanceIndex = sInstanceList.size();
sInstanceList.push_back(this);
- sUpdateDelay.push_back(0);
}//-----------------------------------------------
LLVolumeImplFlexible::~LLVolumeImplFlexible()
@@ -86,28 +87,28 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible()
{
sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
- sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
}
sInstanceList.pop_back();
- sUpdateDelay.pop_back();
}
//static
void LLVolumeImplFlexible::updateClass()
{
- std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
+ U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
iter != sInstanceList.end();
++iter)
{
- --(*delay_iter);
- if (*delay_iter <= 0)
+ // Note: by now update period might have changed
+ if ((*iter)->mRenderRes == -1
+ || (*iter)->mLastFrameNum + (*iter)->mLastUpdatePeriod <= virtual_frame_num
+ || (*iter)->mLastFrameNum > virtual_frame_num) //time issues, overflow
{
(*iter)->doIdleUpdate();
}
- ++delay_iter;
}
}
@@ -334,15 +335,12 @@ void LLVolumeImplFlexible::updateRenderRes()
// updated every time step. In the future, perhaps there could be an
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
-static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
- //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
-
//ensure drawable is active
drawablep->makeActive();
@@ -354,15 +352,20 @@ void LLVolumeImplFlexible::doIdleUpdate()
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
- sUpdateDelay[mInstanceIndex] = 0;
}
else
{
F32 pixel_area = mVO->getPixelArea();
+ // Note: Flexies afar will be rarely updated, closer ones will be updated more frequently.
+ // But frequency differences are extremely noticeable, so consider modifying update factor,
+ // or at least clamping value a bit more from both sides.
U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
- update_period = llclamp(update_period, 0U, 32U);
+ update_period = llclamp(update_period, 1U, 32U);
+
+ // We control how fast flexies update, buy splitting updates among frames
+ U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
if (visible)
{
@@ -370,42 +373,44 @@ void LLVolumeImplFlexible::doIdleUpdate()
pixel_area > 256.f)
{
U32 id;
-
if (mVO->isRootEdit())
{
id = mID;
}
else
{
- LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
+ LLVOVolume* parent = (LLVOVolume*)mVO->getParent();
id = parent->getVolumeInterfaceID();
}
- if (mVO->isRootEdit())
- {
- id = mID;
- }
- else
- {
- LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
- id = parent->getVolumeInterfaceID();
- }
- if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
- {
- sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
+ // Throttle flexies and spread load by preventing flexies from updating in same frame
+ // Shows how many frames we need to wait before next update
+ U64 throttling_delay = (virtual_frame_num + id) % update_period;
- updateRenderRes();
+ if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
+ || (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
+ {
+ // We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
+ // If happened too late, subtract throttling_delay (it is zero otherwise)
+ mLastFrameNum = virtual_frame_num - throttling_delay;
+
+ // Store update period for updateClass()
+ // Note: Consider substituting update_period with mLastUpdatePeriod everywhere.
+ mLastUpdatePeriod = update_period;
+
+ updateRenderRes();
- gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ }
+ }
}
- }
- }
else
{
- sUpdateDelay[mInstanceIndex] = (S32) update_period;
- }
-}
+ mLastFrameNum = virtual_frame_num;
+ mLastUpdatePeriod = update_period;
+ }
+ }
}
}
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index a00551df8e..9383ab03ae 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -72,7 +72,6 @@ class LLVolumeImplFlexible : public LLVolumeInterface
{
private:
static std::vector<LLVolumeImplFlexible*> sInstanceList;
- static std::vector<S32> sUpdateDelay;
S32 mInstanceIndex;
public:
@@ -133,7 +132,8 @@ private:
S32 mInitializedRes;
S32 mSimulateRes;
S32 mRenderRes;
- U32 mFrameNum;
+ U64 mLastFrameNum;
+ U32 mLastUpdatePeriod;
LLVector3 mCollisionSpherePosition;
F32 mCollisionSphereRadius;
U32 mID;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index c394eb815b..c5561fe011 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -496,6 +496,18 @@ void LLFloaterAvatarPicker::find()
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
+ size_t separator_index = text.find_first_of(" ._");
+ if (separator_index != text.npos)
+ {
+ std::string first = text.substr(0, separator_index);
+ std::string last = text.substr(separator_index+1, text.npos);
+ LLStringUtil::trim(last);
+ if("Resident" == last)
+ {
+ text = first;
+ }
+ }
+
mQueryID.generate();
std::string url;
@@ -739,12 +751,13 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
if (search_results->isEmpty())
{
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = getChild<LLUICtrl>("Edit")->getValue().asString();
+ std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
- item["columns"][0]["value"] = getString("not_found", map);
+ item["columns"][0]["value"] = name;
+ item["columns"][1]["column"] = "username";
+ item["columns"][1]["value"] = getString("not_found_text");
search_results->addElement(item);
search_results->setEnabled(false);
getChildView("ok_btn")->setEnabled(false);
diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp
index 2bae7d63aa..8bdb70a20d 100644
--- a/indra/newview/llfloateravatarrendersettings.cpp
+++ b/indra/newview/llfloateravatarrendersettings.cpp
@@ -27,11 +27,13 @@
#include "llfloateravatarrendersettings.h"
+#include "llagent.h"
#include "llavatarnamecache.h"
#include "llfloateravatarpicker.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"
#include "llnamelistctrl.h"
+#include "llnotificationsutil.h"
#include "llmenugl.h"
#include "lltrans.h"
#include "llviewerobjectlist.h"
@@ -268,6 +270,11 @@ void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata)
void LLFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting)
{
if (ids.empty()) return;
+ if(ids[0] == gAgentID)
+ {
+ LLNotificationsUtil::add("AddSelfRenderExceptions");
+ return;
+ }
setAvatarRenderSetting(ids[0], visual_setting);
}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 3522932d03..333765f99f 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1150,11 +1150,11 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
}
else if ("block_unblock" == command)
{
- toggleMute(userID, LLMute::flagVoiceChat);
+ LLAvatarActions::toggleMute(userID, LLMute::flagVoiceChat);
}
else if ("mute_unmute" == command)
{
- toggleMute(userID, LLMute::flagTextChat);
+ LLAvatarActions::toggleMute(userID, LLMute::flagTextChat);
}
else if ("selected" == command || "mute_all" == command || "unmute_all" == command)
{
@@ -2096,24 +2096,6 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
}
}
-void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags)
-{
- BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
-
- LLAvatarName av_name;
- LLAvatarNameCache::get(participant_id, &av_name);
- LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
-
- if (!is_muted)
- {
- LLMuteList::getInstance()->add(mute, flags);
- }
- else
- {
- LLMuteList::getInstance()->remove(mute, flags);
- }
-}
-
void LLFloaterIMContainer::openNearbyChat()
{
// If there's only one conversation in the container and that conversation is the nearby chat
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 60cef83d9a..90fc0c2bdd 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -176,7 +176,6 @@ private:
void moderateVoiceAllParticipants(bool unmute);
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
void toggleAllowTextChat(const LLUUID& participant_uuid);
- void toggleMute(const LLUUID& participant_id, U32 flags);
void banSelectedMember(const LLUUID& participant_uuid);
void openNearbyChat();
bool isParticipantListExpanded();
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 7895a5ff48..b2568abb83 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -87,6 +87,10 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
{ "/shout" , CHAT_TYPE_SHOUT}
};
+bool cb_do_nothing()
+{
+ return false;
+}
LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
: LLFloaterIMSessionTab(LLSD(LLUUID::null)),
@@ -97,6 +101,12 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
mIsP2PChat = false;
mIsNearbyChat = true;
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+
+ // Required by LLFloaterIMSessionTab::mGearBtn
+ // But nearby floater has no 'per agent' menu items,
+ mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&cb_do_nothing));
+ mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&cb_do_nothing));
+ mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&cb_do_nothing));
}
//static
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 2cd94c592a..3aee08482b 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -46,6 +46,10 @@
const F32 REFRESH_INTERVAL = 1.0f;
+void cb_group_do_nothing()
+{
+}
+
LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
: LLTransientDockableFloater(NULL, false, session_id),
mIsP2PChat(false),
@@ -82,6 +86,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2));
mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2));
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2));
+ mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&cb_group_do_nothing));
}
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4352909706..88b3fb7b96 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -503,7 +503,7 @@ BOOL LLPanelLandGeneral::postBuild()
// note: on region change this will not be re checked, should not matter on Agni as
// 99% of the time all regions will return the same caps. In case of an erroneous setting
// to enabled the floater will just throw an error when trying to get it's cap
- std::string url = gAgent.getRegion()->getCapability("LandResources");
+ std::string url = gAgent.getRegionCapability("LandResources");
if (!url.empty())
{
if(mBtnScriptLimits)
@@ -2181,17 +2181,8 @@ void LLPanelLandOptions::refreshSearch()
&& region
&& !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH));
- // There is a bug with this panel whereby the Show Directory bit can be
- // slammed off by the Region based on an override. Since this data is cached
- // locally the change will not reflect in the panel, which could cause confusion
- // A workaround for this is to flip the bit off in the locally cached version
- // when we detect a mismatch case.
- if(!can_change && parcel->getParcelFlag(PF_SHOW_DIRECTORY))
- {
- parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
- }
BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
- mCheckShowDirectory ->set(show_directory);
+ mCheckShowDirectory->set(show_directory);
// Set by string in case the order in UI doesn't match the order by index.
LLParcel::ECategory cat = parcel->getCategory();
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index 3f80d6f1a4..10cce3bd22 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -41,16 +41,13 @@ LLFloaterLinkReplace::LLFloaterLinkReplace(const LLSD& key)
mRemainingItems(0),
mSourceUUID(LLUUID::null),
mTargetUUID(LLUUID::null),
- mInstance(NULL),
mBatchSize(gSavedSettings.getU32("LinkReplaceBatchSize"))
{
mEventTimer.stop();
- mInstance = this;
}
LLFloaterLinkReplace::~LLFloaterLinkReplace()
{
- mInstance = NULL;
}
BOOL LLFloaterLinkReplace::postBuild()
@@ -180,11 +177,9 @@ void LLFloaterLinkReplace::onStartClicked()
}
}
-void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id)
{
LL_DEBUGS() << "Inventory link replace:" << LL_NEWLINE
<< " - old_item_id = " << old_item_id.asString() << LL_NEWLINE
@@ -239,20 +234,21 @@ void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
outfit_update_folder = outfit_folder_id;
}
- LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
+ LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, floater_handle, outfit_update_folder));
remove_inventory_object(old_item_id, cb);
}
-void LLFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id)
{
if (outfit_folder_id.notNull())
{
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
}
- if (mInstance)
+ if (!floater_handle.isDead())
{
- decreaseOpenItemCount();
+ floater_handle.get()->decreaseOpenItemCount();
}
}
@@ -324,7 +320,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
LLInventoryObject::const_object_list_t obj_array;
obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item));
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::linkCreatedCallback,
- this,
+ getDerivedHandle<LLFloaterLinkReplace>(),
source_item->getUUID(),
target_item->getUUID(),
needs_wearable_ordering_update,
diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h
index 377dd1d450..dd5c301206 100644
--- a/indra/newview/llfloaterlinkreplace.h
+++ b/indra/newview/llfloaterlinkreplace.h
@@ -98,12 +98,9 @@ private:
void updateFoundLinks();
void processBatch(LLInventoryModel::item_array_t items);
- void linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id);
- void itemRemovedCallback(const LLUUID& outfit_folder_id);
+ static void linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id);
+ static void itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id);
void onSourceItemDrop(const LLUUID& source_item_id);
void onTargetItemDrop(const LLUUID& target_item_id);
@@ -120,8 +117,6 @@ private:
U32 mBatchSize;
LLInventoryModel::item_array_t mRemainingInventoryItems;
-
- LLFloaterLinkReplace* mInstance;
};
#endif // LL_FLOATERLINKREPLACE_H
diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp
index 7cdfd56d9a..4427e913e3 100644
--- a/indra/newview/llfloatermodeluploadbase.cpp
+++ b/indra/newview/llfloatermodeluploadbase.cpp
@@ -41,7 +41,7 @@ LLFloaterModelUploadBase::LLFloaterModelUploadBase(const LLSD& key)
void LLFloaterModelUploadBase::requestAgentUploadPermissions()
{
std::string capability = "MeshUploadFlag";
- std::string url = gAgent.getRegion()->getCapability(capability);
+ std::string url = gAgent.getRegionCapability(capability);
if (!url.empty())
{
diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp
index 271fb2f9a3..e817589622 100644
--- a/indra/newview/llfloaterregiondebugconsole.cpp
+++ b/indra/newview/llfloaterregiondebugconsole.cpp
@@ -116,11 +116,11 @@ BOOL LLFloaterRegionDebugConsole::postBuild()
mOutput = getChild<LLTextEditor>("region_debug_console_output");
- std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
+ std::string url = gAgent.getRegionCapability("SimConsoleAsync");
if (url.empty())
{
// Fall back to see if the old API is supported.
- url = gAgent.getRegion()->getCapability("SimConsole");
+ url = gAgent.getRegionCapability("SimConsole");
if (url.empty())
{
mOutput->appendText(
@@ -139,11 +139,11 @@ void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param)
LLLineEditor* input = static_cast<LLLineEditor*>(ctrl);
std::string text = input->getText() + "\n";
- std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
+ std::string url = gAgent.getRegionCapability("SimConsoleAsync");
if (url.empty())
{
// Fall back to the old API
- url = gAgent.getRegion()->getCapability("SimConsole");
+ url = gAgent.getRegionCapability("SimConsole");
if (url.empty())
{
text += CONSOLE_UNAVAILABLE + PROMPT;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index c33dee5fb4..af68a2aae1 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -238,7 +238,7 @@ BOOL LLFloaterRegionInfo::postBuild()
return TRUE;
}
- if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
+ if(!gAgent.getRegionCapability("RegionExperiences").empty())
{
panel = new LLPanelRegionExperiences;
mInfoPanels.push_back(panel);
@@ -879,7 +879,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
void LLFloaterRegionInfo::requestMeshRezInfo()
{
- std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
+ std::string sim_console_url = gAgent.getRegionCapability("SimConsoleAsync");
if (!sim_console_url.empty())
{
@@ -907,7 +907,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
// First try using a Cap. If that fails use the old method.
LLSD body;
- std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
+ std::string url = gAgent.getRegionCapability("DispatchRegionInfo");
if (!url.empty())
{
body["block_terraform"] = getChild<LLUICtrl>("block_terraform_check")->getValue();
@@ -2290,13 +2290,15 @@ BOOL LLPanelEstateInfo::postBuild()
getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this));
+ getChild<LLUICtrl>("externally_visible_radio")->setFocus(TRUE);
+
return LLPanelRegionInfo::postBuild();
}
void LLPanelEstateInfo::refresh()
{
// Disable access restriction controls if they make no sense.
- bool public_access = getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex();
+ bool public_access = ("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
getChildView("Only Allow")->setEnabled(public_access);
getChildView("limit_payment")->setEnabled(public_access);
@@ -2317,7 +2319,7 @@ void LLPanelEstateInfo::refreshFromEstate()
getChild<LLUICtrl>("estate_name")->setValue(estate_info.getName());
setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString());
- getChild<LLRadioGroup>("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0);
+ getChild<LLUICtrl>("externally_visible_radio")->setValue(estate_info.getIsExternallyVisible() ? "estate_public_access" : "estate_restricted_access");
getChild<LLUICtrl>("voice_chat_check")->setValue(estate_info.getAllowVoiceChat());
getChild<LLUICtrl>("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport());
getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous());
@@ -2360,7 +2362,7 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con
// update model
estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore
- estate_info.setIsExternallyVisible(getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex());
+ estate_info.setIsExternallyVisible("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
estate_info.setAllowDirectTeleport(getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean());
estate_info.setDenyAnonymous(getChild<LLUICtrl>("limit_payment")->getValue().asBoolean());
estate_info.setDenyAgeUnverified(getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean());
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 515c2b0c4b..c0f5e63623 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -438,8 +438,8 @@ void LLFloaterReporter::onClickSend(void *userdata)
LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report"));
// *TODO don't upload image if checkbox isn't checked
- std::string url = gAgent.getRegion()->getCapability("SendUserReport");
- std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
+ std::string url = gAgent.getRegionCapability("SendUserReport");
+ std::string sshot_url = gAgent.getRegionCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index 5f0587a286..21df769d0c 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -112,24 +112,16 @@ BOOL LLFloaterScriptLimits::postBuild()
}
// contruct the panels
- std::string land_url = gAgent.getRegion()->getCapability("LandResources");
- if (!land_url.empty())
- {
- LLPanelScriptLimitsRegionMemory* panel_memory;
- panel_memory = new LLPanelScriptLimitsRegionMemory;
- mInfoPanels.push_back(panel_memory);
- panel_memory->buildFromFile( "panel_script_limits_region_memory.xml");
- mTab->addTabPanel(panel_memory);
- }
-
- std::string attachment_url = gAgent.getRegion()->getCapability("AttachmentResources");
- if (!attachment_url.empty())
- {
- LLPanelScriptLimitsAttachment* panel_attachments = new LLPanelScriptLimitsAttachment;
- mInfoPanels.push_back(panel_attachments);
- panel_attachments->buildFromFile("panel_script_limits_my_avatar.xml");
- mTab->addTabPanel(panel_attachments);
- }
+ LLPanelScriptLimitsRegionMemory* panel_memory = new LLPanelScriptLimitsRegionMemory;
+ mInfoPanels.push_back(panel_memory);
+ panel_memory->buildFromFile( "panel_script_limits_region_memory.xml");
+ mTab->addTabPanel(panel_memory);
+
+ LLPanelScriptLimitsAttachment* panel_attachments = new LLPanelScriptLimitsAttachment;
+ mInfoPanels.push_back(panel_attachments);
+ panel_attachments->buildFromFile("panel_script_limits_my_avatar.xml");
+ mTab->addTabPanel(panel_attachments);
+
if(mInfoPanels.size() > 0)
{
@@ -195,6 +187,8 @@ LLPanelScriptLimitsRegionMemory::~LLPanelScriptLimitsRegionMemory()
BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources()
{
+ if (!gAgent.getRegion()) return FALSE;
+
LLSD body;
std::string url = gAgent.getRegion()->getCapability("LandResources");
if (!url.empty())
@@ -718,10 +712,9 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain()
LLParcel* parcel = instance->getCurrentSelectedParcel();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
- LLUUID current_region_id = gAgent.getRegion()->getRegionID();
-
if ((region) && (parcel))
{
+ LLUUID current_region_id = gAgent.getRegion()->getRegionID();
LLVector3 parcel_center = parcel->getCenterpoint();
region_id = region->getRegionID();
@@ -982,6 +975,8 @@ void LLPanelScriptLimitsRegionMemory::onClickReturn(void* userdata)
BOOL LLPanelScriptLimitsAttachment::requestAttachmentDetails()
{
+ if (!gAgent.getRegion()) return FALSE;
+
LLSD body;
std::string url = gAgent.getRegion()->getCapability("AttachmentResources");
if (!url.empty())
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 8b3cfa7fd5..64ddeff1b0 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -74,7 +74,10 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
{
edit_wearable_ptr->onClose();
}
- panel_appearance->showOutfitsInventoryPanel();
+ if(!app_quitting)
+ {
+ panel_appearance->showOutfitsInventoryPanel();
+ }
}
}
}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index ba3106913c..2d0002dcd8 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -314,8 +314,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
}
else
{
- width_ctrl->setMaxValue(6016);
- height_ctrl->setMaxValue(6016);
+ width_ctrl->setMaxValue(MAX_SNAPSHOT_IMAGE_SIZE);
+ height_ctrl->setMaxValue(MAX_SNAPSHOT_IMAGE_SIZE);
}
}
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index b14b9b7578..2869256d09 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -638,20 +638,20 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
// HACK - highlight buttons for next click
mRadioGroupMove->setVisible(move_visible);
- if (!gGrabBtnSpin &&
- !gGrabBtnVertical &&
- !(mask == MASK_VERTICAL) &&
- !(mask == MASK_SPIN) )
+ if (!(gGrabBtnSpin ||
+ gGrabBtnVertical ||
+ (mask == MASK_VERTICAL) ||
+ (mask == MASK_SPIN)))
{
mRadioGroupMove->setValue("radio move");
}
- else if (gGrabBtnVertical ||
- (mask == MASK_VERTICAL) )
+ else if ((mask == MASK_VERTICAL) ||
+ (gGrabBtnVertical && (mask != MASK_SPIN)))
{
mRadioGroupMove->setValue("radio lift");
}
- else if (gGrabBtnSpin ||
- (mask == MASK_SPIN) )
+ else if ((mask == MASK_SPIN) ||
+ (gGrabBtnSpin && (mask != MASK_VERTICAL)))
{
mRadioGroupMove->setValue("radio spin");
}
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index e9f80b795a..d53cf2a9a3 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -258,6 +258,15 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
{
// This is where filter check on the item done (CHUI-849)
const bool passed_filter = filter.check(this);
+ if (passed_filter && mChildren.empty()) // Update the latest filter generation for empty folders
+ {
+ LLFolderViewModelItemInventory* view_model = this;
+ while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+ {
+ view_model->mMostFilteredDescendantGeneration = filter_generation;
+ view_model = static_cast<LLFolderViewModelItemInventory*>(view_model->mParent);
+ }
+ }
setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
continue_filtering = !filter.isTimedOut();
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index feef726630..d62b6300cb 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3671,8 +3671,7 @@ public:
}
//K now we want to accept the invitation
- std::string url = gAgent.getRegion()->getCapability(
- "ChatSessionRequest");
+ std::string url = gAgent.getRegionCapability("ChatSessionRequest");
if ( url != "" )
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1b32fc9dfe..3f18039376 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -204,6 +204,58 @@ const std::string& LLInvFVBridge::getDisplayName() const
return mDisplayName;
}
+std::string LLInvFVBridge::getSearchableDescription() const
+{
+ const LLInventoryModel* model = getInventoryModel();
+ if (model)
+ {
+ const LLInventoryItem *item = model->getItem(mUUID);
+ if(item)
+ {
+ std::string desc = item->getDescription();
+ LLStringUtil::toUpper(desc);
+ return desc;
+ }
+ }
+ return LLStringUtil::null;
+}
+
+std::string LLInvFVBridge::getSearchableCreatorName() const
+{
+ const LLInventoryModel* model = getInventoryModel();
+ if (model)
+ {
+ const LLInventoryItem *item = model->getItem(mUUID);
+ if(item)
+ {
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
+ {
+ std::string username = av_name.getUserName();
+ LLStringUtil::toUpper(username);
+ return username;
+ }
+ }
+ }
+ return LLStringUtil::null;
+}
+
+std::string LLInvFVBridge::getSearchableUUIDString() const
+{
+ const LLInventoryModel* model = getInventoryModel();
+ if (model)
+ {
+ const LLViewerInventoryItem *item = model->getItem(mUUID);
+ if(item && (item->getIsFullPerm() || gAgent.isGodlikeWithoutAdminMenuFakery()))
+ {
+ std::string uuid = item->getAssetUUID().asString();
+ LLStringUtil::toUpper(uuid);
+ return uuid;
+ }
+ }
+ return LLStringUtil::null;
+}
+
// Folders have full perms
PermissionMask LLInvFVBridge::getPermissionMask() const
{
@@ -828,6 +880,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
{
disabled_items.push_back(std::string("Properties"));
}
+
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ if (active_panel && (active_panel->getName() != "All Items"))
+ {
+ items.push_back(std::string("Show in Main Panel"));
+ }
}
void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -1593,6 +1651,11 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(buffer));
return;
}
+ else if ("show_in_main_panel" == action)
+ {
+ LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+ return;
+ }
else if ("cut" == action)
{
cutToClipboard();
@@ -1813,13 +1876,19 @@ void LLItemBridge::buildDisplayName() const
{
mDisplayName.assign(LLStringUtil::null);
}
-
+ S32 old_length = mSearchableName.length();
+ S32 new_length = mDisplayName.length() + getLabelSuffix().length();
+
mSearchableName.assign(mDisplayName);
mSearchableName.append(getLabelSuffix());
LLStringUtil::toUpper(mSearchableName);
- //Name set, so trigger a sort
- if(mParent)
+ if ((old_length > new_length) && getInventoryFilter())
+ {
+ getInventoryFilter()->setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
+ }
+ //Name set, so trigger a sort
+ if(mParent)
{
mParent->requestSort();
}
@@ -3087,6 +3156,11 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
modifyOutfit(TRUE);
return;
}
+ else if ("show_in_main_panel" == action)
+ {
+ LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+ return;
+ }
else if ("cut" == action)
{
cutToClipboard();
@@ -3884,8 +3958,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array;
gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array);
+ LLViewerInventoryCategory *trash = getCategory();
// Enable Empty menu item only when there is something to act upon.
- if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel)
+ // Also don't enable menu if folder isn't fully fetched
+ if ((0 == cat_array->size() && 0 == item_array->size())
+ || is_recent_panel
+ || !trash
+ || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN
+ || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
disabled_items.push_back(std::string("Empty Trash"));
}
@@ -4060,8 +4140,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
// BAP change once we're no longer treating regular categories as ensembles.
- const bool is_ensemble = (type == LLFolderType::FT_NONE ||
- LLFolderType::lookupIsEnsembleType(type));
const bool is_agent_inventory = isAgentInventory();
// Only enable calling-card related options for non-system folders.
@@ -4104,30 +4182,26 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
}
items.push_back(std::string("Replace Outfit"));
-
- if (is_agent_inventory)
+ }
+ if (is_agent_inventory)
+ {
+ items.push_back(std::string("Folder Wearables Separator"));
+ items.push_back(std::string("Remove From Outfit"));
+ if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
{
- items.push_back(std::string("Folder Wearables Separator"));
- if (is_ensemble)
- {
- items.push_back(std::string("Wear As Ensemble"));
- }
- items.push_back(std::string("Remove From Outfit"));
- if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
- {
disabled_items.push_back(std::string("Remove From Outfit"));
- }
- }
- if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
- {
- disabled_items.push_back(std::string("Replace Outfit"));
- }
- if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
- {
- disabled_items.push_back(std::string("Add To Outfit"));
}
- items.push_back(std::string("Outfit Separator"));
}
+ if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Replace Outfit"));
+ }
+ if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Add To Outfit"));
+ }
+ items.push_back(std::string("Outfit Separator"));
+
}
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index e6fcb6be96..fd532c609c 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -94,6 +94,10 @@ public:
virtual const std::string& getDisplayName() const;
const std::string& getSearchableName() const { return mSearchableName; }
+ std::string getSearchableDescription() const;
+ std::string getSearchableCreatorName() const;
+ std::string getSearchableUUIDString() const;
+
virtual PermissionMask getPermissionMask() const;
virtual LLFolderType::EType getPreferredType() const;
virtual time_t getCreationDate() const;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 1433ea36bf..9193613e9f 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -29,6 +29,7 @@
#include "llinventoryfilter.h"
// viewer includes
+#include "llagent.h"
#include "llfolderviewmodel.h"
#include "llfolderviewitem.h"
#include "llinventorymodel.h"
@@ -76,10 +77,14 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
mFilterSubString(p.substring),
mCurrentGeneration(0),
mFirstRequiredGeneration(0),
- mFirstSuccessGeneration(0)
+ mFirstSuccessGeneration(0),
+ mSearchType(SEARCHTYPE_NAME),
+ mFilterCreatorType(FILTERCREATOR_ALL)
{
// copy mFilterOps into mDefaultFilterOps
markDefault();
+ mUsername = gAgentUsername;
+ LLStringUtil::toUpper(mUsername);
}
bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
@@ -93,10 +98,29 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
return true;
}
- bool passed = (mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) != std::string::npos : true);
+ std::string desc = listener->getSearchableCreatorName();
+ switch(mSearchType)
+ {
+ case SEARCHTYPE_CREATOR:
+ desc = listener->getSearchableCreatorName();
+ break;
+ case SEARCHTYPE_DESCRIPTION:
+ desc = listener->getSearchableDescription();
+ break;
+ case SEARCHTYPE_UUID:
+ desc = listener->getSearchableUUIDString();
+ break;
+ case SEARCHTYPE_NAME:
+ default:
+ desc = listener->getSearchableName();
+ break;
+ }
+
+ bool passed = (mFilterSubString.size() ? desc.find(mFilterSubString) != std::string::npos : true);
passed = passed && checkAgainstFilterType(listener);
passed = passed && checkAgainstPermissions(listener);
passed = passed && checkAgainstFilterLinks(listener);
+ passed = passed && checkAgainstCreator(listener);
return passed;
}
@@ -245,6 +269,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
}
}
+ if(filterTypes & FILTERTYPE_WORN)
+ {
+ if (!get_is_item_worn(object_id))
+ {
+ return FALSE;
+ }
+ }
+
////////////////////////////////////////////////////////////////////////////////
// FILTERTYPE_UUID
// Pass if this item is the target UUID or if it links to the target UUID
@@ -453,6 +485,24 @@ bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInven
return TRUE;
}
+bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const
+{
+ if (!listener) return TRUE;
+ const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
+ switch(mFilterCreatorType)
+ {
+ case FILTERCREATOR_SELF:
+ if(is_folder) return FALSE;
+ return (listener->getSearchableCreatorName() == mUsername);
+ case FILTERCREATOR_OTHERS:
+ if(is_folder) return FALSE;
+ return (listener->getSearchableCreatorName() != mUsername);
+ case FILTERCREATOR_ALL:
+ default:
+ return TRUE;
+ }
+}
+
const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
{
return mFilterSubString;
@@ -460,7 +510,14 @@ const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
std::string::size_type LLInventoryFilter::getStringMatchOffset(LLFolderViewModelItem* item) const
{
- return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
+ if (mSearchType == SEARCHTYPE_NAME)
+ {
+ return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
+ }
+ else
+ {
+ return std::string::npos;
+ }
}
bool LLInventoryFilter::isDefault() const
@@ -533,6 +590,24 @@ void LLInventoryFilter::updateFilterTypes(U64 types, U64& current_types)
}
}
+void LLInventoryFilter::setSearchType(ESearchType type)
+{
+ if(mSearchType != type)
+ {
+ mSearchType = type;
+ setModified();
+ }
+}
+
+void LLInventoryFilter::setFilterCreator(EFilterCreatorType type)
+{
+ if(mFilterCreatorType != type)
+ {
+ mFilterCreatorType = type;
+ setModified();
+ }
+}
+
void LLInventoryFilter::setFilterObjectTypes(U64 types)
{
updateFilterTypes(types, mFilterOps.mFilterObjectTypes);
@@ -556,6 +631,11 @@ void LLInventoryFilter::setFilterEmptySystemFolders()
mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS;
}
+void LLInventoryFilter::setFilterWorn()
+{
+ mFilterOps.mFilterTypes |= FILTERTYPE_WORN;
+}
+
void LLInventoryFilter::setFilterMarketplaceActiveFolders()
{
mFilterOps.mFilterTypes |= FILTERTYPE_MARKETPLACE_ACTIVE;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index eee36b7e40..01754ed023 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -57,7 +57,8 @@ public:
FILTERTYPE_MARKETPLACE_INACTIVE = 0x1 << 7, // pass if folder is a marketplace inactive folder
FILTERTYPE_MARKETPLACE_UNASSOCIATED = 0x1 << 8, // pass if folder is a marketplace non associated (no market ID) folder
FILTERTYPE_MARKETPLACE_LISTING_FOLDER = 0x1 << 9, // pass iff folder is a listing folder
- FILTERTYPE_NO_MARKETPLACE_ITEMS = 0x1 << 10 // pass iff folder is not under the marketplace
+ FILTERTYPE_NO_MARKETPLACE_ITEMS = 0x1 << 10, // pass iff folder is not under the marketplace
+ FILTERTYPE_WORN = 0x1 << 11, // pass if item is worn
};
enum EFilterDateDirection
@@ -82,6 +83,21 @@ public:
SO_FOLDERS_BY_WEIGHT = 0x1 << 3, // Force folder sort by weight, usually, amount of some elements in their descendents
};
+ enum ESearchType
+ {
+ SEARCHTYPE_NAME,
+ SEARCHTYPE_DESCRIPTION,
+ SEARCHTYPE_CREATOR,
+ SEARCHTYPE_UUID
+ };
+
+ enum EFilterCreatorType
+ {
+ FILTERCREATOR_ALL,
+ FILTERCREATOR_SELF,
+ FILTERCREATOR_OTHERS
+ };
+
struct FilterOps
{
struct DateRange : public LLInitParam::Block<DateRange>
@@ -176,12 +192,17 @@ public:
void setFilterUUID(const LLUUID &object_id);
void setFilterWearableTypes(U64 types);
void setFilterEmptySystemFolders();
+ void setFilterWorn();
void setFilterMarketplaceActiveFolders();
void setFilterMarketplaceInactiveFolders();
void setFilterMarketplaceUnassociatedFolders();
void setFilterMarketplaceListingFolders(bool select_only_listing_folders);
void setFilterNoMarketplaceFolder();
void updateFilterTypes(U64 types, U64& current_types);
+ void setSearchType(ESearchType type);
+ ESearchType getSearchType() { return mSearchType; }
+ void setFilterCreator(EFilterCreatorType type);
+ EFilterCreatorType getFilterCreator() { return mFilterCreatorType; }
void setFilterSubString(const std::string& string);
const std::string& getFilterSubString(BOOL trim = FALSE) const;
@@ -277,6 +298,7 @@ private:
bool checkAgainstPermissions(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstPermissions(const LLInventoryItem* item) const;
bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const;
+ bool checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstClipboard(const LLUUID& object_id) const;
FilterOps mFilterOps;
@@ -285,6 +307,7 @@ private:
std::string mFilterSubString;
std::string mFilterSubStringOrig;
+ std::string mUsername;
const std::string mName;
S32 mCurrentGeneration;
@@ -299,6 +322,9 @@ private:
std::string mFilterText;
std::string mEmptyLookupMessage;
+
+ ESearchType mSearchType;
+ EFilterCreatorType mFilterCreatorType;
};
#endif
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index bccc654fbf..67ddd79230 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2295,9 +2295,40 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
if ("delete" == action)
{
- LLSD args;
- args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem");
- LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ static bool sDisplayedAtSession = false;
+ const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
+ bool marketplacelistings_item = false;
+ LLAllDescendentsPassedFilter f;
+ for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
+ {
+ if (LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(*it))
+ {
+ folder->applyFunctorRecursively(f);
+ }
+ LLFolderViewModelItemInventory * viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*it)->getViewModelItem());
+ if (viewModel && gInventory.isObjectDescendentOf(viewModel->getUUID(), marketplacelistings_id))
+ {
+ marketplacelistings_item = 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")) )
+ {
+ LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ }
+ else
+ {
+ if (!sDisplayedAtSession) // ask for the confirmation at least once per session
+ {
+ LLNotifications::instance().setIgnored("DeleteItems", false);
+ sDisplayedAtSession = true;
+ }
+
+ LLSD args;
+ args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem");
+ LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
+ }
// Note: marketplace listings will be updated in the callback if delete confirmed
return;
}
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 649db4032d..d454d7e00b 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -460,6 +460,8 @@ struct LLInventoryAction
static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);
static void removeItemFromDND(LLFolderView* root);
+ static const int sConfirmOnDeleteItemsNumber;
+
private:
static void buildMarketplaceFolders(LLFolderView* root);
static void updateMarketplaceFolders();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index e5fd126d53..dc75e09ad9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -221,7 +221,11 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const
{
const LLInventoryObject* obj = getObject(obj_id);
-
+ if(!obj)
+ {
+ LL_WARNS(LOG_INV) << "Non-existent object [ id: " << obj_id << " ] " << LL_ENDL;
+ return NULL;
+ }
// Search up the parent chain until we get to root or an acceptable folder.
// This assumes there are no cycles in the tree else we'll get a hang.
LLUUID parent_id = obj->getParentUUID();
@@ -458,12 +462,8 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
}
// Purge the emptied folder
- // Note: we'd like to use purgeObject() but it doesn't cleanly eliminate the folder
- // which leads to issues further down the road when the folder is found again
- //purgeObject(folder_id);
- // We remove the folder and empty the trash instead which seems to work
- removeCategory(folder_id);
- gInventory.emptyFolderType("", LLFolderType::FT_TRASH);
+ removeCategory(folder_id);
+ remove_inventory_category(folder_id, NULL);
}
}
@@ -799,22 +799,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
-U32 LLInventoryModel::getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit)
-{
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(id, cats, items, LLInventoryModel::INCLUDE_TRASH);
-
- U32 items_found = items.size() + cats.size();
-
- for (U32 i = 0; i < cats.size() && items_found <= max_item_limit; ++i)
- {
- items_found += getDescendentsCountRecursive(cats[i]->getUUID(), max_item_limit - items_found);
- }
-
- return items_found;
-}
-
void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
{
const LLInventoryObject *obj = getObject(object_id);
@@ -3321,9 +3305,12 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderT
LLSD args;
if(LLFolderType::FT_TRASH == preferred_type)
{
- static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity");
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
const LLUUID trash_id = findCategoryUUIDForType(preferred_type);
- args["COUNT"] = (S32)getDescendentsCountRecursive(trash_id, trash_max_capacity);
+ gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); //All descendants
+ S32 item_count = items.size() + cats.size();
+ args["COUNT"] = item_count;
}
LLNotificationsUtil::add(notification, args, LLSD(),
boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, preferred_type));
@@ -3433,9 +3420,20 @@ bool callback_preview_trash_folder(const LLSD& notification, const LLSD& respons
void LLInventoryModel::checkTrashOverflow()
{
- static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity");
+ static LLCachedControl<U32> trash_max_capacity(gSavedSettings, "InventoryTrashMaxCapacity");
+
+ // Collect all descendants including those in subfolders.
+ //
+ // Note: Do we really need content of subfolders?
+ // This was made to prevent download of trash folder timeouting
+ // viewer and sub-folders are supposed to download independently.
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH);
- if (getDescendentsCountRecursive(trash_id, trash_max_capacity) >= trash_max_capacity)
+ gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH);
+ S32 item_count = items.size() + cats.size();
+
+ if (item_count >= trash_max_capacity)
{
if (LLFloaterPreviewTrash::isVisible())
{
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index c558c0803b..01e0ed7e9b 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -265,9 +265,6 @@ public:
// Follow parent chain to the top.
bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const;
-private:
- U32 getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit);
-
//--------------------------------------------------------------------
// Find
//--------------------------------------------------------------------
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 4427f32de9..26d7a7a28a 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -350,6 +350,11 @@ void LLInventoryFetchDescendentsObserver::startFetch()
if (!cat) continue;
if (!isCategoryComplete(cat))
{
+ // CHECK IT: isCategoryComplete() checks both version and descendant count but
+ // fetch() only works for Unknown version and doesn't care about descentants,
+ // as result fetch won't start and folder will potentially get stuck as
+ // incomplete in observer.
+ // Likely either both should use only version or both should check descendants.
cat->fetch(); //blindly fetch it without seeing if anything else is fetching it.
mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer.
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 4b117941a0..8f93796ec7 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -351,6 +351,11 @@ void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType
getFilter().setFilterCategoryTypes(types);
}
+void LLInventoryPanel::setFilterWorn()
+{
+ getFilter().setFilterWorn();
+}
+
U32 LLInventoryPanel::getFilterObjectTypes() const
{
return getFilter().getFilterObjectTypes();
@@ -420,6 +425,16 @@ void LLInventoryPanel::setFilterLinks(U64 filter_links)
getFilter().setFilterLinks(filter_links);
}
+void LLInventoryPanel::setSearchType(LLInventoryFilter::ESearchType type)
+{
+ getFilter().setSearchType(type);
+}
+
+LLInventoryFilter::ESearchType LLInventoryPanel::getSearchType()
+{
+ return getFilter().getSearchType();
+}
+
void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show)
{
getFilter().setShowFolderState(show);
@@ -1217,7 +1232,18 @@ void LLInventoryPanel::purgeSelectedItems()
const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList();
if (inventory_selected.empty()) return;
LLSD args;
- args["COUNT"] = (S32)inventory_selected.size();
+ S32 count = inventory_selected.size();
+ for (std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end();
+ it != end_it;
+ ++it)
+ {
+ LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID();
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH);
+ count += items.size() + cats.size();
+ }
+ args["COUNT"] = count;
LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2));
}
@@ -1333,9 +1359,14 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
}
//static
-void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id)
+void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel)
{
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
+ LLInventoryPanel *active_panel;
+ if (main_panel)
+ {
+ LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory")->selectAllItemsPanel();
+ }
+ active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel)
{
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 5ee58707b0..d849647bb6 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -172,6 +172,7 @@ public:
LLInventoryFilter& getFilter();
const LLInventoryFilter& getFilter() const;
void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT);
+ void setFilterWorn();
U32 getFilterObjectTypes() const;
void setFilterPermMask(PermissionMask filter_perm_mask);
U32 getFilterPermMask() const;
@@ -183,6 +184,8 @@ public:
void setDateSearchDirection(U32 direction);
BOOL getSinceLogoff();
void setFilterLinks(U64 filter_links);
+ void setSearchType(LLInventoryFilter::ESearchType type);
+ LLInventoryFilter::ESearchType getSearchType();
void setShowFolderState(LLInventoryFilter::EFolderShow show);
LLInventoryFilter::EFolderShow getShowFolderState();
@@ -218,7 +221,7 @@ 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, const LLUUID& obj_id);
+ static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel = FALSE);
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
void removeItemID(const LLUUID& id);
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index b4d0bb6823..77eadef716 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -59,10 +59,18 @@
#include "llupdaterservice.h"
#include "llevents.h"
#include "llappviewer.h"
+#include "llsdserialize.h"
#include <boost/scoped_ptr.hpp>
#include <sstream>
+const S32 LOGIN_MAX_RETRIES = 3;
+
+// this can be removed once it is defined by the build for all forks
+#ifndef ADDRESS_SIZE
+# define ADDRESS_SIZE 32
+#endif
+
class LLLoginInstance::Disposable {
public:
virtual ~Disposable() {}
@@ -493,10 +501,12 @@ LLLoginInstance::LLLoginInstance() :
}
void LLLoginInstance::setPlatformInfo(const std::string platform,
- const std::string platform_version)
+ const std::string platform_version,
+ const std::string platform_name)
{
mPlatform = platform;
mPlatformVersion = platform_version;
+ mPlatformVersionName = platform_name;
}
LLLoginInstance::~LLLoginInstance()
@@ -565,7 +575,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
requested_options.append("event_notifications");
requested_options.append("classified_categories");
requested_options.append("adult_compliant");
- //requested_options.append("inventory-targets");
requested_options.append("buddy-list");
requested_options.append("newuser-config");
requested_options.append("ui-config");
@@ -587,8 +596,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
requested_options.append("god-connect");
}
- // (re)initialize the request params with creds.
- LLSD request_params = user_credential->getLoginParams();
+ LLSD request_params;
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
if ( ! llHashedUniqueID(hashed_unique_id_string) )
@@ -605,18 +613,36 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params["version"] = LLVersionInfo::getVersion();
request_params["channel"] = LLVersionInfo::getChannel();
request_params["platform"] = mPlatform;
+ request_params["address_size"] = ADDRESS_SIZE;
request_params["platform_version"] = mPlatformVersion;
+ request_params["platform_string"] = mPlatformVersionName;
request_params["id0"] = mSerialNumber;
request_params["host_id"] = gSavedSettings.getString("HostID");
request_params["extended_errors"] = true; // request message_id and message_args
+ // log request_params _before_ adding the credentials
+ LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
+
+ // Copy the credentials into the request after logging the rest
+ LLSD credentials(user_credential->getLoginParams());
+ for (LLSD::map_const_iterator it = credentials.beginMap();
+ it != credentials.endMap();
+ it++
+ )
+ {
+ request_params[it->first] = it->second;
+ }
+
+ // Specify desired timeout/retry options
+ LLSD http_params;
+ http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout");
+ http_params["retries"] = LOGIN_MAX_RETRIES;
+
mRequestData.clear();
mRequestData["method"] = "login_to_simulator";
mRequestData["params"] = request_params;
mRequestData["options"] = requested_options;
-
- mRequestData["cfg_srv_timeout"] = gSavedSettings.getF32("LoginSRVTimeout");
- mRequestData["cfg_srv_pump"] = gSavedSettings.getString("LoginSRVPump");
+ mRequestData["http_params"] = http_params;
}
bool LLLoginInstance::handleLoginEvent(const LLSD& event)
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 282ddc1cea..1adea67189 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -67,7 +67,7 @@ public:
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
- void setPlatformInfo(const std::string platform, const std::string platform_version);
+ void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name);
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
@@ -105,6 +105,7 @@ private:
S32 mLastExecDuration;
std::string mPlatform;
std::string mPlatformVersion;
+ std::string mPlatformVersionName;
UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
LLUpdaterService * mUpdaterService;
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index b5fd3df0f3..b0ee8e7fcb 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -37,6 +37,28 @@ using namespace std;
unsigned char static_unique_id[] = {0,0,0,0,0,0};
bool static has_static_unique_id = false;
+#if LL_WINDOWS
+
+class LLComInitialize
+{
+ HRESULT mHR;
+public:
+ LLComInitialize()
+ {
+ mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
+ if (FAILED(mHR))
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
+ }
+
+ ~LLComInitialize()
+ {
+ if (SUCCEEDED(mHR))
+ CoUninitialize();
+ }
+};
+
+#endif //LL_WINDOWS
+
// get an unique machine id.
// NOT THREAD SAFE - do before setting up threads.
// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
@@ -59,12 +81,7 @@ S32 LLMachineID::init()
// Step 1: --------------------------------------------------
// Initialize COM. ------------------------------------------
- hres = CoInitializeEx(0, COINIT_MULTITHREADED);
- if (FAILED(hres))
- {
- LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL;
- return 1; // Program has failed.
- }
+ LLComInitialize comInit;
// Step 2: --------------------------------------------------
// Set general COM security levels --------------------------
@@ -89,7 +106,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
- CoUninitialize();
return 1; // Program has failed.
}
@@ -107,7 +123,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
- CoUninitialize();
return 1; // Program has failed.
}
@@ -134,7 +149,6 @@ S32 LLMachineID::init()
{
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -160,7 +174,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -181,7 +194,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -236,7 +248,6 @@ S32 LLMachineID::init()
pLoc->Release();
if (pEnumerator)
pEnumerator->Release();
- CoUninitialize();
ret_code=0;
#else
unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 291d87073e..125a67e23e 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -176,6 +176,8 @@ public:
virtual bool wantsKeyUpKeyDown() const;
virtual bool wantsReturnKey() const;
+ virtual BOOL acceptsTextInput() const {return TRUE;}
+
protected:
void convertInputCoords(S32& x, S32& y);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c4d1917567..df708013fc 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1586,7 +1586,12 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
LLMeshRepository::sCacheBytesRead += size;
++LLMeshRepository::sCacheReads;
file.seek(offset);
- U8* buffer = new U8[size];
+ U8* buffer = new(std::nothrow) U8[size];
+ if (!buffer)
+ {
+ LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh LOD" << LL_ENDL;
+ return false;
+ }
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
@@ -1887,7 +1892,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mOrigin = gAgent.getPositionAgent();
mHost = gAgent.getRegionHost();
- mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
+ mWholeModelFeeCapability = gAgent.getRegionCapability("NewFileAgentInventory");
mOrigin += gAgent.getAtAxis() * scale.magVec();
@@ -1975,14 +1980,14 @@ void dump_llsd_to_file(const LLSD& content, std::string filename)
{
if (gSavedSettings.getBOOL("MeshUploadLogXML"))
{
- std::ofstream of(filename.c_str());
+ llofstream of(filename.c_str());
LLSDSerialize::toPrettyXML(content,of);
}
}
LLSD llsd_from_file(std::string filename)
{
- std::ifstream ifs(filename.c_str());
+ llifstream ifs(filename.c_str());
LLSD result;
LLSDSerialize::fromXML(result,ifs);
return result;
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 5b53a05274..bf1716e18c 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -48,6 +48,7 @@
#include <boost/tokenizer.hpp>
#include <boost/bind.hpp>
+#include <boost/algorithm/string/replace.hpp>
#include "lldispatcher.h"
#include "llxfermanager.h"
@@ -180,9 +181,10 @@ LLMuteList::~LLMuteList()
BOOL LLMuteList::isLinden(const std::string& name) const
{
+ std::string username = boost::replace_all_copy(name, ".", " ");
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
- tokenizer tokens(name, sep);
+ tokenizer tokens(username, sep);
tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end()) return FALSE;
@@ -190,7 +192,8 @@ BOOL LLMuteList::isLinden(const std::string& name) const
if (token_iter == tokens.end()) return FALSE;
std::string last_name = *token_iter;
- return last_name == "Linden";
+ LLStringUtil::toLower(last_name);
+ return last_name == "linden";
}
static LLVOAvatar* find_avatar(const LLUUID& id)
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 7a183cb298..52c5234137 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -322,6 +322,8 @@ public:
*/
static std::string getSubstitutionName(const LLNotificationPtr& notification);
+ static std::string getSubstitutionOriginalName(const LLNotificationPtr& notification);
+
/**
* Adds notification panel to the IM floater.
*/
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 4a3923ef6e..6a58196760 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -242,6 +242,20 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica
}
// static
+std::string LLHandlerUtil::getSubstitutionOriginalName(const LLNotificationPtr& notification)
+{
+ if(notification->getSubstitutions().has("ORIGINAL_NAME"))
+ {
+ std::string name = notification->getSubstitutions()["ORIGINAL_NAME"];
+ if(!name.empty())
+ {
+ return name;
+ }
+ }
+ return LLHandlerUtil::getSubstitutionName(notification);
+}
+
+// static
void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 63ab88da42..14d25d8158 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -131,6 +131,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notif_to_im;
p.force_show = notification->getOfferFromAgent();
+ p.can_fade = notification->canFadeToast();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index 7acb2f9e90..fef0631fa6 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -77,6 +77,7 @@ void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notifica
p.notification = notification;
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
+ p.can_fade = notification->canFadeToast();
if(gAgent.isDoNotDisturb())
{
p.force_show = notification->getName() == "SystemMessage"
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 596327e8f1..a6ef130cd0 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -86,7 +86,7 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
}
std::string session_name = notification->getPayload()["SESSION_NAME"];
- const std::string name = notification->getSubstitutions()["NAME"];
+ const std::string name = LLHandlerUtil::getSubstitutionOriginalName(notification);
if (session_name.empty())
{
session_name = name;
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 31e89c0ed0..cca65f2ce1 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -344,7 +344,7 @@ void LLOutfitGallery::removeFromLastRow(LLOutfitGalleryItem* item)
mItemPanels.pop_back();
}
-LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name)
+LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name, LLUUID outfit_id)
{
LLOutfitGalleryItem::Params giparams;
LLOutfitGalleryItem* gitem = LLUICtrlFactory::create<LLOutfitGalleryItem>(giparams);
@@ -353,6 +353,7 @@ LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name)
gitem->setFollowsLeft();
gitem->setFollowsTop();
gitem->setOutfitName(name);
+ gitem->setUUID(outfit_id);
return gitem;
}
@@ -511,7 +512,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
if (!cat) return;
std::string name = cat->getName();
- LLOutfitGalleryItem* item = buildGalleryItem(name);
+ LLOutfitGalleryItem* item = buildGalleryItem(name, cat_id);
mOutfitMap.insert(LLOutfitGallery::outfit_map_value_t(cat_id, item));
item->setRightMouseDownCallback(boost::bind(&LLOutfitListBase::outfitRightClickCallBack, this,
_1, _2, _3, cat_id));
@@ -661,7 +662,8 @@ LLOutfitGalleryItem::LLOutfitGalleryItem(const Params& p)
mSelected(false),
mWorn(false),
mDefaultImage(true),
- mOutfitName("")
+ mOutfitName(""),
+ mUUID(LLUUID())
{
buildFromFile("panel_outfit_gallery_item.xml");
}
@@ -697,13 +699,24 @@ void LLOutfitGalleryItem::draw()
const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
if (mTexturep)
{
- LLRect interior = border;
- interior.stretch(-1);
+ if (mImageUpdatePending && mTexturep->getDiscardLevel() >= 0)
+ {
+ mImageUpdatePending = false;
+ if (mTexturep->getOriginalWidth() > MAX_OUTFIT_PHOTO_WIDTH || mTexturep->getOriginalHeight() > MAX_OUTFIT_PHOTO_HEIGHT)
+ {
+ setDefaultImage();
+ }
+ }
+ else
+ {
+ LLRect interior = border;
+ interior.stretch(-1);
- gl_draw_scaled_image(interior.mLeft - 1, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
+ gl_draw_scaled_image(interior.mLeft - 1, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
- // Pump the priority
- mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight()));
+ // Pump the priority
+ mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight()));
+ }
}
}
@@ -745,23 +758,20 @@ BOOL LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLUICtrl::handleRightMouseDown(x, y, mask);
}
-BOOL LLOutfitGallery::handleDoubleClick(S32 x, S32 y, MASK mask)
+BOOL LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
LLTabContainer* appearence_tabs = LLPanelOutfitsInventory::findInstance()->getChild<LLTabContainer>("appearance_tabs");
- LLPanel* panel = NULL;
- LLAccordionCtrl* accordion = NULL;
- if (appearence_tabs != NULL)
+ if (appearence_tabs && (mUUID != LLUUID()))
{
appearence_tabs->selectTabByName("outfitslist_tab");
- panel = appearence_tabs->getCurrentPanel();
- if (panel != NULL)
+ LLPanel* panel = appearence_tabs->getCurrentPanel();
+ if (panel)
{
- accordion = panel->getChild<LLAccordionCtrl>("outfits_accordion");
+ LLAccordionCtrl* accordion = panel->getChild<LLAccordionCtrl>("outfits_accordion");
LLOutfitsList* outfit_list = dynamic_cast<LLOutfitsList*>(panel);
if (accordion != NULL && outfit_list != NULL)
{
- LLUUID item_id = getSelectedOutfitUUID();
- outfit_list->setSelectedOutfitByUUID(item_id);
+ outfit_list->setSelectedOutfitByUUID(mUUID);
LLAccordionCtrlTab* tab = accordion->getSelectedTab();
tab->showAndFocusHeader();
return TRUE;
@@ -769,15 +779,22 @@ BOOL LLOutfitGallery::handleDoubleClick(S32 x, S32 y, MASK mask)
}
}
- return LLUICtrl::handleDoubleClick(x, y, mask);
+ return LLPanel::handleDoubleClick(x, y, mask);
}
-void LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
+bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
{
- mImageAssetId = image_asset_id;
- mTexturep = LLViewerTextureManager::getFetchedTexture(image_asset_id, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- getChildView("preview_outfit")->setVisible(FALSE);
- mDefaultImage = false;
+ LLPointer<LLViewerFetchedTexture> texture = LLViewerTextureManager::getFetchedTexture(image_asset_id, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ if (texture && texture->getOriginalWidth() <= MAX_OUTFIT_PHOTO_WIDTH && texture->getOriginalHeight() <= MAX_OUTFIT_PHOTO_HEIGHT)
+ {
+ mImageAssetId = image_asset_id;
+ mTexturep = texture;
+ getChildView("preview_outfit")->setVisible(FALSE);
+ mDefaultImage = false;
+ mImageUpdatePending = (texture->getDiscardLevel() == -1);
+ return true;
+ }
+ return false;
}
LLUUID LLOutfitGalleryItem::getImageAssetId()
@@ -791,6 +808,7 @@ void LLOutfitGalleryItem::setDefaultImage()
mImageAssetId.setNull();
getChildView("preview_outfit")->setVisible(TRUE);
mDefaultImage = true;
+ mImageUpdatePending = false;
}
LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
@@ -1026,13 +1044,28 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
- if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ LLUUID asset_id, inv_id;
+ std::string item_name;
+ if (linked_item != NULL)
{
- LLUUID asset_id = linked_item->getAssetUUID();
- mOutfitMap[category_id]->setImageAssetId(asset_id);
- photo_loaded = true;
- std::string linked_item_name = linked_item->getName();
- if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == linked_item_name)
+ if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ {
+ asset_id = linked_item->getAssetUUID();
+ inv_id = linked_item->getUUID();
+ item_name = linked_item->getName();
+ }
+ }
+ else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
+ {
+ asset_id = outfit_item->getAssetUUID();
+ inv_id = outfit_item->getUUID();
+ item_name = outfit_item->getName();
+ }
+ if (asset_id.notNull())
+ {
+ photo_loaded |= mOutfitMap[category_id]->setImageAssetId(asset_id);
+ // Rename links
+ if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == item_name)
{
LLViewerInventoryCategory *outfit_cat = gInventory.getCategory(mOutfitRenamePending);
LLStringUtil::format_map_t photo_string_args;
@@ -1040,7 +1073,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
std::string new_name = getString("outfit_photo_string", photo_string_args);
LLSD updates;
updates["name"] = new_name;
- update_inventory_item(linked_item->getUUID(), updates, NULL);
+ update_inventory_item(inv_id, updates, NULL);
mOutfitRenamePending.setNull();
LLFloater* inv_floater = LLFloaterReg::getInstance("inventory");
if (inv_floater)
@@ -1053,7 +1086,11 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
appearance_floater->setFocus(TRUE);
}
}
- break;
+ if (item_name == LLAppearanceMgr::sExpectedTextureName)
+ {
+ // Images with "appropriate" name take priority
+ break;
+ }
}
if (!photo_loaded)
{
@@ -1068,6 +1105,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
}
}
+// Refresh linked textures from "textures" uploads folder
void LLOutfitGallery::refreshTextures(const LLUUID& category_id)
{
LLInventoryModel::cat_array_t cat_array;
@@ -1177,6 +1215,7 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id)
upload_pending_name, callback, expected_upload_cost, nruserdata);
mOutfitLinkPending = outfit_id;
}
+ delete unit;
}
}
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 37e75f1109..b1ca850508 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -115,8 +115,6 @@ public:
void onBeforeOutfitSnapshotSave();
void onAfterOutfitSnapshotSave();
- /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
-
protected:
/*virtual*/ void onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id);
/*virtual*/ void onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid);
@@ -150,7 +148,7 @@ private:
void updateRowsIfNeeded();
void updateGalleryWidth();
- LLOutfitGalleryItem* buildGalleryItem(std::string name);
+ LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id);
void onTextureSelectionChanged(LLInventoryItem* itemp);
@@ -258,13 +256,15 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
void setDefaultImage();
- void setImageAssetId(LLUUID asset_id);
+ bool setImageAssetId(LLUUID asset_id);
LLUUID getImageAssetId();
void setOutfitName(std::string name);
void setOutfitWorn(bool value);
void setSelected(bool value);
+ void setUUID(LLUUID outfit_id) {mUUID = outfit_id;}
std::string getItemName() {return mOutfitName;}
bool isDefaultImage() {return mDefaultImage;}
@@ -274,6 +274,7 @@ public:
private:
LLPointer<LLViewerFetchedTexture> mTexturep;
+ LLUUID mUUID;
LLUUID mImageAssetId;
LLTextBox* mOutfitNameText;
LLTextBox* mOutfitWornText;
@@ -281,6 +282,7 @@ private:
bool mSelected;
bool mWorn;
bool mDefaultImage;
+ bool mImageUpdatePending;
bool mHidden;
std::string mOutfitName;
};
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 5d1ae4ff10..b9b97f4cce 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -208,19 +208,21 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough);
- // While we're at it let's get the stats from the new table if that
- // capability exists.
- std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
- if (!url.empty())
+ if (gAgent.getRegion())
{
- LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
- LLSD body;
- LLUUID classifiedId = getClassifiedId();
- body["classified_id"] = classifiedId;
- LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body,
- boost::bind(&LLPanelClassifiedInfo::handleSearchStatResponse, classifiedId, _1));
+ // While we're at it let's get the stats from the new table if that
+ // capability exists.
+ std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
+ if (!url.empty())
+ {
+ LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
+ LLSD body;
+ LLUUID classifiedId = getClassifiedId();
+ body["classified_id"] = classifiedId;
+ LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body,
+ boost::bind(&LLPanelClassifiedInfo::handleSearchStatResponse, classifiedId, _1));
+ }
}
-
// Update classified click stats.
// *TODO: Should we do this when opening not from search?
sendClickMessage("profile");
@@ -540,21 +542,24 @@ void LLPanelClassifiedInfo::sendClickMessage(
const LLVector3d& global_pos,
const std::string& sim_name)
{
- // You're allowed to click on your own ads to reassure yourself
- // that the system is working.
- LLSD body;
- body["type"] = type;
- body["from_search"] = from_search;
- body["classified_id"] = classified_id;
- body["parcel_id"] = parcel_id;
- body["dest_pos_global"] = global_pos.getValue();
- body["region_name"] = sim_name;
-
- std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
- LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
- LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
- LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
- "SearchStatTracking Click report sent.", "SearchStatTracking Click report NOT sent.");
+ if (gAgent.getRegion())
+ {
+ // You're allowed to click on your own ads to reassure yourself
+ // that the system is working.
+ LLSD body;
+ body["type"] = type;
+ body["from_search"] = from_search;
+ body["classified_id"] = classified_id;
+ body["parcel_id"] = parcel_id;
+ body["dest_pos_global"] = global_pos.getValue();
+ body["region_name"] = sim_name;
+
+ std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
+ LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
+ LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
+ LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
+ "SearchStatTracking Click report sent.", "SearchStatTracking Click report NOT sent.");
+ }
}
void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 0e6f5b8924..05be4b5aee 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -164,6 +164,8 @@ public:
virtual void setupCtrls (LLPanel* parent) {};
+ virtual void onFilterChanged() { }
+
protected:
LLUUID mGroupID;
BOOL mAllowEdit;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 8440e9ee50..66a0a1d4ad 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
mSearchFilter = filter;
LLStringUtil::toLower(mSearchFilter);
update(GC_ALL);
+ onFilterChanged();
}
void LLPanelGroupSubTab::activate()
@@ -2471,12 +2472,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
//////////////////////////////////////////////////////////////////////////
- LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(role_id);
- U64 current_role_powers = GP_NO_POWERS;
- if (rit != gdatap->mRoles.end())
- {
- current_role_powers = ((*rit).second->getRoleData().mRolePowers);
- }
+ U64 current_role_powers = gdatap->getRolePowers(role_id);
if(isEnablingAbility)
{
@@ -2775,6 +2771,16 @@ void LLPanelGroupActionsSubTab::activate()
LLPanelGroupSubTab::activate();
update(GC_ALL);
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
+ mActionList->deleteAllItems();
+ buildActionsList(mActionList,
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::deactivate()
@@ -2803,19 +2809,31 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
if (mGroupID.isNull()) return;
- mActionList->deselectAllItems();
mActionMembers->deleteAllItems();
mActionRoles->deleteAllItems();
- mActionDescription->clear();
+ if(mActionList->hasSelectedItem())
+ {
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+ if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete())
+ {
+ handleActionSelect();
+ }
+ }
+}
+
+void LLPanelGroupActionsSubTab::onFilterChanged()
+{
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
mActionList->deleteAllItems();
buildActionsList(mActionList,
- GP_ALL_POWERS,
- GP_ALL_POWERS,
- NULL,
- FALSE,
- TRUE,
- FALSE);
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::handleActionSelect()
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 9a696124a8..1d1d69e0ae 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -311,6 +311,7 @@ public:
virtual bool needsApply(std::string& mesg);
virtual bool apply(std::string& mesg);
virtual void update(LLGroupChange gc);
+ virtual void onFilterChanged();
void handleActionSelect();
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index f8a5bbb036..a88c10521c 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -791,7 +791,7 @@ void LLPanelLogin::loadLoginPage()
params["grid"] = LLGridManager::getInstance()->getGridId();
// add OS info
- params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ params["os"] = LLOSInfo::instance().getOSStringSimple();
// sourceid
params["sourceid"] = gSavedSettings.getString("sourceid");
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 3db9500de0..f771a027e0 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -30,6 +30,8 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llavataractions.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
#include "lldndbutton.h"
#include "lleconomy.h"
#include "llfilepicker.h"
@@ -84,6 +86,9 @@ public:
BOOL getCheckSinceLogoff();
U32 getDateSearchDirection();
+ void onCreatorSelfFilterCommit();
+ void onCreatorOtherFilterCommit();
+
static void onTimeAgo(LLUICtrl*, void *);
static void onCloseBtn(void* user_data);
static void selectAllTypes(void* user_data);
@@ -92,6 +97,8 @@ private:
LLPanelMainInventory* mPanelMainInventory;
LLSpinCtrl* mSpinSinceDays;
LLSpinCtrl* mSpinSinceHours;
+ LLCheckBoxCtrl* mCreatorSelf;
+ LLCheckBoxCtrl* mCreatorOthers;
LLInventoryFilter* mFilter;
};
@@ -102,6 +109,7 @@ private:
LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
: LLPanel(p),
mActivePanel(NULL),
+ mWornItemsPanel(NULL),
mSavedFolderState(NULL),
mFilterText(""),
mMenuGearDefault(NULL),
@@ -158,6 +166,25 @@ BOOL LLPanelMainInventory::postBuild()
recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
}
+ mWornItemsPanel = getChild<LLInventoryPanel>("Worn Items");
+ if (mWornItemsPanel)
+ {
+ U32 filter_types = 0x0;
+ filter_types |= 0x1 << LLInventoryType::IT_WEARABLE;
+ filter_types |= 0x1 << LLInventoryType::IT_ATTACHMENT;
+ filter_types |= 0x1 << LLInventoryType::IT_OBJECT;
+ mWornItemsPanel->setFilterTypes(filter_types);
+ mWornItemsPanel->setFilterWorn();
+ mWornItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ mWornItemsPanel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
+ mWornItemsPanel->getFilter().markDefault();
+ mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2));
+ }
+ mSearchTypeCombo = getChild<LLComboBox>("search_type");
+ if(mSearchTypeCombo)
+ {
+ mSearchTypeCombo->setCommitCallback(boost::bind(&LLPanelMainInventory::onSelectSearchType, this));
+ }
// Now load the stored settings from disk, if available.
std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME));
LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL;
@@ -262,6 +289,16 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
delete mSavedFolderState;
}
+LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
+{
+ return getChild<LLInventoryPanel>("All Items");
+}
+
+void LLPanelMainInventory::selectAllItemsPanel()
+{
+ mFilterTabs->selectFirstTab();
+}
+
void LLPanelMainInventory::startSearch()
{
// this forces focus to line editor portion of search editor
@@ -387,6 +424,48 @@ void LLPanelMainInventory::setSortBy(const LLSD& userdata)
}
}
+void LLPanelMainInventory::onSelectSearchType()
+{
+ std::string new_type = mSearchTypeCombo->getValue();
+ if (new_type == "search_by_name")
+ {
+ getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_NAME);
+ }
+ if (new_type == "search_by_creator")
+ {
+ getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_CREATOR);
+ }
+ if (new_type == "search_by_description")
+ {
+ getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_DESCRIPTION);
+ }
+ if (new_type == "search_by_UUID")
+ {
+ getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_UUID);
+ }
+}
+
+void LLPanelMainInventory::updateSearchTypeCombo()
+{
+ LLInventoryFilter::ESearchType search_type = getActivePanel()->getSearchType();
+ switch(search_type)
+ {
+ case LLInventoryFilter::SEARCHTYPE_CREATOR:
+ mSearchTypeCombo->setValue("search_by_creator");
+ break;
+ case LLInventoryFilter::SEARCHTYPE_DESCRIPTION:
+ mSearchTypeCombo->setValue("search_by_description");
+ break;
+ case LLInventoryFilter::SEARCHTYPE_UUID:
+ mSearchTypeCombo->setValue("search_by_UUID");
+ break;
+ case LLInventoryFilter::SEARCHTYPE_NAME:
+ default:
+ mSearchTypeCombo->setValue("search_by_name");
+ break;
+ }
+}
+
// static
BOOL LLPanelMainInventory::filtersVisible(void* user_data)
{
@@ -400,7 +479,7 @@ void LLPanelMainInventory::onClearSearch()
{
BOOL initially_active = FALSE;
LLFloater *finder = getFinder();
- if (mActivePanel)
+ if (mActivePanel && (getActivePanel() != mWornItemsPanel))
{
initially_active = mActivePanel->getFilter().isNotDefault();
mActivePanel->setFilterSubString(LLStringUtil::null);
@@ -507,6 +586,11 @@ void LLPanelMainInventory::onFilterSelected()
return;
}
+ if (getActivePanel() == mWornItemsPanel)
+ {
+ mActivePanel->openAllFolders();
+ }
+ updateSearchTypeCombo();
setFilterSubString(mFilterSubString);
LLInventoryFilter& filter = mActivePanel->getFilter();
LLFloaterInventoryFinder *finder = getFinder();
@@ -540,7 +624,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Check to see if we are auto scrolling from the last frame
LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
- BOOL needsToScroll = panel->getScrollableContainer()->autoScroll(x, y);
+ BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
if(mFilterTabs)
{
if(needsToScroll)
@@ -705,6 +789,11 @@ BOOL LLFloaterInventoryFinder::postBuild()
mSpinSinceDays = getChild<LLSpinCtrl>("spin_days_ago");
childSetCommitCallback("spin_days_ago", onTimeAgo, this);
+ mCreatorSelf = getChild<LLCheckBoxCtrl>("check_created_by_me");
+ mCreatorOthers = getChild<LLCheckBoxCtrl>("check_created_by_others");
+ mCreatorSelf->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorSelfFilterCommit, this));
+ mCreatorOthers->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorOtherFilterCommit, this));
+
childSetAction("Close", onCloseBtn, this);
updateElementsFromFilter();
@@ -763,6 +852,10 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
U32 hours = mFilter->getHoursAgo();
U32 date_search_direction = mFilter->getDateSearchDirection();
+ LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreator();
+ bool show_created_by_me = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF));
+ bool show_created_by_others = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS));
+
// update the ui elements
setTitle(mFilter->getName());
@@ -780,6 +873,10 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
getChild<LLUICtrl>("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
getChild<LLUICtrl>("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
getChild<LLUICtrl>("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
+
+ getChild<LLUICtrl>("check_created_by_me")->setValue(show_created_by_me);
+ getChild<LLUICtrl>("check_created_by_others")->setValue(show_created_by_others);
+
getChild<LLUICtrl>("check_since_logoff")->setValue(mFilter->isSinceLogoff());
mSpinSinceHours->set((F32)(hours % 24));
mSpinSinceDays->set((F32)(hours / 24));
@@ -877,6 +974,7 @@ void LLFloaterInventoryFinder::draw()
mPanelMainInventory->getPanel()->setShowFolderState(getCheckShowEmpty() ?
LLInventoryFilter::SHOW_ALL_FOLDERS : LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
mPanelMainInventory->getPanel()->setFilterTypes(filter);
+
if (getCheckSinceLogoff())
{
mSpinSinceDays->set(0);
@@ -905,6 +1003,46 @@ void LLFloaterInventoryFinder::draw()
LLPanel::draw();
}
+void LLFloaterInventoryFinder::onCreatorSelfFilterCommit()
+{
+ bool show_creator_self = mCreatorSelf->getValue();
+ bool show_creator_other = mCreatorOthers->getValue();
+
+ if(show_creator_self && show_creator_other)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_ALL);
+ }
+ else if(show_creator_self)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
+ }
+ else if(!show_creator_self || !show_creator_other)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
+ mCreatorOthers->set(TRUE);
+ }
+}
+
+void LLFloaterInventoryFinder::onCreatorOtherFilterCommit()
+{
+ bool show_creator_self = mCreatorSelf->getValue();
+ bool show_creator_other = mCreatorOthers->getValue();
+
+ if(show_creator_self && show_creator_other)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_ALL);
+ }
+ else if(show_creator_other)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
+ }
+ else if(!show_creator_other || !show_creator_self)
+ {
+ mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
+ mCreatorSelf->set(TRUE);
+ }
+}
+
BOOL LLFloaterInventoryFinder::getCheckShowEmpty()
{
return getChild<LLUICtrl>("check_show_empty")->getValue();
@@ -1287,13 +1425,13 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id);
- return children != LLInventoryModel::CHILDREN_NO;
+ return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
if (command_name == "empty_lostnfound")
{
const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id);
- return children != LLInventoryModel::CHILDREN_NO;
+ return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
return TRUE;
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 38936804ac..530f4e618c 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -34,6 +34,7 @@
#include "llfolderview.h"
+class LLComboBox;
class LLFolderViewItem;
class LLInventoryPanel;
class LLSaveFolderState;
@@ -76,6 +77,8 @@ public:
LLInventoryPanel* getPanel() { return mActivePanel; }
LLInventoryPanel* getActivePanel() { return mActivePanel; }
+ LLInventoryPanel* getAllItemsPanel();
+ void selectAllItemsPanel();
const LLInventoryPanel* getActivePanel() const { return mActivePanel; }
const std::string& getFilterText() const { return mFilterText; }
@@ -120,6 +123,8 @@ protected:
void updateItemcountText();
void onFocusReceived();
+ void onSelectSearchType();
+ void updateSearchTypeCombo();
private:
LLFloaterInventoryFinder* getFinder();
@@ -129,12 +134,14 @@ private:
LLUICtrl* mCounterCtrl;
LLHandle<LLFloater> mFinderHandle;
LLInventoryPanel* mActivePanel;
+ LLInventoryPanel* mWornItemsPanel;
bool mResortActivePanel;
LLSaveFolderState* mSavedFolderState;
std::string mFilterText;
std::string mFilterSubString;
S32 mItemCount;
std::string mItemCountString;
+ LLComboBox* mSearchTypeCombo;
//////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 5dd44b4444..0bf4d48421 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1712,7 +1712,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
if (mObject->isRootEdit())
{
// only offset by parent's translation
- mObject->resetChildrenPosition(LLVector3(-delta), TRUE) ;
+ mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ;
}
if(!btn_down)
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index dbfebf901a..b5ee68ba25 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -110,6 +110,11 @@ public:
virtual const std::string& getDisplayName() const;
virtual const std::string& getSearchableName() const;
+ virtual std::string getSearchableDescription() const {return LLStringUtil::null;}
+ virtual std::string getSearchableCreatorName() const {return LLStringUtil::null;}
+ virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;}
+
+
virtual PermissionMask getPermissionMask() const { return PERM_NONE; }
/*virtual*/ LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; }
virtual const LLUUID& getUUID() const { return mUUID; }
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 3f6bdde127..5973b08183 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -1285,7 +1285,7 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type
showWearablesListView();
//e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE
- applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type));
+ applyListViewFilter(static_cast<EListViewItemType>(LVIT_SHAPE + type));
}
static void update_status_widget_rect(LLView * widget, S32 right_border)
@@ -1305,8 +1305,10 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started)
S32 delta = started ? indicator_delta : 0;
S32 right_border = status_panel->getRect().getWidth() - delta;
- update_status_widget_rect(mCurrentOutfitName, right_border);
- update_status_widget_rect(mStatus, right_border);
+ if (mCurrentOutfitName)
+ update_status_widget_rect(mCurrentOutfitName, right_border);
+ if (mStatus)
+ update_status_widget_rect(mStatus, right_border);
indicator->setVisible(started);
}
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 51ec964ace..77378f8092 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -172,6 +172,7 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
}
else
{
+ cancel();
floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local")));
}
}
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index 3d18e837af..f3a4cf36ee 100644
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -164,6 +164,8 @@ void LLPanelSnapshotPostcard::sendPostcardFinished(LLSD result)
void LLPanelSnapshotPostcard::sendPostcard()
{
+ if (!gAgent.getRegion()) return;
+
// upload the image
std::string url = gAgent.getRegion()->getCapability("SendPostcard");
if (!url.empty())
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index a150007177..3099a6e039 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -416,7 +416,7 @@ bool LLPanelWearing::populateAttachmentsList(bool update)
void LLPanelWearing::requestAttachmentDetails()
{
LLSD body;
- std::string url = gAgent.getRegion()->getCapability("AttachmentResources");
+ std::string url = gAgent.getRegionCapability("AttachmentResources");
if (!url.empty())
{
LLCoros::instance().launch("LLPanelWearing::getAttachmentLimitsCoro",
diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp
index 55cb7d616b..471e1c24f3 100644
--- a/indra/newview/llplacesinventorybridge.cpp
+++ b/indra/newview/llplacesinventorybridge.cpp
@@ -62,7 +62,7 @@ void LLPlacesLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
items.push_back(std::string("Purge Item"));
- if (!isItemRemovable())
+ if (!isItemRemovable() || (gInventory.getCategory(mUUID) && !gInventory.isCategoryComplete(mUUID)))
{
disabled_items.push_back(std::string("Purge Item"));
}
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index fb21b980dc..fc2de4844e 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -62,7 +62,8 @@ LLPreview::LLPreview(const LLSD& key)
mUserResized(FALSE),
mCloseAfterSave(FALSE),
mAssetStatus(PREVIEW_ASSET_UNLOADED),
- mDirty(TRUE)
+ mDirty(TRUE),
+ mSaveDialogShown(FALSE)
{
mAuxItem = new LLInventoryItem;
// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 49c114720b..b41aa2be1a 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -121,7 +121,8 @@ protected:
// for LLInventoryObserver
virtual void changed(U32 mask);
BOOL mDirty;
-
+ BOOL mSaveDialogShown;
+
protected:
LLUUID mItemUUID;
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index fb40af1302..12ac9e6fc5 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -148,6 +148,12 @@ void LLPreviewAnim::draw()
}
if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
{
+ const LLInventoryItem *item = getItem();
+ LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
+ if (item && motion)
+ {
+ motion->setName(item->getName());
+ }
this->mDidStart = true;
}
}
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index ff9a70d05c..787bd68e58 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -234,9 +234,13 @@ BOOL LLPreviewGesture::canClose()
}
else
{
- // Bring up view-modal dialog: Save changes? Yes, No, Cancel
- LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
- boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
+ if(!mSaveDialogShown)
+ {
+ mSaveDialogShown = TRUE;
+ // Bring up view-modal dialog: Save changes? Yes, No, Cancel
+ LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
+ boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
+ }
return FALSE;
}
}
@@ -264,6 +268,7 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility )
bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
+ mSaveDialogShown = FALSE;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 510d91839d..850c3b350d 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -153,9 +153,12 @@ BOOL LLPreviewNotecard::canClose()
}
else
{
- // Bring up view-modal dialog: Save changes? Yes, No, Cancel
- LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
-
+ if(!mSaveDialogShown)
+ {
+ mSaveDialogShown = TRUE;
+ // Bring up view-modal dialog: Save changes? Yes, No, Cancel
+ LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
+ }
return FALSE;
}
}
@@ -639,6 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
+ mSaveDialogShown = FALSE;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 5cdc5dfd38..6ecc4c7fb9 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -376,7 +376,8 @@ LLScriptEdCore::LLScriptEdCore(
mLive(live),
mContainer(container),
mHasScriptData(FALSE),
- mScriptRemoved(FALSE)
+ mScriptRemoved(FALSE),
+ mSaveDialogShown(FALSE)
{
setFollowsAll();
setBorderVisible(FALSE);
@@ -584,6 +585,14 @@ void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
}
}
+void LLScriptEdCore::makeEditorPristine()
+{
+ if (mEditor)
+ {
+ mEditor->makePristine();
+ }
+}
+
bool LLScriptEdCore::loadScriptText(const std::string& filename)
{
if (filename.empty())
@@ -847,8 +856,12 @@ BOOL LLScriptEdCore::canClose()
}
else
{
- // Bring up view-modal dialog: Save changes? Yes, No, Cancel
- LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
+ if(!mSaveDialogShown)
+ {
+ mSaveDialogShown = TRUE;
+ // Bring up view-modal dialog: Save changes? Yes, No, Cancel
+ LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
+ }
return FALSE;
}
}
@@ -861,6 +874,7 @@ void LLScriptEdCore::setEnableEditing(bool enable)
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
{
+ mSaveDialogShown = FALSE;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
@@ -1200,7 +1214,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data )
std::string filename = file_picker.getFirstFile();
- std::ifstream fin(filename.c_str());
+ llifstream fin(filename.c_str());
std::string line;
std::string text;
@@ -1238,7 +1252,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata )
{
std::string filename = file_picker.getFirstFile();
std::string scriptText=self->mEditor->getText();
- std::ofstream fout(filename.c_str());
+ llofstream fout(filename.c_str());
fout<<(scriptText);
fout.close();
self->mSaveCallback( self->mUserdata, FALSE );
@@ -1683,6 +1697,7 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
mScriptEd->sync();
}
+ if (!gAgent.getRegion()) return;
const LLInventoryItem *inv_item = getItem();
// save it out to asset server
std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgent");
@@ -2025,7 +2040,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
buffer[file_length] = '\0';
mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
- mScriptEd->mEditor->makePristine();
+ mScriptEd->makeEditorPristine();
mScriptEd->setScriptName(getItem()->getName());
}
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 6b31125641..a185d85889 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -90,6 +90,7 @@ public:
bool canLoadOrSaveToFile( void* userdata );
void setScriptText(const std::string& text, BOOL is_valid);
+ void makeEditorPristine();
bool loadScriptText(const std::string& filename);
bool writeToFile(const std::string& filename);
void sync();
@@ -166,6 +167,7 @@ private:
LLLiveLSLFile* mLiveFile;
LLUUID mAssociatedExperience;
BOOL mScriptRemoved;
+ BOOL mSaveDialogShown;
LLScriptEdContainer* mContainer; // parent view
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 645a77e42a..12bcd89cb0 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -52,6 +52,8 @@
#include "llviewerwindow.h"
#include "lllineeditor.h"
+#include <boost/lexical_cast.hpp>
+
const S32 CLIENT_RECT_VPAD = 4;
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
@@ -98,6 +100,29 @@ LLPreviewTexture::~LLPreviewTexture()
}
}
+void LLPreviewTexture::populateRatioList()
+{
+ // Fill in ratios list with common aspect ratio values
+ mRatiosList.clear();
+ mRatiosList.push_back(LLTrans::getString("Unconstrained"));
+ mRatiosList.push_back("1:1");
+ mRatiosList.push_back("4:3");
+ mRatiosList.push_back("10:7");
+ mRatiosList.push_back("3:2");
+ mRatiosList.push_back("16:10");
+ mRatiosList.push_back("16:9");
+ mRatiosList.push_back("2:1");
+
+ // Now fill combo box with provided list
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
+ combo->removeall();
+
+ for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it)
+ {
+ combo->add(*it);
+ }
+}
+
// virtual
BOOL LLPreviewTexture::postBuild()
{
@@ -138,27 +163,12 @@ BOOL LLPreviewTexture::postBuild()
}
}
- // Fill in ratios list with common aspect ratio values
- mRatiosList.clear();
- mRatiosList.push_back(LLTrans::getString("Unconstrained"));
- mRatiosList.push_back("1:1");
- mRatiosList.push_back("4:3");
- mRatiosList.push_back("10:7");
- mRatiosList.push_back("3:2");
- mRatiosList.push_back("16:10");
- mRatiosList.push_back("16:9");
- mRatiosList.push_back("2:1");
-
- // Now fill combo box with provided list
- LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
- combo->removeall();
-
- for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it)
- {
- combo->add(*it);
- }
+ // Fill in ratios list and combo box with common aspect ratio values
+ populateRatioList();
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
+
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
combo->setCurrentByIndex(0);
return LLPreview::postBuild();
@@ -444,16 +454,25 @@ void LLPreviewTexture::updateDimensions()
return;
}
- if (mAssetStatus != PREVIEW_ASSET_LOADED)
+ S32 img_width = mImage->getFullWidth();
+ S32 img_height = mImage->getFullHeight();
+
+ if (mAssetStatus != PREVIEW_ASSET_LOADED
+ || mLastWidth != img_width
+ || mLastHeight != img_height)
{
mAssetStatus = PREVIEW_ASSET_LOADED;
// Asset has been fully loaded, adjust aspect ratio
adjustAspectRatio();
}
-
+
+
// Update the width/height display every time
- getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth()));
- getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", img_width));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height));
+
+ mLastHeight = img_height;
+ mLastWidth = img_width;
// Reshape the floater only when required
if (mUpdateDimensions)
@@ -579,7 +598,12 @@ void LLPreviewTexture::adjustAspectRatio()
std::vector<std::string>::const_iterator found = std::find(mRatiosList.begin(), mRatiosList.end(), ratio.str());
if (found == mRatiosList.end())
{
- combo->setCurrentByIndex(0);
+ // No existing ratio found, create an element that will show image at original ratio
+ populateRatioList(); // makes sure previous custom ratio is cleared
+ std::string ratio = boost::lexical_cast<std::string>(num)+":" + boost::lexical_cast<std::string>(denom);
+ mRatiosList.push_back(ratio);
+ combo->add(ratio);
+ combo->setCurrentByIndex(mRatiosList.size()- 1);
}
else
{
@@ -587,6 +611,15 @@ void LLPreviewTexture::adjustAspectRatio()
}
}
}
+ else
+ {
+ // Aspect ratio was set to unconstrained or was clamped
+ LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
+ if (combo)
+ {
+ combo->setCurrentByIndex(0); //unconstrained
+ }
+ }
mUpdateDimensions = TRUE;
}
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index b104a91c75..c156c48d0c 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -67,6 +67,7 @@ public:
/*virtual*/ void setObjectID(const LLUUID& object_id);
protected:
void init();
+ void populateRatioList();
/* virtual */ BOOL postBuild();
bool setAspectRatio(const F32 width, const F32 height);
static void onAspectRatioCommit(LLUICtrl*,void* userdata);
diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp
index b663df4aae..4abb673555 100644
--- a/indra/newview/llproductinforequest.cpp
+++ b/indra/newview/llproductinforequest.cpp
@@ -41,7 +41,7 @@ LLProductInfoRequestManager::LLProductInfoRequestManager():
void LLProductInfoRequestManager::initSingleton()
{
- std::string url = gAgent.getRegion()->getCapability("ProductInfoRequest");
+ std::string url = gAgent.getRegionCapability("ProductInfoRequest");
if (!url.empty())
{
LLCoros::instance().launch("LLProductInfoRequestManager::getLandDescriptionsCoro",
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 02912f12a9..5ab0013055 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -532,7 +532,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
LL_INFOS("SceneMonitor") << "Saving scene load stats to " << file_name << LL_ENDL;
- std::ofstream os(file_name.c_str());
+ llofstream os(file_name.c_str());
os << std::setprecision(10);
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index c6a0198afd..e25cac8c17 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -696,6 +696,19 @@ LLInventoryPanel *LLSidepanelInventory::getActivePanel()
return NULL;
}
+void LLSidepanelInventory::selectAllItemsPanel()
+{
+ if (!getVisible())
+ {
+ return;
+ }
+ if (mInventoryPanel->getVisible())
+ {
+ mPanelMainInventory->selectAllItemsPanel();
+ }
+
+}
+
BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
{
return mInventoryPanel->getVisible();
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 5060f7025f..3b8cdb98ab 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -57,6 +57,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
+ void selectAllItemsPanel();
LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox.get(); }
LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; }
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 58e48480c1..ee8b2d79c0 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -45,6 +45,7 @@
#include "llimagepng.h"
#include "lllandmarkactions.h"
#include "lllocalcliprect.h"
+#include "llresmgr.h"
#include "llnotificationsutil.h"
#include "llslurl.h"
#include "llsnapshotlivepreview.h"
@@ -56,6 +57,7 @@
#include "llvfs.h"
#include "llwindow.h"
#include "llworld.h"
+#include <boost/filesystem.hpp>
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
@@ -1069,7 +1071,7 @@ BOOL LLSnapshotLivePreview::saveLocal()
getFormattedImage();
// Save the formatted image
- BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
+ BOOL success = saveLocal(mFormattedImage);
if(success)
{
@@ -1078,3 +1080,38 @@ BOOL LLSnapshotLivePreview::saveLocal()
return success;
}
+//Check if failed due to insufficient memory
+BOOL LLSnapshotLivePreview::saveLocal(LLPointer<LLImageFormatted> mFormattedImage)
+{
+ BOOL insufficient_memory;
+ BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage, FALSE, insufficient_memory);
+
+ if (insufficient_memory)
+ {
+ std::string lastSnapshotDir = LLViewerWindow::getLastSnapshotDir();
+
+#ifdef LL_WINDOWS
+ boost::filesystem::path b_path(utf8str_to_utf16str(lastSnapshotDir));
+#else
+ boost::filesystem::path b_path(lastSnapshotDir);
+#endif
+ boost::filesystem::space_info b_space = boost::filesystem::space(b_path);
+ if (b_space.free < mFormattedImage->getDataSize())
+ {
+ LLSD args;
+ args["PATH"] = lastSnapshotDir;
+
+ std::string needM_bytes_string;
+ LLResMgr::getInstance()->getIntegerString(needM_bytes_string, (mFormattedImage->getDataSize()) >> 10);
+ args["NEED_MEMORY"] = needM_bytes_string;
+
+ std::string freeM_bytes_string;
+ LLResMgr::getInstance()->getIntegerString(freeM_bytes_string, (b_space.free) >> 10);
+ args["FREE_MEMORY"] = freeM_bytes_string;
+
+ LLNotificationsUtil::add("SnapshotToComputerFailed", args);
+ return false;
+ }
+ }
+ return success;
+}
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index b689c50320..4ea8d25a5a 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -41,6 +41,7 @@ class LLSnapshotLivePreview : public LLView
LOG_CLASS(LLSnapshotLivePreview);
public:
+ static BOOL saveLocal(LLPointer<LLImageFormatted>);
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
Params()
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 19d1af34f9..abb936c3e5 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -818,7 +818,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
if (!speakerp) return;
- std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+ std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "mute update";
data["session-id"] = getSessionID();
@@ -844,7 +844,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
// do not send voice moderation changes for avatars not in voice channel
if (!is_in_voice) return;
- std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+ std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "mute update";
data["session-id"] = getSessionID();
@@ -924,7 +924,7 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update)
void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice)
{
- std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+ std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "session update";
data["session-id"] = session_id;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 33b6352bf5..8295ce029b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -345,7 +345,7 @@ bool idle_startup()
const std::string delims (" ");
std::string system;
int begIdx, endIdx;
- std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ std::string osString = LLOSInfo::instance().getOSStringSimple();
begIdx = osString.find_first_not_of (delims);
endIdx = osString.find_first_of (delims, begIdx);
@@ -830,7 +830,8 @@ bool idle_startup()
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
- display_startup();
+
+ // display() function will be the one to run display_startup()
// Sleep so we don't spin the CPU
ms_sleep(1);
return FALSE;
@@ -2268,13 +2269,15 @@ void login_callback(S32 option, void *userdata)
*/
void show_release_notes_if_required()
{
- if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion
+ static bool release_notes_shown = false;
+ if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion)
&& LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds
&& gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
&& !gSavedSettings.getBOOL("FirstLoginThisInstall"))
{
LLSD info(LLAppViewer::instance()->getViewerInfo());
LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+ release_notes_shown = true;
}
}
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index a541273621..f0c28041d1 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -31,6 +31,7 @@
#include "llapr.h"
#include "lldir.h"
#include "llimage.h"
+#include "llimagej2c.h" // for version control
#include "lllfsthread.h"
#include "llviewercontrol.h"
@@ -938,6 +939,14 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)
F32 LLTextureCache::sHeaderCacheVersion = 1.7f;
U32 LLTextureCache::sCacheMaxEntries = 1024 * 1024; //~1 million textures.
S64 LLTextureCache::sCacheMaxTexturesSize = 0; // no limit
+std::string LLTextureCache::sHeaderCacheEncoderVersion = LLImageJ2C::getEngineInfo();
+
+#if defined(ADDRESS_SIZE)
+U32 LLTextureCache::sHeaderCacheAddressSize = ADDRESS_SIZE;
+#else
+U32 LLTextureCache::sHeaderCacheAddressSize = 32;
+#endif
+
const char* entries_filename = "texture.entries";
const char* cache_filename = "texture.cache";
const char* old_textures_dirname = "textures";
@@ -1080,12 +1089,28 @@ void LLTextureCache::readEntriesHeader()
}
else //create an empty entries header.
{
- mHeaderEntriesInfo.mVersion = sHeaderCacheVersion ;
- mHeaderEntriesInfo.mEntries = 0 ;
+ setEntriesHeader();
writeEntriesHeader() ;
}
}
+void LLTextureCache::setEntriesHeader()
+{
+ if (sHeaderEncoderStringSize < sHeaderCacheEncoderVersion.size() + 1)
+ {
+ // For simplicity we use predefined size of header, so if version string
+ // doesn't fit, either getEngineInfo() returned malformed string or
+ // sHeaderEncoderStringSize need to be increased.
+ // Also take into accout that c_str() returns additional null character
+ LL_ERRS() << "Version string doesn't fit in header" << LL_ENDL;
+ }
+
+ mHeaderEntriesInfo.mVersion = sHeaderCacheVersion;
+ mHeaderEntriesInfo.mAdressSize = sHeaderCacheAddressSize;
+ strcpy(mHeaderEntriesInfo.mEncoderVersion, sHeaderCacheEncoderVersion.c_str());
+ mHeaderEntriesInfo.mEntries = 0;
+}
+
void LLTextureCache::writeEntriesHeader()
{
llassert_always(mHeaderAPRFile == NULL);
@@ -1439,10 +1464,13 @@ void LLTextureCache::readHeaderCache()
readEntriesHeader();
- if (mHeaderEntriesInfo.mVersion != sHeaderCacheVersion)
+ if (mHeaderEntriesInfo.mVersion != sHeaderCacheVersion
+ || mHeaderEntriesInfo.mAdressSize != sHeaderCacheAddressSize
+ || strcmp(mHeaderEntriesInfo.mEncoderVersion, sHeaderCacheEncoderVersion.c_str()) != 0)
{
if (!mReadOnly)
{
+ LL_INFOS() << "Texture Cache version mismatch, Purging." << LL_ENDL;
purgeAllTextures(false);
}
}
@@ -1587,9 +1615,9 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
gDirUtilp->deleteFilesInDir(dirname, mask);
}
}
+ gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); // headers, fast cache
if (purge_directories)
{
- gDirUtilp->deleteFilesInDir(mTexturesDirName, mask);
LLFile::rmdir(mTexturesDirName);
}
}
@@ -1601,8 +1629,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
mUpdatedEntryMap.clear();
// Info with 0 entries
- mHeaderEntriesInfo.mVersion = sHeaderCacheVersion;
- mHeaderEntriesInfo.mEntries = 0;
+ setEntriesHeader();
writeEntriesHeader();
LL_INFOS() << "The entire texture cache is cleared." << LL_ENDL ;
@@ -1960,15 +1987,13 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
if(w * h *c > 0) //valid
{
//make a duplicate to keep the original raw image untouched.
- raw = raw->duplicate();
+ raw = raw->scaled(w, h);
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
- raw->scale(w, h) ;
-
discardlevel += i ;
}
}
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index 6ff4c44568..95f9afc2bc 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -46,10 +46,13 @@ class LLTextureCache : public LLWorkerThread
private:
// Entries
+ static const U32 sHeaderEncoderStringSize = 32;
struct EntriesInfo
{
- EntriesInfo() : mVersion(0.f), mEntries(0) {}
+ EntriesInfo() : mVersion(0.f), mAdressSize(0), mEntries(0) { memset(mEncoderVersion, 0, sHeaderEncoderStringSize); }
F32 mVersion;
+ U32 mAdressSize;
+ char mEncoderVersion[sHeaderEncoderStringSize];
U32 mEntries;
};
struct Entry
@@ -156,6 +159,7 @@ private:
LLAPRFile* openHeaderEntriesFile(bool readonly, S32 offset);
void closeHeaderEntriesFile();
void readEntriesHeader();
+ void setEntriesHeader();
void writeEntriesHeader();
S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create);
bool updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 new_body_size);
@@ -224,6 +228,8 @@ private:
// Statics
static F32 sHeaderCacheVersion;
+ static U32 sHeaderCacheAddressSize;
+ static std::string sHeaderCacheEncoderVersion;
static U32 sCacheMaxEntries;
static S64 sCacheMaxTexturesSize;
};
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index b78d0b51d5..84a2f1b597 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2559,7 +2559,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mTextureInfoMainThread(false)
{
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
- mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold")));
+ mTextureInfo.setLogging(true);
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
mHttpRequest = new LLCore::HttpRequest;
diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp
index 473d8ce709..e79bb62a52 100644
--- a/indra/newview/lltextureinfo.cpp
+++ b/indra/newview/lltextureinfo.cpp
@@ -26,10 +26,19 @@
#include "llviewerprecompiledheaders.h"
+#include "llagent.h"
+#include "llmeshrepository.h"
+#include "llsdutil.h"
#include "lltextureinfo.h"
+#include "lltexturecache.h"
+#include "lltexturefetch.h"
#include "lltexturestats.h"
-#include "llviewercontrol.h"
#include "lltrace.h"
+#include "llviewercontrol.h"
+#include "llviewerregion.h"
+#include "llviewerstats.h"
+#include "llvocache.h"
+#include "llworld.h"
static LLTrace::CountStatHandle<S32> sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated");
static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed");
@@ -37,10 +46,8 @@ static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_
static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures");
LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
- mLogTextureDownloadsToViewerLog(false),
- mLogTextureDownloadsToSimulator(false),
- mTextureDownloadProtocol("NONE"),
- mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100))
+ mLoggingEnabled(false),
+ mTextureDownloadProtocol("NONE")
{
if (!postponeStartRecoreder)
{
@@ -48,11 +55,9 @@ LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
}
}
-void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold)
+void LLTextureInfo::setLogging(bool log_info)
{
- mLogTextureDownloadsToViewerLog = writeToViewerLog;
- mLogTextureDownloadsToSimulator = sendToSim;
- mTextureLogThreshold = U32Bytes(textureLogThreshold);
+ mLoggingEnabled = log_info;
}
LLTextureInfo::~LLTextureInfo()
@@ -147,36 +152,80 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
break;
}
- if (mLogTextureDownloadsToViewerLog)
+ if (mLoggingEnabled)
{
- LL_INFOS() << "texture=" << id
- << " start=" << details.mStartTime
- << " end=" << details.mCompleteTime
- << " size=" << details.mSize
- << " offset=" << details.mOffset
- << " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime)
- << " protocol=" << protocol
- << LL_ENDL;
- }
+ static LLCachedControl<bool> log_to_viewer_log(gSavedSettings, "LogTextureDownloadsToViewerLog", false);
+ static LLCachedControl<bool> log_to_simulator(gSavedSettings, "LogTextureDownloadsToSimulator", false);
+ static LLCachedControl<U32> texture_log_threshold(gSavedSettings, "TextureLoggingThreshold", 1);
- if(mLogTextureDownloadsToSimulator)
- {
- add(sTextureDataDownloaded, details.mSize);
- add(sTexureDownloadTime, details.mCompleteTime - details.mStartTime);
- add(sTextureDownloadsCompleted, 1);
- mTextureDownloadProtocol = protocol;
- if (mRecording.getSum(sTextureDataDownloaded) >= mTextureLogThreshold)
+ if (log_to_viewer_log)
+ {
+ LL_INFOS() << "texture=" << id
+ << " start=" << details.mStartTime
+ << " end=" << details.mCompleteTime
+ << " size=" << details.mSize
+ << " offset=" << details.mOffset
+ << " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime)
+ << " protocol=" << protocol
+ << LL_ENDL;
+ }
+
+ if(log_to_simulator)
{
- LLSD texture_data;
- std::stringstream startTime;
- startTime << mCurrentStatsBundleStartTime;
- texture_data["start_time"] = startTime.str();
- std::stringstream endTime;
- endTime << completeTime;
- texture_data["end_time"] = endTime.str();
- texture_data["averages"] = getAverages();
- send_texture_stats_to_sim(texture_data);
- resetTextureStatistics();
+ add(sTextureDataDownloaded, details.mSize);
+ add(sTexureDownloadTime, details.mCompleteTime - details.mStartTime);
+ add(sTextureDownloadsCompleted, 1);
+ mTextureDownloadProtocol = protocol;
+ if (mRecording.getSum(sTextureDataDownloaded) >= U32Bytes(texture_log_threshold))
+ {
+ LLSD texture_data;
+ std::stringstream startTime;
+ startTime << mCurrentStatsBundleStartTime;
+ texture_data["start_time"] = startTime.str();
+ std::stringstream endTime;
+ endTime << completeTime;
+ texture_data["end_time"] = endTime.str();
+ texture_data["averages"] = getAverages();
+
+ // Texture cache
+ LLSD texture_cache;
+ U32 cache_read = 0, cache_write = 0, res_wait = 0;
+ F64 cache_hit_rate = 0;
+ LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
+ if (cache_read > 0 || cache_write > 0)
+ {
+ cache_hit_rate = cache_read / (cache_read + cache_write);
+ }
+ texture_cache["cache_read"] = LLSD::Integer(cache_read);
+ texture_cache["cache_write"] = LLSD::Integer(cache_write);
+ texture_cache["hit_rate"] = LLSD::Real(cache_hit_rate);
+ texture_cache["entries"] = LLSD::Integer(LLAppViewer::getTextureCache()->getEntries());
+ texture_cache["space_max"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getMaxUsage().value()); // bytes
+ texture_cache["space_used"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getUsage().value()); // bytes
+ texture_data["texture_cache"] = texture_cache;
+
+ // VO and mesh cache
+ LLSD object_cache;
+ object_cache["vo_entries_max"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntriesMax());
+ object_cache["vo_entries_curent"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntries());
+ object_cache["vo_active_entries"] = LLSD::Integer(LLWorld::getInstance()->getNumOfActiveCachedObjects());
+ U64 region_hit_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheHitCount() : 0;
+ U64 region_miss_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheMissCount() : 0;
+ F64 region_vocache_hit_rate = 0;
+ if (region_hit_count > 0 || region_miss_count > 0)
+ {
+ region_vocache_hit_rate = region_hit_count / (region_hit_count + region_miss_count);
+ }
+ object_cache["vo_region_hitcount"] = ll_sd_from_U64(region_hit_count);
+ object_cache["vo_region_misscount"] = ll_sd_from_U64(region_miss_count);
+ object_cache["vo_region_hitrate"] = LLSD::Real(region_vocache_hit_rate);
+ object_cache["mesh_reads"] = LLSD::Integer(LLMeshRepository::sCacheReads);
+ object_cache["mesh_writes"] = LLSD::Integer(LLMeshRepository::sCacheWrites);
+ texture_data["object_cache"] = object_cache;
+
+ send_texture_stats_to_sim(texture_data);
+ resetTextureStatistics();
+ }
}
}
diff --git a/indra/newview/lltextureinfo.h b/indra/newview/lltextureinfo.h
index 03721bdd73..46378eb7f8 100644
--- a/indra/newview/lltextureinfo.h
+++ b/indra/newview/lltextureinfo.h
@@ -38,7 +38,7 @@ public:
LLTextureInfo(bool postponeStartRecoreder = true);
~LLTextureInfo();
- void setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold);
+ void setLogging(bool log_info);
bool has(const LLUUID& id);
void setRequestStartTime(const LLUUID& id, U64 startTime);
void setRequestSize(const LLUUID& id, U32 size);
@@ -61,12 +61,11 @@ private:
std::map<LLUUID, LLTextureInfoDetails *> mTextures;
LLSD mAverages;
- bool mLogTextureDownloadsToViewerLog,
- mLogTextureDownloadsToSimulator;
+ bool mLoggingEnabled;
std::string mTextureDownloadProtocol;
- U32Bytes mTextureLogThreshold;
U64Microseconds mCurrentStatsBundleStartTime;
LLTrace::Recording mRecording;
+
};
#endif // LL_LLTEXTUREINFO_H
diff --git a/indra/newview/lltexturestats.cpp b/indra/newview/lltexturestats.cpp
index 8ded148e17..b55b4d9ca4 100644
--- a/indra/newview/lltexturestats.cpp
+++ b/indra/newview/lltexturestats.cpp
@@ -30,6 +30,7 @@
#include "llagent.h"
#include "lltexturefetch.h"
#include "lltexturestats.h"
+#include "llversioninfo.h"
#include "llviewerregion.h"
#include "llcorehttputil.h"
@@ -45,6 +46,8 @@ void send_texture_stats_to_sim(const LLSD &texture_stats)
LLUUID agent_id = gAgent.getID();
texture_stats_report["agent_id"] = agent_id;
texture_stats_report["region_id"] = gAgent.getRegion()->getRegionID();
+ texture_stats_report["viewer_channel"] = LLVersionInfo::getChannel();
+ texture_stats_report["viewer_version"] = LLVersionInfo::getVersion();
texture_stats_report["stats_data"] = texture_stats;
std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats");
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index bbce717c20..495c9c1f44 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -46,6 +46,8 @@
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include <boost/algorithm/string.hpp>
+
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
@@ -351,6 +353,10 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
{
setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label);
}
+ if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY)
+ {
+ setCheckBox(LLNotifications::instance().getGlobalString("skipnexttimesessiononly"), ignore_label);
+ }
else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
{
setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label);
@@ -385,15 +391,18 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
const LLFontGL* font = mCheck->getFont();
const S32 LINE_HEIGHT = font->getLineHeight();
+
+ std::vector<std::string> lines;
+ boost::split(lines, check_title, boost::is_any_of("\n"));
// Extend dialog for "check next time"
S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD;
- S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16;
+ S32 check_width = S32(font->getWidth(lines[0]) + 0.99f) + 16; // use width of the first line
max_msg_width = llmax(max_msg_width, check_width);
S32 dialog_width = max_msg_width + 2 * HPAD;
S32 dialog_height = LLToastPanel::getRect().getHeight();
- dialog_height += LINE_HEIGHT;
+ dialog_height += LINE_HEIGHT * lines.size();
dialog_height += LINE_HEIGHT / 2;
LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
@@ -402,7 +411,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::
// set check_box's attributes
LLRect check_rect;
- mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT));
+ mCheck->setRect(check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, max_msg_width, LINE_HEIGHT*lines.size()));
mCheck->setLabel(check_title);
mCheck->setCommitCallback(boost::bind(&LLToastAlertPanel::onClickIgnore, this, _1));
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 49436ee406..bd68d8c999 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1450,13 +1450,20 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
-EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item)
+EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item, EDragAndDropType type)
{
// check the basics
if (!item || !obj) return ACCEPT_NO;
// HACK: downcast
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
- if (!vitem->isFinished()) return ACCEPT_NO;
+ if (!vitem->isFinished() && (type != DAD_CATEGORY))
+ {
+ // Note: for DAD_CATEGORY we assume that folder version check passed and folder
+ // is complete, meaning that items inside are up to date.
+ // (isFinished() == false) at the moment shows that item was loaded from cache.
+ // Library or agent inventory only.
+ return ACCEPT_NO;
+ }
if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links
// deny attempts to drop from an object onto itself. This is to
@@ -2296,7 +2303,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
(*item_iter) = item;
}
*/
- rv = willObjectAcceptInventory(root_object, item);
+ rv = willObjectAcceptInventory(root_object, item, DAD_CATEGORY);
if (rv < ACCEPT_YES_COPY_SINGLE)
{
LL_DEBUGS() << "Object will not accept " << item->getUUID() << LL_ENDL;
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 766046785b..2d99de2244 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -224,7 +224,7 @@ protected:
// accessor that looks at permissions, copyability, and names of
// inventory items to determine if a drop would be ok.
- static EAcceptance willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item);
+ static EAcceptance willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item, EDragAndDropType type = DAD_NONE);
public:
// helper functions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 5623036b91..f3e661e71a 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -478,38 +478,52 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
}
//--------------------------------------------------
+ // Determine target mode
+ //--------------------------------------------------
+ bool vertical_dragging = false;
+ bool spin_grabbing = false;
+ if ((mask == MASK_VERTICAL)
+ || (gGrabBtnVertical && (mask != MASK_SPIN)))
+ {
+ vertical_dragging = TRUE;
+ }
+ else if ((mask == MASK_SPIN)
+ || (gGrabBtnSpin && (mask != MASK_VERTICAL)))
+ {
+ spin_grabbing = TRUE;
+ }
+
+ //--------------------------------------------------
// Toggle spinning
//--------------------------------------------------
- if (mSpinGrabbing && !(mask == MASK_SPIN) && !gGrabBtnSpin)
+ if (mSpinGrabbing && !spin_grabbing)
{
- // user released ALT key, stop spinning
+ // user released or switched mask key(s), stop spinning
stopSpin();
}
- else if (!mSpinGrabbing && (mask == MASK_SPIN) )
+ else if (!mSpinGrabbing && spin_grabbing)
{
- // user pressed ALT key, start spinning
+ // user pressed mask key(s), start spinning
startSpin();
}
+ mSpinGrabbing = spin_grabbing;
//--------------------------------------------------
// Toggle vertical dragging
//--------------------------------------------------
- if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical)
+ if (mVerticalDragging && !vertical_dragging)
{
// ...switch to horizontal dragging
- mVerticalDragging = FALSE;
-
mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp);
mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal();
}
- else if (!mVerticalDragging && (mask == MASK_VERTICAL) )
+ else if (!mVerticalDragging && vertical_dragging)
{
// ...switch to vertical dragging
- mVerticalDragging = TRUE;
-
mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp);
mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal();
}
+ mVerticalDragging = vertical_dragging;
const F32 RADIANS_PER_PIXEL_X = 0.01f;
const F32 RADIANS_PER_PIXEL_Y = 0.01f;
@@ -755,12 +769,13 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
//--------------------------------------------------
// Toggle vertical dragging
//--------------------------------------------------
- if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical)
+ if (!(mask == MASK_VERTICAL) && !gGrabBtnVertical)
{
mVerticalDragging = FALSE;
}
- else if (!mVerticalDragging && (mask == MASK_VERTICAL) )
+ else if ((gGrabBtnVertical && (mask != MASK_SPIN))
+ || (mask == MASK_VERTICAL))
{
mVerticalDragging = TRUE;
}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fc052ae3aa..f473000657 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -485,7 +485,8 @@ void LLToolPie::walkToClickedLocation()
mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
mAutoPilotDestination->setDuration(3.f);
- handle_go_to();
+ LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
+ gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE);
}
// When we get object properties after left-clicking on an object
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bf79a0595c..6c9fe5e39b 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1463,6 +1463,10 @@ void remove_inventory_category(
LLPointer<LLViewerInventoryCategory> obj = gInventory.getCategory(cat_id);
if(obj)
{
+ if (!gInventory.isCategoryComplete(cat_id))
+ {
+ LL_WARNS() << "Removing (purging) incomplete category " << obj->getName() << LL_ENDL;
+ }
if(LLFolderType::lookupIsProtectedType(obj->getPreferredType()))
{
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
@@ -1507,63 +1511,64 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
LLPointer<LLViewerInventoryCategory> cat = gInventory.getCategory(id);
if (cat.notNull())
{
- if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode())
+ if (LLClipboard::instance().hasContents())
{
- // Something on the clipboard is in "cut mode" and needs to be preserved
- LL_DEBUGS(LOG_INV) << "purge_descendents_of clipboard case " << cat->getName()
- << " iterate and purge non hidden items" << LL_ENDL;
- LLInventoryModel::cat_array_t* categories;
- LLInventoryModel::item_array_t* items;
- // Get the list of direct descendants in tha categoy passed as argument
- gInventory.getDirectDescendentsOf(id, categories, items);
- std::vector<LLUUID> list_uuids;
- // Make a unique list with all the UUIDs of the direct descendants (items and categories are not treated differently)
- // Note: we need to do that shallow copy as purging things will invalidate the categories or items lists
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); it != categories->end(); ++it)
- {
- list_uuids.push_back((*it)->getUUID());
- }
- for (LLInventoryModel::item_array_t::const_iterator it = items->begin(); it != items->end(); ++it)
+ // Remove items from clipboard or it will remain active even if there is nothing to paste/copy
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+ gInventory.collectDescendents(id, categories, items, TRUE);
+
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it)
{
- list_uuids.push_back((*it)->getUUID());
+ if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
+ {
+ // No sense in removing single items, partial 'paste' will result in confusion only
+ LLClipboard::instance().reset();
+ break;
+ }
}
- // Iterate through the list and only purge the UUIDs that are not on the clipboard
- for (std::vector<LLUUID>::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it)
+ if (LLClipboard::instance().hasContents())
{
- if (!LLClipboard::instance().isOnClipboard(*it))
+ for (LLInventoryModel::item_array_t::const_iterator it = items.begin(); it != items.end(); ++it)
{
- remove_inventory_object(*it, NULL);
+ if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
+ {
+ LLClipboard::instance().reset();
+ break;
+ }
}
}
}
- else
+
+ if (AISAPI::isAvailable())
{
- if (AISAPI::isAvailable())
+ if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
- AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
- AISAPI::PurgeDescendents(id, cr);
+ LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
}
- else // no cap
+ AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
+ AISAPI::PurgeDescendents(id, cr);
+ }
+ else // no cap
+ {
+ // Fast purge
+ LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
+
+ // send it upstream
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("PurgeInventoryDescendents");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->nextBlock("InventoryData");
+ msg->addUUID("FolderID", id);
+ gAgent.sendReliableMessage();
+
+ // Update model immediately because there is no callback mechanism.
+ gInventory.onDescendentsPurgedFromServer(id);
+ if (cb)
{
- // Fast purge
- LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
-
- // send it upstream
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("PurgeInventoryDescendents");
- msg->nextBlock("AgentData");
- msg->addUUID("AgentID", gAgent.getID());
- msg->addUUID("SessionID", gAgent.getSessionID());
- msg->nextBlock("InventoryData");
- msg->addUUID("FolderID", id);
- gAgent.sendReliableMessage();
-
- // Update model immediately because there is no callback mechanism.
- gInventory.onDescendentsPurgedFromServer(id);
- if (cb)
- {
- cb->fire(id);
- }
+ cb->fire(id);
}
}
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 9f05ee61bd..01b0dd0077 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3052,20 +3052,23 @@ void LLViewerMediaImpl::update()
data = mMediaSource->getBitsData();
}
- // Offset the pixels pointer to match x_pos and y_pos
- data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
- data += ( y_pos * mMediaSource->getTextureDepth() );
-
+ if(data != NULL)
{
- LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
- placeholder_image->setSubImage(
- data,
- mMediaSource->getBitsWidth(),
- mMediaSource->getBitsHeight(),
- x_pos,
- y_pos,
- width,
- height);
+ // Offset the pixels pointer to match x_pos and y_pos
+ data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
+ data += ( y_pos * mMediaSource->getTextureDepth() );
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE);
+ placeholder_image->setSubImage(
+ data,
+ mMediaSource->getBitsWidth(),
+ mMediaSource->getBitsHeight(),
+ x_pos,
+ y_pos,
+ width,
+ height);
+ }
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c68f6b8a15..912b0e0b04 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -618,6 +618,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ gDebugView->mDebugConsolep->setVisible(TRUE);
std::string info_type = userdata.asString();
if ("region" == info_type)
{
@@ -8016,7 +8017,7 @@ void handle_report_bug(const LLSD& param)
LLUIString url(param.asString());
LLStringUtil::format_map_t replace;
- replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString());
+ replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getShortViewerInfoString());
LLSLURL location_url;
LLAgentUI::buildSLURL(location_url);
replace["[LOCATION]"] = LLURI::escape(location_url.getSLURLString());
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index d46bb0199b..90355b7166 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -583,7 +583,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize() ;
- gViewerWindow->saveImageNumbered(formatted);
+ LLSnapshotLivePreview::saveLocal(formatted);
}
return true;
}
@@ -799,7 +799,7 @@ void upload_new_resource(
// uploadInfo->setTransactionId(tid);
- std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory");
+ std::string url = gAgent.getRegionCapability("NewFileAgentInventory");
if ( !url.empty() )
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 507087d1ae..1ce18f5496 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1222,6 +1222,11 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
const LLUUID& obj_id = (*obj_iter);
if(!highlight_offered_object(obj_id))
{
+ const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(obj_id);
+ if (parent && (parent->getPreferredType() == LLFolderType::FT_TRASH))
+ {
+ gInventory.checkTrashOverflow();
+ }
continue;
}
@@ -2836,6 +2841,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
+ args["ORIGINAL_NAME"] = original_name;
LLSD payload;
payload["from_id"] = from_id;
// Passing the "SESSION_NAME" to use it for IM notification logging
@@ -3563,7 +3569,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLAvatarName av_name;
if (LLAvatarNameCache::get(from_id, &av_name))
{
- chat.mFromName = av_name.getDisplayName();
+ chat.mFromName = av_name.getCompleteName();
}
else
{
@@ -6845,14 +6851,10 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
// Get the message ID
msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id);
big_reason = LLAgent::sTeleportErrorMessages[message_id];
- if ( big_reason.size() > 0 )
- { // Substitute verbose reason from the local map
- args["REASON"] = big_reason;
- }
- else
- { // Nothing found in the map - use what the server returned in the original message block
+ if ( big_reason.size() <= 0 )
+ {
+ // Nothing found in the map - use what the server returned in the original message block
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason);
- args["REASON"] = big_reason;
}
LLSD llsd_block;
@@ -6867,6 +6869,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
else
{
+ if(llsd_block.has("REGION_NAME"))
+ {
+ std::string region_name = llsd_block["REGION_NAME"].asString();
+ if(!region_name.empty())
+ {
+ LLStringUtil::format_map_t name_args;
+ name_args["[REGION_NAME]"] = region_name;
+ LLStringUtil::format(big_reason, name_args);
+ }
+ }
// change notification name in this special case
if (handle_teleport_access_blocked(llsd_block, message_id, args["REASON"]))
{
@@ -6878,7 +6890,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
}
}
-
+ args["REASON"] = big_reason;
}
else
{ // Extra message payload not found - use what the simulator sent
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 1d6daed9cc..978a398986 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6216,7 +6216,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater
}
//counter-translation
-void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified)
+void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified, BOOL skip_avatar_child)
{
if(mChildList.empty())
{
@@ -6246,6 +6246,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
iter != mChildList.end(); iter++)
{
LLViewerObject* childp = *iter;
+
if (!childp->isSelected() && childp->mDrawable.notNull())
{
if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
@@ -6255,14 +6256,16 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
}
else //avatar
{
- LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
+ if(!skip_avatar_child)
+ {
+ LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
- ((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
- ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
-
- LLManip::rebuild(childp);
- }
- }
+ ((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
+ ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
+ LLManip::rebuild(childp);
+ }
+ }
+ }
}
return ;
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 24fcf0517e..7a490f6957 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -575,7 +575,7 @@ public:
public:
//counter-translation
- void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ;
+ void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ;
//counter-rotation
void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations,
const std::vector<LLVector3>& positions) ;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 8f98d66c0c..3c83e3a006 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1247,9 +1247,11 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
+ bool new_dead_object = true;
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
LL_INFOS() << "Object " << objectp->mID << " already on dead list!" << LL_ENDL;
+ new_dead_object = false;
}
else
{
@@ -1286,7 +1288,10 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
// Also, not cleaned up
removeDrawable(objectp->mDrawable);
- mNumDeadObjects++;
+ if(new_dead_object)
+ {
+ mNumDeadObjects++;
+ }
}
static LLTrace::BlockTimerStatHandle FTM_REMOVE_DRAWABLE("Remove Drawable");
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 0ab3d2b4e7..d31fc0d606 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -461,7 +461,7 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
// *TODO: I can not find any active code where this method is called...
void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
{
- std::string region_url = gAgent.getRegion()->getCapability("ParcelNavigateMedia");
+ std::string region_url = gAgent.getRegionCapability("ParcelNavigateMedia");
if (!region_url.empty())
{
// send navigate event to sim for link sharing
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index eb37613c95..3fd2af87de 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -532,7 +532,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mDead(FALSE),
mLastVisitedEntry(NULL),
mInvisibilityCheckHistory(-1),
- mPaused(FALSE)
+ mPaused(FALSE),
+ mRegionCacheHitCount(0),
+ mRegionCacheMissCount(0)
{
mWidth = region_width_meters;
mImpl->mOriginGlobal = from_region_handle(handle);
@@ -2440,6 +2442,7 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id, bool valid)
void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type)
{
+ mRegionCacheMissCount++;
#if 0
mCacheMissList.insert(CacheMissItem(id, miss_type));
#else
@@ -2491,6 +2494,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
if (entry->getCRC() == crc)
{
// Record a hit
+ mRegionCacheHitCount++;
entry->recordHit();
cache_miss_type = CACHE_MISS_TYPE_NONE;
entry->setUpdateFlags(flags);
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 61ce5b454d..69fb9c4d4e 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -338,6 +338,8 @@ public:
LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true);
bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type);
+ U64 getRegionCacheHitCount() { return mRegionCacheHitCount; }
+ U64 getRegionCacheMissCount() { return mRegionCacheMissCount; }
void requestCacheMisses();
void addCacheMissFull(const U32 local_id);
//update object cache if the object receives a full-update or terse update
@@ -534,7 +536,9 @@ private:
typedef std::list<CacheMissItem> cache_miss_list_t;
};
CacheMissItem::cache_miss_list_t mCacheMissList;
-
+ U64 mRegionCacheHitCount;
+ U64 mRegionCacheMissCount;
+
caps_received_signal_t mCapabilitiesReceivedSignal;
caps_received_signal_t mSimulatorFeaturesReceivedSignal;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index f52c82dab7..7f88d5e30f 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -489,7 +489,7 @@ void send_stats()
LLSD &system = body["system"];
system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value();
- system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ system["os"] = LLOSInfo::instance().getOSStringSimple();
system["cpu"] = gSysCPU.getCPUString();
unsigned char MACAddress[MAC_ADDRESS_BYTES];
LLUUID::getNodeID(MACAddress);
@@ -585,9 +585,6 @@ void send_stats()
misc["string_1"] = llformat("%d", window_size);
misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value());
-// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
-// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
-
F32 unbaked_time = LLVOAvatar::sUnbakedTime * 1000.f / gFrameTimeSeconds;
misc["int_1"] = LLSD::Integer(unbaked_time); // Steve: 1.22
F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 6abd6f7b64..e5a1bed48c 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1396,8 +1396,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
{
//make a duplicate in case somebody else is using this raw image
- mRawImage = mRawImage->duplicate();
- mRawImage->scale(w >> i, h >> i) ;
+ mRawImage = mRawImage->scaled(w >> i, h >> i);
}
}
}
@@ -1462,9 +1461,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
}
bool size_okay = true;
-
- U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel;
- U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
+
+ S32 discard_level = mRawDiscardLevel;
+ if (mRawDiscardLevel < 0)
+ {
+ LL_DEBUGS() << "Negative raw discard level when creating image: " << mRawDiscardLevel << LL_ENDL;
+ discard_level = 0;
+ }
+
+ U32 raw_width = mRawImage->getWidth() << discard_level;
+ U32 raw_height = mRawImage->getHeight() << discard_level;
+
if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
{
LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL;
@@ -2081,7 +2088,9 @@ bool LLViewerFetchedTexture::updateFetch()
{
make_request = false;
}
- else if(mCachedRawImage.notNull() && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
+ else if(mCachedRawImage.notNull() // can be empty
+ && mCachedRawImageReady
+ && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
{
make_request = false;
switchToCachedImage(); //use the cached raw data first
@@ -2903,8 +2912,7 @@ void LLViewerFetchedTexture::setCachedRawImage()
{
//make a duplicate in case somebody else is using this raw image
- mRawImage = mRawImage->duplicate();
- mRawImage->scale(w >> i, h >> i) ;
+ mRawImage = mRawImage->scaled(w >> i, h >> i);
}
}
mCachedRawImage = mRawImage;
@@ -3956,7 +3964,7 @@ void LLTexturePipelineTester::updateStablizingTime()
}
//virtual
-void LLTexturePipelineTester::compareTestSessions(std::ofstream* os)
+void LLTexturePipelineTester::compareTestSessions(llofstream* os)
{
LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp);
LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp);
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 8017d82604..c9dea17f63 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -779,7 +779,7 @@ private:
};
/*virtual*/ LLMetricPerformanceTesterWithSession::LLTestSession* loadTestSession(LLSD* log) ;
- /*virtual*/ void compareTestSessions(std::ofstream* os) ;
+ /*virtual*/ void compareTestSessions(llofstream* os) ;
};
#endif
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2d3b48bab3..b052a48424 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -33,6 +33,7 @@
#include <iostream>
#include <fstream>
#include <algorithm>
+#include <boost/filesystem.hpp>
#include <boost/lambda/core.hpp>
#include <boost/regex.hpp>
@@ -4353,8 +4354,10 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
}
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker)
+BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory)
{
+ insufficient_memory = FALSE;
+
if (!image)
{
LL_WARNS() << "No image to save" << LL_ENDL;
@@ -4398,6 +4401,22 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
}
+ if(LLViewerWindow::sSnapshotDir.empty())
+ {
+ return FALSE;
+ }
+
+// Check if there is enough free space to save snapshot
+#ifdef LL_WINDOWS
+ boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir));
+#else
+ boost::filesystem::space_info b_space = boost::filesystem::space(sSnapshotDir);
+#endif
+ if (b_space.free < image->getDataSize())
+ {
+ insufficient_memory = TRUE;
+ return FALSE;
+ }
// Look for an unused file name
std::string filepath;
S32 i = 1;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index a134dfaaa9..38178fa910 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -352,7 +352,7 @@ public:
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type);
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
- BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false);
+ BOOL saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory);
// Reset the directory where snapshots are saved.
// Client will open directory picker on next snapshot save.
@@ -419,6 +419,7 @@ public:
bool getSystemUIScaleFactorChanged() { return mSystemUIScaleFactorChanged; }
static void showSystemUIScaleFactorChanged();
+ static std::string getLastSnapshotDir() { return sSnapshotDir; }
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 80c6805ead..efcdb07176 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3417,10 +3417,62 @@ void LLVOAvatar::updateDebugText()
std::string output;
if (motionp->getName().empty())
{
+ std::string name;
+ if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
+ {
+ name = motionp->getID().asString();
+ LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
+ for (; anim_it != mAnimationSources.end(); ++anim_it)
+ {
+ if (anim_it->second == motionp->getID())
+ {
+ LLViewerObject* object = gObjectList.findObject(anim_it->first);
+ if (!object)
+ {
+ break;
+ }
+ if (object->isAvatar())
+ {
+ if (mMotionController.mIsSelf)
+ {
+ // Searching inventory by asset id is really long
+ // so just mark as inventory
+ // Also item is likely to be named by LLPreviewAnim
+ name += "(inventory)";
+ }
+ }
+ else
+ {
+ LLViewerInventoryItem* item = NULL;
+ if (!object->isInventoryDirty())
+ {
+ item = object->getInventoryItemByAsset(motionp->getID());
+ }
+ if (item)
+ {
+ name = item->getName();
+ }
+ else if (object->isAttachment())
+ {
+ name += "(" + getAttachmentItemName() + ")";
+ }
+ else
+ {
+ // in-world object, name or content unknown
+ name += "(in-world)";
+ }
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ name = LLUUID::null.asString();
+ }
+
output = llformat("%s - %d",
- gAgent.isGodlikeWithoutAdminMenuFakery() ?
- motionp->getID().asString().c_str() :
- LLUUID::null.asString().c_str(),
+ name.c_str(),
(U32)motionp->getPriority());
}
else
@@ -5230,10 +5282,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
if (use_new_walk_run)
result = ANIM_AGENT_FEMALE_RUN_NEW;
}
- else if (id == ANIM_AGENT_SIT)
- {
- result = ANIM_AGENT_SIT_FEMALE;
- }
}
else
{
@@ -8378,7 +8426,7 @@ void dump_sequential_xml(const std::string outprefix, const LLSD& content)
{
std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
- std::ofstream ofs(fullpath.c_str(), std::ios_base::out);
+ llofstream ofs(fullpath.c_str(), std::ios_base::out);
ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY);
LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL;
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index aa5d82a096..10af524ee7 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2246,7 +2246,9 @@ bool LLVOAvatarSelf::updateAvatarRezMetrics(bool force_send)
{
const F32 AV_METRICS_INTERVAL_QA = 30.0;
F32 send_period = 300.0;
- if (gSavedSettings.getBOOL("QAModeMetrics"))
+
+ static LLCachedControl<bool> qa_mode_metrics(gSavedSettings,"QAModeMetrics");
+ if (qa_mode_metrics)
{
send_period = AV_METRICS_INTERVAL_QA;
}
@@ -2742,7 +2744,7 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
//------------------------------------------------------------------------
void LLVOAvatarSelf::sendHoverHeight() const
{
- std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
+ std::string url = gAgent.getRegionCapability("AgentPreferences");
if (!url.empty())
{
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index fd1d57a9d0..fb28d9bdb5 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -1093,11 +1093,21 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version)
}
mCacheSize = llclamp(size, MIN_ENTRIES_TO_PURGE, MAX_NUM_OBJECT_ENTRIES);
mMetaInfo.mVersion = cache_version;
+
+#if defined(ADDRESS_SIZE)
+ U32 expected_address = ADDRESS_SIZE;
+#else
+ U32 expected_address = 32;
+#endif
+ mMetaInfo.mAddressSize = expected_address;
+
readCacheHeader();
- if(mMetaInfo.mVersion != cache_version)
+ if( mMetaInfo.mVersion != cache_version
+ || mMetaInfo.mAddressSize != expected_address)
{
mMetaInfo.mVersion = cache_version ;
+ mMetaInfo.mAddressSize = expected_address;
if(mReadOnly) //disable cache
{
clearCacheInMemory();
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 7aabde1b2d..7d450c5231 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -237,9 +237,10 @@ private:
struct HeaderMetaInfo
{
- HeaderMetaInfo() : mVersion(0){}
+ HeaderMetaInfo() : mVersion(0), mAddressSize(0) {}
U32 mVersion;
+ U32 mAddressSize;
};
struct header_entry_less
@@ -267,6 +268,9 @@ public:
void setReadOnly(bool read_only) {mReadOnly = read_only;}
+ U32 getCacheEntries() { return mNumEntries; }
+ U32 getCacheEntriesMax() { return mCacheSize; }
+
private:
void setDirNames(ELLPath location);
// determine the cache filename for the region from the region handle
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 189ed54993..25df528d89 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -153,6 +153,7 @@ static bool sMuteListListener_listening = false;
///////////////////////////////////////////////////////////////////////////////////////////////
static LLProcessPtr sGatewayPtr;
+static LLEventStream sGatewayPump("VivoxDaemonPump", true);
static bool isGatewayRunning()
{
@@ -163,6 +164,7 @@ static void killGateway()
{
if (sGatewayPtr)
{
+ sGatewayPump.stopListening("VivoxDaemonPump");
sGatewayPtr->kill();
}
}
@@ -599,6 +601,19 @@ bool LLVivoxVoiceClient::endAndDisconnectSession()
return true;
}
+bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data)
+{
+ if (!LLAppViewer::isExiting())
+ {
+ terminateAudioSession(false);
+ closeSocket();
+ cleanUp();
+ LLVoiceClient::getInstance()->setUserPTTState(false);
+ gAgent.setVoiceConnected(false);
+ }
+ sGatewayPump.stopListening("VivoxDaemonPump");
+ return false;
+}
bool LLVivoxVoiceClient::startAndLaunchDaemon()
{
@@ -670,6 +685,9 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
params.args.add(LLVivoxSecurity::getInstance()->connectorHandle());
# endif // VIVOX_HANDLE_ARGS
+ params.postend = sGatewayPump.getName();
+ sGatewayPump.listen("VivoxDaemonPump", boost::bind(&LLVivoxVoiceClient::callbackEndDaemon, this, _1));
+
sGatewayPtr = LLProcess::create(params);
mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort"));
@@ -764,15 +782,13 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
llcoro::suspend();
}
- LLViewerRegion *region = gAgent.getRegion();
-
- while (!region->capabilitiesReceived())
+ while (!gAgent.getRegion()->capabilitiesReceived())
{
// *TODO* Pump a message for wake up.
llcoro::suspend();
}
- std::string url = region->getCapability("ProvisionVoiceAccountRequest");
+ std::string url = gAgent.getRegionCapability("ProvisionVoiceAccountRequest");
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 81e924e438..c7ce92fff5 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -623,6 +623,7 @@ private:
bool startAndConnectSession();
bool endAndDisconnectSession();
+ bool callbackEndDaemon(const LLSD& data);
bool startAndLaunchDaemon();
bool provisionVoiceAccount();
bool establishVoiceConnection();
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 8026dc3ea8..b816225b07 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -192,7 +192,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["CHANNEL"] = LLVersionInfo::getChannel();
substitution["GRID"] = LLGridManager::getInstance()->getGridId();
substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridId());
- substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ substitution["OS"] = LLOSInfo::instance().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
substitution["FIRST_LOGIN"] = gAgent.isFirstLogin();
@@ -224,6 +224,22 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
}
substitution["PARCEL_ID"] = llformat("%d", parcel_id);
+ // find the grid
+ std::string current_grid = LLGridManager::getInstance()->getGridId();
+ std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower);
+ if (current_grid == "agni")
+ {
+ substitution["GRID"] = "secondlife.com";
+ }
+ else if (current_grid == "damballah")
+ {
+ // Staging grid has its own naming scheme.
+ substitution["GRID"] = "secondlife-staging.com";
+ }
+ else
+ {
+ substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str());
+ }
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index 87e8c3008e..ea65a0c6d9 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -74,7 +74,7 @@ void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id)
// static
bool LLEnvironmentRequest::doRequest()
{
- std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
+ std::string url = gAgent.getRegionCapability("EnvironmentSettings");
if (url.empty())
{
LL_INFOS("WindlightCaps") << "Skipping windlight setting request - we don't have this capability" << LL_ENDL;
@@ -162,7 +162,7 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content)
sLastUpdate = current;
// Send update request.
- std::string url = gAgent.getRegion()->getCapability("EnvironmentSettings");
+ std::string url = gAgent.getRegionCapability("EnvironmentSettings");
if (url.empty())
{
LL_WARNS("WindlightCaps") << "Applying windlight settings not supported" << LL_ENDL;
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index cc3645131d..99070d5bee 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -312,7 +312,7 @@ public:
}
XMLRPC_RequestSetData(request, xparams);
- mTransaction.reset(new LLXMLRPCTransaction(mUri, request));
+ mTransaction.reset(new LLXMLRPCTransaction(mUri, request, true, command.has("http_params")? LLSD(command["http_params"]) : LLSD()));
mPreviousStatus = mTransaction->status(NULL);
// Free the XMLRPC_REQUEST object and the attached data values.
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index f8b38669b6..0c8495a6e4 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -208,7 +208,7 @@ public:
std::string mCertStore;
LLPointer<LLCertificate> mErrorCert;
- Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip);
+ Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams);
Impl(const std::string& uri,
const std::string& method, LLXMLRPCValue params, bool useGzip);
~Impl();
@@ -219,7 +219,7 @@ public:
void setHttpStatus(const LLCore::HttpStatus &status);
private:
- void init(XMLRPC_REQUEST request, bool useGzip);
+ void init(XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams);
};
LLXMLRPCTransaction::Handler::Handler(LLCore::HttpRequest::ptr_t &request,
@@ -315,13 +315,13 @@ void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
//=========================================================================
LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
- XMLRPC_REQUEST request, bool useGzip)
+ XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
: mHttpRequest(),
mStatus(LLXMLRPCTransaction::StatusNotStarted),
mURI(uri),
mResponse(0)
{
- init(request, useGzip);
+ init(request, useGzip, httpParams);
}
@@ -337,7 +337,7 @@ LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
XMLRPC_RequestSetRequestType(request, xmlrpc_request_call);
XMLRPC_RequestSetData(request, params.getValue());
- init(request, useGzip);
+ init(request, useGzip, LLSD());
// DEV-28398: without this XMLRPC_RequestFree() call, it looks as though
// the 'request' object is simply leaked. It's less clear to me whether we
// should also ask to free request value data (second param 1), since the
@@ -345,7 +345,7 @@ LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
XMLRPC_RequestFree(request, 1);
}
-void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
+void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
{
LLCore::HttpOptions::ptr_t httpOpts;
LLCore::HttpHeaders::ptr_t httpHeaders;
@@ -359,7 +359,15 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
- httpOpts->setTimeout(40L);
+ // delay between repeats will start from 5 sec and grow to 20 sec with each repeat
+ httpOpts->setMinBackoff(5E6L);
+ httpOpts->setMaxBackoff(20E6L);
+
+ httpOpts->setTimeout(httpParams.has("timeout") ? httpParams["timeout"].asInteger() : 40L);
+ if (httpParams.has("retries"))
+ {
+ httpOpts->setRetries(httpParams["retries"].asInteger());
+ }
bool vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert");
mCertStore = gSavedSettings.getString("CertStore");
@@ -526,8 +534,8 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status)
LLXMLRPCTransaction::LLXMLRPCTransaction(
- const std::string& uri, XMLRPC_REQUEST request, bool useGzip)
-: impl(* new Impl(uri, request, useGzip))
+ const std::string& uri, XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
+: impl(* new Impl(uri, request, useGzip, httpParams))
{ }
diff --git a/indra/newview/llxmlrpctransaction.h b/indra/newview/llxmlrpctransaction.h
index 3a1c9c82b7..7a9bc991f7 100644
--- a/indra/newview/llxmlrpctransaction.h
+++ b/indra/newview/llxmlrpctransaction.h
@@ -85,7 +85,7 @@ class LLXMLRPCTransaction
{
public:
LLXMLRPCTransaction(const std::string& uri,
- XMLRPC_REQUEST request, bool useGzip = true);
+ XMLRPC_REQUEST request, bool useGzip = true, const LLSD& httpParams = LLSD());
// does not take ownership of the request object
// request can be freed as soon as the transaction is constructed
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index 2a8eaf26ec..a113c5cf78 100644
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="Hilfe" name="Help">
<menu_item_call label="Anweisungen..." name="How To"/>
+ <menu_item_call label="Kurzanleitung" name="Quickstart"/>
<menu_item_call label="Knowledge Base" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Community-Foren" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
index 60e4fb19a7..b8ddc63b93 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Cache:
</text>
- <spinner label="Cache-Größe (64 – 9.984 MB)" name="cachesizespinner"/>
+ <spinner label="Cache-Größe (256 – 9.984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
index 1a55dc2e2c..dddb258ed9 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
@@ -16,6 +16,10 @@
&apos;[TEXT]&apos; not found
</floater.string>
<floater.string
+ name="not_found_text">
+ Resident wasn't found.
+ </floater.string>
+ <floater.string
name="no_one_near">
No one near
</floater.string>
diff --git a/indra/newview/skins/default/xui/en/floater_grid_status.xml b/indra/newview/skins/default/xui/en/floater_grid_status.xml
index b97bd8056d..bf78204282 100644
--- a/indra/newview/skins/default/xui/en/floater_grid_status.xml
+++ b/indra/newview/skins/default/xui/en/floater_grid_status.xml
@@ -12,7 +12,6 @@
save_rect="true"
save_visibility="true"
title=""
- initial_mime_type="text/html"
width="780"
tab_stop="true"
filename="floater_web_content.xml"/>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
index 519d3e043c..1b4992b4ca 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
- height="440"
+ height="468"
layout="topleft"
name="Inventory Finder"
help_topic="inventory_finder"
@@ -245,11 +245,36 @@
layout="topleft"
left="10"
name="horiz_separator"
- top_pad="8"
+ top_pad="10"
width="260"/>
<check_box
height="16"
- top="324"
+ label="Created by me"
+ layout="topleft"
+ left="8"
+ name="check_created_by_me"
+ top_delta="8"
+ width="130" />
+ <check_box
+ height="16"
+ label="Created by others"
+ layout="topleft"
+ left_pad="0"
+ name="check_created_by_others"
+ top_delta="0"
+ width="70" />
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="0"
+ layout="topleft"
+ left="10"
+ name="horiz_separator2"
+ top_pad="10"
+ width="260"/>
+ <check_box
+ height="16"
+ top="352"
label="Since Logoff"
layout="topleft"
left_delta="0"
@@ -265,7 +290,7 @@
layout="topleft"
left_delta="0"
name="- OR -"
- top="342"
+ top="370"
width="144">
- OR -
</text>
@@ -273,7 +298,7 @@
height="16"
layout="topleft"
name="date_search_direction"
- top="360"
+ top="388"
left="8"
width="270">
<radio_item
@@ -343,6 +368,6 @@
layout="topleft"
name="Close"
right="-6"
- top="406"
+ top="434"
width="76" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml
index 612c894b59..e3b49bf917 100644
--- a/indra/newview/skins/default/xui/en/floater_tos.xml
+++ b/indra/newview/skins/default/xui/en/floater_tos.xml
@@ -15,59 +15,31 @@
name="loading_url">
data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E
</floater.string>
- <button
- enabled="false"
- height="20"
- label="Continue"
- label_selected="Continue"
- layout="topleft"
- left="484"
- name="Continue"
- top="464"
- width="100" />
- <button
- height="20"
- label="Cancel"
- label_selected="Cancel"
- layout="topleft"
- left_delta="-468"
- name="Cancel"
- top_delta="0"
- width="100" />
- <check_box
- follows="top|right"
- height="16"
- label="I Agree to the Terms of Service and Privacy Policy"
- layout="topleft"
- left_delta="0"
- name="agree_chk"
- top_delta="-45"
- width="55" />
<text
type="string"
length="1"
follows="left|top"
font="SansSerif"
- height="30"
+ height="45"
layout="topleft"
- left_delta="0"
+ left="20"
name="tos_heading"
- top_delta="-399"
+ top="20"
word_wrap="true"
width="552">
- Please read the following Terms of Service and Privacy Policy carefully. To continue logging in to [SECOND_LIFE], you must accept the agreement.
+ Please read the following Second Life Terms and Conditions, Privacy Policy, and Terms of Service, including the requirements for the use of arbitration and the waiver of any class or group claim to resolve disputes. To continue logging in to [SECOND_LIFE], you must accept these agreements.
</text>
- <text
+ <text
type="string"
length="1"
follows="left|top"
font="SansSerif"
height="30"
layout="topleft"
- left="16"
+ left="20"
name="external_tos_required"
visible="false"
- top="32"
+ top="20"
word_wrap="true"
width="552">
You will need to go to https://my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you!
@@ -75,10 +47,52 @@
<web_browser
trusted_content="true"
follows="left|top"
- height="340"
+ height="305"
layout="topleft"
left_delta="0"
name="tos_html"
- top_delta="40"
+ top_delta="70"
width="568" />
+ <check_box
+ follows="top|left"
+ font="SansSerif"
+ height="16"
+ label="I have read and agree to"
+ layout="topleft"
+ left_delta="0"
+ name="agree_chk"
+ top_delta="320"
+ width="55" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="30"
+ layout="topleft"
+ left_delta="20"
+ name="agree_list"
+ top_delta="15"
+ word_wrap="true"
+ width="552">the Second Life Terms and Conditions, Privacy Policy, and Terms of Service, including the dispute resolution requirements.
+ </text>
+ <button
+ enabled="false"
+ height="20"
+ label="Continue"
+ label_selected="Continue"
+ layout="topleft"
+ left="484"
+ name="Continue"
+ top_delta="35"
+ width="100" />
+ <button
+ height="20"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ left_delta="-468"
+ name="Cancel"
+ top_delta="0"
+ width="100" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index 4473ce0cda..fe9ffba6cd 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -10,7 +10,6 @@
help_topic="floater_web_content"
save_rect="true"
title=""
- initial_mime_type="text/html"
width="780">
<layout_stack
bottom="775"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
index 410caa7290..05ab4d35a0 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu
+<toggleable_menu
height="101"
layout="topleft"
left="100"
@@ -109,5 +109,43 @@
name="Mute Text">
<on_click function="AvatarIcon.Action" parameter="mute_unmute" />
<on_check function="AvatarIcon.Check" parameter="is_muted" />
- </menu_item_check>
-</menu>
+ </menu_item_check>
+ <menu_item_separator layout="topleft" name="Moderator Options Separator"/>
+ <context_menu
+ label="Moderator Options"
+ layout="topleft"
+ name="Moderator Options">
+ <menu_item_check
+ label="Allow text chat"
+ layout="topleft"
+ name="AllowTextChat">
+ <on_check function="AvatarIcon.Check" parameter="is_allowed_text_chat" />
+ <on_click function="AvatarIcon.Action" parameter="toggle_allow_text_chat" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_allow_text_chat" />
+ </menu_item_check>
+ <menu_item_call
+ label="Mute this participant"
+ layout="topleft"
+ name="ModerateVoiceMuteSelected">
+ <on_click function="AvatarIcon.Action" parameter="group_mute" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_mute" />
+ <on_visible function="AvatarIcon.Visible" parameter="show_mute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unmute this participant"
+ layout="topleft"
+ name="ModerateVoiceUnMuteSelected">
+ <on_click function="AvatarIcon.Action" parameter="group_unmute" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_unmute" />
+ <on_visible function="AvatarIcon.Visible" parameter="show_unmute" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator layout="topleft" name="Group Ban Separator"/>
+ <menu_item_call
+ label="Ban member"
+ layout="topleft"
+ name="BanMember">
+ <on_click function="AvatarIcon.Action" parameter="ban_member" />
+ <on_enable function="AvatarIcon.Enable" parameter="can_ban_member" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index ec9f947338..5b45364127 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -569,6 +569,14 @@
function="Inventory.DoToSelected"
parameter="copy_uuid" />
</menu_item_call>
+ <menu_item_call
+ label="Show in Main Panel"
+ layout="topleft"
+ name="Show in Main Panel">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="show_in_main_panel" />
+ </menu_item_call>
<menu_item_separator
layout="topleft"
name="Copy Separator" />
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 8620c09f9a..ee1ff372a7 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4,6 +4,11 @@
Don&apos;t show me this again
</global>
+ <global name="skipnexttimesessiononly">
+Don&apos;t show me this again
+(for current session)
+ </global>
+
<global name="alwayschoose">
Always choose this option
@@ -869,7 +874,7 @@ Do you wish to proceed?
icon="alertmodal.tga"
name="JoinGroupNoCost"
type="alertmodal">
-You are joining group [NAME].
+You are joining group &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
Do you wish to proceed?
<tag>group</tag>
<tag>confirm</tag>
@@ -960,7 +965,7 @@ Sorry, trial users can't join groups.
icon="alertmodal.tga"
name="JoinGroupMaxGroups"
type="alertmodal">
-You cannot join '[group_name]':
+You cannot join &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
You are already a member of [group_count] groups, the maximum number allowed is [max_groups]
<tag>success</tag>
<tag>group_id</tag>
@@ -976,7 +981,7 @@ You are already a member of [group_count] groups, the maximum number allowed is
icon="alertmodal.tga"
name="JoinGroupClosedEnrollment"
type="alertmodal">
-You cannot join '[group_name]':
+You cannot join &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
The group no longer has open enrollment.
<tag>group_id</tag>
<tag>success</tag>
@@ -1065,7 +1070,7 @@ Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NA
icon="alertmodal.tga"
name="ReturnObjectsDeededToGroup"
type="alertmodal">
-Are you sure you want to return all objects shared with the group &apos;[NAME]&apos; on this parcel of land back to their previous owner&apos;s inventory?
+Are you sure you want to return all objects shared with the group &apos;&lt;nolink&gt;[NAME]&lt;/nolink&gt;&apos; on this parcel of land back to their previous owner&apos;s inventory?
*WARNING* This will delete the non-transferable objects deeded to the group!
@@ -1168,7 +1173,7 @@ Are you sure you want to disable all objects in this region?
icon="alertmodal.tga"
name="ReturnObjectsNotOwnedByGroup"
type="alertmodal">
-Return the objects on this parcel of land that are NOT shared with the group [NAME] back to their owners?
+Return the objects on this parcel of land that are NOT shared with the group &lt;nolink&gt;[NAME]&lt;/nolink&gt; back to their owners?
Objects: [N]
<tag>confirm</tag>
@@ -1293,7 +1298,7 @@ There was a problem uploading a report screenshot due to the following reason: [
name="MustAgreeToLogIn"
type="alertmodal">
<tag>fail</tag>
-You must agree to the Terms of Service to continue logging into [SECOND_LIFE].
+You must agree to the Second Life Terms and Conditions, Privacy Policy, and Terms of Service to continue logging into [SECOND_LIFE].
</notification>
<notification
@@ -1956,7 +1961,7 @@ Eject [AVATAR_NAME] from your land?
name="EjectAvatarFromGroup"
persist="true"
type="notify">
-You ejected [AVATAR_NAME] from group [GROUP_NAME]
+You ejected [AVATAR_NAME] from group &lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;
<tag>group</tag>
</notification>
@@ -3331,7 +3336,7 @@ Please select a smaller area and try again.
By deeding this parcel, the group will be required to have and maintain sufficient land use credits.
The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members.
-Deed this [AREA] m² of land to the group &apos;[GROUP_NAME]&apos;?
+Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@@ -3348,7 +3353,7 @@ By deeding this parcel, the group will be required to have and maintain sufficie
The deed will include a simultaneous land contribution to the group from &apos;[NAME]&apos;.
The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members.
-Deed this [AREA] m² of land to the group &apos;[GROUP_NAME]&apos;?
+Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@@ -4324,7 +4329,7 @@ Leave Group?
icon="notify.tga"
name="GroupDepart"
type="notify">
-You have left the group &apos;[group_name]&apos;.
+You have left the group &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;.
<tag>group</tag>
</notification>
@@ -6004,8 +6009,33 @@ You cannot undo this action.
<unique/>
[QUESTION]
<tag>confirm</tag>
+ <form name="form">
+ <ignore name="ignore"
+ session_only="true"
+ text="Confirm before deleting items"/>
+ <button
+ default="true"
+ index="0"
+ name="Yes"
+ text="OK"/>
+ <button
+ index="1"
+ name="No"
+ text="Cancel"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DeleteFilteredItems"
+ type="alertmodal">
+ <unique/>
+ Your inventory is currently filtered and not all of the items you're about to delete are currently visible.
+
+Are you sure you want to delete them?
+ <tag>confirm</tag>
<usetemplate
- ignoretext="Confirm before deleting items"
+ ignoretext="Confirm before deleting filtered items"
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
@@ -6559,6 +6589,13 @@ Although you&apos;re very nice, you can&apos;t add yourself as a friend.
<notification
icon="notifytip.tga"
+ name="AddSelfRenderExceptions"
+ type="notifytip">
+You can&apos;t add yourself to the rendering exceptions list.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
name="UploadingAuctionSnapshot"
type="notifytip">
Uploading in-world and web site snapshots...
@@ -7039,7 +7076,7 @@ The objects on the selected parcel of land owned by the Resident &apos;[NAME]&ap
name="GroupObjectsReturned"
persist="true"
type="notify">
-The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner&apos;s inventory.
+The objects on the selected parcel of land shared with the group &lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt; have been returned back to their owner&apos;s inventory.
Transferable deeded objects have been returned to their previous owners.
Non-transferable objects that are deeded to the group have been deleted.
<tag>group</tag>
@@ -7527,6 +7564,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
name="TeleportOffered"
log_to_im="true"
log_to_chat="false"
+ fade_toast="false"
type="offer"
sound="UISndNewIncomingIMSession">
[NAME_SLURL] has offered to teleport you to their location:
@@ -7602,6 +7640,7 @@ However, this region contains content accessible to adults only.
icon="notify.tga"
name="TeleportRequest"
log_to_im="true"
+ fade_toast="false"
type="offer">
[NAME_SLURL] is requesting to be teleported to your location.
[MESSAGE]
@@ -7958,6 +7997,7 @@ Other Key Experiences may be available.
icon="notify.tga"
name="ScriptQuestionExperience"
persist="false"
+ fade_toast="false"
type="notify">
&apos;&lt;nolink&gt;[OBJECTNAME]&lt;/nolink&gt;&apos;, an object owned by &apos;[NAME]&apos;, requests your participation in the [GRID_WIDE] experience:
@@ -8067,7 +8107,7 @@ To grant this permission please update your viewer to the latest version from [D
show_toast="false"
type="notify">
<tag>group</tag>
-[GROUPNAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
+&lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt;&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
[MESSAGE]
<form name="form">
<button
@@ -8198,7 +8238,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block
icon="notify.tga"
name="VoiceInviteGroup"
type="notify">
-[NAME] has joined a Voice Chat call with the group [GROUP].
+[NAME] has joined a Voice Chat call with the group &lt;nolink&gt;[GROUP]&lt;/nolink&gt;.
Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<tag>group</tag>
<tag>confirm</tag>
@@ -8530,6 +8570,11 @@ Appearance has been saved to XML to [PATH]
Failed to save appearance to XML.
</notification>
+ <notification icon="notifytip.tga"
+ name="SnapshotToComputerFailed" type="notifytip">
+Failed to save snapshot to [PATH]: Disk is full. [NEED_MEMORY]KB is required but only [FREE_MEMORY]KB is free.
+ </notification>
+
<notification
icon="notifytip.tga"
name="PresetNotSaved"
diff --git a/indra/newview/skins/default/xui/en/panel_active_object_row.xml b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
index 3e3271b181..656171ff96 100644
--- a/indra/newview/skins/default/xui/en/panel_active_object_row.xml
+++ b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
@@ -18,15 +18,7 @@
left="5"
height="25"
width="25"
- visible="false"
- speaker.name="speaker_p2p"
- speaker.width="20"
- speaker.height="25"
- speaker.left="25"
- speaker.top="25"
- speaker.auto_update="true"
- speaker.draw_border="false"
- speaker.visible="false">
+ visible="false">
</chiclet_script>
<chiclet_offer
name="inv_offer_chiclet"
@@ -36,15 +28,7 @@
left="5"
height="25"
width="25"
- visible="false"
- speaker.name="speaker_p2p"
- speaker.width="20"
- speaker.height="25"
- speaker.left="25"
- speaker.top="25"
- speaker.auto_update="true"
- speaker.draw_border="false"
- speaker.visible="false">
+ visible="false">
</chiclet_offer>
<text
type="string"
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 0a85477bf4..df70398599 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -41,13 +41,37 @@
text_pad_left="10"
follows="left|top|right"
height="23"
- label="Filter Inventory"
+ label="Enter search text"
layout="topleft"
left="10"
max_length_chars="300"
name="inventory search editor"
top="18"
- width="303" />
+ width="208" />
+ <combo_box
+ height="23"
+ layout="topleft"
+ left_pad="4"
+ name="search_type"
+ follows="top|right"
+ width="90">
+ <item
+ label="Name"
+ name="Name"
+ value="search_by_name"/>
+ <item
+ label="Creator"
+ name="Creator"
+ value="search_by_creator"/>
+ <item
+ label="Description"
+ name="Description"
+ value="search_by_description"/>
+ <item
+ label="UUID"
+ name="UUID"
+ value="search_by_UUID"/>
+ </combo_box>
<tab_container
follows="all"
halign="center"
@@ -92,6 +116,20 @@
name="Recent Items"
show_item_link_overlays="true"
width="290" />
+ <inventory_panel
+ name="Worn Items"
+ label="WORN"
+ show_empty_message="false"
+ follows="all"
+ layout="topleft"
+ width="290"
+ bg_opaque_color="DkGray2"
+ bg_alpha_color="DkGray2"
+ background_visible="true"
+ border="false"
+ bevel_style="none"
+ scroll.reserve_scroll_corner="false">
+ </inventory_panel>
</tab_container>
<layout_stack
animate="false"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index e844a15118..2316beeb36 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -193,7 +193,7 @@
follows="left|top"
height="16"
increment="1"
- initial_val="256"
+ initial_value="256"
label=""
label_width="0"
left_delta="68"
@@ -213,7 +213,7 @@
follows="left|top"
height="16"
increment="1"
- initial_val="256"
+ initial_value="256"
label=""
label_width="0"
left_delta="20"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 0cd56af6d7..4f0bb9d3b7 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -32,12 +32,12 @@
height="23"
increment="64"
initial_value="1024"
- label="Cache size (64 - 9984MB)"
+ label="Cache size (256 - 9984MB)"
label_width="150"
layout="topleft"
left="80"
max_val="9984"
- min_val="64"
+ min_val="256"
top_pad="10"
name="cachesizespinner"
width="200" />
@@ -87,7 +87,7 @@
height="23"
layout="topleft"
left="80"
- max_length="4096"
+ max_length_bytes="4096"
name="cache_location"
top_pad="5"
width="205" />
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 78f771cd51..9e7023d2f2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
border="true"
- has_border="true"
height="408"
label="Text Chat"
layout="topleft"
@@ -541,7 +540,7 @@
height="23"
layout="topleft"
left_pad="55"
- max_length="4096"
+ max_length_bytes="4096"
name="log_path_string"
top_delta="-5"
width="185">
diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml
index 4d20ecb9b6..8d058b0b53 100644
--- a/indra/newview/skins/default/xui/en/role_actions.xml
+++ b/indra/newview/skins/default/xui/en/role_actions.xml
@@ -105,6 +105,9 @@
<action description="Always allow &apos;Create Objects&apos;"
longdescription="Members in a Role with this Ability can create objects on a group-owned parcel, even if it&apos;s turned off in About Land &gt; Options tab."
name="land allow create" value="25" />
+ <action description="Ignore landing point"
+ longdescription="Members in a Role with this Ability can direct teleport to a group-owned parcel, even if a landing point is set in About Land &gt; Options tab."
+ name="land allow direct teleport" value="26" />
<action description="Allow &apos;Set Home to Here&apos; on group land"
longdescription="Members in a Role with this Ability can use World menu &gt; Landmarks &gt; Set Home to Here on a parcel deeded to this group."
name="land allow set home" value="28" />
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c9be141427..439560031e 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -150,8 +150,7 @@ support@secondlife.com.</string>
<string name="LoginFailedAcountSuspended">Your account is not accessible until
[TIME] Pacific Time.</string>
<string name="LoginFailedAccountDisabled">We are unable to complete your request at this time.
-Please contact Second Life support for assistance at http://secondlife.com/support.
-If you are unable to change your password, please call (866) 476-9763.</string>
+Please contact Second Life support for assistance at http://support.secondlife.com.</string>
<string name="LoginFailedTransformError">Data inconsistency found during login.
Please contact support@secondlife.com.</string>
<string name="LoginFailedAccountMaintenance">Your account is undergoing minor maintenance.
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index 99aab42db8..1e6fa7b2c7 100644
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="Ayuda" name="Help">
<menu_item_call label="Cómo..." name="How To"/>
+ <menu_item_call label="Guía rápida" name="Quickstart"/>
<menu_item_call label="Base de Conocimientos" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Foros comunitarios" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
index efa003c17e..4cb816a120 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Caché:
</text>
- <spinner label="Tamaño de la caché (64 - 9984 MB)" name="cachesizespinner"/>
+ <spinner label="Tamaño de la caché (256 - 9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 7cbd969ca0..2c7b27860d 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -78,7 +78,7 @@ Versión de Voice Server: [VOICE_VERSION]
Paquetes perdidos: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
</string>
<string name="AboutTime">
- [mes, fecha_hora, slt] [día, fecha_hora, slt] [año, fecha_hora, slt] [hora, fecha_hora, slt]:[min, fecha_hora, slt]:[segundo,fecha_hora,slt]
+ [month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second,datetime,slt]
</string>
<string name="ErrorFetchingServerReleaseNotesURL">
Error al obtener la URL de las notas de la versión del servidor.
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 98a69aa043..b59eee2539 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="Aide" name="Help">
<menu_item_call label="Aide rapide..." name="How To"/>
+ <menu_item_call label="Démarrage rapide" name="Quickstart"/>
<menu_item_call label="Base de connaissances" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Forums de la communauté" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
index f61dc5aa35..b96cb6dc49 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Cache :
</text>
- <spinner label="Taille du cache (64 - 9984 Mo)" name="cachesizespinner"/>
+ <spinner label="Taille du cache (256 - 9984 Mo)" name="cachesizespinner"/>
<text name="text_box5">
Mo
</text>
diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml
index 216af0e458..4e438c3c23 100644
--- a/indra/newview/skins/default/xui/it/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/it/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="Aiuto" name="Help">
<menu_item_call label="Istruzioni..." name="How To"/>
+ <menu_item_call label="Guida introduttiva" name="Quickstart"/>
<menu_item_call label="Base di conoscenza" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Forum della comunità" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
index 85cbfb92ef..87cee345fa 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Cache:
</text>
- <spinner label="Dimensione cache (64 - 9984 MB)" name="cachesizespinner"/>
+ <spinner label="Dimensione cache (256 - 9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml
index a8be8e7616..c7525478eb 100644
--- a/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="ヘルプ" name="Help">
<menu_item_call label="ハウツー..." name="How To"/>
+ <menu_item_call label="クイックスタート" name="Quickstart"/>
<menu_item_call label="ナレッジベース" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="コミュニティフォーラム" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
index 62b8daeb4e..266809f4da 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
キャッシュ:
</text>
- <spinner label="キャッシュサイズ(64~9,984MB)" name="cachesizespinner"/>
+ <spinner label="キャッシュサイズ(256~9,984MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pl/panel_preferences_advanced.xml
index cc85ec20f6..4609b2f916 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_advanced.xml
@@ -3,7 +3,7 @@
<text name="Cache:">
Pamięć podręczna:
</text>
- <spinner label="Rozmiar (64 - 9984 MB)" name="cachesizespinner" />
+ <spinner label="Rozmiar (256 - 9984 MB)" name="cachesizespinner" />
<button label="Wyczyść" label_selected="Wyczyść" name="clear_cache" />
<text name="Cache location">
Położenie buforu pamięci podręcznej:
diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml
index 542734eb22..4d132447d8 100644
--- a/indra/newview/skins/default/xui/pt/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml
@@ -173,6 +173,7 @@
</menu>
<menu label="Ajuda" name="Help">
<menu_item_call label="Como..." name="How To"/>
+ <menu_item_call label="Início rápido" name="Quickstart"/>
<menu_item_call label="Base de conhecimento" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Fóruns da comunidade" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
index 15340a9a5f..56065d95a3 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Cache:
</text>
- <spinner label="Cache (64 - 9984 MB)" name="cachesizespinner"/>
+ <spinner label="Cache (256 - 9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml
index e0d8861225..8ac457dea4 100644
--- a/indra/newview/skins/default/xui/ru/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml
@@ -170,6 +170,7 @@
</menu>
<menu label="Справка" name="Help">
<menu_item_call label="Инструкции..." name="How To"/>
+ <menu_item_call label="Краткое руководство" name="Quickstart"/>
<menu_item_call label="База знаний" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Форумы сообщества" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
index 88bcc22414..03295084dc 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Кэш:
</text>
- <spinner label="Размер кэша (64 - 9984 МБ)" name="cachesizespinner"/>
+ <spinner label="Размер кэша (256 - 9984 МБ)" name="cachesizespinner"/>
<text name="text_box5">
МБ
</text>
diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml
index ef001a8687..e6e5a037ac 100644
--- a/indra/newview/skins/default/xui/tr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml
@@ -171,6 +171,7 @@
</menu>
<menu label="Yardım" name="Help">
<menu_item_call label="Nasıl yapılır..." name="How To"/>
+ <menu_item_call label="Hızlı Başlangıç" name="Quickstart"/>
<menu_item_call label="Bilgi Bankası" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Topluluk Forumları" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml
index c3ac198d08..f8aa17f0c6 100644
--- a/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
Önbellek:
</text>
- <spinner label="Önbellek boyutu (64-9984 MB)" name="cachesizespinner"/>
+ <spinner label="Önbellek boyutu (256-9984 MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml
index a58e1bb0fa..ede9942f69 100644
--- a/indra/newview/skins/default/xui/zh/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml
@@ -171,6 +171,7 @@
</menu>
<menu label="幫助" name="Help">
<menu_item_call label="簡易教學…" name="How To"/>
+ <menu_item_call label="快速上手" name="Quickstart"/>
<menu_item_call label="知識庫" name="Knowledge Base"/>
<menu_item_call label="維基" name="Wiki"/>
<menu_item_call label="社群論壇" name="Community Forums"/>
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml
index 170cdddb8c..47f1069254 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_advanced.xml
@@ -6,7 +6,7 @@
<text name="Cache:">
快取:
</text>
- <spinner label="快取大小 (64 - 9984MB)" name="cachesizespinner"/>
+ <spinner label="快取大小 (256 - 9984MB)" name="cachesizespinner"/>
<text name="text_box5">
MB
</text>
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index b603157ca7..978678a09c 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -362,7 +362,7 @@ namespace tut
accountCredential->setCredentialData(identifier, authenticator);
logininstance->setNotificationsInterface(&notifications);
- logininstance->setPlatformInfo("win", "1.3.5");
+ logininstance->setPlatformInfo("win", "1.3.5", "Windows Bogus Version 100.6.6.6");
}
LLLoginInstance* logininstance;
@@ -478,109 +478,4 @@ namespace tut
ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
}
- template<> template<>
- void lllogininstance_object::test<3>()
- {
- set_test_name("Test Mandatory Update User Accepts");
-
- // Part 1 - Mandatory Update, with User accepts response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "update";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
-
- notifications.sendYesResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<4>()
- {
- set_test_name("Test Mandatory Update User Decline");
-
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "update";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendNoResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<6>()
- {
- set_test_name("Test Optional Update User Accept");
-
- // Part 3 - Mandatory Update, with bogus response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "optional";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendYesResponse();
-
- ensure("Disconnected", !(logininstance->authSuccess()));
- }
-
- template<> template<>
- void lllogininstance_object::test<7>()
- {
- set_test_name("Test Optional Update User Denies");
-
- // Part 3 - Mandatory Update, with bogus response.
- // Test connect with update needed.
- logininstance->connect(agentCredential);
-
- ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
-
- // Update needed failure response.
- LLSD response;
- response["state"] = "offline";
- response["change"] = "fail.login";
- response["progress"] = 0.0;
- response["transfer_rate"] = 7;
- response["data"]["reason"] = "optional";
- gTestPump.post(response);
-
- ensure_equals("Notification added", notifications.addedCount(), 1);
- notifications.sendNoResponse();
-
- // User skips, should be reconnecting.
- ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI);
- ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true);
- }
}
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 630af2b73b..1c0317df1d 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -136,7 +136,7 @@ public:
private:
NamedTempFile mTempFile;
- std::ofstream mFile;
+ llofstream mFile;
};
class LLReplayLogReal: public LLReplayLog, public boost::noncopyable
@@ -569,7 +569,7 @@ int main(int argc, char **argv)
apr_status_t apr_err;
const char* opt_arg = NULL;
int opt_id = 0;
- boost::scoped_ptr<std::ofstream> output;
+ boost::scoped_ptr<llofstream> output;
const char *touch = NULL;
while(true)
@@ -599,7 +599,7 @@ int main(int argc, char **argv)
verbose_mode = true;
break;
case 'o':
- output.reset(new std::ofstream);
+ output.reset(new llofstream);
output->open(opt_arg);
break;
case 's': // --sourcedir
@@ -673,7 +673,7 @@ int main(int argc, char **argv)
if (touch && success)
{
- std::ofstream s;
+ llofstream s;
s.open(touch);
s << "ok" << std::endl;
s.close();
diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp
index 167acf6ac7..267224a79b 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.cpp
+++ b/indra/win_crash_logger/llcrashloggerwindows.cpp
@@ -377,7 +377,7 @@ bool LLCrashLoggerWindows::initCrashServer()
std::wstring wpipe_name;
wpipe_name = mCrashReportPipeStr + std::wstring(wstringize(mPID));
- std::wstring wdump_path( wstringize(dump_path) );
+ std::wstring wdump_path(utf8str_to_utf16str(dump_path));
//Pipe naming conventions: http://msdn.microsoft.com/en-us/library/aa365783%28v=vs.85%29.aspx
mCrashHandler = new CrashGenerationServer( wpipe_name,
diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp
index 7466dbb766..58746eba02 100644
--- a/indra/win_crash_logger/win_crash_logger.cpp
+++ b/indra/win_crash_logger/win_crash_logger.cpp
@@ -29,15 +29,26 @@
#include <stdlib.h>
#include "llcrashloggerwindows.h"
+#ifdef _UNICODE
+int APIENTRY wWinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPWSTR lpCmdLine,
+ int nCmdShow)
+#else
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
+#endif //_UNICODE
{
LL_INFOS() << "Starting crash reporter with args" << &lpCmdLine << LL_ENDL;
LLCrashLoggerWindows app;
app.setHandle(hInstance);
+#ifdef _UNICODE
+ app.parseCommandOptions(__argc, __wargv);
+#else
app.parseCommandOptions(__argc, __argv);
+#endif //_UNICODE
LLSD options = LLApp::instance()->getOptionData(
LLApp::PRIORITY_COMMAND_LINE);