From 75addb32d6b1b6af07a2c8f66722b651602e661a Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 26 Jul 2010 16:14:23 +0300 Subject: EXT-8391 FIXED Landmark creation and error handling. - Added displaying error messages in Create Landmark panel upon remote parcel request fail. - Moved landmark creation from LLPanelLandmarkInfo::processParcelInfo() because we use only agent's current coordinates instead of waiting for remote parcel request to complete. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/793/. --HG-- branch : product-engine --- indra/newview/llpanellandmarkinfo.cpp | 65 +++++++++++++++++++++++------------ indra/newview/llpanelplaceinfo.cpp | 16 ++++++++- 2 files changed, 58 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 4ffd43cb0f..c05cffc59e 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -123,11 +123,54 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) switch(type) { case CREATE_LANDMARK: + { mCurrentTitle = getString("title_create_landmark"); mLandmarkTitle->setVisible(FALSE); mLandmarkTitleEditor->setVisible(TRUE); mNotesEditor->setEnabled(TRUE); + + LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); + std::string name = parcel_mgr->getAgentParcelName(); + LLVector3 agent_pos = gAgent.getPositionAgent(); + + if (name.empty()) + { + S32 region_x = llround(agent_pos.mV[VX]); + S32 region_y = llround(agent_pos.mV[VY]); + S32 region_z = llround(agent_pos.mV[VZ]); + + std::string region_name; + LLViewerRegion* region = parcel_mgr->getSelectionRegion(); + if (region) + { + region_name = region->getName(); + } + else + { + region_name = getString("unknown"); + } + + mLandmarkTitleEditor->setText(llformat("%s (%d, %d, %d)", + region_name.c_str(), region_x, region_y, region_z)); + } + else + { + mLandmarkTitleEditor->setText(name); + } + + std::string desc; + LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos); + mNotesEditor->setText(desc); + + // Moved landmark creation here from LLPanelLandmarkInfo::processParcelInfo() + // because we use only agent's current coordinates instead of waiting for + // remote parcel request to complete. + if (!LLLandmarkActions::landmarkAlreadyExists()) + { + createLandmark(LLUUID()); + } + } break; case LANDMARK: @@ -192,28 +235,6 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) info["global_y"] = parcel_data.global_y; info["global_z"] = parcel_data.global_z; notifyParent(info); - - if (mInfoType == CREATE_LANDMARK) - { - if (parcel_data.name.empty()) - { - mLandmarkTitleEditor->setText(llformat("%s (%d, %d, %d)", - parcel_data.sim_name.c_str(), region_x, region_y, region_z)); - } - else - { - mLandmarkTitleEditor->setText(parcel_data.name); - } - - std::string desc; - LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, gAgent.getPositionAgent()); - mNotesEditor->setText(desc); - - if (!LLLandmarkActions::landmarkAlreadyExists()) - { - createLandmark(mFolderCombo->getValue().asUUID()); - } - } } void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem) diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 8c1f5d0915..38ad112438 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -103,11 +103,11 @@ void LLPanelPlaceInfo::resetLocation() mPosRegion.clearVec(); std::string loading = LLTrans::getString("LoadingData"); - mMaturityRatingIcon->setValue(loading); mMaturityRatingText->setValue(loading); mRegionName->setText(loading); mParcelName->setText(loading); mDescEditor->setText(loading); + mMaturityRatingIcon->setValue(LLUUID::null); mSnapshotCtrl->setImageAssetID(LLUUID::null); } @@ -185,7 +185,21 @@ void LLPanelPlaceInfo::setErrorStatus(U32 status, const std::string& reason) { error_text = getString("server_forbidden_text"); } + else + { + error_text = getString("server_error_text"); + } + mDescEditor->setText(error_text); + + std::string not_available = getString("not_available"); + mMaturityRatingText->setValue(not_available); + mRegionName->setText(not_available); + mParcelName->setText(not_available); + mMaturityRatingIcon->setValue(LLUUID::null); + + // Enable "Back" button that was disabled when parcel request was sent. + getChild("back_btn")->setEnabled(TRUE); } // virtual -- cgit v1.2.3 From 0defb7a1d28e1d9a83635a55ada7a2d16593ca2c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 26 Jul 2010 16:17:52 +0300 Subject: EXT-8257 FIXED Made "Expand" and "Collapse" menu items visible in Places gear menu mutually exclusive. Root cause: ========== The same menu is used to be shown as context and gear menus. But visibility of context Folder View's menu is processed in a separate way. So, once visibility of menu items is changed in context menu - it is unchanged in gear menu. Also it was possible situation when both "Expand" and "Collapse" menu items were visible in gear menu (If it was opened before any context menu) FIX: === Added "on_visible" callbacks for "Expand" and "Collapse" menu items to set proper visibility in "gear" menu. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/801/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/menu_places_gear_folder.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') 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 3e38503e43..77cc3910fd 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 @@ -94,6 +94,9 @@ + + Date: Mon, 26 Jul 2010 16:20:14 +0300 Subject: EXT-8069 FIXED "Show Advanced Menu" item is moved to "Advanced/Shortcuts" submenu and made invisible. (invisible - because it is still located in menu it toggles) Note: We can not completely remove this menu item to keep hot key workable. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/803/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/menu_viewer.xml | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 67b8c81a01..bf1707c13e 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -951,17 +951,6 @@ name="Advanced" tear_off="true" visible="false"> - - - - @@ -1681,7 +1670,24 @@ - + + + + + + + -- cgit v1.2.3 From 0c8cddecc16d5bd25a2eb5159333ada1dec59259 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 26 Jul 2010 18:10:29 +0300 Subject: EXT-8010 FIXED Implemented special behaviour of avatar links. Avatar links are now underlined only on hover. Also they have the same color as other links. - Underlining text and getting it back to normal are done in handleHover() and draw() of new LLOnHoverChangeableTextSegment class derived from LLNormalTextSegment. This class has two pointers to styles- one for style which will be used for text on hover, and another otherwise. This special type of text segment is used if link's boolean member mUnderlineOnHoverOnly is true. So it is URL's flag depending on which textbase adds new text segment(like it currently happens with mDisabledLink). - Changed avatar link color in colors.xml to emphasis (because it was white before and was inconsistent with other links). Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/749/ --HG-- branch : product-engine --- indra/newview/skins/default/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 2188c71ff9..5ba1fc9b21 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -113,7 +113,7 @@ reference="LtYellow" /> + reference="EmphasisColor" /> -- cgit v1.2.3