Merge branch 'DRTVWR-567' of https://github.com/secondlife/viewer
# Conflicts: # indra/newview/llsidepaneltaskinfo.cppmaster
commit
e585252397
|
|
@ -1210,7 +1210,7 @@ LLSD LLInventoryCategory::asLLSD() const
|
|||
return sd;
|
||||
}
|
||||
|
||||
LLSD LLInventoryCategory::asAISLLSD() const
|
||||
LLSD LLInventoryCategory::asAISCreateCatLLSD() const
|
||||
{
|
||||
LLSD sd = LLSD();
|
||||
sd[INV_FOLDER_ID_LABEL_WS] = mUUID;
|
||||
|
|
@ -1222,10 +1222,6 @@ LLSD LLInventoryCategory::asAISLLSD() const
|
|||
{
|
||||
sd[INV_THUMBNAIL_LABEL] = LLSD().with(INV_ASSET_ID_LABEL, mThumbnailUUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
sd[INV_THUMBNAIL_LABEL] = LLSD();
|
||||
}
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public:
|
|||
LLFolderType::EType getPreferredType() const;
|
||||
void setPreferredType(LLFolderType::EType type);
|
||||
LLSD asLLSD() const;
|
||||
LLSD asAISLLSD() const;
|
||||
LLSD asAISCreateCatLLSD() const;
|
||||
bool fromLLSD(const LLSD& sd);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1119,7 +1119,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
|
|||
new_inventory["categories"] = LLSD::emptyArray();
|
||||
LLViewerInventoryCategory cat(LLUUID::null, parent_id, preferred_type, name, gAgent.getID());
|
||||
cat.setThumbnailUUID(thumbnail_id);
|
||||
LLSD cat_sd = cat.asAISLLSD();
|
||||
LLSD cat_sd = cat.asAISCreateCatLLSD();
|
||||
new_inventory["categories"].append(cat_sd);
|
||||
AISAPI::CreateInventory(
|
||||
parent_id,
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ static LLPanelInjector<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info");
|
|||
|
||||
// Default constructor
|
||||
LLSidepanelTaskInfo::LLSidepanelTaskInfo()
|
||||
: mVisibleDebugPermissions(true) // space was allocated by default
|
||||
{
|
||||
setMouseOpaque(FALSE);
|
||||
LLSelectMgr::instance().mUpdateSignal.connect(boost::bind(&LLSidepanelTaskInfo::refreshAll, this));
|
||||
|
|
@ -152,12 +153,12 @@ BOOL LLSidepanelTaskInfo::postBuild()
|
|||
mDALabelClickAction = getChildView("label click action");
|
||||
mDAComboClickAction = getChild<LLComboBox>("clickaction");
|
||||
mDAPathfindingAttributes = getChild<LLTextBase>("pathfinding_attributes_value");
|
||||
mDAB = getChildView("B:");
|
||||
mDAO = getChildView("O:");
|
||||
mDAG = getChildView("G:");
|
||||
mDAE = getChildView("E:");
|
||||
mDAN = getChildView("N:");
|
||||
mDAF = getChildView("F:");
|
||||
mDAB = getChild<LLUICtrl>("B:");
|
||||
mDAO = getChild<LLUICtrl>("O:");
|
||||
mDAG = getChild<LLUICtrl>("G:");
|
||||
mDAE = getChild<LLUICtrl>("E:");
|
||||
mDAN = getChild<LLUICtrl>("N:");
|
||||
mDAF = getChild<LLUICtrl>("F:");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -207,12 +208,22 @@ void LLSidepanelTaskInfo::disableAll()
|
|||
|
||||
disablePermissions();
|
||||
|
||||
mDAB->setVisible(FALSE);
|
||||
mDAO->setVisible(FALSE);
|
||||
mDAG->setVisible(FALSE);
|
||||
mDAE->setVisible(FALSE);
|
||||
mDAN->setVisible(FALSE);
|
||||
mDAF->setVisible(FALSE);
|
||||
if (mVisibleDebugPermissions)
|
||||
{
|
||||
mDAB->setVisible(FALSE);
|
||||
mDAO->setVisible(FALSE);
|
||||
mDAG->setVisible(FALSE);
|
||||
mDAE->setVisible(FALSE);
|
||||
mDAN->setVisible(FALSE);
|
||||
mDAF->setVisible(FALSE);
|
||||
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLRect parent_rect = parent_floater->getRect();
|
||||
LLRect debug_rect = mDAB->getRect();
|
||||
// use double the debug rect for padding (since it isn't trivial to extract top_pad)
|
||||
parent_floater->reshape(parent_rect.getWidth(), parent_rect.getHeight() - (debug_rect.getHeight() * 2));
|
||||
mVisibleDebugPermissions = false;
|
||||
}
|
||||
|
||||
mOpenBtn->setEnabled(FALSE);
|
||||
mPayBtn->setEnabled(FALSE);
|
||||
|
|
@ -640,31 +651,30 @@ void LLSidepanelTaskInfo::refresh()
|
|||
if (gSavedSettings.getBOOL("DebugPermissions") )
|
||||
{
|
||||
// <FS:Beq> remove misleading X for export when not in OpenSim
|
||||
bool isOpenSim {false};
|
||||
bool isOpenSim {false};
|
||||
#ifdef OPENSIM
|
||||
if( LLGridManager::instance().isInOpenSim() )
|
||||
{
|
||||
isOpenSim = true;
|
||||
}
|
||||
if( LLGridManager::instance().isInOpenSim() )
|
||||
{
|
||||
isOpenSim = true;
|
||||
}
|
||||
#endif
|
||||
// </FS:Beq>
|
||||
if (valid_base_perms)
|
||||
{
|
||||
getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("B:")->setVisible( TRUE);
|
||||
|
||||
getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("O:")->setVisible( TRUE);
|
||||
|
||||
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("G:")->setVisible( TRUE);
|
||||
|
||||
getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("E:")->setVisible( TRUE);
|
||||
|
||||
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("N:")->setVisible( TRUE);
|
||||
}
|
||||
if (valid_base_perms)
|
||||
{
|
||||
mDAB->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAB->setVisible( TRUE);
|
||||
|
||||
mDAO->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAO->setVisible( TRUE);
|
||||
|
||||
mDAG->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAG->setVisible( TRUE);
|
||||
|
||||
mDAE->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAE->setVisible( TRUE);
|
||||
|
||||
mDAN->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAN->setVisible( TRUE);
|
||||
}
|
||||
|
||||
U32 flag_mask = 0x0;
|
||||
if (objectp->permMove()) flag_mask |= PERM_MOVE;
|
||||
|
|
@ -672,18 +682,35 @@ void LLSidepanelTaskInfo::refresh()
|
|||
if (objectp->permCopy()) flag_mask |= PERM_COPY;
|
||||
if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER;
|
||||
|
||||
getChild<LLUICtrl>("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
getChildView("F:")->setVisible( TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("B:")->setVisible( FALSE);
|
||||
getChildView("O:")->setVisible( FALSE);
|
||||
getChildView("G:")->setVisible( FALSE);
|
||||
getChildView("E:")->setVisible( FALSE);
|
||||
getChildView("N:")->setVisible( FALSE);
|
||||
getChildView("F:")->setVisible( FALSE);
|
||||
}
|
||||
mDAF->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // <FS:Beq/> remove misleading X for export when not in OpenSim
|
||||
mDAF->setVisible(TRUE);
|
||||
|
||||
if (!mVisibleDebugPermissions)
|
||||
{
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLRect parent_rect = parent_floater->getRect();
|
||||
LLRect debug_rect = mDAB->getRect();
|
||||
// use double the debug rect for padding (since it isn't trivial to extract top_pad)
|
||||
parent_floater->reshape(parent_rect.getWidth(), parent_rect.getHeight() + (debug_rect.getHeight() * 2));
|
||||
mVisibleDebugPermissions = true;
|
||||
}
|
||||
}
|
||||
else if (mVisibleDebugPermissions)
|
||||
{
|
||||
mDAB->setVisible(FALSE);
|
||||
mDAO->setVisible(FALSE);
|
||||
mDAG->setVisible(FALSE);
|
||||
mDAE->setVisible(FALSE);
|
||||
mDAN->setVisible(FALSE);
|
||||
mDAF->setVisible(FALSE);
|
||||
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLRect parent_rect = parent_floater->getRect();
|
||||
LLRect debug_rect = mDAB->getRect();
|
||||
// use double the debug rect for padding (since it isn't trivial to extract top_pad)
|
||||
parent_floater->reshape(parent_rect.getWidth(), parent_rect.getHeight() - (debug_rect.getHeight() * 2));
|
||||
mVisibleDebugPermissions = false;
|
||||
}
|
||||
|
||||
BOOL has_change_perm_ability = FALSE;
|
||||
BOOL has_change_sale_ability = FALSE;
|
||||
|
|
|
|||
|
|
@ -125,6 +125,10 @@ protected:
|
|||
private:
|
||||
LLPointer<LLViewerObject> mObject;
|
||||
LLObjectSelectionHandle mObjectSelection;
|
||||
|
||||
// mVisibleDebugPermissions doesn't nessesarily matche state
|
||||
// of viewes and is primarily for floater resize
|
||||
bool mVisibleDebugPermissions;
|
||||
static LLSidepanelTaskInfo* sActivePanel;
|
||||
|
||||
private:
|
||||
|
|
@ -152,12 +156,12 @@ private:
|
|||
LLView* mDALabelClickAction;
|
||||
LLComboBox* mDAComboClickAction;
|
||||
LLTextBase* mDAPathfindingAttributes;
|
||||
LLView* mDAB;
|
||||
LLView* mDAO;
|
||||
LLView* mDAG;
|
||||
LLView* mDAE;
|
||||
LLView* mDAN;
|
||||
LLView* mDAF;
|
||||
LLUICtrl* mDAB;
|
||||
LLUICtrl* mDAO;
|
||||
LLUICtrl* mDAG;
|
||||
LLUICtrl* mDAE;
|
||||
LLUICtrl* mDAN;
|
||||
LLUICtrl* mDAF;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="570"
|
||||
height="590"
|
||||
layout="topleft"
|
||||
name="Task Properties"
|
||||
help_topic="item+properties"
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
name="sidepanel"
|
||||
top="20"
|
||||
label=""
|
||||
height="550"
|
||||
height="570"
|
||||
visible="true"
|
||||
width="330">
|
||||
</panel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue