svn merge -r 71509:72877 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-4-Viewer --> release

Backport patches and translations from RC branch
master
Josh Bell 2007-11-01 23:10:05 +00:00
parent ef0eb8dbcf
commit 0f00eef217
26 changed files with 195 additions and 245 deletions

View File

@ -34,8 +34,8 @@
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 18;
const S32 LL_VERSION_PATCH = 3;
const S32 LL_VERSION_BUILD = 5;
const S32 LL_VERSION_PATCH = 4;
const S32 LL_VERSION_BUILD = 2;
const char * const LL_CHANNEL = "Second Life Release";

View File

@ -1239,6 +1239,7 @@ BOOL LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask)
doIt();
make_ui_sound("UISndClickRelease");
return TRUE;
}
return FALSE;
}
@ -1550,7 +1551,7 @@ public:
// LLView functionality
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ) {return FALSE; }
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual void draw( void );
virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
@ -1674,6 +1675,11 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask )
return TRUE;
}
BOOL LLMenuItemBranchDownGL::handleMouseUp( S32 x, S32 y, MASK mask )
{
return TRUE;
}
BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
{

View File

@ -67,7 +67,6 @@ const LLColor4 UI_VERTEX_COLOR(1.f, 1.f, 1.f, 1.f);
BOOL gShowTextEditCursor = TRUE;
// Language for UI construction
LLString gLanguage = "english-usa";
std::map<LLString, LLString> gTranslation;
std::list<LLString> gUntranslated;
@ -1515,104 +1514,6 @@ void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3
gl_segmented_rect_3d_tex(border_scale, border_width, border_height, width_vec, height_vec, ROUNDED_RECT_TOP);
}
#if 0 // No longer used
void load_tr(const LLString& lang)
{
LLString inname = "words." + lang + ".txt";
LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, inname.c_str());
llifstream file;
file.open(filename.c_str(), std::ios_base::binary); /* Flawfinder: ignore */
if (!file)
{
llinfos << "No translation dictionary for: " << filename << llendl;
return;
}
llinfos << "Reading language translation dictionary: " << filename << llendl;
gTranslation.clear();
gUntranslated.clear();
const S32 MAX_LINE_LEN = 1024;
char buffer[MAX_LINE_LEN]; /* Flawfinder: ignore */
while (!file.eof())
{
file.getline(buffer, MAX_LINE_LEN);
LLString line(buffer);
S32 commentpos = line.find("//");
if (commentpos != LLString::npos)
{
line = line.substr(0, commentpos);
}
S32 offset = line.find('\t');
if (offset != LLString::npos)
{
LLString english = line.substr(0,offset);
LLString translation = line.substr(offset+1);
//llinfos << "TR: " << english << " = " << translation << llendl;
gTranslation[english] = translation;
}
}
file.close();
}
void init_tr(const LLString& language)
{
if (!language.empty())
{
gLanguage = language;
}
load_tr(gLanguage);
}
void cleanup_tr()
{
// Dump untranslated phrases to help with translation
if (gUntranslated.size() > 0)
{
LLString outname = "untranslated_" + gLanguage + ".txt";
LLString outfilename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, outname.c_str());
llofstream outfile;
outfile.open(outfilename.c_str()); /* Flawfinder: ignore */
if (!outfile)
{
return;
}
llinfos << "Writing untranslated words to: " << outfilename << llendl;
LLString outtext;
for (std::list<LLString>::iterator iter = gUntranslated.begin();
iter != gUntranslated.end(); ++iter)
{
// output: english_phrase english_phrase
outtext += *iter;
outtext += "\t";
outtext += *iter;
outtext += "\n";
}
outfile << outtext.c_str();
outfile.close();
}
}
LLString tr(const LLString& english_string)
{
std::map<LLString, LLString>::iterator it = gTranslation.find(english_string);
if (it != gTranslation.end())
{
return it->second;
}
else
{
gUntranslated.push_back(english_string);
return english_string;
}
}
#endif
class LLShowXUINamesListener: public LLSimpleListener
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@ -1643,12 +1544,10 @@ void LLUI::initClass(LLControlGroup* config,
LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
LLUI::sConfigGroup->getControl("ShowXUINames")->addListener(&show_xui_names_listener);
// init_tr(language);
}
void LLUI::cleanupClass()
{
// cleanup_tr();
}

View File

@ -144,9 +144,6 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL
// Used to hide the flashing text cursor when window doesn't have focus.
extern BOOL gShowTextEditCursor;
// Language
extern LLString gLanguage;
class LLImageProviderInterface;
typedef void (*LLUIAudioCallback)(const LLUUID& uuid);

