summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-27 10:44:17 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-27 10:44:17 +0100
commite543691aec8ad19762d6216dd53466d1d42ced1a (patch)
treed0033f26a9f75073ba28a9f87e2bd9be641d7444 /indra/newview
parent5904c4770ca06fbda6c4176ebd5f1b3a0c4e6518 (diff)
parent0c8cddecc16d5bd25a2eb5159333ada1dec59259 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp65
-rw-r--r--indra/newview/llpanelplaceinfo.cpp16
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_folder.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml30
5 files changed, 83 insertions, 36 deletions
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 99e48cca6d..1ca4a048a4 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -104,11 +104,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);
}
@@ -186,7 +186,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<LLButton>("back_btn")->setEnabled(TRUE);
}
// virtual
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" />
<color
name="AgentLinkColor"
- reference="White" />
+ reference="EmphasisColor" />
<color
name="AlertTextColor"
value="0.58 0.66 0.84 1" />
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 @@
<on_enable
function="Places.LandmarksGear.Enable"
parameter="expand" />
+ <on_visible
+ function="Places.LandmarksGear.Enable"
+ parameter="expand" />
</menu_item_call>
<menu_item_call
label="Collapse"
@@ -105,6 +108,9 @@
<on_enable
function="Places.LandmarksGear.Enable"
parameter="collapse" />
+ <on_visible
+ function="Places.LandmarksGear.Enable"
+ parameter="collapse" />
</menu_item_call>
<menu_item_call
label="Expand all folders"
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">
- <menu_item_check
- label="Show Advanced Menu"
- name="Show Advanced Menu"
- shortcut="control|alt|D">
- <on_check
- function="CheckControl"
- parameter="UseDebugMenus" />
- <on_click
- function="ToggleControl"
- parameter="UseDebugMenus" />
- </menu_item_check>
<menu_item_call
label="Stop Animating Me"
name="Stop Animating My Avatar">
@@ -1681,7 +1670,24 @@
<menu_item_call.on_click
function="View.ZoomOut" />
</menu_item_call>
- </menu>
+ <menu_item_separator
+ visible="false"/>
+ <!-- Made invisible to avoid a dissonance: menu item toggle menu where it is located. EXT-8069.
+ Can't be removed to keep sortcut workable.
+ -->
+ <menu_item_check
+ label="Show Advanced Menu"
+ name="Show Advanced Menu"
+ shortcut="control|alt|D"
+ visible="false">
+ <on_check
+ function="CheckControl"
+ parameter="UseDebugMenus" />
+ <on_click
+ function="ToggleControl"
+ parameter="UseDebugMenus" />
+ </menu_item_check>
+ </menu> <!--Shortcuts-->
<menu_item_separator/>