summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelavatar.cpp6
-rw-r--r--indra/newview/llpanelavatar.h6
-rw-r--r--indra/newview/llpanelprofile.cpp35
-rw-r--r--indra/newview/llpanelprofile.h4
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp4
-rw-r--r--indra/newview/llpanelprofileclassifieds.h4
-rw-r--r--indra/newview/llpanelprofilepicks.cpp4
-rw-r--r--indra/newview/llpanelprofilepicks.h4
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_firstlife.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_secondlife.xml37
10 files changed, 73 insertions, 37 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 90f3e87ae9..5d5d4b676c 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -121,12 +121,12 @@ void LLPanelProfileTab::setApplyProgress(bool started)
}
}
-LLPanelProfilePropertiesPeocessorTab::LLPanelProfilePropertiesPeocessorTab()
+LLPanelProfilePropertiesProcessorTab::LLPanelProfilePropertiesProcessorTab()
: LLPanelProfileTab()
{
}
-LLPanelProfilePropertiesPeocessorTab::~LLPanelProfilePropertiesPeocessorTab()
+LLPanelProfilePropertiesProcessorTab::~LLPanelProfilePropertiesProcessorTab()
{
if (getAvatarId().notNull())
{
@@ -134,7 +134,7 @@ LLPanelProfilePropertiesPeocessorTab::~LLPanelProfilePropertiesPeocessorTab()
}
}
-void LLPanelProfilePropertiesPeocessorTab::setAvatarId(const LLUUID & avatar_id)
+void LLPanelProfilePropertiesProcessorTab::setAvatarId(const LLUUID & avatar_id)
{
if (avatar_id.notNull())
{
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 1b47411fdb..249b895abb 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -146,13 +146,13 @@ private:
bool mSelfProfile;
};
-class LLPanelProfilePropertiesPeocessorTab
+class LLPanelProfilePropertiesProcessorTab
: public LLPanelProfileTab
, public LLAvatarPropertiesObserver
{
public:
- LLPanelProfilePropertiesPeocessorTab();
- ~LLPanelProfilePropertiesPeocessorTab();
+ LLPanelProfilePropertiesProcessorTab();
+ ~LLPanelProfilePropertiesProcessorTab();
/*virtual*/ void setAvatarId(const LLUUID& avatar_id);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 7d3a98ba96..46b2d032e1 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -37,6 +37,7 @@
#include "llavatariconctrl.h"
#include "llclipboard.h"
#include "llcheckboxctrl.h"
+#include "llcombobox.h"
#include "lllineeditor.h"
#include "llloadingindicator.h"
#include "llmenubutton.h"
@@ -116,6 +117,8 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+ LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Result: " << httpResults << LL_ENDL;
+
if (!status
|| !result.has("id")
|| agent_id != result["id"].asUUID())
@@ -151,7 +154,6 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_data->fl_image_id = result["fl_image_id"].asUUID();
avatar_data->partner_id = result["partner_id"].asUUID();
avatar_data->about_text = result["sl_about_text"].asString();
- // Todo: new descriptio size is 65536, check if it actually fits or has scroll
avatar_data->fl_about_text = result["fl_about_text"].asString();
avatar_data->born_on = result["member_since"].asDate();
avatar_data->profile_url = getProfileURL(agent_id.asString());
@@ -248,7 +250,6 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_notes.agent_id = agent_id;
avatar_notes.target_id = agent_id;
- // Todo: new notes size is 65536, check that field has a scroll
avatar_notes.notes = result["notes"].asString();
panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE);
@@ -284,9 +285,11 @@ void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data)
if (!status)
{
- LL_WARNS("AvatarProperties") << "Failed to put agent information for id " << agent_id << LL_ENDL;
+ LL_WARNS("AvatarProperties") << "Failed to put agent information " << data << " for id " << agent_id << LL_ENDL;
return;
}
+
+ LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Data: " << data << " Result: " << httpResults << LL_ENDL;
}
LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::string path_to_image, LLHandle<LLPanel> *handle)
@@ -810,7 +813,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife()
BOOL LLPanelProfileSecondLife::postBuild()
{
mGroupList = getChild<LLGroupList>("group_list");
- mShowInSearchCheckbox = getChild<LLCheckBoxCtrl>("show_in_search_checkbox");
+ mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
mSecondLifePic = getChild<LLIconCtrl>("2nd_life_pic");
mSecondLifePicLayout = getChild<LLPanel>("image_stack");
mDescriptionEdit = getChild<LLTextEditor>("sl_description_edit");
@@ -821,6 +824,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
mSeeOnMapToggle = getChild<LLButton>("allow_to_see_on_map");
mEditObjectsToggle = getChild<LLButton>("allow_edit_my_objects");
+ mShowInSearchCombo->setCommitCallback([this](LLUICtrl*, void*) { onShowInSearchCallback(); }, nullptr);
mGroupList->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { LLPanelProfileSecondLife::openGroupProfile(); });
mGroupList->setReturnCallback([this](LLUICtrl*, const LLSD&) { LLPanelProfileSecondLife::openGroupProfile(); });
mSaveDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveDescriptionChanges(); }, nullptr);
@@ -1052,7 +1056,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
if (getSelfProfile())
{
- mShowInSearchCheckbox->setValue((BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
+ mShowInSearchCombo->setValue((BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
}
}
@@ -1225,8 +1229,7 @@ void LLPanelProfileSecondLife::setLoaded()
if (getSelfProfile())
{
- mShowInSearchCheckbox->setVisible(TRUE);
- mShowInSearchCheckbox->setEnabled(TRUE);
+ mShowInSearchCombo->setEnabled(TRUE);
mDescriptionEdit->setEnabled(TRUE);
}
}
@@ -1525,6 +1528,22 @@ void LLPanelProfileSecondLife::onSetDescriptionDirty()
mDiscardDescriptionChanges->setEnabled(TRUE);
}
+void LLPanelProfileSecondLife::onShowInSearchCallback()
+{
+ std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
+ if (!cap_url.empty())
+ {
+ LLSD data;
+ data["allow_publish"] = mShowInSearchCombo->getValue().asBoolean();
+ LLCoros::instance().launch("putAgentUserInfoCoro",
+ boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), data));
+ }
+ else
+ {
+ LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
+ }
+}
+
void LLPanelProfileSecondLife::onSaveDescriptionChanges()
{
mDescriptionText = mDescriptionEdit->getValue().asString();
@@ -1814,7 +1833,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges()
if (!cap_url.empty())
{
LLCoros::instance().launch("putAgentUserInfoCoro",
- boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("sl_about_text", mCurrentDescription)));
+ boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("fl_about_text", mCurrentDescription)));
}
else
{
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 05be48f1c2..b959ac1ec3 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -47,6 +47,7 @@
class LLAvatarName;
class LLButton;
class LLCheckBoxCtrl;
+class LLComboBox;
class LLIconCtrl;
class LLTabContainer;
class LLTextBox;
@@ -166,6 +167,7 @@ private:
void setDescriptionText(const std::string &text);
void onSetDescriptionDirty();
+ void onShowInSearchCallback();
void onSaveDescriptionChanges();
void onDiscardDescriptionChanges();
void onShowAgentPermissionsDialog();
@@ -176,7 +178,7 @@ private:
void openGroupProfile();
LLGroupList* mGroupList;
- LLCheckBoxCtrl* mShowInSearchCheckbox;
+ LLComboBox* mShowInSearchCombo;
LLIconCtrl* mSecondLifePic;
LLPanel* mSecondLifePicLayout;
LLTextEditor* mDescriptionEdit;
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 2769329dca..9cd7ca8160 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -191,7 +191,7 @@ LLClassifiedHandler gClassifiedHandler;
//-----------------------------------------------------------------------------
LLPanelProfileClassifieds::LLPanelProfileClassifieds()
- : LLPanelProfilePropertiesPeocessorTab()
+ : LLPanelProfilePropertiesProcessorTab()
, mClassifiedToSelectOnLoad(LLUUID::null)
, mClassifiedEditOnLoad(false)
{
@@ -473,7 +473,7 @@ static const S32 CB_ITEM_MATURE = 0;
static const S32 CB_ITEM_PG = 1;
LLPanelProfileClassified::LLPanelProfileClassified()
- : LLPanelProfilePropertiesPeocessorTab()
+ : LLPanelProfilePropertiesProcessorTab()
, mInfoLoaded(false)
, mTeleportClicksOld(0)
, mMapClicksOld(0)
diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h
index 89ce8dae1a..3c4dfc9bd0 100644
--- a/indra/newview/llpanelprofileclassifieds.h
+++ b/indra/newview/llpanelprofileclassifieds.h
@@ -68,7 +68,7 @@ public:
* Panel for displaying Avatar's picks.
*/
class LLPanelProfileClassifieds
- : public LLPanelProfilePropertiesPeocessorTab
+ : public LLPanelProfilePropertiesProcessorTab
{
public:
LLPanelProfileClassifieds();
@@ -109,7 +109,7 @@ private:
class LLPanelProfileClassified
- : public LLPanelProfilePropertiesPeocessorTab
+ : public LLPanelProfilePropertiesProcessorTab
{
public:
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 264d3b78f1..b3109e7da2 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -120,7 +120,7 @@ LLPickHandler gPickHandler;
//-----------------------------------------------------------------------------
LLPanelProfilePicks::LLPanelProfilePicks()
- : LLPanelProfilePropertiesPeocessorTab()
+ : LLPanelProfilePropertiesProcessorTab()
, mPickToSelectOnLoad(LLUUID::null)
{
}
@@ -370,7 +370,7 @@ bool LLPanelProfilePicks::canDeletePick()
//-----------------------------------------------------------------------------
LLPanelProfilePick::LLPanelProfilePick()
- : LLPanelProfilePropertiesPeocessorTab()
+ : LLPanelProfilePropertiesProcessorTab()
, LLRemoteParcelInfoObserver()
, mSnapshotCtrl(NULL)
, mPickId(LLUUID::null)
diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h
index 8be3e0285b..046f13292e 100644
--- a/indra/newview/llpanelprofilepicks.h
+++ b/indra/newview/llpanelprofilepicks.h
@@ -44,7 +44,7 @@ class LLTextEditor;
* Panel for displaying Avatar's picks.
*/
class LLPanelProfilePicks
- : public LLPanelProfilePropertiesPeocessorTab
+ : public LLPanelProfilePropertiesProcessorTab
{
public:
LLPanelProfilePicks();
@@ -93,7 +93,7 @@ private:
class LLPanelProfilePick
- : public LLPanelProfilePropertiesPeocessorTab
+ : public LLPanelProfilePropertiesProcessorTab
, public LLRemoteParcelInfoObserver
{
public:
diff --git a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
index a957a2b454..90e0f1bc05 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
@@ -74,12 +74,12 @@
<button
name="fl_save_changes"
label="Save"
- top="389"
+ top_pad="5"
right="-108"
height="20"
width="80"
enabled="false"
- follows="top|right"
+ follows="right|bottom"
layout="topleft"/>
<button
name="fl_discard_changes"
@@ -89,6 +89,6 @@
height="20"
width="100"
enabled="false"
- follows="top|right"
+ follows="right|bottom"
layout="topleft"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index 6c2460378e..21743baf9d 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -381,26 +381,41 @@ Account: [ACCTTYPE]
follows="all"
layout="topleft"
width="200"
- auto_resize="true"
+ auto_resize="false"
user_resize="false">
- <!-- settings will be here -->
- <check_box
- name="show_in_search_checkbox"
- label="Show in search"
- tool_tip="Let people see you in search results"
- left="1"
+ <!-- only for self -->
+ <text
+ name="search_label"
+ value="Show my profile in search:"
top="1"
+ left="1"
+ right="-1"
height="16"
- width="130"
+ follows="left|top|right"
+ layout="topleft"/>
+ <combo_box
+ name="show_in_search"
+ tool_tip="Let people see you in search results"
+ left="1"
+ top="18"
+ height="23"
+ width="140"
follows="left|top"
layout="topleft"
visible="true"
- enabled="false"/>
+ enabled="false">
+ <combo_box.item
+ name="Hide"
+ label="Hide"
+ value="0" />
+ <combo_box.item
+ name="Show"
+ label="Show"
+ value="1" />
+ </combo_box>
</layout_panel>
-
</layout_stack>
-
</layout_panel>
</layout_stack>