Feature Request: Allow bulk edit for objects' descriptions and names

Translators need to translate the multiple_objects_selected string in floater_tools.xml
This commit is contained in:
Inusaito Sayori
2015-02-19 14:28:50 -05:00
parent 072742cba5
commit 454be02eab
3 changed files with 24 additions and 18 deletions

View File

@@ -202,14 +202,18 @@ void LLPanelPermissions::disableAll()
getChildView("button set group")->setEnabled(FALSE);
getChildView("button open group")->setEnabled(FALSE);
getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
getChildView("Object Name")->setEnabled(FALSE);
LLLineEditor* ed = getChild<LLLineEditor>("Object Name");
ed->setValue(LLStringUtil::null);
ed->setEnabled(FALSE);
ed->setLabel(LLStringUtil::null);
getChildView("Name:")->setEnabled(FALSE);
//getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
//getChildView("Group Name")->setEnabled(FALSE);
getChildView("Description:")->setEnabled(FALSE);
getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
getChildView("Object Description")->setEnabled(FALSE);
ed = getChild<LLLineEditor>("Object Description");
ed->setEnabled(FALSE);
ed->setValue(LLStringUtil::null);
ed->setLabel(LLStringUtil::null);
getChildView("Permissions:")->setEnabled(FALSE);
@@ -510,7 +514,7 @@ void LLPanelPermissions::refresh()
{
if(keyboard_focus_view != LineEditorObjectName)
{
getChild<LLUICtrl>("Object Name")->setValue(nodep->mName);
LineEditorObjectName->setValue(nodep->mName);
}
if(LineEditorObjectDesc)
@@ -523,25 +527,26 @@ void LLPanelPermissions::refresh()
}
else
{
getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
LineEditorObjectName->setText(LLStringUtil::null);
LineEditorObjectDesc->setText(LLStringUtil::null);
}
// figure out the contents of the name, description, & category
BOOL edit_name_desc = FALSE;
if(is_one_object && objectp->permModify() && !objectp->isPermanentEnforced())
// Singu Note: It was requested that the user be able to bulk change description
{
edit_name_desc = TRUE;
const std::string& str(object_count > 1 ? getString("multiple_objects_selected") : LLStringUtil::null);
LineEditorObjectName->setLabel(str);
LineEditorObjectDesc->setLabel(str);
}
if(edit_name_desc)
if (/*is_one_object &&*/ objectp->permModify() && !objectp->isPermanentEnforced())
{
getChildView("Object Name")->setEnabled(TRUE);
getChildView("Object Description")->setEnabled(TRUE);
LineEditorObjectName->setEnabled(TRUE);
LineEditorObjectDesc->setEnabled(TRUE);
}
else
{
getChildView("Object Name")->setEnabled(FALSE);
getChildView("Object Description")->setEnabled(FALSE);
LineEditorObjectName->setEnabled(FALSE);
LineEditorObjectDesc->setEnabled(FALSE);
}
S32 total_sale_price = 0;

View File

@@ -4290,7 +4290,7 @@ void LLSelectMgr::selectionSetObjectName(const std::string& name)
std::string name_copy(name);
// we only work correctly if 1 object is selected.
if(mSelectedObjects->getRootObjectCount() == 1)
if(mSelectedObjects->getRootObjectCount() /*== 1*/) // Singu Note: It was requested that the user be able to bulk rename
{
sendListToRegions("ObjectName",
packAgentAndSessionID,
@@ -4298,7 +4298,7 @@ void LLSelectMgr::selectionSetObjectName(const std::string& name)
(void*)(&name_copy),
SEND_ONLY_ROOTS);
}
else if(mSelectedObjects->getObjectCount() == 1)
else if(mSelectedObjects->getObjectCount() /*== 1*/)
{
sendListToRegions("ObjectName",
packAgentAndSessionID,
@@ -4313,7 +4313,7 @@ void LLSelectMgr::selectionSetObjectDescription(const std::string& desc)
std::string desc_copy(desc);
// we only work correctly if 1 object is selected.
if(mSelectedObjects->getRootObjectCount() == 1)
if (mSelectedObjects->getRootObjectCount() /*== 1*/) // Singu Note: It was requested that the user be able to bulk change description
{
sendListToRegions("ObjectDescription",
packAgentAndSessionID,
@@ -4321,7 +4321,7 @@ void LLSelectMgr::selectionSetObjectDescription(const std::string& desc)
(void*)(&desc_copy),
SEND_ONLY_ROOTS);
}
else if(mSelectedObjects->getObjectCount() == 1)
else if (mSelectedObjects->getObjectCount() /*== 1*/)
{
sendListToRegions("ObjectDescription",
packAgentAndSessionID,

View File

@@ -443,6 +443,7 @@
follows="left|top|right" font="SansSerifSmall" height="16" left="88"
max_length="127" mouse_opaque="true" name="Object Description"
select_all_on_focus_received="true" width="172" />
<string name="multiple_objects_selected" value="Multiple (bulk change mode)"/>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-66" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"