diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h index f981e08ff7..21df036cb7 100644 --- a/indra/newview/llagentpicksinfo.h +++ b/indra/newview/llagentpicksinfo.h @@ -74,10 +74,10 @@ public: void decrementNumberOfPicks() { --mNumberOfPicks; } -private: - void onServerRespond(LLAvatarPicks* picks); +private: + /** * Sets number of Picks. */ diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 3d64a58110..64920ea0a6 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -421,6 +421,8 @@ LLGroupListItem::LLGroupListItem(bool for_agent, bool show_icons) mGroupIcon(NULL), mGroupNameBox(NULL), mInfoBtn(NULL), +mProfileBtn(NULL), +mVisibilityBtn(NULL), mGroupID(LLUUID::null), mForAgent(for_agent) { @@ -455,7 +457,11 @@ BOOL LLGroupListItem::postBuild() mInfoBtn = getChild("info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLGroupListItem::onInfoBtnClick, this)); - childSetAction("profile_btn", boost::bind(&LLGroupListItem::onProfileBtnClick, this)); + mProfileBtn = getChild("profile_btn"); + mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); }); + + mVisibilityBtn = getChild("visibility_btn"); + mVisibilityBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(); }); return TRUE; } @@ -474,7 +480,11 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) if (mGroupID.notNull()) // don't show the info button for the "none" group { mInfoBtn->setVisible(true); - getChildView("profile_btn")->setVisible( true); + mProfileBtn->setVisible(true); + if (mForAgent) + { + mVisibilityBtn->setVisible(true); + } } LLPanel::onMouseEnter(x, y, mask); @@ -484,7 +494,8 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) { getChildView("hovered_icon")->setVisible( false); mInfoBtn->setVisible(false); - getChildView("profile_btn")->setVisible( false); + mVisibilityBtn->setVisible(false); + mProfileBtn->setVisible(false); LLPanel::onMouseLeave(x, y, mask); } @@ -574,6 +585,17 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } +void LLGroupListItem::onVisibilityBtnClick() +{ + LLGroupData agent_gdatap; + if (gAgent.getGroupData(mGroupID, agent_gdatap)) + { + bool new_visibility = !agent_gdatap.mListInProfile; + gAgent.setUserGroupFlags(mGroupID, agent_gdatap.mAcceptNotices, new_visibility); + setVisibleInProfile(new_visibility); + } +} + void LLGroupListItem::changed(LLGroupChange gc) { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID); diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index a85e20d819..5d4bb7bed2 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -123,11 +123,14 @@ private: void setBold(bool bold); void onInfoBtnClick(); void onProfileBtnClick(); + void onVisibilityBtnClick(); LLTextBox* mGroupNameBox; LLUUID mGroupID; LLGroupIconCtrl* mGroupIcon; - LLButton* mInfoBtn; + LLButton* mInfoBtn; + LLButton* mProfileBtn; + LLButton* mVisibilityBtn; std::string mGroupName; bool mForAgent; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 5d5d4b676c..9a030f1d7d 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -119,6 +119,12 @@ void LLPanelProfileTab::setApplyProgress(bool started) indicator->stop(); } } + + LLPanel* panel = findChild("indicator_stack"); + if (panel) + { + panel->setVisible(started); + } } LLPanelProfilePropertiesProcessorTab::LLPanelProfilePropertiesProcessorTab() diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 9f26dd1cf1..449007a09f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -219,6 +219,8 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) LLPanelProfilePicks *panel_picks = dynamic_cast(panel); if (panel_picks) { + // Refresh pick limit before processing + LLAgentPicksInfo::getInstance()->onServerRespond(&avatar_picks); panel_picks->processProperties(&avatar_picks); } @@ -839,7 +841,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mGroupList = getChild("group_list"); mShowInSearchCombo = getChild("show_in_search"); mSecondLifePic = getChild("2nd_life_pic"); - mSecondLifePicLayout = getChild("image_stack"); + mSecondLifePicLayout = getChild("image_panel"); mDescriptionEdit = getChild("sl_description_edit"); mNotesSnippet = getChild("notes_snippet"); mAgentActionMenuButton = getChild("agent_actions_menu"); @@ -1018,6 +1020,11 @@ void LLPanelProfileSecondLife::onAvatarNameCache(const LLUUID& agent_id, const L getChild("user_name")->setValue(av_name.getAccountName()); } +void LLPanelProfileSecondLife::setNotesSnippet(std::string ¬es) +{ + mNotesSnippet->setValue(notes); +} + void LLPanelProfileSecondLife::setProfileImageUploading(bool loading) { LLLoadingIndicator* indicator = getChild("image_upload_indicator"); @@ -1111,6 +1118,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data) LLTextBox* partner_text_ctrl = getChild("partner_link"); if (avatar_data->partner_id.notNull()) { + childSetVisible("partner_layout", TRUE); LLStringUtil::format_map_t args; args["[LINK]"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString(); std::string partner_text = getString("partner_text", args); @@ -1118,7 +1126,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data) } else { - partner_text_ctrl->setText(getString("no_partner_text")); + childSetVisible("partner_layout", FALSE); } } @@ -1442,7 +1450,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) { LLAvatarActions::startCall(agent_id); } - else if (item_name == "callog") + else if (item_name == "chat_history") { LLAvatarActions::viewChatHistory(agent_id); } @@ -1552,7 +1560,7 @@ bool LLPanelProfileSecondLife::onEnableMenu(const LLSD& userdata) { return mVoiceStatus; } - else if (item_name == "callog") + else if (item_name == "chat_history") { return LLLogChat::isTranscriptExist(agent_id); } @@ -1893,6 +1901,12 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key) { LLPanelProfileTab::onOpen(key); + if (!getSelfProfile()) + { + // Otherwise as the only focusable element it will be selected + mDescriptionEdit->setTabStop(FALSE); + } + resetData(); } @@ -2066,24 +2080,6 @@ void LLPanelProfileNotes::onOpen(const LLSD& key) resetData(); } -void LLPanelProfileNotes::onCommitNotes() -{ - std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP); - if (getIsLoaded()) - { - if (!cap_url.empty()) - { - std::string notes = mNotesEditor->getValue().asString(); - LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", notes))); - } - else - { - LL_WARNS() << "Failed to update notes, no cap found" << LL_ENDL; - } - } -} - void LLPanelProfileNotes::setNotesText(const std::string &text) { mSaveChanges->setEnabled(FALSE); @@ -2106,6 +2102,20 @@ void LLPanelProfileNotes::onSaveNotesChanges() { LLCoros::instance().launch("putAgentUserInfoCoro", boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes))); + + + LLFloater* floater_profile = LLFloaterReg::findInstance("profile", LLSD().with("id", getAvatarId())); + if (!floater_profile) + { + return; + } + + LLPanel* panel = floater_profile->findChild(PANEL_SECONDLIFE, TRUE); + LLPanelProfileSecondLife *panel_sl = dynamic_cast(panel); + if (panel_sl) + { + panel_sl->setNotesSnippet(mCurrentNotes); + } } else { diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index b1e41f0bac..fda0a1449b 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -100,6 +100,7 @@ public: void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); + void setNotesSnippet(std::string ¬es); void setProfileImageUploading(bool loading); void setProfileImageUploaded(const LLUUID &image_asset_id); @@ -316,7 +317,6 @@ public: /*virtual*/ void updateData(); protected: - void onCommitNotes(); void setNotesText(const std::string &text); void onSetNotesDirty(); void onSaveNotesChanges(); diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 0103769d49..206c7288a2 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -216,7 +216,8 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key) resetData(); - if (getSelfProfile()) + bool own_profile = getSelfProfile(); + if (own_profile) { mNewButton->setVisible(TRUE); mNewButton->setEnabled(FALSE); @@ -224,6 +225,9 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key) mDeleteButton->setVisible(TRUE); mDeleteButton->setEnabled(FALSE); } + + childSetVisible("buttons_header", own_profile); + } void LLPanelProfileClassifieds::selectClassified(const LLUUID& classified_id, bool edit) diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 9aa43be60c..a4c0ed509d 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -144,7 +144,8 @@ void LLPanelProfilePicks::onOpen(const LLSD& key) resetData(); - if (getSelfProfile()) + bool own_profile = getSelfProfile(); + if (own_profile) { mNewButton->setVisible(TRUE); mNewButton->setEnabled(FALSE); @@ -152,6 +153,8 @@ void LLPanelProfilePicks::onOpen(const LLSD& key) mDeleteButton->setVisible(TRUE); mDeleteButton->setEnabled(FALSE); } + + childSetVisible("buttons_header", own_profile); } void LLPanelProfilePicks::selectPick(const LLUUID& pick_id) diff --git a/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Dark.png b/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Dark.png new file mode 100644 index 0000000000..09e627861c Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Dark.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Light.png b/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Light.png new file mode 100644 index 0000000000..1a5aa63727 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Light.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index aaca978cbf..cd257e5888 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -601,6 +601,9 @@ with the same filename but different name + + + diff --git a/indra/newview/skins/default/xui/en/floater_display_name.xml b/indra/newview/skins/default/xui/en/floater_display_name.xml index a8b54383cd..f49123a46a 100644 --- a/indra/newview/skins/default/xui/en/floater_display_name.xml +++ b/indra/newview/skins/default/xui/en/floater_display_name.xml @@ -23,7 +23,7 @@ use_ellipses="true" width="380" wrap="true"> - The name you give your avatar is called your Display Name. You can change it once a week. + Your display name is what other people see above your head. It is different from your login name. You can change it once a week. +