Merge branch 'master' of git://github.com/siana/SingularityViewer
This commit is contained in:
@@ -788,9 +788,12 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
llassert(max_pixels >= 0.f);
|
||||
llassert(max_chars >= 0);
|
||||
|
||||
//llassert(max_pixels >= 0.f);
|
||||
//llassert(max_chars >= 0);
|
||||
if(max_pixels < 0.f || max_chars < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL clip = FALSE;
|
||||
F32 cur_x = 0;
|
||||
|
||||
@@ -1599,7 +1599,7 @@ void LLLineEditor::draw()
|
||||
std::string text;
|
||||
for (S32 i = 0; i < mText.length(); i++)
|
||||
{
|
||||
text += '*';
|
||||
text += "\xe2\x80\xa2";
|
||||
}
|
||||
mText = text;
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ std::string LLDir::getForbiddenFileChars()
|
||||
return "\\/:*?\"<>|";
|
||||
}
|
||||
|
||||
void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
|
||||
void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last)
|
||||
{
|
||||
// if both first and last aren't set, assume we're grabbing the cached dir
|
||||
if (!first.empty() && !last.empty())
|
||||
@@ -558,6 +558,14 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
|
||||
mLindenUserDir += firstlower;
|
||||
mLindenUserDir += "_";
|
||||
mLindenUserDir += lastlower;
|
||||
|
||||
if (!grid.empty())
|
||||
{
|
||||
std::string gridlower(grid);
|
||||
LLStringUtil::toLower(gridlower);
|
||||
mPerAccountChatLogsDir += "@";
|
||||
mPerAccountChatLogsDir += gridlower;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -131,7 +131,7 @@ class LLDir
|
||||
|
||||
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
|
||||
virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory.
|
||||
virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir
|
||||
virtual void setLindenUserDir(const std::string& grid, const std::string& first, const std::string& last); // Set the linden user dir to this user's dir
|
||||
virtual void setSkinFolder(const std::string &skin_folder);
|
||||
virtual bool setCacheDir(const std::string &path);
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
#if defined(LL_DARWIN)
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#elif defined(LL_WINDOWS)
|
||||
#undef __STDC_CONSTANT_MACROS //Needed, as boost/unordered_map.hpp already defines INT32_C, etc.
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1600
|
||||
#define _STDINT_H //Visual Studio 2010 includes its own stdint header already
|
||||
#endif
|
||||
#include "MacTypes.h"
|
||||
#include "QTML.h"
|
||||
#include "Movies.h"
|
||||
|
||||
@@ -600,7 +600,14 @@ void HippoGridInfo::initFallback()
|
||||
FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/");
|
||||
}
|
||||
|
||||
|
||||
bool HippoGridInfo::supportsInvLinks(){
|
||||
if(isSecondLife())
|
||||
return true;
|
||||
else if(mLoginUri.find("avination.")!=std::string::npos)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
@@ -85,6 +85,7 @@ public:
|
||||
void setCurrencySymbol(const std::string& sym);
|
||||
void setRealCurrencySymbol(const std::string& sym);
|
||||
void setDirectoryFee(int fee);
|
||||
bool supportsInvLinks();
|
||||
|
||||
bool retrieveGridInfo();
|
||||
|
||||
|
||||
@@ -7367,10 +7367,10 @@ void LLAgent::makeNewOutfit(
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL fUseLinks = gSavedSettings.getBOOL("UseInventoryLinks") &&
|
||||
gHippoGridManager->getConnectedGrid()->isSecondLife();
|
||||
BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") ||
|
||||
!gHippoGridManager->getConnectedGrid()->supportsInvLinks();
|
||||
BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders") &&
|
||||
gHippoGridManager->getConnectedGrid()->isSecondLife();
|
||||
gHippoGridManager->getConnectedGrid()->supportsInvLinks();
|
||||
|
||||
LLAssetType::EType typeDest = (fUseOutfits) ? LLAssetType::AT_MY_OUTFITS : LLAssetType::AT_CLOTHING;
|
||||
LLAssetType::EType typeFolder = (fUseOutfits) ? LLAssetType::AT_OUTFIT : LLAssetType::AT_NONE;
|
||||
@@ -8483,10 +8483,11 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_
|
||||
}
|
||||
|
||||
const LLInventoryItem* item = obj_item_array.get(i).get();
|
||||
bool replace = !gHippoGridManager->getConnectedGrid()->supportsInvLinks();
|
||||
msg->nextBlockFast(_PREHASH_ObjectData );
|
||||
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
|
||||
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
|
||||
msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point
|
||||
msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point
|
||||
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
|
||||
msg->addStringFast(_PREHASH_Name, item->getName());
|
||||
msg->addStringFast(_PREHASH_Description, item->getDescription());
|
||||
|
||||
@@ -220,11 +220,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) {
|
||||
if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) {
|
||||
childSetEnabled("checkbox_use_links", FALSE);
|
||||
childSetValue("checkbox_use_links", FALSE);
|
||||
childSetEnabled("checkbox_use_outfits", FALSE);
|
||||
childSetValue("checkbox_use_outfits", FALSE);
|
||||
childSetValue("checkbox_use_outfits", FALSE);
|
||||
}
|
||||
|
||||
childSetAction("Save", onSave, this );
|
||||
|
||||
@@ -528,7 +528,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
|
||||
|
||||
BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
|
||||
{
|
||||
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||
if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1382,7 +1382,7 @@ BOOL LLItemBridge::isItemCopyable() const
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
if (item && !item->getIsLinkType())
|
||||
{
|
||||
if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) {
|
||||
if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) {
|
||||
return (item->getPermissions().allowCopyBy(gAgent.getID()));
|
||||
} else {
|
||||
// All items can be copied since you can
|
||||
@@ -2401,7 +2401,7 @@ void LLFolderBridge::folderOptionsMenu()
|
||||
if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments))
|
||||
{
|
||||
// </edit>
|
||||
if (gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
mItems.push_back(std::string("Add To Outfit"));
|
||||
mItems.push_back(std::string("Wear Items"));
|
||||
mItems.push_back(std::string("Replace Outfit"));
|
||||
@@ -4179,7 +4179,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
{
|
||||
items.push_back(std::string("Attach Separator"));
|
||||
items.push_back(std::string("Object Wear"));
|
||||
if (gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
items.push_back(std::string("Object Add"));
|
||||
if (!avatarp->canAttachMoreObjects())
|
||||
{
|
||||
@@ -4668,7 +4668,7 @@ void wear_inventory_category(LLInventoryCategory* category, bool copy, bool appe
|
||||
|
||||
// *NOTE: hack to get from avatar inventory to avatar
|
||||
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace)
|
||||
{
|
||||
{
|
||||
// Avoid unintentionally overwriting old wearables. We have to do
|
||||
// this up front to avoid having to deal with the case of multiple
|
||||
// wearables being dirty.
|
||||
|
||||
@@ -3614,7 +3614,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point)
|
||||
if (0 == attachment_point ||
|
||||
get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
|
||||
{
|
||||
if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||
if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
||||
{
|
||||
// If we know the attachment point then we got here by clicking an
|
||||
// "Attach to..." context menu item, so we should add, not replace.
|
||||
|
||||
@@ -807,13 +807,6 @@ bool idle_startup()
|
||||
|
||||
timeout_count = 0;
|
||||
|
||||
// OGPX : Load URL History File for saved user. Needs to happen *before* login panel is displayed.
|
||||
// Note: it only loads them if it can figure out the saved username.
|
||||
if (!firstname.empty() && !lastname.empty())
|
||||
{
|
||||
gDirUtilp->setLindenUserDir(firstname, lastname);
|
||||
LLURLHistory::loadFile("url_history.xml");
|
||||
}
|
||||
|
||||
// *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
|
||||
|
||||
@@ -972,7 +965,14 @@ bool idle_startup()
|
||||
|
||||
// create necessary directories
|
||||
// *FIX: these mkdir's should error check
|
||||
gDirUtilp->setLindenUserDir(firstname, lastname);
|
||||
if (gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
{
|
||||
gDirUtilp->setLindenUserDir(LLStringUtil::null, firstname, lastname);
|
||||
}
|
||||
else
|
||||
{
|
||||
gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
|
||||
}
|
||||
LLFile::mkdir(gDirUtilp->getLindenUserDir());
|
||||
|
||||
// Set PerAccountSettingsFile to the default value.
|
||||
@@ -1043,22 +1043,13 @@ bool idle_startup()
|
||||
// END TODO
|
||||
LLPanelLogin::close();
|
||||
}
|
||||
|
||||
|
||||
//For HTML parsing in text boxes.
|
||||
LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
|
||||
|
||||
// Load URL History File
|
||||
LLURLHistory::loadFile("url_history.xml");
|
||||
// OGPX : Since loading the file wipes the new value that might have gotten added on
|
||||
// the login panel, let's add it to URL history
|
||||
// (appendToURLCollection() only adds unique values to list)
|
||||
// OGPX kind of ugly. TODO: figure out something less hacky
|
||||
if (!gSavedSettings.getString("CmdLineRegionURI").empty())
|
||||
{
|
||||
LLURLHistory::appendToURLCollection("regionuri",gSavedSettings.getString("CmdLineRegionURI"));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// Handle startup progress screen
|
||||
//-------------------------------------------------
|
||||
|
||||
@@ -622,6 +622,7 @@ BOOL LLWearable::isDirty()
|
||||
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
|
||||
if( avatar_image->getID() != image_id )
|
||||
{
|
||||
llwarns << "image ID " << avatar_image->getID() << " was changed." << llendl;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user