diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 6751c25fb995ded9deb3521996de1f6e132e4b96..069fb32a56f5d6f552f60c8a002af92d91303c99 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -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; diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 9712736182bcfafe46f3ab62104295eb600f970d..9a2e0c8f59ec9453152d4f301c763796a25391a8 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -43,8 +43,12 @@ class LLPanelLandmarkInfo : public LLPanelPlaceInfo /*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 @@ class LLPanelLandmarkInfo : public LLPanelPlaceInfo // 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; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 578485c96764a3a1bb0964e409b5e7468aa63a55..46c23961f4b101a637b58a47925c9a687baf1242 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -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) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index abec3ba733f3c4973b93b62841200b1e6fdc88bf..c03820762809e38705b7f82ec91d51283d284221 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -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")) { diff --git a/indra/newview/skins/default/xui/en/menu_picks.xml b/indra/newview/skins/default/xui/en/menu_picks.xml index ebb49c900422eae22cadbcdee4a09b8e8fec2724..a408e6136c11fdced40ae309e5271e21c5a186a2 100644 --- a/indra/newview/skins/default/xui/en/menu_picks.xml +++ b/indra/newview/skins/default/xui/en/menu_picks.xml @@ -3,7 +3,17 @@ layout="topleft" name="Picks"> <menu_item_call - label="Info" + label="Teleport" + layout="topleft" + name="pick_teleport"> + <menu_item_call.on_click + function="Pick.Teleport" /> + <menu_item_call.on_enable + function="Pick.Enable" + parameter="teleport" /> + </menu_item_call> + <menu_item_call + label="View Pick" layout="topleft" name="pick_info"> <menu_item_call.on_click @@ -13,7 +23,7 @@ parameter="info" /> </menu_item_call> <menu_item_call - label="Edit" + label="Edit Pick" layout="topleft" name="pick_edit" visible="false"> @@ -24,17 +34,7 @@ parameter="edit" /> </menu_item_call> <menu_item_call - label="Teleport" - layout="topleft" - name="pick_teleport"> - <menu_item_call.on_click - function="Pick.Teleport" /> - <menu_item_call.on_enable - function="Pick.Enable" - parameter="teleport" /> - </menu_item_call> - <menu_item_call - label="Map" + label="Show on map" layout="topleft" name="pick_map"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml index 4d59ab06317bfc97007a222ff866d8a76d0aa63e..eb76f58722d709ab43a3b120fb958396074cf01e 100644 --- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml +++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml @@ -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