Commit af5c5562 authored by andreykproductengine's avatar andreykproductengine
Browse files

Merge from viewer-release

parents bd42fd13 33821bd5
......@@ -553,3 +553,4 @@ ab2ec5c5423b277d23fd0511ce50c15123ff2e03 6.2.3-release
67297f9902857e357570c44722ad84de3aff974e 6.2.4-release
9777aec6dc4a30a24537297ac040861ce16b82ae 6.3.0-release
ece699718f163921717bb95a6131e94af4c4138f 6.3.1-release
07f5d5bc9faebb45695853d40a9549773db816c0 6.3.2-release
......@@ -3138,9 +3138,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>aaf04f5ed1d28477781d976dc04871ee</string>
<string>42066e2447c7a3359784438d16510992</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/31904/266163/viewer_manager-2.0.524157-darwin64-524157.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/40539/348124/viewer_manager-2.0.529188-darwin64-529188.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
......@@ -3162,9 +3162,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>4604624f11b215b052f4a840f4da4bf8</string>
<string>ca230428635ce13cb7ace0f9522f8546</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/31906/266177/viewer_manager-2.0.524157-windows-524157.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/40538/348130/viewer_manager-2.0.529188-windows-529188.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
......@@ -3175,7 +3175,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>source_type</key>
<string>hg</string>
<key>version</key>
<string>2.0.524157</string>
<string>2.0.529188</string>
</map>
<key>vlc-bin</key>
<map>
......
......@@ -1448,6 +1448,7 @@ Tonya Souther
STORM-1905
BUG-3875
BUG-3968
OPEN-345
Torben Trautman
TouchaHoney Perhaps
TraductoresAnonimos Alter
......
......@@ -8,7 +8,7 @@ include(Python)
# building in an IDE, it probably isn't. Set it explicitly using
# run_build_test.py.
add_custom_command(OUTPUT packages-info.txt
COMMENT Generating packages-info.txt for the about box
COMMENT "Generating packages-info.txt for the about box"
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
${CMAKE_SOURCE_DIR}/../autobuild.xml
......
......@@ -199,14 +199,10 @@ class BlockTimer
friend BlockTimer timeThisBlock(BlockTimerStatHandle&);
BlockTimer(BlockTimerStatHandle& timer);
#if !defined(MSC_VER) || MSC_VER < 1700
// Visual Studio 2010 has a bug where capturing an object returned by value
// into a local reference requires access to the copy constructor at the call site.
// This appears to be fixed in 2012.
public:
#endif
// no-copy
BlockTimer(const BlockTimer& other) {};
BlockTimer(const BlockTimer& other);
BlockTimer& operator=(const BlockTimer& other);
private:
U64 mStartTime;
......
......@@ -37,6 +37,42 @@ LLMortician::~LLMortician()
sGraveyard.remove(this);
}
U32 LLMortician::logClass(std::stringstream &str)
{
U32 size = sGraveyard.size();
str << "Mortician graveyard count: " << size;
str << " Zealous: " << (sDestroyImmediate ? "True" : "False");
if (size == 0)
{
return size;
}
str << " Output:\n";
std::list<LLMortician*>::iterator iter = sGraveyard.begin();
std::list<LLMortician*>::iterator end = sGraveyard.end();
while (iter!=end)
{
LLMortician* dead = *iter;
iter++;
// Be as detailed and safe as possible to figure out issues
str << "Pointer: " << dead;
if (dead)
{
try
{
str << " Is dead: " << (dead->isDead() ? "True" : "False");
str << " Name: " << typeid(*dead).name();
}
catch (...)
{
}
}
str << "\n";
}
str << "--------------------------------------------";
return size;
}
void LLMortician::updateClass()
{
while (!sGraveyard.empty())
......
......@@ -34,6 +34,8 @@ class LL_COMMON_API LLMortician
{
public:
LLMortician() { mIsDead = FALSE; }
static U32 graveyardCount() { return sGraveyard.size(); };
static U32 logClass(std::stringstream &str);
static void updateClass();
virtual ~LLMortician();
void die();
......
......@@ -44,6 +44,7 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
if (!success)
{
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
LL_ERRS() << "Couldn't load string table " << xml_filename << ". Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
return false;
}
......
......@@ -1033,24 +1033,24 @@ bool LLDir::setCacheDir(const std::string &path)
}
}
void LLDir::dumpCurrentDirectories()
void LLDir::dumpCurrentDirectories(LLError::ELevel level)
{
LL_DEBUGS("AppInit","Directories") << "Current Directories:" << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
LL_DEBUGS("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
LL_VLOGS(level, "AppInit","Directories") << "Current Directories:" << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " CurPath: " << getCurPath() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " AppName: " << getAppName() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " TempDir: " << getTempDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " CAFile: " << getCAFile() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
LL_VLOGS(level, "AppInit", "Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
}
void LLDir::append(std::string& destpath, const std::string& name) const
......
......@@ -194,7 +194,7 @@ class LLDir
virtual bool setCacheDir(const std::string &path);
virtual void updatePerAccountChatLogsDir();
virtual void dumpCurrentDirectories();
virtual void dumpCurrentDirectories(LLError::ELevel level = LLError::LEVEL_DEBUG);
// Utility routine
std::string buildSLOSCacheDir() const;
......
......@@ -46,3 +46,6 @@
- (void) languageUpdated;
- (bool) romanScript;
@end
@interface LLApplication : NSApplication
@end
......@@ -509,15 +509,6 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
[[self inputContext] handleEvent:theEvent];
}
// OS X intentionally does not send us key-up information on cmd-key combinations.
// This behaviour is not a bug, and only applies to cmd-combinations (no others).
// Since SL assumes we receive those, we fake it here.
if (mModifiers & NSCommandKeyMask && !mHasMarkedText)
{
eventData.mKeyEvent = NativeKeyEventData::KEYUP;
callKeyUp(&eventData, [theEvent keyCode], mModifiers);
}
}
- (void)flagsChanged:(NSEvent *)theEvent
......
......@@ -2121,7 +2121,7 @@ if (DARWIN)
set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}")
set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2018")
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "SecondLife.nib")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLApplication")
# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
set(CMAKE_MACOSX_RPATH 1)
......
......@@ -3710,6 +3710,23 @@ BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global )
return TRUE;
}
bool LLAgent::isInHomeRegion()
{
if(!mHaveHomePosition)
{
return false;
}
if (!getRegion())
{
return false;
}
if (getRegion()->getHandle() != mHomeRegionHandle)
{
return false;
}
return true;
}
void LLAgent::clearVisualParams(void *data)
{
if (isAgentAvatarValid())
......
......@@ -233,6 +233,8 @@ class LLAgent : public LLOldEvents::LLObservable
void setStartPosition(U32 location_id); // Marks current location as start, sends information to servers
void setHomePosRegion(const U64& region_handle, const LLVector3& pos_region);
BOOL getHomePosGlobal(LLVector3d* pos_global);
bool isInHomeRegion();
private:
void setStartPositionSuccess(const LLSD &result);
......
......@@ -342,3 +342,16 @@ struct AttachmentInfo
#endif // LL_BUGSPLAT
@end
@implementation LLApplication
- (void)sendEvent:(NSEvent *)event
{
[super sendEvent:event];
if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
{
[[self keyWindow] sendEvent:event];
}
}
@end
......@@ -2862,6 +2862,7 @@ void LLAppViewer::initStrings()
if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
{
// initial check to make sure files are there failed
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
LL_ERRS() << "Viewer failed to find localization and UI files. Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
}
LLTransUtil::parseStrings(strings_file, default_trans_args);
......@@ -4485,10 +4486,37 @@ void LLAppViewer::saveFinalSnapshot()
std::string snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_LAST_FILENAME;
snap_filename += LLStartUp::getScreenLastFilename();
// use full pixel dimensions of viewer window (not post-scale dimensions)
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, TRUE);
gViewerWindow->saveSnapshot(snap_filename,
gViewerWindow->getWindowWidthRaw(),
gViewerWindow->getWindowHeightRaw(),
FALSE,
TRUE,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
LLSnapshotModel::SNAPSHOT_FORMAT_PNG);
mSavedFinalSnapshot = TRUE;
if (gAgent.isInHomeRegion())
{
LLVector3d home;
if (gAgent.getHomePosGlobal(&home) && dist_vec(home, gAgent.getPositionGlobal()) < 10)
{
// We are at home position or close to it, see if we need to create home screenshot
// Notes:
// 1. It might be beneficial to also replace home if file is too old
// 2. This is far from best way/place to update screenshot since location might be not fully loaded,
// but we don't have many options
std::string snap_home = gDirUtilp->getLindenUserDir();
snap_home += gDirUtilp->getDirDelimiter();
snap_home += LLStartUp::getScreenHomeFilename();
if (!gDirUtilp->fileExists(snap_home))
{
// We are at home position yet no home image exist, fix it
LLFile::copy(snap_filename, snap_home);
}
}
}
}
}
......
......@@ -312,12 +312,12 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
#if DEBUGGING_SEH_FILTER
# define WINMAIN DebuggingWinMain
#else
# define WINMAIN WinMain
# define WINMAIN wWinMain
#endif
int APIENTRY WINMAIN(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
PWSTR pCmdLine,
int nCmdShow)
{
const S32 MAX_HEAPS = 255;
......@@ -356,8 +356,8 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// *FIX: global
gIconResource = MAKEINTRESOURCE(IDI_LL_ICON);
LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(lpCmdLine);
LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(ll_convert_wide_to_string(pCmdLine).c_str());
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
......@@ -469,9 +469,9 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// in a method that uses object destructors. Go figure.
// This winmain just calls the real winmain inside __try.
// The __except calls our exception filter function. For debugging purposes.
int APIENTRY WinMain(HINSTANCE hInstance,
int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
PWSTR lpCmdLine,
int nCmdShow)
{
__try
......
......@@ -502,13 +502,14 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
{
mAttachments->sort();
mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
setAttachmentsTitle();
}
else
{
mAttachments->setNoItemsCommentText(LLTrans::getString("no_attachments"));
}
setAttachmentsTitle();
if (mBodyParts->size())
{
mBodyParts->sort();
......
......@@ -327,10 +327,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
{
LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR);
cav->mRootVolp = obj;
if (cav)
{
cav->mRootVolp = obj;
// Sync up position/rotation with object
cav->matchVolumeTransform();
// Sync up position/rotation with object
cav->matchVolumeTransform();
}
return cav;
}
......
......@@ -41,6 +41,7 @@ const S32 SIZE_OF_ONE_KB = 1024;
LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed)
: LLFloater(seed),
mGotAttachmentMemoryUsed(false),
mAttachmentDetailsRequested(false),
mAttachmentMemoryMax(0),
mAttachmentMemoryUsed(0),
mGotAttachmentURLsUsed(false),
......@@ -55,12 +56,24 @@ BOOL LLFloaterMyScripts::postBuild()
std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting");
getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting));
return requestAttachmentDetails();
mAttachmentDetailsRequested = requestAttachmentDetails();
return TRUE;
}
BOOL LLFloaterMyScripts::requestAttachmentDetails()
// virtual
void LLFloaterMyScripts::onOpen(const LLSD& key)
{
if (!gAgent.getRegion()) return FALSE;
if (!mAttachmentDetailsRequested)
{
mAttachmentDetailsRequested = requestAttachmentDetails();
}
LLFloater::onOpen(key);
}
bool LLFloaterMyScripts::requestAttachmentDetails()
{
if (!gAgent.getRegion()) return false;
LLSD body;
std::string url = gAgent.getRegion()->getCapability("AttachmentResources");
......@@ -68,11 +81,11 @@ BOOL LLFloaterMyScripts::requestAttachmentDetails()
{
LLCoros::instance().launch("LLFloaterMyScripts::getAttachmentLimitsCoro",
boost::bind(&LLFloaterMyScripts::getAttachmentLimitsCoro, this, url));
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}
......@@ -284,7 +297,7 @@ void LLFloaterMyScripts::onClickRefresh(void* userdata)
btn->setEnabled(false);
}
instance->clearList();
instance->requestAttachmentDetails();
instance->mAttachmentDetailsRequested = instance->requestAttachmentDetails();
}
else
{
......
......@@ -36,15 +36,17 @@ class LLFloaterMyScripts : public LLFloater
LLFloaterMyScripts(const LLSD& seed);
BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
void setAttachmentDetails(LLSD content);
void setAttachmentSummary(LLSD content);
BOOL requestAttachmentDetails();
bool requestAttachmentDetails();
void clearList();
private:
void getAttachmentLimitsCoro(std::string url);
bool mGotAttachmentMemoryUsed;
bool mAttachmentDetailsRequested;
S32 mAttachmentMemoryMax;
S32 mAttachmentMemoryUsed;
......
......@@ -38,7 +38,7 @@
#include "llcallbacklist.h"
#include "llcheckboxctrl.h"
#include "llfontgl.h"
#include "llimagebmp.h"
#include "llimagepng.h"
#include "llimagej2c.h"
#include "llinventory.h"
#include "llnotificationsutil.h"
......@@ -89,7 +89,7 @@
#include "llcorehttputil.h"
#include "llviewerassetupload.h"
const std::string SCREEN_PREV_FILENAME = "screen_report_last.bmp";
const std::string SCREEN_PREV_FILENAME = "screen_report_last.png";
//=========================================================================
//-----------------------------------------------------------------------------
......@@ -872,10 +872,10 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
if(!use_prev_screenshot)
{
std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
LLPointer<LLImageBMP> bmp_image = new LLImageBMP;
if(bmp_image->encode(mImageRaw, 0.0f))
LLPointer<LLImagePNG> png_image = new LLImagePNG;
if(png_image->encode(mImageRaw, 0.0f))
{
bmp_image->save(screenshot_filename);
png_image->save(screenshot_filename);
}
}
else
......@@ -948,10 +948,10 @@ void LLFloaterReporter::takeNewSnapshot()
{
std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
mPrevImageRaw = new LLImageRaw;
LLPointer<LLImageBMP> start_image_bmp = new LLImageBMP;
if(start_image_bmp->load(screenshot_filename))
LLPointer<LLImagePNG> start_image_png = new LLImagePNG;
if(start_image_png->load(screenshot_filename))
{
if (start_image_bmp->decode(mPrevImageRaw, 0.0f))
if (start_image_png->decode(mPrevImageRaw, 0.0f))
{
LLNotificationsUtil::add("LoadPreviousReportScreenshot", LLSD(), LLSD(), boost::bind(&LLFloaterReporter::onLoadScreenshotDialog,this, _1, _2));
return;
......
......@@ -120,6 +120,7 @@ void LLFloaterSearch::onOpen(const LLSD& key)
p.allow_address_entry = false;
LLFloaterWebContent::onOpen(p);
mWebBrowser->setFocus(TRUE);
search(p.search);
}
......
......@@ -850,6 +850,18 @@ void LLFloaterTools::onOpen(const LLSD& key)
{
mTab->selectTabByName(panel);
}
LLTool* tool = LLToolMgr::getInstance()->getCurrentTool();
if (tool == LLToolCompInspect::getInstance()
|| tool == LLToolDragAndDrop::getInstance())
{
// Something called floater up while it was supressed (during drag n drop, inspect),
// so it won't be getting any layout or visibility updates, update once
// further updates will come from updateLayout()
LLCoordGL select_center_screen;
MASK mask = gKeyboard->currentMask(TRUE);
updatePopup(select_center_screen, mask);
}
//gMenuBarView->setItemVisible("BuildTools", TRUE);
}
......
......@@ -107,6 +107,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
static bool can_move_to_my_outfits(LLInventoryModel* model, LLInventoryCategory* inv_cat, U32 wear_limit);
static BOOL can_move_to_landmarks(LLInventoryItem* inv_item);
static bool check_category(LLInventoryModel* model,
const LLUUID& cat_id,
......@@ -2269,7 +2270,7 @@ class LLIsItemRemovable : public LLFolderViewFunctor
// Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const
{
if (!get_is_category_removable(getInventoryModel(), mUUID))
if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder())
{
return FALSE;
}
......@@ -2285,11 +2286,6 @@ BOOL LLFolderBridge::isItemRemovable() const