View File

@ -42,6 +42,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
// Utility stuff to get versions of the sh
#define PACKVERSION(major,minor) MAKELONG(minor,major)

View File

@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
CFBundleShortVersionString = "Second Life version 1.18.3.5";
CFBundleGetInfoString = "Second Life version 1.18.3.5, Copyright 2004-2007 Linden Research, Inc.";
CFBundleShortVersionString = "Second Life version 1.18.4.2";
CFBundleGetInfoString = "Second Life version 1.18.4.2, Copyright 2004-2007 Linden Research, Inc.";

View File

@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.18.3.5</string>
<string>1.18.4.2</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -5130,6 +5130,8 @@ void update_group_floaters(const LLUUID& group_id)
// update the talk view
gIMMgr->refresh();
}
gAgent.fireEvent(new LLEvent(&gAgent, "new group"), "");
}
// static
@ -5219,7 +5221,6 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
if (need_floater_update)
{
update_group_floaters(group.mID);
gAgent.fireEvent(new LLEvent(&gAgent, "new group"), "");
}
}
@ -5321,8 +5322,6 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **)
}
update_group_floaters(active_id);
gAgent.fireEvent(new LLEvent(&gAgent, "new group"), "");
}
// static

View File

@ -116,8 +116,10 @@ BOOL LLFloaterLandHoldings::postBuild()
element["columns"][0]["value"] = gAgent.mGroups.get(i).mName;
element["columns"][0]["font"] = "SANSSERIF";
LLUIString areastr = getUIString("area_string");
areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution));
element["columns"][1]["column"] = "area";
element["columns"][1]["value"] = llformat("%d sq. meters", gAgent.mGroups.get(i).mContribution);
element["columns"][1]["value"] = areastr;
element["columns"][1]["font"] = "SANSSERIF";
list->addElement(element, ADD_SORTED);
@ -315,14 +317,7 @@ void LLFloaterLandHoldings::refreshAggregates()
S32 current_area = gStatusBar->getSquareMetersCommitted();
S32 available_area = gStatusBar->getSquareMetersLeft();
char buffer[MAX_STRING]; /* Flawfinder: ignore */
snprintf(buffer, MAX_STRING, "%d sq. meters", allowed_area); /* Flawfinder: ignore */
childSetValue("allowed_text", LLSD(buffer));
snprintf(buffer, MAX_STRING, "%d sq. meters", current_area); /* Flawfinder: ignore */
childSetValue("current_text", LLSD(buffer));
snprintf(buffer, MAX_STRING, "%d sq. meters", available_area); /* Flawfinder: ignore */
childSetValue("available_text", LLSD(buffer));
childSetTextArg("allowed_text", "[AREA]", llformat("%d",allowed_area));
childSetTextArg("current_text", "[AREA]", llformat("%d",current_area));
childSetTextArg("available_text", "[AREA]", llformat("%d",available_area));
}

View File

@ -557,14 +557,14 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
if (is_for_sale)
{
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
std::string numerical_price;
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
childSetText("EditPrice",numerical_price);
childSetText("EditPrice",llformat("%d",numerical_price));
}
else
{
radioSaleType->setSelectedIndex(-1);
childSetText("EditPrice",LLString::null);
childSetText("EditPrice",llformat("%d",0));
}
}

View File

@ -716,10 +716,11 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
body["allow_land_resell"] = childGetValue("allow_land_resell_check");
body["agent_limit"] = childGetValue("agent_limit_spin");
body["prim_bonus"] = childGetValue("object_bonus_spin");
body["sim_access"] = childGetValue("access_combo");
body["sim_access"] = LLViewerRegion::stringToAccess(childGetValue("access_combo").asString().c_str());
body["restrict_pushobject"] = childGetValue("restrict_pushobject");
body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check");
body["block_parcel_search"] = childGetValue("block_parcel_search_check");
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
}
else

View File

@ -456,15 +456,18 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
mManipPart = LL_NO_PART;
if( hasMouseCapture() )
{
mManipPart = LL_NO_PART;
// Might have missed last update due to timing.
gSelectMgr->sendMultipleUpdate( UPD_ROTATION | UPD_POSITION );
gSelectMgr->enableSilhouette(TRUE);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
// Might have missed last update due to timing.
gSelectMgr->sendMultipleUpdate( UPD_ROTATION | UPD_POSITION );
gSelectMgr->enableSilhouette(TRUE);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
gSelectMgr->updateSelectionCenter();
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
gSelectMgr->updateSelectionCenter();
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
}
return LLManip::handleMouseUp(x, y, mask);
}

