diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 2f2cc7d1bb..114b937a44 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -122,7 +122,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key) mObserver = new LLFloaterGestureObserver(this); LLGestureMgr::instance().addObserver(mObserver); - mCommitCallbackRegistrar.add("Gesture.Action.ToogleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); + mCommitCallbackRegistrar.add("Gesture.Action.ToggleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this)); mCommitCallbackRegistrar.add("Gesture.Action.CopyPaste", boost::bind(&LLFloaterGesture::onCopyPasteAction, this, _2)); mCommitCallbackRegistrar.add("Gesture.Action.SaveToCOF", boost::bind(&LLFloaterGesture::addToCurrentOutFit, this)); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 64920ea0a6..c62d199b2d 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -422,7 +422,8 @@ mGroupIcon(NULL), mGroupNameBox(NULL), mInfoBtn(NULL), mProfileBtn(NULL), -mVisibilityBtn(NULL), +mVisibilityHideBtn(NULL), +mVisibilityShowBtn(NULL), mGroupID(LLUUID::null), mForAgent(for_agent) { @@ -460,8 +461,16 @@ BOOL LLGroupListItem::postBuild() mProfileBtn = getChild("profile_btn"); mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); }); - mVisibilityBtn = getChild("visibility_btn"); - mVisibilityBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(); }); + mVisibilityHideBtn = findChild("visibility_hide_btn"); + if (mVisibilityHideBtn) + { + mVisibilityHideBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(false); }); + } + mVisibilityShowBtn = findChild("visibility_show_btn"); + if (mVisibilityShowBtn) + { + mVisibilityShowBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(true); }); + } return TRUE; } @@ -481,9 +490,14 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) { mInfoBtn->setVisible(true); mProfileBtn->setVisible(true); - if (mForAgent) + if (mForAgent && mVisibilityHideBtn) { - mVisibilityBtn->setVisible(true); + LLGroupData agent_gdatap; + if (gAgent.getGroupData(mGroupID, agent_gdatap)) + { + mVisibilityHideBtn->setVisible(agent_gdatap.mListInProfile); + mVisibilityShowBtn->setVisible(!agent_gdatap.mListInProfile); + } } } @@ -494,8 +508,12 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) { getChildView("hovered_icon")->setVisible( false); mInfoBtn->setVisible(false); - mVisibilityBtn->setVisible(false); mProfileBtn->setVisible(false); + if (mVisibilityHideBtn) + { + mVisibilityHideBtn->setVisible(false); + mVisibilityShowBtn->setVisible(false); + } LLPanel::onMouseLeave(x, y, mask); } @@ -585,14 +603,15 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } -void LLGroupListItem::onVisibilityBtnClick() +void LLGroupListItem::onVisibilityBtnClick(bool new_visibility) { 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); + mVisibilityHideBtn->setVisible(new_visibility); + mVisibilityShowBtn->setVisible(!new_visibility); } } diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 5d4bb7bed2..bab9127e10 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -123,14 +123,15 @@ private: void setBold(bool bold); void onInfoBtnClick(); void onProfileBtnClick(); - void onVisibilityBtnClick(); + void onVisibilityBtnClick(bool new_visibility); LLTextBox* mGroupNameBox; LLUUID mGroupID; LLGroupIconCtrl* mGroupIcon; LLButton* mInfoBtn; LLButton* mProfileBtn; - LLButton* mVisibilityBtn; + LLButton* mVisibilityHideBtn; + LLButton* mVisibilityShowBtn; std::string mGroupName; bool mForAgent; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 449007a09f..b9b3284439 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -847,9 +847,12 @@ BOOL LLPanelProfileSecondLife::postBuild() mAgentActionMenuButton = getChild("agent_actions_menu"); mSaveDescriptionChanges = getChild("save_description_changes"); mDiscardDescriptionChanges = getChild("discard_description_changes"); - mSeeOnlineToggle = getChild("allow_to_see_online"); - mSeeOnMapToggle = getChild("allow_to_see_on_map"); - mEditObjectsToggle = getChild("allow_edit_my_objects"); + mCanSeeOnlineIcon = getChild("can_see_online"); + mCantSeeOnlineIcon = getChild("cant_see_online"); + mCanSeeOnMapIcon = getChild("can_see_on_map"); + mCantSeeOnMapIcon = getChild("cant_see_on_map"); + mCanEditObjectsIcon = getChild("can_edit_objects"); + mCantEditObjectsIcon = getChild("cant_edit_objects"); // Undo LL dumb-down junk mStatusText = getChild("status"); @@ -862,9 +865,8 @@ BOOL LLPanelProfileSecondLife::postBuild() mSaveDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveDescriptionChanges(); }, nullptr); mDiscardDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr); mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); }); - mSeeOnlineToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); - mSeeOnMapToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); - mEditObjectsToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); }); + + getChild("open_notes")->setCommitCallback([this](LLUICtrl*, void*) { onOpenNotes(); }, nullptr); return TRUE; } @@ -958,9 +960,13 @@ void LLPanelProfileSecondLife::resetData() mGroups.clear(); mGroupList->setGroups(mGroups); - mSeeOnlineToggle->setToggleState(false); - mSeeOnMapToggle->setToggleState(false); - mEditObjectsToggle->setToggleState(false); + mCanSeeOnlineIcon->setVisible(false); + mCantSeeOnlineIcon->setVisible(true); + mCanSeeOnMapIcon->setVisible(false); + mCantSeeOnMapIcon->setVisible(true); + mCanEditObjectsIcon->setVisible(false); + mCantEditObjectsIcon->setVisible(true); + childSetVisible("permissions_panel", false); mStatusText->setVisible(FALSE); // Undo LL dumb-down junk @@ -1204,16 +1210,25 @@ void LLPanelProfileSecondLife::fillRightsData() if (relation) { S32 rights = relation->getRightsGrantedTo(); + bool can_see_online = LLRelationship::GRANT_ONLINE_STATUS & rights; + bool can_see_on_map = LLRelationship::GRANT_MAP_LOCATION & rights; + bool can_edit_objects = LLRelationship::GRANT_MODIFY_OBJECTS & rights; - 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); + mCanSeeOnlineIcon->setVisible(can_see_online); + mCantSeeOnlineIcon->setVisible(!can_see_online); + mCanSeeOnMapIcon->setVisible(can_see_on_map); + mCantSeeOnMapIcon->setVisible(!can_see_on_map); + mCanEditObjectsIcon->setVisible(can_edit_objects); + mCantEditObjectsIcon->setVisible(!can_edit_objects); } else { - mSeeOnlineToggle->setToggleState(false); - mSeeOnMapToggle->setToggleState(false); - mEditObjectsToggle->setToggleState(false); + mCanSeeOnlineIcon->setVisible(false); + mCantSeeOnlineIcon->setVisible(true); + mCanSeeOnMapIcon->setVisible(false); + mCantSeeOnMapIcon->setVisible(true); + mCanEditObjectsIcon->setVisible(false); + mCantEditObjectsIcon->setVisible(true); } childSetVisible("permissions_panel", NULL != relation); @@ -1727,6 +1742,23 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog() } } +void LLPanelProfileSecondLife::onOpenNotes() +{ + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + if (!parent_floater) + { + return; + } + + LLTabContainer* tab_container = parent_floater->findChild("panel_profile_tabs", TRUE); + if (!tab_container) + { + return; + } + + tab_container->selectTabByName(PANEL_NOTES); +} + ////////////////////////////////////////////////////////////////////////// // LLPanelProfileWeb @@ -2104,13 +2136,13 @@ void LLPanelProfileNotes::onSaveNotesChanges() 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) + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + if (!parent_floater) { return; } - LLPanel* panel = floater_profile->findChild(PANEL_SECONDLIFE, TRUE); + LLPanel* panel = parent_floater->findChild(PANEL_SECONDLIFE, TRUE); LLPanelProfileSecondLife *panel_sl = dynamic_cast(panel); if (panel_sl) { diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index fda0a1449b..2a27a9621b 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -178,6 +178,7 @@ private: void onSaveDescriptionChanges(); void onDiscardDescriptionChanges(); void onShowAgentPermissionsDialog(); + void onOpenNotes(); private: typedef std::map group_map_t; @@ -194,9 +195,12 @@ private: LLMenuButton* mAgentActionMenuButton; LLButton* mSaveDescriptionChanges; LLButton* mDiscardDescriptionChanges; - LLButton* mSeeOnlineToggle; - LLButton* mSeeOnMapToggle; - LLButton* mEditObjectsToggle; + LLIconCtrl* mCanSeeOnlineIcon; + LLIconCtrl* mCantSeeOnlineIcon; + LLIconCtrl* mCanSeeOnMapIcon; + LLIconCtrl* mCantSeeOnMapIcon; + LLIconCtrl* mCanEditObjectsIcon; + LLIconCtrl* mCantEditObjectsIcon; LLHandle mFloaterPermissionsHandle; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 93be4a0a04..6ec535c5aa 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1458,7 +1458,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, // note: modifies the argument raw_image!!!! LLPointer LLViewerTextureList::convertToUploadFile(LLPointer raw_image, const S32 max_image_dimentions) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; raw_image->biasedScaleToPowerOfTwo(max_image_dimentions); LLPointer compressedImage = new LLImageJ2C(); diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png new file mode 100644 index 0000000000..8f8caa10d8 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Disabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png new file mode 100644 index 0000000000..42a209dda5 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Find_Enabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png new file mode 100644 index 0000000000..644edf0ef6 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Disabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png new file mode 100644 index 0000000000..629c05ecb8 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Objects_Enabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png new file mode 100644 index 0000000000..ecf66c0ee1 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Disabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png new file mode 100644 index 0000000000..26123938fa Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Profile_Perm_Online_Enabled.png differ 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 deleted file mode 100644 index 09e627861c..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Dark.png and /dev/null 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 deleted file mode 100644 index 1a5aa63727..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Profile_Search_Visibility_Light.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png new file mode 100644 index 0000000000..3a2ed399b2 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off.png differ diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png new file mode 100644 index 0000000000..789f59a491 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_off_pressed.png differ diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png new file mode 100644 index 0000000000..4fb56c389c Binary files /dev/null and b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on.png differ diff --git a/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png new file mode 100644 index 0000000000..ae04a256a4 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/profile_group_visibility_eye_on_pressed.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index cd257e5888..dc3a91acec 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -601,8 +601,16 @@ with the same filename but different name - - + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml index 5cae643e44..359c093eff 100644 --- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml @@ -9,7 +9,7 @@ layout="topleft" name="activate"> + function="Gesture.Action.ToggleActiveState" />