diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-13 23:38:02 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-13 23:38:02 +0300 |
commit | 4f38a63b076044e9578a91b769a4e1856241f2ba (patch) | |
tree | 01e9707670d5aa488c38a0c42009b7119fec759d /indra/newview | |
parent | 1483c05c9f61e7ce44e8883d8e10d976867882fa (diff) |
SL-15312 Legacy profiles remake #6
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterdisplayname.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 352 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.h | 38 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_display_name.xml | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_profile_permissions.xml | 73 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile_notes.xml | 43 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile_secondlife.xml | 26 |
7 files changed, 329 insertions, 231 deletions
diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index e6742727d6..3b0c67415a 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -47,7 +47,6 @@ public: virtual ~LLFloaterDisplayName() { } /*virtual*/ BOOL postBuild(); void onSave(); - void onReset(); void onCancel(); /*virtual*/ void onOpen(const LLSD& key); @@ -102,7 +101,6 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) BOOL LLFloaterDisplayName::postBuild() { - getChild<LLUICtrl>("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this)); getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this)); getChild<LLUICtrl>("save_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onSave, this)); @@ -158,21 +156,6 @@ void LLFloaterDisplayName::onCancel() setVisible(false); } -void LLFloaterDisplayName::onReset() -{ - if (LLAvatarNameCache::getInstance()->hasNameLookupURL()) - { - LLViewerDisplayName::set("",boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); - } - else - { - LLNotificationsUtil::add("SetDisplayNameFailedGeneric"); - } - - setVisible(false); -} - - void LLFloaterDisplayName::onSave() { std::string display_name_utf8 = getChild<LLUICtrl>("display_name_editor")->getValue().asString(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index b7bc1e2cba..34caa61fbf 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -574,6 +574,163 @@ public: LLAgentHandler gAgentHandler; +///---------------------------------------------------------------------------- +/// LLFloaterInventoryFinder +///---------------------------------------------------------------------------- + +class LLFloaterProfilePermissions + : public LLFloater + , public LLFriendObserver +{ +public: + LLFloaterProfilePermissions(const LLUUID &avatar_id); + ~LLFloaterProfilePermissions(); + BOOL postBuild() override; + void changed(U32 mask) override; // LLFriendObserver + // todo: check if this (and inventory filters) need a drawFrustum() + +private: + void fillRightsData(); + void rightsConfirmationCallback(const LLSD& notification, const LLSD& response); + void confirmModifyRights(bool grant); + void onCommitRights(); + + void onApplyRights(); + void onCancel(); + + LLCheckBoxCtrl* mOnlineStatus; + LLCheckBoxCtrl* mMapRights; + LLCheckBoxCtrl* mEditObjectRights; + LLButton* mOkBtn; + LLButton* mCancelBtn; + + LLUUID mAvatarID; +}; + +LLFloaterProfilePermissions::LLFloaterProfilePermissions(const LLUUID &avatar_id) + : LLFloater(LLSD()) + , mAvatarID(avatar_id) +{ + buildFromFile("floater_profile_permissions.xml"); +} + +LLFloaterProfilePermissions::~LLFloaterProfilePermissions() +{ +} + +BOOL LLFloaterProfilePermissions::postBuild() +{ + mOnlineStatus = getChild<LLCheckBoxCtrl>("online_check"); + mMapRights = getChild<LLCheckBoxCtrl>("map_check"); + mEditObjectRights = getChild<LLCheckBoxCtrl>("objects_check"); + mOkBtn = getChild<LLButton>("perms_btn_ok"); + mCancelBtn = getChild<LLButton>("perms_btn_cancel"); + + mEditObjectRights->setCommitCallback([this](LLUICtrl*, void*) { onCommitRights(); }, nullptr); + mOkBtn->setCommitCallback([this](LLUICtrl*, void*) { onApplyRights(); }, nullptr); + mCancelBtn->setCommitCallback([this](LLUICtrl*, void*) { onCancel(); }, nullptr); + + fillRightsData(); // is it possible to not be friends at this point? This might need to be onOpen() + + return TRUE; +} + +void LLFloaterProfilePermissions::changed(U32 mask) +{ + //todo +} + +void LLFloaterProfilePermissions::fillRightsData() +{ + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(mAvatarID); + // If true - we are viewing friend's profile, enable check boxes and set values. + if (relation) + { + S32 rights = relation->getRightsGrantedTo(); + + mOnlineStatus->setValue(LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE); + mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE); + mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE); + } + else + { + closeFloater(); + LL_INFOS("ProfilePermissions") << "Floater closing since agent is no longer a friend" << LL_ENDL; + } +} + +void LLFloaterProfilePermissions::rightsConfirmationCallback(const LLSD& notification, + const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) + { + mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? FALSE : TRUE); + } +} + +void LLFloaterProfilePermissions::confirmModifyRights(bool grant) +{ + LLSD args; + args["NAME"] = LLSLURL("agent", mAvatarID, "completename").getSLURLString(); + LLNotificationsUtil::add(grant ? "GrantModifyRights" : "RevokeModifyRights", args, LLSD(), + boost::bind(&LLFloaterProfilePermissions::rightsConfirmationCallback, this, _1, _2)); +} + +void LLFloaterProfilePermissions::onCommitRights() +{ + const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(mAvatarID); + + if (!buddy_relationship) + { + LL_WARNS("ProfilePermissions") << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; + return; + } + + bool allow_modify_objects = mEditObjectRights->getValue().asBoolean(); + + // if modify objects checkbox clicked + if (buddy_relationship->isRightGrantedTo( + LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects) + { + confirmModifyRights(allow_modify_objects); + } +} + +void LLFloaterProfilePermissions::onApplyRights() +{ + const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(mAvatarID); + + if (!buddy_relationship) + { + LL_WARNS("ProfilePermissions") << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; + return; + } + + S32 rights = 0; + + if (mOnlineStatus->getValue().asBoolean()) + { + rights |= LLRelationship::GRANT_ONLINE_STATUS; + } + if (mMapRights->getValue().asBoolean()) + { + rights |= LLRelationship::GRANT_MAP_LOCATION; + } + if (mEditObjectRights->getValue().asBoolean()) + { + rights |= LLRelationship::GRANT_MODIFY_OBJECTS; + } + + LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(mAvatarID, rights); + + closeFloater(); +} + +void LLFloaterProfilePermissions::onCancel() +{ + closeFloater(); +} ////////////////////////////////////////////////////////////////////////// // LLPanelProfileSecondLife @@ -613,12 +770,21 @@ BOOL LLPanelProfileSecondLife::postBuild() mAgentActionMenuButton = getChild<LLMenuButton>("agent_actions_menu"); mSaveDescriptionChanges = getChild<LLButton>("save_description_changes"); mDiscardDescriptionChanges = getChild<LLButton>("discard_description_changes"); + mSeeOnlineToggle = getChild<LLButton>("allow_to_see_online"); + mSeeOnMapToggle = getChild<LLButton>("allow_to_see_on_map"); + mEditObjectsToggle = getChild<LLButton>("allow_edit_my_objects"); 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); mDiscardDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr); mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); }); + //mSeeOnlineToggle->setMouseDownCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + mSeeOnlineToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + // mSeeOnMapToggle->setMouseDownCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + mSeeOnMapToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + //mEditObjectsToggle->setMouseDownCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + mEditObjectsToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); return TRUE; } @@ -639,7 +805,6 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) childSetVisible("notes_panel", !own_profile); childSetVisible("settings_panel", own_profile); childSetVisible("about_buttons_panel", own_profile); - childSetVisible("permissions_panel", !own_profile); if (own_profile && !getEmbedded()) { @@ -672,6 +837,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) { mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : TRUE); updateOnlineStatus(); + fillRightsData(); } updateButtons(); @@ -715,10 +881,6 @@ void LLPanelProfileSecondLife::processProperties(void* data, EAvatarProcessorTyp void LLPanelProfileSecondLife::resetData() { resetLoading(); - getChild<LLUICtrl>("complete_name")->setValue(LLStringUtil::null); - getChild<LLUICtrl>("register_date")->setValue(LLStringUtil::null); - getChild<LLUICtrl>("acc_status_text")->setValue(LLStringUtil::null); - getChild<LLUICtrl>("partner_text")->setValue(LLStringUtil::null); // Set default image and 1:1 dimensions for it mSecondLifePic->setValue("Generic_Person_Large"); @@ -728,6 +890,11 @@ void LLPanelProfileSecondLife::resetData() setDescriptionText(LLStringUtil::null); mGroups.clear(); mGroupList->setGroups(mGroups); + + mSeeOnlineToggle->setToggleState(false); + mSeeOnMapToggle->setToggleState(false); + mEditObjectsToggle->setToggleState(false); + childSetVisible("permissions_panel", false); } void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data) @@ -891,6 +1058,28 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data getChild<LLUICtrl>("account_info")->setValue(caption_text); } +void LLPanelProfileSecondLife::fillRightsData() +{ + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); + // If true - we are viewing friend's profile, enable check boxes and set values. + if (relation) + { + S32 rights = relation->getRightsGrantedTo(); + + mSeeOnlineToggle->setToggleState(LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE); + mSeeOnMapToggle->setToggleState(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE); + mEditObjectsToggle->setToggleState(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE); + } + else + { + mSeeOnlineToggle->setToggleState(false); + mSeeOnMapToggle->setToggleState(false); + mEditObjectsToggle->setToggleState(false); + } + + childSetVisible("permissions_panel", NULL != relation); +} + void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep) { LLRect imageRect = mSecondLifePicLayout->getRect(); @@ -936,7 +1125,14 @@ void LLPanelProfileSecondLife::onImageLoaded(BOOL success, // virtual, called by LLAvatarTracker void LLPanelProfileSecondLife::changed(U32 mask) { - updateOnlineStatus(); + if (mask & LLFriendObserver::ONLINE) + { + updateOnlineStatus(); + } + if (mask != LLFriendObserver::ONLINE) + { + fillRightsData(); + } updateButtons(); } @@ -1000,6 +1196,7 @@ void LLPanelProfileSecondLife::processOnlineStatus(bool online) { } +//todo: remove? void LLPanelProfileSecondLife::updateButtons() { LLPanelProfileTab::updateButtons(); @@ -1019,7 +1216,7 @@ class LLProfileImagePicker : public LLFilePickerThread public: LLProfileImagePicker(EProfileImageType type, LLHandle<LLPanel> *handle); ~LLProfileImagePicker(); - virtual void notify(const std::vector<std::string>& filenames); + void notify(const std::vector<std::string>& filenames) override; private: LLHandle<LLPanel> *mHandle; @@ -1321,6 +1518,25 @@ void LLPanelProfileSecondLife::onDiscardDescriptionChanges() setDescriptionText(mDescriptionText); } +void LLPanelProfileSecondLife::onShowAgentPermissionsDialog() +{ + LLFloater *floater = mFloaterPermissionsHandle.get(); + if (!floater) + { + LLFloaterProfilePermissions * perms = new LLFloaterProfilePermissions(getAvatarId()); + mFloaterPermissionsHandle = perms->getHandle(); + perms->openFloater(); + + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + if (parent_floater) + parent_floater->addDependentFloater(mFloaterPermissionsHandle); + } + else // already open + { + floater->closeFloater(); + } +} + ////////////////////////////////////////////////////////////////////////// // LLPanelProfileWeb @@ -1658,10 +1874,6 @@ LLPanelProfileNotes::LLPanelProfileNotes() LLPanelProfileNotes::~LLPanelProfileNotes() { - if (getAvatarId().notNull()) - { - LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this); - } } void LLPanelProfileNotes::updateData() @@ -1682,14 +1894,10 @@ void LLPanelProfileNotes::updateData() BOOL LLPanelProfileNotes::postBuild() { - mOnlineStatus = getChild<LLCheckBoxCtrl>("status_check"); - mMapRights = getChild<LLCheckBoxCtrl>("map_check"); - mEditObjectRights = getChild<LLCheckBoxCtrl>("objects_check"); mNotesEditor = getChild<LLTextEditor>("notes_edit"); mSaveChanges = getChild<LLButton>("notes_save_changes"); mDiscardChanges = getChild<LLButton>("notes_discard_changes"); - mEditObjectRights->setCommitCallback(boost::bind(&LLPanelProfileNotes::onCommitRights, this)); mSaveChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveNotesChanges(); }, nullptr); mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardNotesChanges(); }, nullptr); mNotesEditor->setKeystrokeCallback([this](LLTextEditor* caller) { onSetNotesDirty(); }); @@ -1702,28 +1910,6 @@ void LLPanelProfileNotes::onOpen(const LLSD& key) LLPanelProfileTab::onOpen(key); resetData(); - - fillRightsData(); -} - -void LLPanelProfileNotes::fillRightsData() -{ - mOnlineStatus->setValue(FALSE); - mMapRights->setValue(FALSE); - mEditObjectRights->setValue(FALSE); - - const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); - // If true - we are viewing friend's profile, enable check boxes and set values. - if(relation) - { - S32 rights = relation->getRightsGrantedTo(); - - mOnlineStatus->setValue(LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE); - mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE); - mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE); - } - - enableCheckboxes(NULL != relation); } void LLPanelProfileNotes::onCommitNotes() @@ -1781,76 +1967,6 @@ void LLPanelProfileNotes::onDiscardNotesChanges() setNotesText(mCurrentNotes); } -void LLPanelProfileNotes::rightsConfirmationCallback(const LLSD& notification, - const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) - { - mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? FALSE : TRUE); - } -} - -void LLPanelProfileNotes::confirmModifyRights(bool grant) -{ - LLSD args; - args["NAME"] = LLSLURL("agent", getAvatarId(), "completename").getSLURLString(); - - - LLNotificationsUtil::add(grant ? "GrantModifyRights" : "RevokeModifyRights", args, LLSD(), - boost::bind(&LLPanelProfileNotes::rightsConfirmationCallback, this, _1, _2)); - -} - -void LLPanelProfileNotes::onCommitRights() -{ - const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); - - if (!buddy_relationship) - { - LL_WARNS("LegacyProfile") << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; - return; - } - - bool allow_modify_objects = mEditObjectRights->getValue().asBoolean(); - - // if modify objects checkbox clicked - if (buddy_relationship->isRightGrantedTo( - LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects) - { - confirmModifyRights(allow_modify_objects); - } -} - -void LLPanelProfileNotes::applyRights() -{ - const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); - - if (!buddy_relationship) - { - // Lets have a warning log message instead of having a crash. EXT-4947. - LL_WARNS("LegacyProfile") << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; - return; - } - - S32 rights = 0; - - if (mOnlineStatus->getValue().asBoolean()) - { - rights |= LLRelationship::GRANT_ONLINE_STATUS; - } - if (mMapRights->getValue().asBoolean()) - { - rights |= LLRelationship::GRANT_MAP_LOCATION; - } - if (mEditObjectRights->getValue().asBoolean()) - { - rights |= LLRelationship::GRANT_MODIFY_OBJECTS; - } - - LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(), rights); -} - void LLPanelProfileNotes::processProperties(void* data, EAvatarProcessorType type) { if (APT_NOTES == type) @@ -1875,35 +1991,13 @@ void LLPanelProfileNotes::resetData() { resetLoading(); mNotesEditor->setValue(LLStringUtil::null); - mOnlineStatus->setValue(FALSE); - mMapRights->setValue(FALSE); - mEditObjectRights->setValue(FALSE); -} - -void LLPanelProfileNotes::enableCheckboxes(bool enable) -{ - mOnlineStatus->setEnabled(enable); - mMapRights->setEnabled(enable); - mEditObjectRights->setEnabled(enable); -} - -// virtual, called by LLAvatarTracker -void LLPanelProfileNotes::changed(U32 mask) -{ - // update rights to avoid have checkboxes enabled when friendship is terminated. EXT-4947. - fillRightsData(); } void LLPanelProfileNotes::setAvatarId(const LLUUID& avatar_id) { if (avatar_id.notNull()) { - if (getAvatarId().notNull()) - { - LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this); - } LLPanelProfileTab::setAvatarId(avatar_id); - LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this); } } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 428f4ce78d..1d871415e8 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -109,27 +109,29 @@ protected: /** * Process profile related data received from server. */ - virtual void processProfileProperties(const LLAvatarData* avatar_data); + void processProfileProperties(const LLAvatarData* avatar_data); /** * Processes group related data received from server. */ - virtual void processGroupProperties(const LLAvatarGroups* avatar_groups); + void processGroupProperties(const LLAvatarGroups* avatar_groups); /** * Fills common for Avatar profile and My Profile fields. */ - virtual void fillCommonData(const LLAvatarData* avatar_data); + void fillCommonData(const LLAvatarData* avatar_data); /** * Fills partner data. */ - virtual void fillPartnerData(const LLAvatarData* avatar_data); + void fillPartnerData(const LLAvatarData* avatar_data); /** * Fills account status. */ - virtual void fillAccountStatus(const LLAvatarData* avatar_data); + void fillAccountStatus(const LLAvatarData* avatar_data); + + void fillRightsData(); void onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep); static void onImageLoaded(BOOL success, @@ -168,6 +170,7 @@ private: void onSetDescriptionDirty(); void onSaveDescriptionChanges(); void onDiscardDescriptionChanges(); + void onShowAgentPermissionsDialog(); private: typedef std::map<std::string, LLUUID> group_map_t; @@ -182,6 +185,11 @@ private: LLMenuButton* mAgentActionMenuButton; LLButton* mSaveDescriptionChanges; LLButton* mDiscardDescriptionChanges; + LLButton* mSeeOnlineToggle; + LLButton* mSeeOnMapToggle; + LLButton* mEditObjectsToggle; + + LLHandle<LLFloater> mFloaterPermissionsHandle; bool mVoiceStatus; bool mWaitingForImageUpload; @@ -285,7 +293,6 @@ protected: */ class LLPanelProfileNotes : public LLPanelProfileTab - , public LLFriendObserver { public: LLPanelProfileNotes(); @@ -293,11 +300,6 @@ public: virtual void setAvatarId(const LLUUID& avatar_id); - /** - * LLFriendObserver trigger - */ - virtual void changed(U32 mask); - /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ BOOL postBuild(); @@ -310,26 +312,12 @@ public: /*virtual*/ void updateData(); protected: - /** - * Fills rights data for friends. - */ - void fillRightsData(); - - void rightsConfirmationCallback(const LLSD& notification, const LLSD& response); - void confirmModifyRights(bool grant); - void onCommitRights(); void onCommitNotes(); - void enableCheckboxes(bool enable); void setNotesText(const std::string &text); void onSetNotesDirty(); void onSaveNotesChanges(); void onDiscardNotesChanges(); - void applyRights(); - - LLCheckBoxCtrl* mOnlineStatus; - LLCheckBoxCtrl* mMapRights; - LLCheckBoxCtrl* mEditObjectRights; LLTextEditor* mNotesEditor; LLButton* mSaveChanges; LLButton* mDiscardChanges; 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 9a9fd32a77..d14b4a1699 100644 --- a/indra/newview/skins/default/xui/en/floater_display_name.xml +++ b/indra/newview/skins/default/xui/en/floater_display_name.xml @@ -85,19 +85,10 @@ width="120" /> <button height="23" - label="Reset" - layout="topleft" - font="SansSerif" - left_pad="5" - name="reset_btn" - tool_tip="Make Display Name the same as Username" - width="120" /> - <button - height="23" label="Cancel" font="SansSerif" layout="topleft" - left_pad="5" + left_pad="125" name="cancel_btn" width="120" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_profile_permissions.xml b/indra/newview/skins/default/xui/en/floater_profile_permissions.xml new file mode 100644 index 0000000000..d186146770 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_profile_permissions.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_resize="false" + show_title="false" + can_minimize="false" + can_close="false" + header_height="10" + bg_opaque_image="Window_NoTitle_Foreground" + bg_alpha_image="Window_NoTitle_Background" + height="200" + layout="topleft" + name="profile_permissiona" + width="300"> + <text + name="perm_description" + value="Allow [AGENT_NAME] to:" + top="5" + left="6" + right="-6" + height="16" + follows="top|left" + layout="topleft" + font.style="BOLD" + /> + <check_box + name="online_check" + label="See when I am online" + top_pad="5" + left="10" + height="16" + width="293" + follows="top|left" + layout="topleft" + /> + <check_box + name="map_check" + label="Find me on the world map" + top_pad="5" + left="10" + height="16" + width="293" + follows="top|left" + layout="topleft" + /> + <check_box + name="objects_check" + label="Edit, delete or take my objects" + top_pad="5" + left="10" + height="16" + width="293" + follows="top|left" + layout="topleft" + /> + <button + name="perms_btn_ok" + label="OK" + top_pad="5" + left="10" + height="20" + width="90" + follows="top|left" + layout="topleft"/> + <button + name="perms_btn_cancel" + label="Cancel" + top_delta="0" + left_pad="10" + height="20" + width="90" + follows="top|left" + layout="topleft"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/panel_profile_notes.xml b/indra/newview/skins/default/xui/en/panel_profile_notes.xml index 2d9d513ce0..78d5fb5915 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_notes.xml @@ -42,49 +42,6 @@ max_length="65530" word_wrap="true" /> - <!--Placeholder, will be moved into BIO's clickable icons--> - <text - name="status_message2" - value="Allow this avatar to:" - top_pad="11" - left="6" - right="-6" - height="16" - follows="left|bottom|right" - layout="topleft" - font.style="BOLD" - /> - <check_box - name="status_check" - label="See when I am online" - enabled="false" - top_pad="0" - left="10" - height="16" - width="293" - follows="left|bottom|right" - layout="topleft" - /> - <check_box - name="map_check" - label="Find me on the world map" - enabled="false" - left="10" - height="16" - width="293" - follows="left|bottom|right" - layout="topleft" - /> - <check_box - name="objects_check" - label="Edit, delete or take my objects" - enabled="false" - left="10" - height="16" - width="293" - follows="left|bottom|right" - layout="topleft" - /> <button name="notes_save_changes" label="Save" 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 3aa4b47612..5dd4a9116a 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml @@ -159,28 +159,40 @@ Account: [ACCTTYPE] auto_resize="false" user_resize="false"> <!--Todo: progress indicator--> - <!--Probably should be borderless buttons--> - <icon + <!--Todo: Waits for icons. Current behavior is suboptimal and is a placeholder--> + + <button name="allow_to_see_online" - image_name="Generic_Person_Large" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Command_Speak_Icon" + image_selected="Toolbar_Middle_Selected" + image_unselected="Generic_Person_Large" layout="topleft" follows="left|top" top="0" left="0" width="24" height="24"/> - <icon + + <button name="allow_to_see_on_map" - image_name="Generic_Person_Large" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Command_Speak_Icon" + image_selected="Toolbar_Middle_Selected" + image_unselected="Generic_Person_Large" layout="topleft" follows="left|top" top_pad="7" left="0" width="24" height="24"/> - <icon + + <button name="allow_edit_my_objects" - image_name="Generic_Person_Large" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Command_Speak_Icon" + image_selected="Toolbar_Middle_Selected" + image_unselected="Generic_Person_Large" layout="topleft" follows="left|top" top_pad="7" |