View File

@ -374,29 +374,32 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
if( (LL_FACE_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_FACE_MAX) )
if( hasMouseCapture() )
{
sendUpdates(TRUE,TRUE,FALSE);
}
else
if( (LL_CORNER_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_CORNER_MAX) )
{
sendUpdates(TRUE,TRUE,TRUE);
}
//send texture update
gSelectMgr->adjustTexturesByScale(TRUE, getStretchTextures());
gSelectMgr->enableSilhouette(TRUE);
mManipPart = LL_NO_PART;
if( (LL_FACE_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_FACE_MAX) )
{
sendUpdates(TRUE,TRUE,FALSE);
}
else
if( (LL_CORNER_MIN <= (S32)mManipPart)
&& ((S32)mManipPart <= LL_CORNER_MAX) )
{
sendUpdates(TRUE,TRUE,TRUE);
}
//send texture update
gSelectMgr->adjustTexturesByScale(TRUE, getStretchTextures());
gSelectMgr->enableSilhouette(TRUE);
mManipPart = LL_NO_PART;
// Might have missed last update due to UPDATE_DELAY timing
gSelectMgr->sendMultipleUpdate( mLastUpdateFlags );
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
// Might have missed last update due to UPDATE_DELAY timing
gSelectMgr->sendMultipleUpdate( mLastUpdateFlags );
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
}
return LLManip::handleMouseUp(x, y, mask);
}

View File

@ -1037,16 +1037,19 @@ BOOL LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
// first, perform normal processing in case this was a quick-click
handleHover(x, y, mask);
// make sure arrow colors go back to normal
mManipPart = LL_NO_PART;
gSelectMgr->enableSilhouette(TRUE);
if(hasMouseCapture())
{
// make sure arrow colors go back to normal
mManipPart = LL_NO_PART;
gSelectMgr->enableSilhouette(TRUE);
// Might have missed last update due to UPDATE_DELAY timing.
gSelectMgr->sendMultipleUpdate( UPD_POSITION );
mInSnapRegime = FALSE;
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
// Might have missed last update due to UPDATE_DELAY timing.
gSelectMgr->sendMultipleUpdate( UPD_POSITION );
mInSnapRegime = FALSE;
gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
}
return LLManip::handleMouseUp(x, y, mask);
}

View File

@ -701,9 +701,12 @@ void LLPanelClassified::refresh()
//mEnabledCheck->setEnabled(is_self);
mMatureCheck->setEnabled(is_self);
mAutoRenewCheck->setEnabled(is_self);
mAutoRenewCheck->setVisible(is_self);
if (mAutoRenewCheck)
{
mAutoRenewCheck->setEnabled(is_self);
mAutoRenewCheck->setVisible(is_self);
}
mClickThroughText->setEnabled(is_self);
mClickThroughText->setVisible(is_self);
@ -801,7 +804,10 @@ void LLPanelClassified::confirmPublish(S32 option)
mLocationChanged = false;
mCategoryCombo->resetDirty();
mMatureCheck->resetDirty();
mAutoRenewCheck->resetDirty();
if (mAutoRenewCheck)
{
mAutoRenewCheck->resetDirty();
}
}
// static

View File

@ -480,7 +480,7 @@ void LLPanelFace::getState()
{
F32 get(LLViewerObject* object, S32 face)
{
return object->getTE(face)->mScaleS;
return object->getTE(face)->mScaleT;
}
} func;
identical = gSelectMgr->getSelection()->getSelectedTEValue( &func, scale_t );

View File

@ -614,6 +614,12 @@ void LLPanelGroup::draw()
mRefreshTimer.stop();
childEnable("btn_refresh");
}
if (mCurrentTab)
{
LLString mesg;
childSetEnabled("btn_apply", mCurrentTab->needsApply(mesg));
}
}
void LLPanelGroup::refreshData()

View File

@ -392,9 +392,7 @@ void LLPanelGroupGeneral::openProfile(void* data)
bool LLPanelGroupGeneral::needsApply(LLString& mesg)
{
llinfos << "LLPanelGroupGeneral::needsApply(LLString& mesg) " << mChanged << llendl;
mesg = "General group information has changed.";
mesg = getUIString("group_info_unchanged");
return mChanged || mGroupID.isNull();
}

View File

