SL-14797 Normalize right-click menus on Landmarks & Picks Part#2
parent
99278b2f62
commit
74d3f9d017
|
|
@ -106,6 +106,18 @@ void LLPanelLandmarkInfo::resetLocation()
|
|||
|
||||
// virtual
|
||||
void LLPanelLandmarkInfo::setInfoType(EInfoType type)
|
||||
{
|
||||
LLUUID dest_folder;
|
||||
setInfoType(type, dest_folder);
|
||||
}
|
||||
|
||||
// Sets CREATE_LANDMARK infotype and creates landmark at desired folder
|
||||
void LLPanelLandmarkInfo::setInfoAndCreateLandmark(const LLUUID& fodler_id)
|
||||
{
|
||||
setInfoType(CREATE_LANDMARK, fodler_id);
|
||||
}
|
||||
|
||||
void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id)
|
||||
{
|
||||
LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
|
||||
|
||||
|
|
@ -183,7 +195,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
|
|||
// remote parcel request to complete.
|
||||
if (!LLLandmarkActions::landmarkAlreadyExists())
|
||||
{
|
||||
createLandmark(LLUUID());
|
||||
createLandmark(folder_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,12 @@ public:
|
|||
|
||||
/*virtual*/ void resetLocation();
|
||||
|
||||
// If landmark doesn't exists, will create it at default folder
|
||||
/*virtual*/ void setInfoType(EInfoType type);
|
||||
|
||||
// Sets CREATE_LANDMARK infotype and creates landmark at desired folder
|
||||
void setInfoAndCreateLandmark(const LLUUID& fodler_id);
|
||||
|
||||
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
|
||||
|
||||
// Displays landmark owner, creator and creation date info.
|
||||
|
|
@ -59,13 +63,17 @@ public:
|
|||
// Select current landmark folder in combobox.
|
||||
BOOL setLandmarkFolder(const LLUUID& id);
|
||||
|
||||
// Create a landmark for the current location
|
||||
// in a folder specified by folder_id.
|
||||
void createLandmark(const LLUUID& folder_id);
|
||||
|
||||
static std::string getFullFolderName(const LLViewerInventoryCategory* cat);
|
||||
|
||||
private:
|
||||
// Create a landmark for the current location
|
||||
// in a folder specified by folder_id.
|
||||
// Expects title and description to be initialized
|
||||
void createLandmark(const LLUUID& folder_id);
|
||||
|
||||
// If landmark doesn't exists, will create it at specified folder
|
||||
void setInfoType(EInfoType type, const LLUUID &folder_id);
|
||||
|
||||
void populateFoldersList();
|
||||
|
||||
LLTextBox* mOwner;
|
||||
|
|
|
|||
|
|
@ -785,7 +785,14 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
|
|||
}
|
||||
else
|
||||
{
|
||||
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
|
||||
LLSD args;
|
||||
args["type"] = "create_landmark";
|
||||
if (view_model->getInventoryType()
|
||||
== LLInventoryType::IT_CATEGORY)
|
||||
{
|
||||
args["dest_folder"] = view_model->getUUID();
|
||||
}
|
||||
LLFloaterSidePanelContainer::showPanel("places", args);
|
||||
}
|
||||
}
|
||||
else if ("category" == command_name)
|
||||
|
|
|
|||
|
|
@ -409,7 +409,8 @@ void LLPanelPlaces::onOpen(const LLSD& key)
|
|||
}
|
||||
else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
|
||||
{
|
||||
mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
|
||||
LLUUID dest_folder = key["dest_folder"];
|
||||
mLandmarkInfo->setInfoAndCreateLandmark(dest_folder);
|
||||
|
||||
if (key.has("x") && key.has("y") && key.has("z"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,27 +2,6 @@
|
|||
<context_menu
|
||||
layout="topleft"
|
||||
name="Picks">
|
||||
<menu_item_call
|
||||
label="Info"
|
||||
layout="topleft"
|
||||
name="pick_info">
|
||||
<menu_item_call.on_click
|
||||
function="Pick.Info" />
|
||||
<menu_item_call.on_enable
|
||||
function="Pick.Enable"
|
||||
parameter="info" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Edit"
|
||||
layout="topleft"
|
||||
name="pick_edit"
|
||||
visible="false">
|
||||
<menu_item_call.on_click
|
||||
function="Pick.Edit" />
|
||||
<menu_item_call.on_enable
|
||||
function="Pick.Enable"
|
||||
parameter="edit" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Teleport"
|
||||
layout="topleft"
|
||||
|
|
@ -34,7 +13,28 @@
|
|||
parameter="teleport" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Map"
|
||||
label="View Pick"
|
||||
layout="topleft"
|
||||
name="pick_info">
|
||||
<menu_item_call.on_click
|
||||
function="Pick.Info" />
|
||||
<menu_item_call.on_enable
|
||||
function="Pick.Enable"
|
||||
parameter="info" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Edit Pick"
|
||||
layout="topleft"
|
||||
name="pick_edit"
|
||||
visible="false">
|
||||
<menu_item_call.on_click
|
||||
function="Pick.Edit" />
|
||||
<menu_item_call.on_enable
|
||||
function="Pick.Enable"
|
||||
parameter="edit" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show on map"
|
||||
layout="topleft"
|
||||
name="pick_map">
|
||||
<menu_item_call.on_click
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
name="menu_folder_gear"
|
||||
visible="false">
|
||||
<menu_item_call
|
||||
label="Add Landmark"
|
||||
label="Landmark current location"
|
||||
layout="topleft"
|
||||
name="add_landmark">
|
||||
<on_click
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
parameter="add_landmark" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Add Folder"
|
||||
label="Create subfolder"
|
||||
layout="topleft"
|
||||
name="add_folder">
|
||||
<on_click
|
||||
|
|
|
|||
Loading…
Reference in New Issue