PATH-717: Minor UI changes from Leo. Also, adding a notification when attempting to return or delete multiple items.
parent
9b46e116a9
commit
bf86a69731
|
|
@ -41,6 +41,8 @@
|
|||
#include "llcheckboxctrl.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llfloater.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
|
|
@ -581,14 +583,42 @@ void LLFloaterPathfindingObjects::onTakeCopyClicked()
|
|||
|
||||
void LLFloaterPathfindingObjects::onReturnClicked()
|
||||
{
|
||||
handle_object_return();
|
||||
requestGetObjects();
|
||||
LLNotification::Params params("PathfindingReturnMultipleItems");
|
||||
params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleReturnItemsResponse, this, _1, _2));
|
||||
|
||||
LLSD substitutions;
|
||||
int numItems = getNumSelectedObjects();
|
||||
substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems);
|
||||
params.substitutions = substitutions;
|
||||
|
||||
if (numItems == 1)
|
||||
{
|
||||
LLNotifications::getInstance()->forceResponse(params, 0);
|
||||
}
|
||||
else if (numItems > 1)
|
||||
{
|
||||
LLNotifications::getInstance()->add(params);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingObjects::onDeleteClicked()
|
||||
{
|
||||
handle_object_delete();
|
||||
requestGetObjects();
|
||||
LLNotification::Params params("PathfindingDeleteMultipleItems");
|
||||
params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleDeleteItemsResponse, this, _1, _2));
|
||||
|
||||
LLSD substitutions;
|
||||
int numItems = getNumSelectedObjects();
|
||||
substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems);
|
||||
params.substitutions = substitutions;
|
||||
|
||||
if (numItems == 1)
|
||||
{
|
||||
LLNotifications::getInstance()->forceResponse(params, 0);
|
||||
}
|
||||
else if (numItems > 1)
|
||||
{
|
||||
LLNotifications::getInstance()->add(params);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingObjects::onTeleportClicked()
|
||||
|
|
@ -768,6 +798,24 @@ void LLFloaterPathfindingObjects::selectScrollListItemsInWorld()
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingObjects::handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse)
|
||||
{
|
||||
if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
|
||||
{
|
||||
handle_object_return();
|
||||
requestGetObjects();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingObjects::handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse)
|
||||
{
|
||||
if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
|
||||
{
|
||||
handle_object_delete();
|
||||
requestGetObjects();
|
||||
}
|
||||
}
|
||||
|
||||
LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const
|
||||
{
|
||||
LLPathfindingObjectPtr objectPtr;
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ private:
|
|||
void updateStateOnActionControls();
|
||||
void selectScrollListItemsInWorld();
|
||||
|
||||
void handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse);
|
||||
void handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse);
|
||||
|
||||
LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const;
|
||||
|
||||
LLScrollListCtrl *mObjectsScrollList;
|
||||
|
|
|
|||
|
|
@ -179,14 +179,24 @@
|
|||
<button
|
||||
follows="left|bottom"
|
||||
height="22"
|
||||
label="Teleport me to it"
|
||||
layout="topleft"
|
||||
name="teleport_me_to_object"
|
||||
tool_tip="Enabled only when one character is selected."
|
||||
top_pad="-22"
|
||||
left_pad="26"
|
||||
width="159"/>
|
||||
<button
|
||||
follows="right|bottom"
|
||||
height="22"
|
||||
label="Return"
|
||||
layout="topleft"
|
||||
name="return_objects"
|
||||
top_pad="-22"
|
||||
left_pad="6"
|
||||
left_pad="26"
|
||||
width="94"/>
|
||||
<button
|
||||
follows="left|bottom"
|
||||
follows="right|bottom"
|
||||
height="22"
|
||||
label="Delete"
|
||||
layout="topleft"
|
||||
|
|
@ -194,15 +204,5 @@
|
|||
top_pad="-22"
|
||||
left_pad="6"
|
||||
width="94"/>
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="22"
|
||||
label="Teleport me to it"
|
||||
layout="topleft"
|
||||
name="teleport_me_to_object"
|
||||
tool_tip="Enabled only when one character is selected."
|
||||
top_pad="-22"
|
||||
left_pad="6"
|
||||
width="159"/>
|
||||
</panel>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -322,14 +322,23 @@
|
|||
<button
|
||||
follows="left|bottom"
|
||||
height="21"
|
||||
label="Teleport me to it"
|
||||
layout="topleft"
|
||||
name="teleport_me_to_object"
|
||||
top_pad="-21"
|
||||
left_pad="206"
|
||||
width="160"/>
|
||||
<button
|
||||
follows="right|bottom"
|
||||
height="21"
|
||||
label="Return"
|
||||
layout="topleft"
|
||||
name="return_objects"
|
||||
top_pad="-21"
|
||||
left_pad="6"
|
||||
left_pad="220"
|
||||
width="95"/>
|
||||
<button
|
||||
follows="left|bottom"
|
||||
follows="right|bottom"
|
||||
height="21"
|
||||
label="Delete"
|
||||
layout="topleft"
|
||||
|
|
@ -337,15 +346,6 @@
|
|||
top_pad="-21"
|
||||
left_pad="6"
|
||||
width="95"/>
|
||||
<button
|
||||
follows="left|bottom"
|
||||
height="21"
|
||||
label="Teleport me to it"
|
||||
layout="topleft"
|
||||
name="teleport_me_to_object"
|
||||
top_pad="-21"
|
||||
left_pad="6"
|
||||
width="160"/>
|
||||
</panel>
|
||||
<view_border
|
||||
bevel_style="none"
|
||||
|
|
|
|||
|
|
@ -7861,5 +7861,31 @@ Disabling future updates for this file.
|
|||
Attempted to add an invalid or unreadable image file [FNAME] which could not be opened or decoded.
|
||||
Attempt cancelled.
|
||||
</notification>
|
||||
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="PathfindingReturnMultipleItems"
|
||||
type="alertmodal">
|
||||
You are returning [NUM_ITEMS] items. Are you sure you want to continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Are you sure you want to return multiple items?"
|
||||
name="okcancelignore"
|
||||
notext="No"
|
||||
yestext="Yes"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="PathfindingDeleteMultipleItems"
|
||||
type="alertmodal">
|
||||
You are deleting [NUM_ITEMS] items. Are you sure you want to continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Are you sure you want to delete multiple items?"
|
||||
name="okcancelignore"
|
||||
notext="No"
|
||||
yestext="Yes"/>
|
||||
</notification>
|
||||
|
||||
</notifications>
|
||||
|
|
|
|||
Loading…
Reference in New Issue