summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterexperienceprofile.cpp66
-rw-r--r--indra/newview/llfloaterexperienceprofile.h8
-rw-r--r--indra/newview/llfloaterexperiences.cpp79
-rw-r--r--indra/newview/llfloaterexperiences.h6
-rw-r--r--indra/newview/llpanelexperiences.cpp19
-rw-r--r--indra/newview/llpanelexperiences.h11
-rw-r--r--indra/newview/skins/default/xui/en/floater_experienceprofile.xml145
-rw-r--r--indra/newview/skins/default/xui/en/floater_experiences.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_experience_list_item.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_experiences.xml1
10 files changed, 247 insertions, 96 deletions
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index f99e20f7e0..e1667a39b7 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -55,6 +55,7 @@
#define TF_MRKT "marketplace"
#define TF_MATURITY "ContentRatingText"
#define TF_OWNER "OwnerText"
+#define TF_GROUP "GroupText"
#define TF_GRID_WIDE "grid_wide"
#define EDIT "edit_"
@@ -65,6 +66,7 @@
#define PNL_DESC "description panel"
#define PNL_LOC "location panel"
#define PNL_MRKT "marketplace panel"
+#define PNL_GROUP "group_panel"
#define BTN_EDIT "edit_btn"
#define BTN_ALLOW "allow_btn"
@@ -74,6 +76,8 @@
#define BTN_SAVE "save_btn"
#define BTN_ENABLE "enable_btn"
#define BTN_PRIVATE "private_btn"
+#define BTN_SET_LOCATION "location_btn"
+#define BTN_CLEAR_LOCATION "clear_btn"
@@ -236,14 +240,15 @@ BOOL LLFloaterExperienceProfile::postBuild()
childSetAction(BTN_BLOCK, boost::bind(&LLFloaterExperienceProfile::onClickPermission, this, "Block"));
childSetAction(BTN_CANCEL, boost::bind(&LLFloaterExperienceProfile::onClickCancel, this));
childSetAction(BTN_SAVE, boost::bind(&LLFloaterExperienceProfile::onClickSave, this));
+ childSetAction(BTN_SET_LOCATION, boost::bind(&LLFloaterExperienceProfile::onClickLocation, this));
+ childSetAction(BTN_CLEAR_LOCATION, boost::bind(&LLFloaterExperienceProfile::onClickClear, this));
- getChild<LLUICtrl>(EDIT TF_NAME)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
- getChild<LLUICtrl>(EDIT TF_DESC)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
- getChild<LLUICtrl>(EDIT TF_SLURL)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
+ getChild<LLTextEditor>(EDIT TF_DESC)->setKeystrokeCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
getChild<LLUICtrl>(EDIT TF_MATURITY)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
- getChild<LLUICtrl>(EDIT TF_MRKT)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
- getChild<LLLineEditor>(EDIT TF_NAME)->setCommitCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
+ getChild<LLLineEditor>(EDIT TF_MRKT)->setKeystrokeCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL);
+ getChild<LLLineEditor>(EDIT TF_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL);
+
childSetAction(EDIT BTN_ENABLE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
childSetAction(EDIT BTN_PRIVATE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this));
@@ -384,28 +389,35 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
value = experience[LLExperienceCache::SLURL].asString();
child = getChild<LLTextBox>(TF_SLURL);
+ bool has_value = value.length()>0;
+ locationPanel->setVisible(has_value);
value = LLSLURL(value).getSLURLString();
child->setText(value);
- locationPanel->setVisible(value.length()>0);
-
- linechild = getChild<LLLineEditor>(EDIT TF_SLURL);
- linechild->setText(value);
-
- setMaturityString((U8)(experience[LLExperienceCache::MATURITY].asInteger()), getChild<LLTextBox>(TF_MATURITY), getChild<LLComboBox>(EDIT TF_MATURITY));
- child = getChild<LLTextBox>(TF_OWNER);
- LLUUID id = experience[LLExperienceCache::GROUP_ID].asUUID();
- if(id.notNull())
+ child = getChild<LLTextBox>(EDIT TF_SLURL);
+ if(has_value)
{
- value = LLSLURL("group", id, "inspect").getSLURLString();
+ child->setText(value);
}
else
{
- id = experience[LLExperienceCache::AGENT_ID].asUUID();
- value = LLSLURL("agent", id, "inspect").getSLURLString();
+ child->setText(getString("empty_slurl"));
}
+
+ setMaturityString((U8)(experience[LLExperienceCache::MATURITY].asInteger()), getChild<LLTextBox>(TF_MATURITY), getChild<LLComboBox>(EDIT TF_MATURITY));
+
+ LLUUID id = experience[LLExperienceCache::AGENT_ID].asUUID();
+ child = getChild<LLTextBox>(TF_OWNER);
+ value = LLSLURL("agent", id, "inspect").getSLURLString();
+ child->setText(value);
+
+
+ id = experience[LLExperienceCache::GROUP_ID].asUUID();
+ child = getChild<LLTextBox>(TF_GROUP);
+ value = LLSLURL("group", id, "inspect").getSLURLString();
child->setText(value);
+ getChild<LLLayoutPanel>(PNL_GROUP)->setVisible(id.notNull());
LLCheckBoxCtrl* enable = getChild<LLCheckBoxCtrl>(EDIT BTN_ENABLE);
S32 properties = mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger();
@@ -479,7 +491,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
mDirty=false;
setCanClose(!mDirty);
-
+ mForceClose = false;
getChild<LLButton>(BTN_SAVE)->setEnabled(mDirty);
}
@@ -703,3 +715,21 @@ void LLFloaterExperienceProfile::changeToView()
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLFloaterExperienceProfile::handleSaveChangesDialog, this, _1, _2, VIEW));
}
}
+
+void LLFloaterExperienceProfile::onClickLocation()
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if(region)
+ {
+ LLTextBox* child = getChild<LLTextBox>(EDIT TF_SLURL);
+ child->setText(LLSLURL(region->getName(), gAgent.getPositionGlobal()).getSLURLString());
+ onFieldChanged();
+ }
+}
+
+void LLFloaterExperienceProfile::onClickClear()
+{
+ LLTextBox* child = getChild<LLTextBox>(EDIT TF_SLURL);
+ child->setText(getString("empty_slurl"));
+ onFieldChanged();
+}
diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h
index 4aa9820a91..feaff0547e 100644
--- a/indra/newview/llfloaterexperienceprofile.h
+++ b/indra/newview/llfloaterexperienceprofile.h
@@ -63,13 +63,13 @@ protected:
void onClickPermission(const char* permission);
void onClickForget();
void onClickCancel();
-
- void changeToView();
-
void onClickSave();
-
+ void onClickLocation();
+ void onClickClear();
void onFieldChanged();
+ void changeToView();
+
static void experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience);
BOOL postBuild();
diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp
index 9ec94f457b..57f08742be 100644
--- a/indra/newview/llfloaterexperiences.cpp
+++ b/indra/newview/llfloaterexperiences.cpp
@@ -27,7 +27,6 @@ public:
return;
LLFloaterExperiences* parent=mParent.get();
-
LLTabContainer* tabs = parent->getChild<LLTabContainer>("xp_tabs");
NameMap::iterator it = mNameMap.begin();
@@ -40,7 +39,7 @@ public:
{
const LLSD& ids = content[it->first];
tab->setExperienceList(ids);
- parent->clearFromRecent(ids);
+ //parent->clearFromRecent(ids);
}
}
++it;
@@ -70,36 +69,10 @@ BOOL LLFloaterExperiences::postBuild()
addTab("Admin_Experiences_Tab", false);
addTab("Contrib_Experiences_Tab", false);
addTab("Recent_Experiences_Tab", false);
+ resizeToTabs();
- setupRecentTabs();
-
- LLViewerRegion* region = gAgent.getRegion();
-
- if (region)
- {
- LLExperienceListResponder::NameMap nameMap;
- std::string lookup_url=region->getCapability("GetExperiences");
- if(!lookup_url.empty())
- {
- nameMap["experiences"]="Allowed_Experiences_Tab";
- nameMap["blocked"]="Blocked_Experiences_Tab";
- LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
- }
+ refreshContents();
- lookup_url = region->getCapability("GetAdminExperiences");
- if(!lookup_url.empty())
- {
- nameMap["experience_ids"]="Admin_Experiences_Tab";
- LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
- }
-
- lookup_url = region->getCapability("GetCreatorExperiences");
- if(!lookup_url.empty())
- {
- nameMap["experience_ids"]="Contrib_Experiences_Tab";
- LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
- }
- }
return TRUE;
}
@@ -138,3 +111,49 @@ void LLFloaterExperiences::setupRecentTabs()
tab->setExperienceList(recent);
}
+
+void LLFloaterExperiences::resizeToTabs()
+{
+ const S32 TAB_WIDTH_PADDING = 16;
+
+ LLTabContainer* tabs = getChild<LLTabContainer>("xp_tabs");
+ LLRect rect = getRect();
+ if(rect.getWidth() < tabs->getTotalTabWidth() + TAB_WIDTH_PADDING)
+ {
+ rect.mRight = rect.mLeft + tabs->getTotalTabWidth() + TAB_WIDTH_PADDING;
+ }
+ reshape(rect.getWidth(), rect.getHeight(), FALSE);
+}
+
+void LLFloaterExperiences::refreshContents()
+{
+ setupRecentTabs();
+
+ LLViewerRegion* region = gAgent.getRegion();
+
+ if (region)
+ {
+ LLExperienceListResponder::NameMap nameMap;
+ std::string lookup_url=region->getCapability("GetExperiences");
+ if(!lookup_url.empty())
+ {
+ nameMap["experiences"]="Allowed_Experiences_Tab";
+ nameMap["blocked"]="Blocked_Experiences_Tab";
+ LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
+ }
+
+ lookup_url = region->getCapability("GetAdminExperiences");
+ if(!lookup_url.empty())
+ {
+ nameMap["experience_ids"]="Admin_Experiences_Tab";
+ LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
+ }
+
+ lookup_url = region->getCapability("GetCreatorExperiences");
+ if(!lookup_url.empty())
+ {
+ nameMap["experience_ids"]="Contrib_Experiences_Tab";
+ LLHTTPClient::get(lookup_url, new LLExperienceListResponder(getDerivedHandle<LLFloaterExperiences>(), nameMap));
+ }
+ }
+}
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h
index 7d8c4a4be7..01a0f4c551 100644
--- a/indra/newview/llfloaterexperiences.h
+++ b/indra/newview/llfloaterexperiences.h
@@ -36,9 +36,15 @@ public:
LLFloaterExperiences(const LLSD& data);
void clearFromRecent(const LLSD& ids);
+ void resizeToTabs();
+
protected:
/*virtual*/ BOOL postBuild();
+ void refreshContents();
+
+
+
void setupRecentTabs();
void addTab(const std::string& name, bool select);
diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp
index 0d7cdce6e8..67ce3d3aa6 100644
--- a/indra/newview/llpanelexperiences.cpp
+++ b/indra/newview/llpanelexperiences.cpp
@@ -87,3 +87,22 @@ LLExperienceItem::~LLExperienceItem()
{
}
+
+void LLPanelSearchExperiences::doSearch()
+{
+
+}
+
+LLPanelSearchExperiences* LLPanelSearchExperiences::create( const std::string& name )
+{
+ LLPanelSearchExperiences* panel= new LLPanelSearchExperiences();
+ panel->getChild<LLPanel>("results")->addChild(LLPanelExperiences::create(name));
+ ///XXXif(
+ return panel;
+}
+
+BOOL LLPanelSearchExperiences::postBuild( void )
+{
+ childSetAction("search_button", boost::bind(&LLPanelSearchExperiences::doSearch, this));
+ return TRUE;
+}
diff --git a/indra/newview/llpanelexperiences.h b/indra/newview/llpanelexperiences.h
index e3c223d9db..45773adda9 100644
--- a/indra/newview/llpanelexperiences.h
+++ b/indra/newview/llpanelexperiences.h
@@ -35,6 +35,17 @@ class LLExperienceItem;
class LLPanelProfile;
+class LLPanelSearchExperiences
+ : public LLPanel
+{
+public:
+ LLPanelSearchExperiences(){}
+ static LLPanelSearchExperiences* create(const std::string& name);
+ /*virtual*/ BOOL postBuild(void);
+
+ void doSearch();
+};
+
class LLPanelExperiences
: public LLPanel
{
diff --git a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
index ca9469474c..e70151c64e 100644
--- a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
+++ b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
@@ -6,10 +6,16 @@
enabled="true"
can_resize="true"
title="EXPERIENCE PROFILE"
+ save_rect="true"
min_width="325"
+ min_height="325"
width="358"
height="580">
<floater.string
+ name="empty_slurl">
+ (none)
+ </floater.string>
+ <floater.string
name="maturity_icon_general">
"Parcel_PG_Light"
</floater.string>
@@ -195,7 +201,7 @@
layout="topleft"
left="10"
name="ContentRating"
- width="100">
+ width="75">
Rating:
</text>
<text
@@ -240,6 +246,7 @@
layout="topleft"
left="10"
valign="center"
+ use_ellipses="true"
name="LocationTextText"
width="288">
</text>
@@ -272,13 +279,14 @@
layout="topleft"
left="10"
valign="center"
+ use_ellipses="true"
name="marketplace"
width="288">
</text>
</layout_panel>
<layout_panel
follows="left|top|right"
- height="75"
+ height="18"
left="0"
top="0"
auto_resize="false"
@@ -291,7 +299,7 @@
layout="topleft"
left="10"
name="Owner"
- width="100">
+ width="75">
Owner:
</text>
<text
@@ -303,39 +311,85 @@
left_pad="2"
valign="center"
name="OwnerText"
+ use_ellipses="true"
top_delta="-2"
width="188">
</text>
- <button
- follows="bottom|left"
- height="23"
- label="Allow"
+ </layout_panel>
+ <layout_panel
+ follows="all"
+ height="18"
+ layout="topleft"
+ left="0"
+ top="5"
+ width="313"
+ visible="false"
+ auto_resize="false"
+ name="group_panel">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
layout="topleft"
- name="allow_btn"
- width="80"
- top_pad="3"
left="10"
- enabled="false"/>
- <button
- follows="bottom|left"
- height="23"
- label="Forget"
- layout="topleft"
- name="forget_btn"
- width="80"
- top_pad="-23"
- left_pad="3"
- enabled="false"/>
- <button
- follows="bottom|left"
- height="23"
- label="Block"
+ name="Group"
+ width="75">
+ Group:
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top|right"
+ height="18"
layout="topleft"
- name="block_btn"
- width="80"
- top_pad="-23"
- left_pad="3"
- enabled="false"/>
+ left_pad="2"
+ valign="center"
+ name="GroupText"
+ use_ellipses="true"
+ top_delta="-2"
+ width="188">
+ </text>
+ </layout_panel>
+ <layout_panel
+ follows="all"
+ height="33"
+ layout="topleft"
+ left="0"
+ top="5"
+ width="313"
+ auto_resize="false"
+ name="perm panel">
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Allow"
+ layout="topleft"
+ name="allow_btn"
+ width="80"
+ top_pad="3"
+ left="10"
+ enabled="false"/>
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Forget"
+ layout="topleft"
+ name="forget_btn"
+ width="80"
+ top_pad="-23"
+ left_pad="3"
+ enabled="false"/>
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Block"
+ layout="topleft"
+ name="block_btn"
+ width="80"
+ top_pad="-23"
+ left_pad="3"
+ enabled="false"/>
</layout_panel>
</layout_stack>
@@ -436,7 +490,7 @@
label="Moderate"
layout="topleft"
right="-10"
- top_pad="-17"
+ top_pad="-19"
name="edit_ContentRatingText"
width="105">
<icons_combo_box.drop_down_button
@@ -478,26 +532,39 @@
<text
type="string"
length="1"
- follows="left|top|right"
+ follows="left|top"
height="14"
layout="topleft"
left="10"
top_pad="10"
name="edit_Location"
- right="-10">
+ right="90">
Location:
</text>
- <line_editor
+ <text
type="string"
length="1"
follows="left|top|right"
- height="19"
+ height="14"
layout="topleft"
- left="10"
- max_length_bytes="255"
- valign="center"
+ left_pad="5"
+ top_pad="-14"
name="edit_LocationTextText"
- right="-10"/>
+ right="-10">Location</text>
+ <button
+ left="10"
+ width="150"
+ height="23"
+ name="location_btn"
+ label="Set to Current"
+ />
+ <button
+ top_pad="-23"
+ follows="top|right"
+ right="-10"
+ width="80"
+ name="clear_btn"
+ label="Clear"/>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_experiences.xml b/indra/newview/skins/default/xui/en/floater_experiences.xml
index 1258ce26ac..e727512b7f 100644
--- a/indra/newview/skins/default/xui/en/floater_experiences.xml
+++ b/indra/newview/skins/default/xui/en/floater_experiences.xml
@@ -9,7 +9,7 @@
min_width="300"
layout="topleft"
name="floater_experiences"
- save_rect="false"
+ save_rect="true"
single_instance="true"
reuse_instance="false"
bg_opaque_color="0 0.5 0 0.3"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_list_item.xml b/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
index 064f80a945..a9777c51e7 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
@@ -4,15 +4,15 @@
layout="topleft"
top="100"
left="5"
- width="200"
+ width="100"
height="19"
label="Experiences"
follows="top|right|left">
<text
- left="0"
+ left="3"
top="3"
height="16"
- width="200"
+ width="177"
follows="all"
name="experience_name"
>
diff --git a/indra/newview/skins/default/xui/en/panel_experiences.xml b/indra/newview/skins/default/xui/en/panel_experiences.xml
index bc78d0813c..af264e73df 100644
--- a/indra/newview/skins/default/xui/en/panel_experiences.xml
+++ b/indra/newview/skins/default/xui/en/panel_experiences.xml
@@ -12,7 +12,6 @@
<string
name="no_experiences"
value="No experiences."/>
-
<flat_list_view
name="experiences_list"
layout="topleft"