@ -573,7 +573,7 @@ bool LLPanelGroupLandMoney::apply(LLString& mesg)
{
if (!mImplementationp->applyContribution() )
{
mesg.assign("Unable to set your land contribution.");
mesg.assign(getUIString("land_contrib_error"));
return false;
}

View File

@ -756,7 +756,7 @@ void LLPanelPermissions::refresh()
BOOL all_volume = gSelectMgr->selectionAllPCode( LL_PCODE_VOLUME );
bool include_in_search;
bool all_include_in_search = gSelectMgr->selectionGetIncludeInSearch(&include_in_search);
childSetEnabled("search_check", is_perm_modify && all_volume);
childSetEnabled("search_check", has_change_sale_ability && all_volume);
childSetValue("search_check", include_in_search);
childSetTentative("search_check", ! all_include_in_search);

View File

@ -247,21 +247,21 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
self->mDescEditor->setText(desc_str);
LLString info_text;
LLUIString traffic = self->childGetText("traffic_text");
LLUIString traffic = self->getUIString("traffic_text");
traffic.setArg("[TRAFFIC]", llformat("%d ", (int)dwell));
info_text = traffic;
LLUIString area = self->childGetText("area_text");
area.setArg("[AREA]", llformat("%d ", actual_area));
LLUIString area = self->getUIString("area_text");
area.setArg("[AREA]", llformat("%d", actual_area));
info_text += area;
if (flags & DFQ_FOR_SALE)
{
LLUIString forsale = self->childGetText("forsale_text");
forsale.setArg("[PRICE]", llformat("%d ", sale_price));
LLUIString forsale = self->getUIString("forsale_text");
forsale.setArg("[PRICE]", llformat("%d", sale_price));
info_text += forsale;
}
if (auction_id != 0)
{
LLUIString auction = self->childGetText("auction_text");
LLUIString auction = self->getUIString("auction_text");
auction.setArg("[ID]", llformat("%010d ", auction_id));
info_text += auction;
}

View File

@ -2232,8 +2232,8 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, LLString& name)
BOOL identical = TRUE;
BOOL first = TRUE;
LLUUID first_id;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); iter++ )
{
LLSelectNode* node = *iter;
if (!node->mValid)
@ -2255,7 +2255,11 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, LLString& name)
}
}
}
if (first_id.isNull())
{
return FALSE;
}
result_id = first_id;
if (identical)
@ -2286,8 +2290,8 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, LLString& name)
BOOL first = TRUE;
BOOL first_group_owned = FALSE;
LLUUID first_id;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); iter++ )
{
LLSelectNode* node = *iter;
if (!node->mValid)
@ -2312,6 +2316,10 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, LLString& name)
}
}
}
if (first_id.isNull())
{
return FALSE;
}
result_id = first_id;
@ -2354,8 +2362,8 @@ BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, LLString& name)
BOOL identical = TRUE;
BOOL first = TRUE;
LLUUID first_id;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); iter++ )
{
LLSelectNode* node = *iter;
if (!node->mValid)
@ -2377,6 +2385,10 @@ BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, LLString& name)
}
}
}
if (first_id.isNull())
{
return FALSE;
}
result_id = first_id;
@ -2415,8 +2427,8 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
BOOL identical = TRUE;
BOOL first = TRUE;
LLUUID first_id;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); iter++ )
{
LLSelectNode* node = *iter;
if (!node->mValid)
@ -2438,6 +2450,10 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
}
}
}
if (first_id.isNull())
{
return FALSE;
}
result_id = first_id;
@ -2452,8 +2468,8 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
BOOL LLSelectMgr::selectIsGroupOwned()
{
BOOL found_one = FALSE;
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++ )
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); iter++ )
{
LLSelectNode* node = *iter;
if (!node->mValid)
@ -3965,14 +3981,8 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
push_editable(std::queue<LLSelectNode*>& n) : nodes_to_send(n) {}
virtual bool apply(LLSelectNode* node)
{
// look and see if this object is actually modifiable by the current agent, because if it's not, then there's little
// point in pushing it up to the server to be updated, since we couldn't change it anyway.
// That just results in errors on screen when this function gets called by other things, like pulling down a drop down menu
LLViewerObject* object = node->getObject();
if( object && (object->permModify() || gAgent.allowOperation(PERM_MODIFY, *node->mPermissions) || gAgent.allowOperation(PERM_MOVE, *node->mPermissions)))
{
nodes_to_send.push(node);
}
nodes_to_send.push(node);
return true;
}
};

View File

@ -254,6 +254,18 @@ public:
valid_root_iterator valid_root_begin() { return valid_root_iterator(mList.begin(), mList.end()); }
valid_root_iterator valid_root_end() { return valid_root_iterator(mList.end(), mList.end()); }
struct is_root_object
{
bool operator()(LLSelectNode* node)
{
LLViewerObject* object = node->getObject();
return (object != NULL) && (object->isRootEdit() || object->isJointChild());
}
};
typedef boost::filter_iterator<is_root_object, list_t::iterator > root_object_iterator;
root_object_iterator root_object_begin() { return root_object_iterator(mList.begin(), mList.end()); }
root_object_iterator root_object_end() { return root_object_iterator(mList.end(), mList.end()); }
public:
LLObjectSelection();

