diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarkinfo.h | 16 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarks.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llpanelplaces.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_picks.xml | 26 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_places_gear_folder.xml | 4 | 
6 files changed, 50 insertions, 22 deletions
| diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 6751c25fb9..069fb32a56 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -107,6 +107,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");  	bool is_info_type_create_landmark = type == CREATE_LANDMARK; @@ -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 9712736182..9a2e0c8f59 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -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; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 578485c967..46c23961f4 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 abec3ba733..c038207628 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 ebb49c9004..a408e6136c 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 4d59ab0631..eb76f58722 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 | 
