summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-07-24 16:20:15 +0000
committerLoren Shih <seraph@lindenlab.com>2009-07-24 16:20:15 +0000
commitf5ba6df4c2dc5a5e0842ed028dd4de01406dca3b (patch)
tree20c3672125adec3f3db81864ef78143da01ec3c2
parentbe7e9a46dbfa6bea2c6d1a0d4e9177eb633f26b4 (diff)
svn merge -r 127369:127511 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/landmark-permissions__merge__viewer2.0.0.3-r127280 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
includes post-merge fix for DEV-36563 : Remove mAcceptsCallingCardNames For DEV-36496 : Viewer merge for Landmark & Callingcard Permissions [VIEWER] For DEV-36563 : Remove mAcceptsCallingCardNames Test plans - EXTERNAL * [ Test against a 1.30 server ] * Test various permissions operations - both on items in inventory, and rezzed items and items that are embedded in objects. * Test creating landmarks. Test plans - INTERNAL * Test against any inventory permissions smoke tests. * See test plans in QAR-1644 for full Landmark&Callingcard Permissions test plan.
-rw-r--r--indra/llinventory/llinventory.cpp13
-rw-r--r--indra/llinventory/llparcel.h4
-rw-r--r--indra/llinventory/llpermissions.cpp11
-rw-r--r--indra/llinventory/llpermissions.h3
-rw-r--r--indra/llui/lltexteditor.cpp1
-rw-r--r--indra/llui/lltexteditor.h4
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp2
-rw-r--r--indra/newview/llfloaterland.cpp13
-rw-r--r--indra/newview/llfloaterland.h1
-rw-r--r--indra/newview/llfloaterproperties.cpp20
-rw-r--r--indra/newview/llinventorybridge.cpp10
-rw-r--r--indra/newview/llpanelgroupnotices.cpp2
-rw-r--r--indra/newview/lltooldraganddrop.cpp12
-rw-r--r--indra/newview/llviewertexteditor.cpp199
-rw-r--r--indra/newview/llviewertexteditor.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_bulk_perms.xml28
18 files changed, 166 insertions, 177 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 2d507bd560..59aca12de2 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -310,6 +310,7 @@ LLInventoryItem::LLInventoryItem(
{
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
LLStringUtil::replaceChar(mDescription, '|', ' ');
+ mPermissions.initMasks(inv_type);
}
LLInventoryItem::LLInventoryItem() :
@@ -432,6 +433,9 @@ void LLInventoryItem::setDescription(const std::string& d)
void LLInventoryItem::setPermissions(const LLPermissions& perm)
{
mPermissions = perm;
+
+ // Override permissions to unrestricted if this is a landmark
+ mPermissions.initMasks(mInventoryType);
}
void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type)
@@ -503,6 +507,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
mType = static_cast<LLAssetType::EType>(type);
msg->getS8(block, "InvType", type, block_num);
mInventoryType = static_cast<LLInventoryType::EType>(type);
+ mPermissions.initMasks(mInventoryType);
msg->getU32Fast(block, _PREHASH_Flags, mFlags, block_num);
@@ -693,6 +698,9 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
lldebugs << "Resetting inventory type for " << mUUID << llendl;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
+
+ mPermissions.initMasks(mInventoryType);
+
return success;
}
@@ -896,6 +904,9 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
lldebugs << "Resetting inventory type for " << mUUID << llendl;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
+
+ mPermissions.initMasks(mInventoryType);
+
return success;
}
@@ -1118,6 +1129,8 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
+ mPermissions.initMasks(mInventoryType);
+
return true;
fail:
return false;
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 7b7896f74f..71baac8d89 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -447,8 +447,10 @@ public:
BOOL getAllowFly() const
{ return (mParcelFlags & PF_ALLOW_FLY) ? TRUE : FALSE; }
+ // Remove permission restrictions for creating landmarks.
+ // We should eventually remove this flag completely.
BOOL getAllowLandmark() const
- { return (mParcelFlags & PF_ALLOW_LANDMARK) ? TRUE : FALSE; }
+ { return TRUE; }
BOOL getAllowGroupScripts() const
{ return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? TRUE : FALSE; }
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index 559a5631dc..0babf26457 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -83,6 +83,17 @@ void LLPermissions::initMasks(PermissionMask base, PermissionMask owner,
fix();
}
+// ! BACKWARDS COMPATIBILITY ! Override masks for inventory types that
+// no longer can have restricted permissions. This takes care of previous
+// version landmarks that could have had no copy/mod/transfer bits set.
+void LLPermissions::initMasks(LLInventoryType::EType type)
+{
+ if (LLInventoryType::cannotRestrictPermissions(type))
+ {
+ initMasks(PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL);
+ }
+}
+
BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
{
if(mOwner.notNull())
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 2035b57f5c..d4ec399436 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -38,6 +38,7 @@
#include "lluuid.h"
#include "llxmlnode.h"
#include "reflective.h"
+#include "llinventorytype.h"
// prototypes
class LLMessageSystem;
@@ -129,6 +130,8 @@ public:
void initMasks(PermissionMask base, PermissionMask owner,
PermissionMask everyone, PermissionMask group,
PermissionMask next);
+ // adjust permissions based on inventory type.
+ void initMasks(LLInventoryType::EType type);
//
// ACCESSORS
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 1bc0adf684..421ba32168 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -255,7 +255,6 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p)
mTakesNonScrollClicks( p.takes_non_scroll_clicks ),
mTrackBottom( p.track_bottom ),
mAllowEmbeddedItems( p.allow_embedded_items ),
- mAcceptCallingCardNames(FALSE),
mHandleEditKeysDirectly( FALSE ),
mMouseDownX(0),
mMouseDownY(0),
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index d0769c2a8f..5e423f8548 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -268,8 +268,6 @@ public:
void setSourceID(const LLUUID& id) { mSourceID = id; }
const LLUUID& getSourceID() const { return mSourceID; }
- void setAcceptCallingCardNames(BOOL enable) { mAcceptCallingCardNames = enable; }
- BOOL acceptsCallingCardNames() const { return mAcceptCallingCardNames; }
void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; }
@@ -586,8 +584,6 @@ private:
BOOL mAllowEmbeddedItems;
- BOOL mAcceptCallingCardNames;
-
LLUUID mSourceID;
// If true, the standard edit keys (Ctrl-X, Delete, etc,) are handled here
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index adc090aa4a..ced072efaa 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -925,17 +925,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>BulkChangeIncludeLandmarks</key>
- <map>
- <key>Comment</key>
- <string>Bulk permission changes affect landmarks</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>BulkChangeIncludeNotecards</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index efaebe311a..29b91cab95 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -250,7 +250,6 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
gSavedSettings.setBOOL("BulkChangeIncludeBodyParts" , check);
gSavedSettings.setBOOL("BulkChangeIncludeClothing" , check);
gSavedSettings.setBOOL("BulkChangeIncludeGestures" , check);
- gSavedSettings.setBOOL("BulkChangeIncludeLandmarks" , check);
gSavedSettings.setBOOL("BulkChangeIncludeNotecards" , check);
gSavedSettings.setBOOL("BulkChangeIncludeObjects" , check);
gSavedSettings.setBOOL("BulkChangeIncludeScripts" , check);
@@ -273,7 +272,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
( asstype == LLAssetType::AT_BODYPART && gSavedSettings.getBOOL("BulkChangeIncludeBodyParts" )) ||
( asstype == LLAssetType::AT_CLOTHING && gSavedSettings.getBOOL("BulkChangeIncludeClothing" )) ||
( asstype == LLAssetType::AT_GESTURE && gSavedSettings.getBOOL("BulkChangeIncludeGestures" )) ||
- ( asstype == LLAssetType::AT_LANDMARK && gSavedSettings.getBOOL("BulkChangeIncludeLandmarks" )) ||
( asstype == LLAssetType::AT_FAVORITE && gSavedSettings.getBOOL("BulkChangeIncludeFavourite" )) ||
( asstype == LLAssetType::AT_NOTECARD && gSavedSettings.getBOOL("BulkChangeIncludeNotecards" )) ||
( asstype == LLAssetType::AT_OBJECT && gSavedSettings.getBOOL("BulkChangeIncludeObjects" )) ||
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4b665a789e..08a042707d 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1720,7 +1720,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mCheckFly(NULL),
mCheckGroupScripts(NULL),
mCheckOtherScripts(NULL),
- mCheckLandmark(NULL),
mCheckShowDirectory(NULL),
mCategoryCombo(NULL),
mLandingTypeCombo(NULL),
@@ -1754,10 +1753,6 @@ BOOL LLPanelLandOptions::postBuild()
childSetCommitCallback("edit land check", onCommitAny, this);
- mCheckLandmark = getChild<LLCheckBoxCtrl>( "check landmark");
- childSetCommitCallback("check landmark", onCommitAny, this);
-
-
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
childSetCommitCallback("check group scripts", onCommitAny, this);
@@ -1883,9 +1878,6 @@ void LLPanelLandOptions::refresh()
mCheckFly ->set(FALSE);
mCheckFly ->setEnabled(FALSE);
- mCheckLandmark ->set(FALSE);
- mCheckLandmark ->setEnabled(FALSE);
-
mCheckGroupScripts ->set(FALSE);
mCheckGroupScripts ->setEnabled(FALSE);
@@ -1936,9 +1928,6 @@ void LLPanelLandOptions::refresh()
mCheckFly ->set( parcel->getAllowFly() );
mCheckFly ->setEnabled( can_change_options );
- mCheckLandmark ->set( parcel->getAllowLandmark() );
- mCheckLandmark ->setEnabled( can_change_options );
-
mCheckGroupScripts ->set( parcel->getAllowGroupScripts() || parcel->getAllowOtherScripts());
mCheckGroupScripts ->setEnabled( can_change_options && !parcel->getAllowOtherScripts());
@@ -2153,7 +2142,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL allow_terraform = self->mCheckEditLand->get();
BOOL allow_damage = !self->mCheckSafe->get();
BOOL allow_fly = self->mCheckFly->get();
- BOOL allow_landmark = self->mCheckLandmark->get();
+ BOOL allow_landmark = TRUE; // cannot restrict landmark creation
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get();
BOOL allow_other_scripts = self->mCheckOtherScripts->get();
BOOL allow_publish = FALSE;
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index c04eae2c68..8f86766e3d 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -330,7 +330,6 @@ private:
LLCheckBoxCtrl* mCheckFly;
LLCheckBoxCtrl* mCheckGroupScripts;
LLCheckBoxCtrl* mCheckOtherScripts;
- LLCheckBoxCtrl* mCheckLandmark;
LLCheckBoxCtrl* mCheckShowDirectory;
LLComboBox* mCategoryCombo;
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index ca7c929d74..8e86aa3ba9 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -303,12 +303,14 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// do not enable the UI for incomplete items.
LLViewerInventoryItem* i = (LLViewerInventoryItem*)item;
BOOL is_complete = i->isComplete();
-
+ const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType());
+ const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const LLPermissions& perm = item->getPermissions();
const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_MANIPULATE);
const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
- GP_OBJECT_SET_SALE);
+ GP_OBJECT_SET_SALE) &&
+ !cannot_restrict_permissions;
const BOOL is_link = LLAssetType::lookupIsLinkType(i->getActualType());
// You need permission to modify the object to modify an inventory
@@ -325,11 +327,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// ITEM NAME & DESC //
//////////////////////
BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm,
- GP_OBJECT_MANIPULATE)
- && is_obj_modify && is_complete;
+ GP_OBJECT_MANIPULATE)
+ && is_obj_modify && is_complete;
childSetEnabled("LabelItemNameTitle",TRUE);
- childSetEnabled("LabelItemName",is_modifiable);
+ childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
childSetText("LabelItemName",item->getName());
childSetEnabled("LabelItemDescTitle",TRUE);
childSetEnabled("LabelItemDesc",is_modifiable);
@@ -492,7 +494,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
/////////////
// Check for ability to change values.
- if (is_link)
+ if (is_link || cannot_restrict_permissions)
{
childSetEnabled("CheckShareWithGroup",FALSE);
childSetEnabled("CheckEveryoneCopy",FALSE);
@@ -558,9 +560,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
childSetEnabled("CheckPurchase",is_complete);
childSetEnabled("NextOwnerLabel",TRUE);
- childSetEnabled("CheckNextOwnerModify",base_mask & PERM_MODIFY);
- childSetEnabled("CheckNextOwnerCopy",base_mask & PERM_COPY);
- childSetEnabled("CheckNextOwnerTransfer",next_owner_mask & PERM_COPY);
+ childSetEnabled("CheckNextOwnerModify",(base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
+ childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions);
+ childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
childSetEnabled("RadioSaleType",is_complete && is_for_sale);
childSetEnabled("TextPrice",is_complete && is_for_sale);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index edbeed2aa4..a0cd0debf4 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1157,6 +1157,12 @@ BOOL LLItemBridge::isItemRenameable() const
LLViewerInventoryItem* item = getItem();
if(item)
{
+ // (For now) Don't allow calling card rename since that may confuse users as to
+ // what the calling card points to.
+ if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
+ {
+ return FALSE;
+ }
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
return FALSE;
@@ -2987,7 +2993,9 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel*
if (item && (item->getCreatorUUID() != gAgent.getID()) &&
(!item->getCreatorUUID().isNull()))
{
- gIMMgr->addSession(item->getName(), IM_NOTHING_SPECIAL, item->getCreatorUUID());
+ std::string callingcard_name;
+ gCacheName->getFullName(item->getCreatorUUID(), callingcard_name);
+ gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
}
}
else if ("lure" == action)
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 0e75681afa..15ae374447 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -152,6 +152,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
+ case DAD_CALLINGCARD:
{
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
if(gInventory.getItem(inv_item->getUUID())
@@ -175,7 +176,6 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
break;
}
case DAD_CATEGORY:
- case DAD_CALLINGCARD:
default:
*accept = ACCEPT_NO;
break;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index d2e07f0725..dd37d41ff5 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -387,8 +387,8 @@ LLToolDragAndDrop::dragOrDrop3dImpl LLToolDragAndDrop::sDragAndDrop3d[DAD_COUNT]
{
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_NONE
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_SELF
- &LLToolDragAndDrop::dad3dNULL, // Dest: DT_AVATAR
- &LLToolDragAndDrop::dad3dNULL, // Dest: DT_OBJECT
+ &LLToolDragAndDrop::dad3dGiveInventory, // Dest: DT_AVATAR
+ &LLToolDragAndDrop::dad3dUpdateInventory, // Dest: DT_OBJECT
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_LAND
},
// Source: DAD_LANDMARK
@@ -1848,9 +1848,6 @@ BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item)
BOOL acceptable = TRUE;
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- acceptable = FALSE;
- break;
case LLAssetType::AT_OBJECT:
if(my_avatar->isWearingAttachment(item->getUUID()))
{
@@ -1898,9 +1895,6 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
BOOL acceptable = TRUE;
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- acceptable = FALSE;
- break;
case LLAssetType::AT_OBJECT:
if(my_avatar->isWearingAttachment(item->getUUID(), TRUE))
{
@@ -2003,6 +1997,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
+ case DAD_CALLINGCARD:
{
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
if(gInventory.getItem(inv_item->getUUID())
@@ -2047,7 +2042,6 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
}
break;
}
- case DAD_CALLINGCARD:
default:
*accept = ACCEPT_NO;
break;
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 23f3f46570..902b59c732 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -44,6 +44,7 @@
#include "llviewertexteditor.h"
#include "llfloaterchat.h"
+#include "llfloateravatarinfo.h"
#include "llfloaterworldmap.h"
#include "llnotify.h"
#include "llpreview.h"
@@ -372,47 +373,61 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
const char* img_name;
switch( item->getType() )
{
- case LLAssetType::AT_TEXTURE:
- if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)
- {
- img_name = "inv_item_snapshot.tga";
- }
- else
- {
- img_name = "inv_item_texture.tga";
- }
+ case LLAssetType::AT_TEXTURE:
+ if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)
+ {
+ img_name = "inv_item_snapshot.tga";
+ }
+ else
+ {
+ img_name = "inv_item_texture.tga";
+ }
- break;
- case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
- case LLAssetType::AT_LANDMARK:
- if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
- {
- img_name = "inv_item_landmark_visited.tga";
- }
- else
- {
- img_name = "inv_item_landmark.tga";
- }
- break;
- case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break;
- case LLAssetType::AT_OBJECT:
- if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
- {
- img_name = "inv_item_object_multi.tga";
- }
- else
+ break;
+ case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
+ case LLAssetType::AT_LANDMARK:
+ if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
+ {
+ img_name = "inv_item_landmark_visited.tga";
+ }
+ else
+ {
+ img_name = "inv_item_landmark.tga";
+ }
+ break;
+ case LLAssetType::AT_CALLINGCARD:
{
- img_name = "inv_item_object.tga";
+ BOOL online;
+ online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
+ if (online)
+ {
+ img_name = "inv_item_callingcard_online.tga"; break;
+ }
+ else
+ {
+ img_name = "inv_item_callingcard_offline.tga"; break;
+ }
+ break;
}
- break;
- case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break;
- case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break;
- case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break;
- case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break;
- case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break;
- //TODO need img_name
- case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break;
- default: llassert(0); continue;
+ case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break;
+ case LLAssetType::AT_OBJECT:
+ if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ {
+ img_name = "inv_item_object_multi.tga";
+ }
+ else
+ {
+ img_name = "inv_item_object.tga";
+ }
+ break;
+ case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break;
+ case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break;
+ case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break;
+ case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break;
+ case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break;
+ //TODO need img_name
+ case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break;
+ default: llassert(0); continue;
}
LLUIImagePtr image = LLUI::getUIImage(img_name);
@@ -1019,8 +1034,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
}
-// Allow calling cards to be dropped onto text fields. Append the name and
-// a carriage return.
// virtual
BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
@@ -1043,33 +1056,17 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
switch( cargo_type )
{
- case DAD_CALLINGCARD:
- if(acceptsCallingCardNames())
- {
- if (drop)
- {
- LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- std::string name = item->getName();
- appendText(name, true, true);
- }
- *accept = ACCEPT_YES_COPY_SINGLE;
- }
- else
- {
- *accept = ACCEPT_NO;
- }
- break;
-
- case DAD_TEXTURE:
- case DAD_SOUND:
- case DAD_LANDMARK:
- case DAD_SCRIPT:
- case DAD_CLOTHING:
- case DAD_OBJECT:
- case DAD_NOTECARD:
- case DAD_BODYPART:
- case DAD_ANIMATION:
- case DAD_GESTURE:
+ case DAD_CALLINGCARD:
+ case DAD_TEXTURE:
+ case DAD_SOUND:
+ case DAD_LANDMARK:
+ case DAD_SCRIPT:
+ case DAD_CLOTHING:
+ case DAD_OBJECT:
+ case DAD_NOTECARD:
+ case DAD_BODYPART:
+ case DAD_ANIMATION:
+ case DAD_GESTURE:
{
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
if( item && allowsEmbeddedItems() )
@@ -1101,8 +1098,8 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
// *TODO: Translate
tooltip_msg.assign("Only items with unrestricted\n"
- "'next owner' permissions \n"
- "can be attached to notecards.");
+ "'next owner' permissions \n"
+ "can be attached to notecards.");
}
}
}
@@ -1113,9 +1110,9 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
break;
}
- default:
- *accept = ACCEPT_NO;
- break;
+ default:
+ *accept = ACCEPT_NO;
+ break;
}
}
else
@@ -1301,32 +1298,36 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc)
switch( item->getType() )
{
- case LLAssetType::AT_TEXTURE:
- openEmbeddedTexture( item, wc );
- return TRUE;
+ case LLAssetType::AT_TEXTURE:
+ openEmbeddedTexture( item, wc );
+ return TRUE;
- case LLAssetType::AT_SOUND:
- openEmbeddedSound( item, wc );
- return TRUE;
+ case LLAssetType::AT_SOUND:
+ openEmbeddedSound( item, wc );
+ return TRUE;
- case LLAssetType::AT_NOTECARD:
- openEmbeddedNotecard( item, wc );
- return TRUE;
+ case LLAssetType::AT_NOTECARD:
+ openEmbeddedNotecard( item, wc );
+ return TRUE;
- case LLAssetType::AT_LANDMARK:
- openEmbeddedLandmark( item, wc );
- return TRUE;
+ case LLAssetType::AT_LANDMARK:
+ openEmbeddedLandmark( item, wc );
+ return TRUE;
- case LLAssetType::AT_LSL_TEXT:
- case LLAssetType::AT_CLOTHING:
- case LLAssetType::AT_OBJECT:
- case LLAssetType::AT_BODYPART:
- case LLAssetType::AT_ANIMATION:
- case LLAssetType::AT_GESTURE:
- showCopyToInvDialog( item, wc );
- return TRUE;
- default:
- return FALSE;
+ case LLAssetType::AT_CALLINGCARD:
+ openEmbeddedCallingcard( item, wc );
+ return TRUE;
+
+ case LLAssetType::AT_LSL_TEXT:
+ case LLAssetType::AT_CLOTHING:
+ case LLAssetType::AT_OBJECT:
+ case LLAssetType::AT_BODYPART:
+ case LLAssetType::AT_ANIMATION:
+ case LLAssetType::AT_GESTURE:
+ showCopyToInvDialog( item, wc );
+ return TRUE;
+ default:
+ return FALSE;
}
}
@@ -1376,6 +1377,16 @@ void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc
copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
}
+void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc )
+{
+ if(item && !item->getCreatorUUID().isNull())
+ {
+ BOOL online;
+ online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
+ LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online);
+ }
+}
+
void LLViewerTextEditor::showUnsavedAlertDialog( LLInventoryItem* item )
{
LLSD payload;
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index bc373c858a..1a69c6869d 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -120,6 +120,7 @@ private:
void openEmbeddedSound( LLInventoryItem* item, llwchar wc );
void openEmbeddedLandmark( LLInventoryItem* item, llwchar wc );
void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
+ void openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc);
void showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
void showUnsavedAlertDialog( LLInventoryItem* item );
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 0a4aa12faa..aec4de7e0d 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1234,14 +1234,6 @@ Only large parcels can be listed in search.
width="268" />
<check_box
height="16"
- label="Create Landmarks"
- layout="topleft"
- left_delta="0"
- name="check landmark"
- top_pad="4"
- width="268" />
- <check_box
- height="16"
label="Fly"
layout="topleft"
left_delta="0"
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
index 843a8848bf..0414ab5fa6 100644
--- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
@@ -109,30 +109,12 @@
width="126" />
<icon
height="16"
- image_name="inv_item_landmark_visited.tga"
- layout="topleft"
- left="12"
- mouse_opaque="true"
- name="icon_landmark"
- top="134"
- width="16" />
- <check_box
- control_name="BulkChangeIncludeLandmarks"
- height="16"
- label="Landmarks"
- layout="topleft"
- left_pad="2"
- name="check_landmark"
- top_delta="0"
- width="126" />
- <icon
- height="16"
image_name="inv_item_notecard.tga"
layout="topleft"
left="12"
mouse_opaque="true"
name="icon_notecard"
- top="154"
+ top="134"
width="16" />
<check_box
control_name="BulkChangeIncludeNotecards"
@@ -150,7 +132,7 @@
left="12"
mouse_opaque="true"
name="icon_object"
- top="174"
+ top="154"
width="16" />
<check_box
control_name="BulkChangeIncludeObjects"
@@ -168,7 +150,7 @@
left="12"
mouse_opaque="true"
name="icon_script"
- top="194"
+ top="174"
width="16" />
<check_box
control_name="BulkChangeIncludeScripts"
@@ -186,7 +168,7 @@
left="12"
mouse_opaque="true"
name="icon_sound"
- top="214"
+ top="194"
width="16" />
<check_box
control_name="BulkChangeIncludeSounds"
@@ -204,7 +186,7 @@
left="12"
mouse_opaque="true"
name="icon_texture"
- top="234"
+ top="214"
width="16" />
<check_box
control_name="BulkChangeIncludeTextures"