summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp31
-rw-r--r--indra/newview/llpanelplaceinfo.cpp17
-rw-r--r--indra/newview/llpanelplaceinfo.h2
-rw-r--r--indra/newview/llpanelplaceprofile.cpp48
-rw-r--r--indra/newview/llpanelplaceprofile.h4
-rw-r--r--indra/newview/llpanelplaces.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml28
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml18
8 files changed, 107 insertions, 42 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 4985663833..f94a59ecef 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -35,6 +35,7 @@
#include "llpanellandmarkinfo.h"
#include "llcombobox.h"
+#include "lliconctrl.h"
#include "lllineeditor.h"
#include "lltextbox.h"
#include "lltexteditor.h"
@@ -58,6 +59,11 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");
+// Statics for textures filenames
+static std::string icon_pg;
+static std::string icon_m;
+static std::string icon_r;
+
LLPanelLandmarkInfo::LLPanelLandmarkInfo()
: LLPanelPlaceInfo()
{}
@@ -79,6 +85,10 @@ BOOL LLPanelLandmarkInfo::postBuild()
mNotesEditor = getChild<LLTextEditor>("notes_editor");
mFolderCombo = getChild<LLComboBox>("folder_combo");
+ icon_pg = getString("icon_PG");
+ icon_m = getString("icon_M");
+ icon_r = getString("icon_R");
+
return TRUE;
}
@@ -101,9 +111,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type)
LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
bool is_info_type_create_landmark = type == CREATE_LANDMARK;
- bool is_info_type_landmark = type == LANDMARK;
- landmark_info_panel->setVisible(is_info_type_landmark);
+ landmark_info_panel->setVisible(type == LANDMARK);
getChild<LLTextBox>("folder_label")->setVisible(is_info_type_create_landmark);
mFolderCombo->setVisible(is_info_type_create_landmark);
@@ -136,6 +145,24 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data)
{
LLPanelPlaceInfo::processParcelInfo(parcel_data);
+ // HACK: Flag 0x2 == adult region,
+ // Flag 0x1 == mature region, otherwise assume PG
+ if (parcel_data.flags & 0x2)
+ {
+ mMaturityRatingIcon->setValue(icon_r);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT));
+ }
+ else if (parcel_data.flags & 0x1)
+ {
+ mMaturityRatingIcon->setValue(icon_m);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE));
+ }
+ else
+ {
+ mMaturityRatingIcon->setValue(icon_pg);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG));
+ }
+
S32 region_x;
S32 region_y;
S32 region_z;
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index c600651015..906f8d084b 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -40,6 +40,7 @@
#include "llsdutil_math.h"
+#include "lliconctrl.h"
#include "llscrollcontainer.h"
#include "lltextbox.h"
@@ -81,6 +82,7 @@ BOOL LLPanelPlaceInfo::postBuild()
mParcelName = getChild<LLTextBox>("parcel_title");
mDescEditor = getChild<LLExpandableTextBox>("description");
+ mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon");
mMaturityRatingText = getChild<LLTextBox>("maturity_value");
LLScrollContainer* scroll_container = getChild<LLScrollContainer>("place_scroll");
@@ -98,6 +100,7 @@ void LLPanelPlaceInfo::resetLocation()
mPosRegion.clearVec();
std::string not_available = getString("not_available");
+ mMaturityRatingIcon->setValue(not_available);
mMaturityRatingText->setValue(not_available);
mRegionName->setText(not_available);
mParcelName->setText(not_available);
@@ -204,20 +207,6 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
mDescEditor->setText(parcel_data.desc);
}
- // HACK: Flag 0x2 == adult region,
- // Flag 0x1 == mature region, otherwise assume PG
- std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
- if (parcel_data.flags & 0x2)
- {
- rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT);
- }
- else if (parcel_data.flags & 0x1)
- {
- rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
- }
-
- mMaturityRatingText->setValue(rating);
-
S32 region_x;
S32 region_y;
S32 region_z;
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index ec30397cff..ba32cc4c34 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -41,6 +41,7 @@
#include "llremoteparcelrequest.h"
class LLExpandableTextBox;
+class LLIconCtrl;
class LLInventoryItem;
class LLPanelPickEdit;
class LLParcel;
@@ -117,6 +118,7 @@ protected:
LLTextBox* mRegionName;
LLTextBox* mParcelName;
LLExpandableTextBox* mDescEditor;
+ LLIconCtrl* mMaturityRatingIcon;
LLTextBox* mMaturityRatingText;
};
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 2a9ba4697d..61501cc1b1 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -97,7 +97,6 @@ BOOL LLPanelPlaceProfile::postBuild()
setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this));
mParcelOwner = getChild<LLTextBox>("owner_value");
- mLastVisited = getChild<LLTextBox>("last_visited_value");
mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon");
mParcelRatingText = getChild<LLTextBox>("rating_value");
@@ -165,7 +164,6 @@ void LLPanelPlaceProfile::resetLocation()
std::string not_available = getString("not_available");
mParcelOwner->setValue(not_available);
- mLastVisited->setValue(not_available);
mParcelRatingIcon->setValue(not_available);
mParcelRatingText->setText(not_available);
@@ -209,17 +207,13 @@ void LLPanelPlaceProfile::resetLocation()
void LLPanelPlaceProfile::setInfoType(INFO_TYPE type)
{
bool is_info_type_agent = type == AGENT;
- bool is_info_type_teleport_history = type == TELEPORT_HISTORY;
- getChild<LLTextBox>("maturity_label")->setVisible(!is_info_type_agent);
+ mMaturityRatingIcon->setVisible(!is_info_type_agent);
mMaturityRatingText->setVisible(!is_info_type_agent);
getChild<LLTextBox>("owner_label")->setVisible(is_info_type_agent);
mParcelOwner->setVisible(is_info_type_agent);
- getChild<LLTextBox>("last_visited_label")->setVisible(is_info_type_teleport_history);
- mLastVisited->setVisible(is_info_type_teleport_history);
-
getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent);
switch(type)
@@ -238,6 +232,30 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type)
LLPanelPlaceInfo::setInfoType(type);
}
+// virtual
+void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data)
+{
+ LLPanelPlaceInfo::processParcelInfo(parcel_data);
+
+ // HACK: Flag 0x2 == adult region,
+ // Flag 0x1 == mature region, otherwise assume PG
+ if (parcel_data.flags & 0x2)
+ {
+ mMaturityRatingIcon->setValue(icon_r);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT));
+ }
+ else if (parcel_data.flags & 0x1)
+ {
+ mMaturityRatingIcon->setValue(icon_m);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE));
+ }
+ else
+ {
+ mMaturityRatingIcon->setValue(icon_pg);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG));
+ }
+}
+
void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
LLViewerRegion* region,
const LLVector3d& pos_global,
@@ -521,22 +539,6 @@ void LLPanelPlaceProfile::updateCovenantText(const std::string &text)
mCovenantText->setText(text);
}
-void LLPanelPlaceProfile::updateLastVisitedText(const LLDate &date)
-{
- if (date.isNull())
- {
- mLastVisited->setText(getString("unknown"));
- }
- else
- {
- std::string timeStr = getString("acquired_date");
- LLSD substitution;
- substitution["datetime"] = (S32) date.secondsSinceEpoch();
- LLStringUtil::format (timeStr, substitution);
- mLastVisited->setText(timeStr);
- }
-}
-
void LLPanelPlaceProfile::onForSaleBannerClick()
{
LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance();
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index b3ef4acf51..8c30ca92fb 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -50,6 +50,8 @@ public:
/*virtual*/ void setInfoType(INFO_TYPE type);
+ /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
+
// Displays information about the currently selected parcel
// without sending a request to the server.
// If is_current_parcel true shows "You Are Here" banner.
@@ -61,7 +63,6 @@ public:
void updateEstateName(const std::string& name);
void updateEstateOwnerName(const std::string& name);
void updateCovenantText(const std::string &text);
- void updateLastVisitedText(const LLDate &date);
private:
void onForSaleBannerClick();
@@ -78,7 +79,6 @@ private:
LLPanel* mYouAreHerePanel;
LLTextBox* mParcelOwner;
- LLTextBox* mLastVisited;
LLIconCtrl* mParcelRatingIcon;
LLTextBox* mParcelRatingText;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 8d117afcfe..3d0fba9426 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -293,7 +293,6 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mPosGlobal = hist_items[index].mGlobalPos;
mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
- mPlaceProfile->updateLastVisitedText(hist_items[index].mDate);
mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
}
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index 0c24adfad5..b01ddbf75a 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -43,6 +43,16 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
+ <!-- Texture names for rating icons -->
+ <string
+ name="icon_PG"
+ value="parcel_drk_PG" />
+ <string
+ name="icon_M"
+ value="parcel_drk_M" />
+ <string
+ name="icon_R"
+ value="parcel_drk_R" />
<button
follows="top|right"
height="23"
@@ -125,6 +135,24 @@
top_pad="10"
value="Du waltz die spritz"
width="300" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="unknown"
+ layout="topleft"
+ left="10"
+ name="maturity_icon"
+ top_pad="10"
+ width="18" />
+ <text
+ follows="right|top"
+ height="16"
+ layout="topleft"
+ left_pad="8"
+ name="maturity_value"
+ top_delta="0"
+ value="unknown"
+ width="268" />
<panel
follows="left|top|right"
height="55"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 65f150b33c..14d138fe4c 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -296,6 +296,24 @@
top_delta="0"
value="Alex Superduperlongenamenton"
width="205" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="unknown"
+ layout="topleft"
+ left="10"
+ name="maturity_icon"
+ top_delta="0"
+ width="18" />
+ <text
+ follows="right|top"
+ height="16"
+ layout="topleft"
+ left_pad="8"
+ name="maturity_value"
+ top_delta="0"
+ value="unknown"
+ width="268" />
<accordion
follows="all"
height="230"