From 41449f8afde55e5998d718ee282063d9e4c3583f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 23 Aug 2010 06:42:38 -0700 Subject: Removed profile buttons in the build window in favor of clickable links. Group names are now also clickable. Fixes inability to see full names when editing objects --- linden/indra/newview/llpanelpermissions.cpp | 44 +++++++++++------- linden/indra/newview/llpanelpermissions.h | 1 + .../skins/default/xui/en-us/floater_tools.xml | 53 ++++++++++------------ 3 files changed, 52 insertions(+), 46 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index a97d177..d541bce 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -85,10 +85,10 @@ BOOL LLPanelPermissions::postBuild() this->childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this); this->childSetPrevalidate("Object Description",LLLineEditor::prevalidatePrintableNotPipe); - - this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); - this->childSetAction("button last owner profile",LLPanelPermissions::onClickLastOwner,this); - this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); + this->getChild("Creator Name")->setClickedCallback(onClickCreator, this); + this->getChild("Owner Name")->setClickedCallback(onClickOwner, this); + this->getChild("Last Owner Name")->setClickedCallback(onClickLastOwner, this); + this->getChild("Group Name Proxy")->setClickedCallback(onClickGroupName, this); this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); @@ -116,8 +116,13 @@ BOOL LLPanelPermissions::postBuild() LLTextBox* group_rect_proxy = getChild("Group Name Proxy"); if(group_rect_proxy ) { + // God I hate leaving this hardcoded styling here, ick ick ick -- MC mLabelGroupName = new LLNameBox("Group Name", group_rect_proxy->getRect()); addChild(mLabelGroupName); + mLabelGroupName->setClickedCallback(onClickGroupName, this); + mLabelGroupName->setHoverActive(TRUE); + mLabelGroupName->setHoverColor(LLColor4(50, 115, 185)); + mLabelGroupName->setFontStyle(LLFontGL::UNDERLINE); } else { @@ -177,17 +182,14 @@ void LLPanelPermissions::refresh() childSetEnabled("Creator:",false); childSetText("Creator Name",LLStringUtil::null); childSetEnabled("Creator Name",false); - childSetEnabled("button creator profile",false); childSetEnabled("Owner:",false); childSetText("Owner Name",LLStringUtil::null); childSetEnabled("Owner Name",false); - childSetEnabled("button owner profile",false); childSetEnabled("Last Owner:",false); childSetText("Last Owner Name",LLStringUtil::null); childSetEnabled("Last Owner Name",false); - childSetEnabled("button last owner profile",false); childSetEnabled("Group:",false); childSetText("Group Name",LLStringUtil::null); @@ -297,8 +299,7 @@ void LLPanelPermissions::refresh() creator_name); childSetText("Creator Name",creator_name); - childSetEnabled("Creator Name",TRUE); - childSetEnabled("button creator profile", creators_identical && mCreatorID.notNull() ); + childSetEnabled("Creator Name",creators_identical && mCreatorID.notNull()); // Update owner text field childSetEnabled("Owner:",true); @@ -347,10 +348,9 @@ void LLPanelPermissions::refresh() // [/RLVa:KB] childSetText("Owner Name",owner_name); - childSetEnabled("Owner Name",TRUE); -// childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) - childSetEnabled("button owner profile", +// childSetEnabled("Owner Name",TRUE); +// [RLVa:KB] - Checked: 2010-08-23 (RLVa-imp-edit) + childSetEnabled("Owner Name", fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); // [/RLVa:KB] @@ -359,14 +359,12 @@ void LLPanelPermissions::refresh() childSetEnabled("Last Owner:", TRUE); childSetText("Last Owner Name", last_owner_name); childSetEnabled("Last Owner Name", TRUE); - childSetEnabled("button last owner profile", TRUE); } else { childSetEnabled("Last Owner:", FALSE); childSetText("Last Owner Name", LLStringUtil::null); childSetEnabled("Last Owner Name", FALSE); - childSetEnabled("button last owner profile", FALSE); } // update group text field @@ -868,7 +866,10 @@ void LLPanelPermissions::onClickCreator(void *data) { LLPanelPermissions *self = (LLPanelPermissions *)data; - LLFloaterAvatarInfo::showFromObject(self->mCreatorID); + if (self->mCreatorID.notNull()) + { + LLFloaterAvatarInfo::showFromObject(self->mCreatorID); + } } // static @@ -882,7 +883,7 @@ void LLPanelPermissions::onClickOwner(void *data) LLSelectMgr::getInstance()->selectGetGroup(group_id); LLFloaterGroupInfo::showFromUUID(group_id); } - else + else if (self->mOwnerID.notNull()) { // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) @@ -910,6 +911,15 @@ void LLPanelPermissions::onClickLastOwner(void *data) } } +void LLPanelPermissions::onClickGroupName(void *data) +{ + LLUUID group_id; + if (LLSelectMgr::getInstance()->selectGetGroup(group_id)) + { + LLFloaterGroupInfo::showFromUUID(group_id); + } +} + void LLPanelPermissions::onClickGroup(void* data) { LLPanelPermissions* panelp = (LLPanelPermissions*)data; diff --git a/linden/indra/newview/llpanelpermissions.h b/linden/indra/newview/llpanelpermissions.h index 9aa5573..9fa4cce 100644 --- a/linden/indra/newview/llpanelpermissions.h +++ b/linden/indra/newview/llpanelpermissions.h @@ -70,6 +70,7 @@ protected: static void onClickCreator(void*); static void onClickOwner(void*); static void onClickLastOwner(void*); + static void onClickGroupName(void*); static void onClickGroup(void*); static void cbGroupID(LLUUID group_id, void* userdata); static void onClickDeedToGroup(void*); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 465abdc..5f61e3c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -349,6 +349,7 @@ follows="left|top|right" font="SansSerifSmall" height="16" left="88" max_length="127" mouse_opaque="true" name="Object Description" select_all_on_focus_received="true" width="172" /> + - Thrax Linden - -