From 41db067a1cfb72ef075e041039e457ecf04a9bf8 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Mon, 18 Dec 2023 01:06:15 -0500 Subject: [PATCH] Fix group name in task properties floater --- indra/newview/llsidepaneltaskinfo.cpp | 24 +++------ indra/newview/llsidepaneltaskinfo.h | 3 +- .../default/xui/en/sidepanel_task_info.xml | 49 ++++++++++--------- 3 files changed, 34 insertions(+), 42 deletions(-) diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 38a84a30d1f..407788ea6bd 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -115,7 +115,7 @@ BOOL LLSidepanelTaskInfo::postBuild() mDeedBtn = getChild<LLButton>("button deed"); - mLabelGroupName = getChild<LLNameBox>("Group Name Proxy"); + mLabelGroupName = getChild<LLTextBox>("Group Name"); childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this); getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); @@ -458,25 +458,17 @@ void LLSidepanelTaskInfo::refresh() // update group text field getChildView("Group:")->setEnabled(TRUE); - getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { - if (mLabelGroupName) - { - mLabelGroupName->setNameID(group_id,TRUE); - mLabelGroupName->setEnabled(TRUE); - } + mLabelGroupName->setValue(LLSLURL("group", group_id, "inspect").getSLURLString()); + mLabelGroupName->setEnabled(TRUE); } else { - if (mLabelGroupName) - { - mLabelGroupName->setNameID(LLUUID::null, TRUE); - mLabelGroupName->refresh(LLUUID::null, std::string(), true); - mLabelGroupName->setEnabled(FALSE); - } + mLabelGroupName->setValue(LLStringUtil::null); + mLabelGroupName->setEnabled(TRUE); } getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); @@ -968,10 +960,8 @@ void LLSidepanelTaskInfo::onClickGroup() void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id) { - if (mLabelGroupName) - { - mLabelGroupName->setNameID(group_id, TRUE); - } + mLabelGroupName->setValue(LLSLURL("group", group_id, "inspect").getSLURLString()); + mLabelGroupName->setEnabled(TRUE); LLSelectMgr::getInstance()->sendGroup(group_id); } diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 2baafc67e7c..8a3b1164dcd 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -42,6 +42,7 @@ class LLComboBox; class LLNameBox; class LLViewerObject; class LLTextBase; +class LLTextBox; class LLSidepanelTaskInfo : public LLPanel { @@ -100,7 +101,7 @@ class LLSidepanelTaskInfo : public LLPanel void disablePermissions(); private: - LLNameBox* mLabelGroupName; // group name + LLTextBox* mLabelGroupName; // group name LLUUID mCreatorID; LLUUID mOwnerID; diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 9e69f3dfe30..041536651de 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -207,37 +207,38 @@ width="78"> Group: </text> - <button - follows="top|left" - height="10" - image_disabled="Activate_Checkmark" - image_selected="Activate_Checkmark" - image_unselected="Activate_Checkmark" - image_color="White_50" - layout="topleft" - left_pad="0" - top_delta="0" - name="button set group" - tab_stop="false" - tool_tip="Choose a group to share this object's permissions" - width="10" /> - <name_box - follows="left|top" - height="18" - initial_value="Loading..." + <text + type="string" + follows="left|right|top" + font="SansSerifSmall" + height="15" + layout="topleft" + name="Group Name" + left_pad="0" + top_delta="0" + translate="false" + use_ellipses="true" + width="200"> + </text> + <button + follows="top|left" + height="23" + image_overlay="Edit_Wrench" layout="topleft" - left_pad="5" - top_delta="-1" - name="Group Name Proxy" - width="150" /> - <button + left_pad="8" + top_delta="-3" + name="button set group" + tab_stop="false" + tool_tip="Choose a group to share this object's permissions" + width="23" /> + <button follows="top|left" height="23" label="Deed" label_selected="Deed" layout="topleft" name="button deed" - top_pad="0" + top_pad="3" left="81" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer." width="100" /> -- GitLab