master
Ansariel 2022-05-26 11:38:12 +02:00
commit ee3f663b00
22 changed files with 191 additions and 67 deletions

View File

@ -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));

View File

@ -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<LLButton>("profile_btn");
mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); });
mVisibilityBtn = getChild<LLButton>("visibility_btn");
mVisibilityBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(); });
mVisibilityHideBtn = findChild<LLButton>("visibility_hide_btn");
if (mVisibilityHideBtn)
{
mVisibilityHideBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(false); });
}
mVisibilityShowBtn = findChild<LLButton>("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);
}
}

View File

@ -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;

View File

@ -847,9 +847,12 @@ 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");
mCanSeeOnlineIcon = getChild<LLIconCtrl>("can_see_online");
mCantSeeOnlineIcon = getChild<LLIconCtrl>("cant_see_online");
mCanSeeOnMapIcon = getChild<LLIconCtrl>("can_see_on_map");
mCantSeeOnMapIcon = getChild<LLIconCtrl>("cant_see_on_map");
mCanEditObjectsIcon = getChild<LLIconCtrl>("can_edit_objects");
mCantEditObjectsIcon = getChild<LLIconCtrl>("cant_edit_objects");
// <FS:Ansariel> Undo LL dumb-down junk
mStatusText = getChild<LLTextBox>("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<LLButton>("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); // <FS:Ansariel> 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<LLTabContainer>("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<LLPanel>(PANEL_SECONDLIFE, TRUE);
LLPanel* panel = parent_floater->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
if (panel_sl)
{

View File

@ -178,6 +178,7 @@ private:
void onSaveDescriptionChanges();
void onDiscardDescriptionChanges();
void onShowAgentPermissionsDialog();
void onOpenNotes();
private:
typedef std::map<std::string, LLUUID> 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<LLFloater> mFloaterPermissionsHandle;

View File

@ -1458,7 +1458,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
// note: modifies the argument raw_image!!!!
LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> 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<LLImageJ2C> compressedImage = new LLImageJ2C();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

View File

@ -601,8 +601,16 @@ with the same filename but different name
<texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" />
<texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" />
<texture name="Profile_Search_Visibility_Dark" file_name="icons/Profile_Search_Visibility_Dark.png" preload="true"/>
<texture name="Profile_Search_Visibility_Light" file_name="icons/Profile_Search_Visibility_Light.png" preload="true"/>
<texture name="Profile_Group_Visibility_Off" file_name="icons/profile_group_visibility_eye_off.png" preload="true"/>
<texture name="Profile_Group_Visibility_Off_Pressed" file_name="icons/profile_group_visibility_eye_off_pressed.png" preload="true"/>
<texture name="Profile_Group_Visibility_On" file_name="icons/profile_group_visibility_eye_on.png" preload="true"/>
<texture name="Profile_Group_Visibility_On_Pressed" file_name="icons/profile_group_visibility_eye_on_pressed.png" preload="true"/>
<texture name="Profile_Perm_Find_Disabled" file_name="icons/Profile_Perm_Find_Disabled.png" preload="true"/>
<texture name="Profile_Perm_Find_Enabled" file_name="icons/Profile_Perm_Find_Enabled.png" preload="true"/>
<texture name="Profile_Perm_Objects_Disabled" file_name="icons/Profile_Perm_Objects_Disabled.png" preload="true"/>
<texture name="Profile_Perm_Objects_Enabled" file_name="icons/Profile_Perm_Objects_Enabled.png" preload="true"/>
<texture name="Profile_Perm_Online_Disabled" file_name="icons/Profile_Perm_Online_Disabled.png" preload="true"/>
<texture name="Profile_Perm_Online_Enabled" file_name="icons/Profile_Perm_Online_Enabled.png" preload="true"/>
<texture name="Music_Off" file_name="icons/Music_Off.png" preload="true" />
<texture name="Music_Over" file_name="icons/Music_Over.png" preload="true" />

View File

@ -9,7 +9,7 @@
layout="topleft"
name="activate">
<on_click
function="Gesture.Action.ToogleActiveState" />
function="Gesture.Action.ToggleActiveState" />
</menu_item_call>
<menu_item_call
label="Rename"

View File

@ -54,23 +54,36 @@
use_ellipses="true"
/>
<button
name="visibility_btn"
tool_tip="Toogle visibility in profile"
top_delta="-1"
name="visibility_hide_btn"
tool_tip="Hide group on my profile"
top_delta="-3"
left_pad="3"
right="-53"
height="14"
height="20"
width="20"
follows="right"
image_pressed="Profile_Search_Visibility_Dark"
image_unselected="Profile_Search_Visibility_Light"
image_pressed="Profile_Group_Visibility_Off_Pressed"
image_unselected="Profile_Group_Visibility_Off"
tab_stop="false"
visible="false"
/>
<button
name="visibility_show_btn"
tool_tip="Show group on my profile"
top_delta="0"
right_delta="0"
height="20"
width="20"
follows="right"
image_pressed="Profile_Group_Visibility_On_Pressed"
image_unselected="Profile_Group_Visibility_On"
tab_stop="false"
visible="false"
/>
<button
name="info_btn"
tool_tip="More info"
top_delta="-1"
top_delta="2"
left_pad="3"
right="-30"
height="16"

View File

@ -248,48 +248,85 @@ Account: [ACCTTYPE]
width="26"
auto_resize="false"
user_resize="false">
<!--Todo: progress indicator-->
<!--Todo: Waits for icons. Current behavior is suboptimal and is a placeholder-->
<button
name="allow_to_see_online"
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Command_Speak_Icon"
image_selected="Toolbar_Middle_Selected"
image_unselected="Generic_Person_Large"
<icon
tool_tip="Can see online status"
mouse_opaque="true"
name="can_see_online"
image_name="Profile_Perm_Online_Enabled"
layout="topleft"
follows="left|top"
top="0"
left="0"
height="24"
width="24"
height="24"/>
left_pad="2" />
<icon
tool_tip="Can not see online status"
mouse_opaque="true"
name="cant_see_online"
image_name="Profile_Perm_Online_Disabled"
layout="topleft"
follows="left|top"
top="0"
left="0"
height="24"
width="24"
left_pad="2" />
<button
name="allow_to_see_on_map"
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Command_Speak_Icon"
image_selected="Toolbar_Middle_Selected"
image_unselected="Generic_Person_Large"
<icon
tool_tip="Can see on map"
mouse_opaque="true"
name="can_see_on_map"
image_name="Profile_Perm_Find_Enabled"
layout="topleft"
follows="left|top"
top_pad="7"
left="0"
height="24"
width="24"
height="24"/>
left_pad="2" />
<button
name="allow_edit_my_objects"
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Command_Speak_Icon"
image_selected="Toolbar_Middle_Selected"
image_unselected="Generic_Person_Large"
<icon
tool_tip="Can not see on map"
mouse_opaque="true"
name="cant_see_on_map"
image_name="Profile_Perm_Find_Disabled"
layout="topleft"
follows="left|top"
top_delta="0"
left="0"
height="24"
width="24"
left_pad="2" />
<icon
tool_tip="Can edit my objects"
mouse_opaque="true"
name="can_edit_objects"
image_name="Profile_Perm_Objects_Enabled"
layout="topleft"
follows="left|top"
top_pad="7"
left="0"
height="24"
width="24"
height="24"/>
left_pad="2" />
<icon
tool_tip="Can not edit my objects"
mouse_opaque="true"
name="cant_edit_objects"
image_name="Profile_Perm_Objects_Disabled"
layout="topleft"
follows="left|top"
top_delta="0"
left="0"
height="24"
width="24"
left_pad="2" />
</layout_panel>
</layout_stack>
@ -446,6 +483,16 @@ Account: [ACCTTYPE]
word_wrap="true"
use_ellipses="true"
allow_scroll="false"/>
<button
follows="right|bottom"
layout="topleft"
name="open_notes"
tooltip="Show notes"
image_overlay="ForwardArrow_Off"
height="18"
bottom="-5"
right="-5"
width="20" />
</layout_panel>
<layout_panel