Right click menus for text entry areas that include copy/paste options.
Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
@@ -935,6 +935,7 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL;
|
||||
if(!handled)handled = LLTextEditor::handleRightMouseDown(x, y, mask);
|
||||
|
||||
// *TODO: Add right click menus for SLURLs
|
||||
// if(! handled)
|
||||
@@ -1079,28 +1080,28 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
{
|
||||
switch( cargo_type )
|
||||
{
|
||||
// <edit>
|
||||
// This does not even appear to be used maybe
|
||||
// Throwing it out so I can embed calling cards
|
||||
/*
|
||||
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_CALLINGCARD:
|
||||
// <edit>
|
||||
// This does not even appear to be used maybe
|
||||
// Throwing it out so I can embed calling cards
|
||||
/*
|
||||
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_CALLINGCARD:
|
||||
// </edit>
|
||||
case DAD_TEXTURE:
|
||||
case DAD_SOUND:
|
||||
@@ -1114,29 +1115,29 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
case DAD_GESTURE:
|
||||
{
|
||||
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
|
||||
// <edit>
|
||||
if((item->getPermissions().getMaskOwner() & PERM_ITEM_UNRESTRICTED) != PERM_ITEM_UNRESTRICTED)
|
||||
{
|
||||
if(gSavedSettings.getBOOL("ForceNotecardDragCargoPermissive"))
|
||||
{
|
||||
item = new LLInventoryItem((LLInventoryItem *)cargo_data);
|
||||
LLPermissions old = item->getPermissions();
|
||||
LLPermissions perm;
|
||||
perm.init(old.getCreator(), old.getOwner(), old.getLastOwner(), old.getGroup());
|
||||
perm.setMaskBase(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskEveryone(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskGroup(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskNext(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskOwner(PERM_ITEM_UNRESTRICTED);
|
||||
item->setPermissions(perm);
|
||||
}
|
||||
}
|
||||
// <edit>
|
||||
if((item->getPermissions().getMaskOwner() & PERM_ITEM_UNRESTRICTED) != PERM_ITEM_UNRESTRICTED)
|
||||
{
|
||||
if(gSavedSettings.getBOOL("ForceNotecardDragCargoPermissive"))
|
||||
{
|
||||
item = new LLInventoryItem((LLInventoryItem *)cargo_data);
|
||||
LLPermissions old = item->getPermissions();
|
||||
LLPermissions perm;
|
||||
perm.init(old.getCreator(), old.getOwner(), old.getLastOwner(), old.getGroup());
|
||||
perm.setMaskBase(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskEveryone(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskGroup(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskNext(PERM_ITEM_UNRESTRICTED);
|
||||
perm.setMaskOwner(PERM_ITEM_UNRESTRICTED);
|
||||
item->setPermissions(perm);
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
if( item && allowsEmbeddedItems() )
|
||||
{
|
||||
U32 mask_next = item->getPermissions().getMaskNextOwner();
|
||||
// <edit>
|
||||
//if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
|
||||
// <edit>
|
||||
//if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
|
||||
if(((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) || gSavedSettings.getBOOL("ForceNotecardDragCargoAcceptance"))
|
||||
{
|
||||
if( drop )
|
||||
@@ -1551,13 +1552,13 @@ bool LLViewerTextEditor::hasEmbeddedInventory()
|
||||
return ! mEmbeddedItemList->empty();
|
||||
}
|
||||
|
||||
// <edit>
|
||||
std::vector<LLPointer<LLInventoryItem> > LLViewerTextEditor::getEmbeddedItems()
|
||||
{
|
||||
std::vector<LLPointer<LLInventoryItem> > items;
|
||||
mEmbeddedItemList->getEmbeddedItemList(items);
|
||||
return items;
|
||||
}
|
||||
// <edit>
|
||||
std::vector<LLPointer<LLInventoryItem> > LLViewerTextEditor::getEmbeddedItems()
|
||||
{
|
||||
std::vector<LLPointer<LLInventoryItem> > items;
|
||||
mEmbeddedItemList->getEmbeddedItemList(items);
|
||||
return items;
|
||||
}
|
||||
// </edit>
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user