View File

@ -51,6 +51,19 @@ std::vector<std::string> LLSRV::rewriteURI(const std::string& uri)
LLPointer<Responder> resp = new Responder;
gAres->rewriteURI(uri, resp);
gAres->processAll();
return resp->mUris;
gAres->processAll();
// It's been observed in deployment that c-ares can return control
// to us without firing all of our callbacks, in which case the
// returned vector will be empty, instead of a singleton as we
// might wish.
if (!resp->mUris.empty())
{
return resp->mUris;
}
std::vector<std::string> uris;
uris.push_back(uri);
return uris;
}

View File

@ -1409,7 +1409,46 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
{
LLFirstUse::useSandbox();
}
// check if it cannot be copied, and mark as remove if it is -
// this will remove the object from inventory after rez. Only
// bother with this check if we would not normally remove from
// inventory.
if(!remove_from_inventory
&& !item->getPermissions().allowCopyBy(gAgent.getID()))
{
remove_from_inventory = TRUE;
}
// Limit raycast to a single object.
// Speeds up server raycast + avoid problems with server ray
// hitting objects that were clipped by the near plane or culled
// on the viewer.
LLUUID ray_target_id;
if( raycast_target )
{
ray_target_id = raycast_target->getID();
}
else
{
ray_target_id.setNull();
}
// Check if it's in the trash.
bool is_in_trash = false;
LLUUID trash_id;
trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id))
{
is_in_trash = true;
remove_from_inventory = TRUE;
}
LLUUID source_id = from_task_inventory ? mSourceID : LLUUID::null;
// Select the object only if we're editing.
BOOL rez_selected = gToolMgr->inEdit();
// Message packing code should be it's own uninterrupted block
LLMessageSystem* msg = gMessageSystem;
if (mSource == SOURCE_NOTECARD)
{
@ -1430,55 +1469,13 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
// *FIX: We can probably compress this to a single byte, since I
// think folderid == mSourceID. This will be a later
// optimization.
if(from_task_inventory)
{
msg->addUUIDFast(_PREHASH_FromTaskID, mSourceID);
}
else
{
msg->addUUIDFast(_PREHASH_FromTaskID, LLUUID::null);
}
msg->addUUIDFast(_PREHASH_FromTaskID, source_id);
msg->addU8Fast(_PREHASH_BypassRaycast, (U8) bypass_sim_raycast);
msg->addVector3Fast(_PREHASH_RayStart, regionp->getPosRegionFromGlobal(mLastCameraPos));
msg->addVector3Fast(_PREHASH_RayEnd, regionp->getPosRegionFromGlobal(mLastHitPos));
// Limit raycast to a single object.
// Speeds up server raycast + avoid problems with server ray
// hitting objects that were clipped by the near plane or culled
// on the viewer.
LLUUID ray_target_id;
if( raycast_target )
{
ray_target_id = raycast_target->getID();
}
else
{
ray_target_id.setNull();
}
msg->addUUIDFast(_PREHASH_RayTargetID, ray_target_id );
msg->addBOOLFast(_PREHASH_RayEndIsIntersection, FALSE);
// Select the object only if we're editing.
BOOL rez_selected = gToolMgr->inEdit();
msg->addBOOLFast(_PREHASH_RezSelected, rez_selected);
// check if it cannot be copied, and mark as remove if it is -
// this will remove the object from inventory after rez. Only
// bother with this check if we would not normally remove from
// inventory.
if(!remove_from_inventory
&& !item->getPermissions().allowCopyBy(gAgent.getID()))
{
remove_from_inventory = TRUE;
}
// Check if it's in the trash.
bool is_in_trash = false;
LLUUID trash_id;
trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id))
{
is_in_trash = true;
remove_from_inventory = TRUE;
}
msg->addBOOLFast(_PREHASH_RemoveItem, remove_from_inventory);
// deal with permissions slam logic

View File

@ -898,6 +898,7 @@ void LLWorldMapView::drawAgents()
{
const LLItemInfo& info = *iter;
S32 agent_count = info.mExtra;
sim_agent_count += info.mExtra;
// Here's how we'd choose the color if info.mID were available but it's not being sent:
//LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? gFriendMapColor : gAvatarMapColor;
drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, gAvatarMapColor);