diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterexperienceprofile.cpp | 42 | ||||
-rwxr-xr-x | indra/newview/llsidepaneliteminfo.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/skins/default/textures/textures.xml | 1 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 57 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 2 |
5 files changed, 70 insertions, 44 deletions
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index ec2e7f0f10..01af6b1cab 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -26,14 +26,20 @@ #include "llviewerprecompiledheaders.h" +#include "llfloaterexperienceprofile.h" #include "llagent.h" +#include "llappviewer.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "llcommandhandler.h" #include "llexpandabletextbox.h" #include "llexperiencecache.h" -#include "llfloaterexperienceprofile.h" #include "llfloaterreg.h" #include "llhttpclient.h" #include "lllayoutstack.h" +#include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llsdserialize.h" #include "llslurl.h" #include "lltabcontainer.h" @@ -41,11 +47,6 @@ #include "lltexturectrl.h" #include "lltrans.h" #include "llviewerregion.h" -#include "lllineeditor.h" -#include "llcombobox.h" -#include "llcheckboxctrl.h" -#include "llnotificationsutil.h" -#include "llappviewer.h" #define XML_PANEL_EXPERIENCE_PROFILE "floater_experienceprofile.xml" #define TF_NAME "experience_title" @@ -75,6 +76,34 @@ #define BTN_PRIVATE "private_btn" + +class LLExperienceHandler : public LLCommandHandler +{ +public: + LLExperienceHandler() : LLCommandHandler("experience", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if(params.size() != 2 || params[1].asString() != "profile") + return false; + + LLExperienceCache::get(params[0].asUUID(), boost::bind(&LLExperienceHandler::experienceCallback, this, _1)); + return true; + } + + void experienceCallback(const LLSD& experienceDetails) + { + if(!experienceDetails.has(LLExperienceCache::MISSING)) + { + LLFloaterReg::showInstance("experience_profile", experienceDetails[LLExperienceCache::EXPERIENCE_ID].asUUID(), true); + } + } +}; + +LLExperienceHandler gExperienceHandler; + + LLFloaterExperienceProfile::LLFloaterExperienceProfile(const LLSD& data) : LLFloater(data) , mExperienceId(data.asUUID()) @@ -355,6 +384,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) value = experience[LLExperienceCache::SLURL].asString(); child = getChild<LLTextBox>(TF_SLURL); + value = LLSLURL(value).getSLURLString(); child->setText(value); locationPanel->setVisible(value.length()>0); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 040c4ee72d..072b001890 100755 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -43,8 +43,9 @@ #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerobjectlist.h" -#include "llexperiencecache.h" #include "llexperienceassociationresponder.h" +#include "llexperiencecache.h" +#include "lltrans.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -684,18 +685,17 @@ void LLSidepanelItemInfo::setAssociatedExperience( LLHandle<LLSidepanelItemInfo> if(info) { LLUUID id; - if(experience.has(LLExperienceCache::EXPERIENCE_ID) && experience.has(LLExperienceCache::NAME)) + if(experience.has(LLExperienceCache::EXPERIENCE_ID)) { id=experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); } - LLTextBox* xpName = info->getChild<LLTextBox>("LabelItemExperience"); - if(id.isNull()) + if(id.notNull()) { - xpName->setText(info->getString("no_experience")); + info->getChild<LLTextBox>("LabelItemExperience")->setText(LLSLURL("experience", id, "profile").getSLURLString()); } else { - xpName->setText(experience[LLExperienceCache::NAME].asString()); + info->getChild<LLTextBox>("LabelItemExperience")->setText(LLTrans::getString("ExperienceNameNull")); } } } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 54f60f4441..1cbf2d8282 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -217,6 +217,7 @@ with the same filename but different name <texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" /> <texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" /> + <texture name="Generic_Experience" file_name="Blank.png" preload="false" /> <texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" /> <texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" /> <texture name="icon_group.tga" file_name="icons/Generic_Group.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index f1f8843a9d..fc3fdbcfa5 100755 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -8,11 +8,7 @@ title="Item Profile" width="333"> <panel.string - name="no_experience"> - (none) - </panel.string> - <panel.string - name="loading_experience"> + name="loading_experience"> (loading) </panel.string> <panel.string @@ -267,6 +263,31 @@ top_delta="0" width="210"> </text> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="5" + name="LabelItemExperienceTitle" + top_pad="0" + width="78" + visible="true"> + Experience: + </text> + <text + type="string" + length="1" + follows="left|top|right" + height="10" + layout="topleft" + left_delta="78" + name="LabelItemExperience" + top_delta="0" + width="210" + visible="true" + /> <panel border="false" follows="left|top|right" @@ -428,32 +449,6 @@ height="23" max_val="999999999" top_pad="10"/> - - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="5" - name="LabelItemExperienceTitle" - top_pad="10" - width="78" - visible="false"> - Experience: - </text> - <text - type="string" - length="1" - follows="left|top|right" - height="10" - layout="topleft" - left_delta="78" - name="LabelItemExperience" - top_delta="0" - width="210" - visible="false" - ></text> </panel> </scroll_container> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b02d4e5d8f..0c84d904a8 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3922,7 +3922,7 @@ Try enclosing path to the editor with double quotes. <!-- Experience Tools strings --> <string name="experience_tools_experience">Experience</string> - + <string name="ExperienceNameNull">(no experience)</string> <!-- Conversation log messages --> <string name="logging_calls_disabled_log_empty"> |