summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelenvironment.cpp28
-rw-r--r--indra/newview/llpanelenvironment.h3
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_environment.xml1
3 files changed, 14 insertions, 18 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index ca9c8bdffa..ef307ad079 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -55,6 +55,8 @@
namespace
{
const std::string FLOATER_DAY_CYCLE_EDIT("env_edit_extdaycycle");
+ const std::string STRING_REGION_ENV("str_region_env");
+ const std::string STRING_EMPTY_NAME("str_empty");
inline bool ends_with(std::string const & value, std::string const & ending)
{
@@ -86,7 +88,6 @@ const std::string LLPanelEnvironmentInfo::SDT_DROP_TARGET("sdt_drop_target");
const std::string LLPanelEnvironmentInfo::STR_LABEL_USEDEFAULT("str_label_use_default");
const std::string LLPanelEnvironmentInfo::STR_LABEL_USEREGION("str_label_use_region");
-const std::string LLPanelEnvironmentInfo::STR_LABEL_UNKNOWNINV("str_unknow_inventory");
const std::string LLPanelEnvironmentInfo::STR_ALTITUDE_DESCRIPTION("str_altitude_desription");
const std::string LLPanelEnvironmentInfo::STR_NO_PARCEL("str_no_parcel");
const std::string LLPanelEnvironmentInfo::STR_CROSS_REGION("str_cross_region");
@@ -332,33 +333,32 @@ void LLPanelEnvironmentInfo::refreshFromEstate()
refresh();
}
-std::string LLPanelEnvironmentInfo::getInventoryNameForAssetId(LLUUID asset_id)
-{
- std::string name(LLFloaterSettingsPicker::findItemName(asset_id, false, false));
-
- if (name.empty())
- return getString(STR_LABEL_UNKNOWNINV);
- return name;
-}
-
-
std::string LLPanelEnvironmentInfo::getNameForTrackIndex(S32 index)
{
+
std::string invname;
if (mCurrentEnvironment->mDayCycleName.empty())
{
invname = mCurrentEnvironment->mNameList[index];
- if (!isRegion() && invname.empty())
- invname = getString("str_region_env");
+ if (invname.empty())
+ {
+ if (index <= LLSettingsDay::TRACK_GROUND_LEVEL)
+ invname = getString(isRegion() ? STRING_EMPTY_NAME : STRING_REGION_ENV);
+ }
}
else if (!mCurrentEnvironment->mDayCycle->isTrackEmpty(index))
{
invname = mCurrentEnvironment->mDayCycleName;
}
+
if (invname.empty())
- invname = getString("str_empty");
+ {
+ invname = getNameForTrackIndex(index - 1);
+ if (invname[0] != '(')
+ invname = "(" + invname + ")";
+ }
return invname;
}
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 87ce0772b2..9eb4040758 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -85,7 +85,6 @@ protected:
static const std::string STR_LABEL_USEDEFAULT;
static const std::string STR_LABEL_USEREGION;
- static const std::string STR_LABEL_UNKNOWNINV;
static const std::string STR_ALTITUDE_DESCRIPTION;
static const std::string STR_NO_PARCEL;
static const std::string STR_CROSS_REGION;
@@ -135,8 +134,6 @@ protected:
virtual bool isLargeEnough() = 0;
virtual void refreshFromSource() = 0;
- std::string getInventoryNameForAssetId(LLUUID asset_id);
-
std::string getNameForTrackIndex(S32 index);
LLFloaterSettingsPicker * getSettingsPicker(bool create = true);
diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml
index 77858ecbc4..bac27f7457 100644
--- a/indra/newview/skins/default/xui/en/panel_region_environment.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml
@@ -11,7 +11,6 @@
width="530">
<string name="str_label_use_default">Use Default Settings</string>
<string name="str_label_use_region">Use Region Settings</string>
- <string name="str_unknow_inventory">Unknown</string>
<string name="str_altitude_desription">Sky [INDEX]([ALTITUDE]m)</string>
<string name="str_no_parcel">No parcel is selected. Environmental settings are disabled.</string>
<string name="str_cross_region">Environmental settings are not available across region boundries.</string>