diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index a890cba38..080a74a48 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -176,7 +176,7 @@ public: void updateFloaterCovenantText(const std::string& string, const LLUUID &asset_id); void updateFloaterEstateName(const std::string& name); void updateFloaterLastModified(const std::string& text); - void updateFloaterEstateOwnerName(const std::string& name); + void updateFloaterEstateOwnerID(const LLUUID& id); void updateWebSiteInfo(); void finishWebSiteInfo(); @@ -263,12 +263,12 @@ void LLFloaterBuyLand::updateLastModified(const std::string& text) } // static -void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name) +void LLFloaterBuyLand::updateEstateOwnerID(const LLUUID& id) { - LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL; + LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : nullptr; if (floater) { - floater->updateFloaterEstateOwnerName(name); + floater->updateFloaterEstateOwnerID(id); } } @@ -629,10 +629,10 @@ void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text) if (editor) editor->setText(text); } -void LLFloaterBuyLandUI::updateFloaterEstateOwnerName(const std::string& name) +void LLFloaterBuyLandUI::updateFloaterEstateOwnerID(const LLUUID& id) { LLTextBox* box = getChild("estate_owner_text"); - if (box) box->setText(name); + if (box) box->setValue(id); } void LLFloaterBuyLandUI::updateWebSiteInfo() diff --git a/indra/newview/llfloaterbuyland.h b/indra/newview/llfloaterbuyland.h index 0d90130a0..8bb98e0c2 100644 --- a/indra/newview/llfloaterbuyland.h +++ b/indra/newview/llfloaterbuyland.h @@ -46,7 +46,7 @@ public: static void updateCovenantText(const std::string& string, const LLUUID& asset_id); static void updateEstateName(const std::string& name); static void updateLastModified(const std::string& text); - static void updateEstateOwnerName(const std::string& name); + static void updateEstateOwnerID(const LLUUID& id); }; #endif diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 59f2b5049..fee645546 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -368,7 +368,6 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel) , mBtnDeedToGroup(nullptr) , mBtnSetGroup(nullptr) , mTextOwner(nullptr) - , mBtnProfile(nullptr) , mContentRating(nullptr) , mLandType(nullptr) , mTextGroup(nullptr) @@ -414,19 +413,13 @@ BOOL LLPanelLandGeneral::postBuild() mContentRating = getChild("ContentRatingText"); mLandType = getChild("LandTypeText"); - - mBtnProfile = getChild("Profile..."); - mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this)); - mTextGroup = getChild("GroupText"); mBtnSetGroup = getChild("Set..."); mBtnSetGroup->setCommitCallback(boost::bind(&LLPanelLandGeneral::onClickSetGroup, this)); - getChild("group_profile")->setClickedCallback(onClickInfoGroup, this); - mCheckDeedToGroup = getChild( "check deed"); childSetCommitCallback("check deed", onCommitAny, this); @@ -564,14 +557,12 @@ void LLPanelLandGeneral::refresh() mCheckContributeWithDeed->set(FALSE); mCheckContributeWithDeed->setEnabled(FALSE); - mTextOwner->setText(LLStringUtil::null); + mTextOwner->setValue(LLUUID::null); mContentRating->setText(LLStringUtil::null); mLandType->setText(LLStringUtil::null); - mBtnProfile->setLabel(getString("profile_text")); - mBtnProfile->setEnabled(FALSE); mTextClaimDate->setText(LLStringUtil::null); - mTextGroup->setText(LLStringUtil::null); + mTextGroup->setValue(LLUUID::null); mTextPrice->setText(LLStringUtil::null); mSaleInfoForSale1->setVisible(FALSE); @@ -626,16 +617,19 @@ void LLPanelLandGeneral::refresh() BOOL can_be_sold = owner_sellable || estate_manager_sellable; const LLUUID &owner_id = parcel->getOwnerID(); + const LLUUID& group_id = parcel->getGroupID(); BOOL is_public = parcel->isPublic(); + bool group_owned = parcel->getIsGroupOwned(); // Is it owned? + mTextOwner->setValue(is_public ? LLUUID::null : LLSD().with("id", owner_id).with("group", group_owned)); + mTextGroup->setValue(is_public ? LLUUID::null : group_id); if (is_public) { mTextSalePending->setText(LLStringUtil::null); mTextSalePending->setEnabled(FALSE); mTextOwner->setText(getString("public_text")); mTextOwner->setEnabled(FALSE); - mBtnProfile->setEnabled(FALSE); mTextClaimDate->setText(LLStringUtil::null); mTextClaimDate->setEnabled(FALSE); mTextGroup->setText(getString("none_text")); @@ -665,21 +659,13 @@ void LLPanelLandGeneral::refresh() mTextOwner->setEnabled(TRUE); // We support both group and personal profiles - mBtnProfile->setEnabled(TRUE); - - if (parcel->getGroupID().isNull()) + if (group_id.isNull()) { - // Not group owned, so "Profile" - mBtnProfile->setLabel(getString("profile_text")); - mTextGroup->setText(getString("none_text")); mTextGroup->setEnabled(FALSE); } else { - // Group owned, so "Info" - mBtnProfile->setLabel(getString("info_text")); - //mTextGroup->setText("HIPPOS!");//parcel->getGroupName()); mTextGroup->setEnabled(TRUE); } @@ -702,9 +688,7 @@ void LLPanelLandGeneral::refresh() mEditDesc->setEnabled(can_edit_identity); BOOL can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS); - mBtnSetGroup->setEnabled(can_edit_agent_only && !parcel->getIsGroupOwned()); - - const LLUUID& group_id = parcel->getGroupID(); + mBtnSetGroup->setEnabled(can_edit_agent_only && !group_owned); // Can only allow deeding if you own it and it's got a group. BOOL enable_deed = (owner_id == gAgent.getID() @@ -723,7 +707,7 @@ void LLPanelLandGeneral::refresh() mBtnDeedToGroup->setEnabled( parcel->getAllowDeedToGroup() && group_id.notNull() && can_deed - && !parcel->getIsGroupOwned() + && !group_owned ); mEditName->setText( parcel->getName() ); @@ -838,34 +822,24 @@ void LLPanelLandGeneral::refreshNames() LLParcel *parcel = mParcel->getParcel(); if (!parcel) { - mTextOwner->setText(LLStringUtil::null); - mTextGroup->setText(LLStringUtil::null); + mTextOwner->setValue(LLUUID::null); + mTextGroup->setValue(LLUUID::null); return; } - std::string owner; - if (parcel->getIsGroupOwned()) + bool group_owned = parcel->getIsGroupOwned(); + mTextOwner->setValue(LLSD().with("id", parcel->getOwnerID()).with("group", group_owned)); + if (group_owned) { - owner = getString("group_owned_text"); - } - else - { - // Figure out the owner's name - gCacheName->getFullName(parcel->getOwnerID(), owner); + mTextOwner->setText(getString("group_owned_text")); } if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) { - owner += getString("sale_pending_text"); + mTextOwner->setText(mTextOwner->getText() + getString("sale_pending_text")); } - mTextOwner->setText(owner); - std::string group; - if (!parcel->getGroupID().isNull()) - { - gCacheName->getGroupName(parcel->getGroupID(), group); - } - mTextGroup->setText(group); + mTextGroup->setValue(parcel->getGroupID()); if (parcel->getForSale()) { @@ -907,32 +881,6 @@ void LLPanelLandGeneral::onClickSetGroup() } } -// static -void LLPanelLandGeneral::onClickInfoGroup(void* userdata) -{ - LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)userdata; - LLParcel* parcel = panelp->mParcel->getParcel(); - if (!parcel) return; - LLGroupActions::show(parcel->getGroupID()); -} - -void LLPanelLandGeneral::onClickProfile() -{ - LLParcel* parcel = mParcel->getParcel(); - if (!parcel) return; - - if (parcel->getIsGroupOwned()) - { - const LLUUID& group_id = parcel->getGroupID(); - LLGroupActions::show(group_id); - } - else - { - const LLUUID& avatar_id = parcel->getOwnerID(); - LLAvatarActions::showProfile(avatar_id); - } -} - // public void LLPanelLandGeneral::setGroup(const LLUUID& group_id) { @@ -942,7 +890,6 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id) // Set parcel properties and send message parcel->setGroupID(group_id); //parcel->setGroupName(group_name); - //mTextGroup->setText(group_name); // Send update LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate(parcel); @@ -3145,13 +3092,12 @@ void LLPanelLandCovenant::updateLastModified(const std::string& text) } // static -void LLPanelLandCovenant::updateEstateOwnerName(const std::string& name) +void LLPanelLandCovenant::updateEstateOwnerID(const LLUUID& id) { LLPanelLandCovenant* self = LLFloaterLand::getCurrentPanelLandCovenant(); if (self) { - LLTextBox* editor = self->getChild("estate_owner_text"); - if (editor) editor->setText(name); + self->getChildView("estate_owner_text")->setValue(id); } } diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index eb0cefd7f..1a99e6394 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -148,9 +148,7 @@ public: virtual void draw(); void setGroup(const LLUUID& group_id); - void onClickProfile(); void onClickSetGroup(); - static void onClickInfoGroup(void*); static void onClickDeed(void*); static void onClickBuyLand(void* data); static void onClickScriptLimits(void* data); @@ -191,8 +189,7 @@ protected: LLButton* mBtnSetGroup; LLTextBox* mTextOwner; - LLButton* mBtnProfile; - + LLTextBox* mContentRating; LLTextBox* mLandType; @@ -406,7 +403,7 @@ public: static void updateCovenantText(const std::string& string); static void updateEstateName(const std::string& name); static void updateLastModified(const std::string& text); - static void updateEstateOwnerName(const std::string& name); + static void updateEstateOwnerID(const LLUUID& id); protected: LLSafeHandle& mParcel; diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 2f80d004d..9a32f4011 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -168,12 +168,6 @@ BOOL LLFloaterProperties::postBuild() getChild("LabelItemName")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitName,this)); getChild("LabelItemDesc")->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe); getChild("LabelItemDesc")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitDescription,this)); - // Creator information - getChild("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this)); - // owner information - getChild("BtnOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickOwner,this)); - // last owner information - getChild("BtnLastOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickLastOwner,this)); // acquired date // owner permissions // Permissions debug text @@ -226,11 +220,8 @@ void LLFloaterProperties::refresh() "LabelItemName", "LabelItemDesc", "LabelCreatorName", - "BtnCreator", "LabelOwnerName", - "BtnOwner", "LabelLastOwnerName", - "BtnLastOwner", "CheckOwnerModify", "CheckOwnerCopy", "CheckOwnerTransfer", @@ -328,72 +319,46 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if(!gCacheName) return; if(!gAgent.getRegion()) return; + getChild("LabelCreatorName")->setValue(item->getCreatorUUID()); if (item->getCreatorUUID().notNull()) { - std::string name; - gCacheName->getFullName(item->getCreatorUUID(), name); - getChildView("BtnCreator")->setEnabled(TRUE); getChildView("LabelCreatorTitle")->setEnabled(TRUE); getChildView("LabelCreatorName")->setEnabled(TRUE); - getChild("LabelCreatorName")->setValue(name); } else { - getChildView("BtnCreator")->setEnabled(FALSE); getChildView("LabelCreatorTitle")->setEnabled(FALSE); getChildView("LabelCreatorName")->setEnabled(FALSE); - getChild("LabelCreatorName")->setValue(getString("unknown")); + getChild("LabelCreatorName")->setText(getString("unknown")); } + getChild("LabelLastOwnerName")->setValue(perm.getLastOwner()); if (perm.getLastOwner().notNull()) { - std::string name; - gCacheName->getFullName(perm.getLastOwner(), name); getChildView("LabelLastOwnerTitle")->setEnabled(true); getChildView("LabelLastOwnerName")->setEnabled(true); - getChild("LabelLastOwnerName")->setValue(name); } else { getChildView("LabelLastOwnerTitle")->setEnabled(false); getChildView("LabelLastOwnerName")->setEnabled(false); - getChild("LabelLastOwnerName")->setValue(getString("unknown")); + getChild("LabelLastOwnerName")->setText(getString("unknown")); } //////////////// // OWNER NAME // //////////////// + getChild("LabelOwnerName")->setValue(perm.getOwner()); if(perm.isOwned()) { - std::string name; - if (perm.isGroupOwned()) - { - gCacheName->getGroupName(perm.getGroup(), name); - } - else - { - gCacheName->getFullName(perm.getOwner(), name); -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - name = RlvStrings::getAnonym(name); - } -// [/RLVa:KB] - } - getChildView("BtnOwner")->setEnabled(TRUE); -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e - getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); -// [/RLVa:KB] getChildView("LabelOwnerTitle")->setEnabled(TRUE); getChildView("LabelOwnerName")->setEnabled(TRUE); - getChild("LabelOwnerName")->setValue(name); } else { - getChildView("BtnOwner")->setEnabled(FALSE); getChildView("LabelOwnerTitle")->setEnabled(FALSE); getChildView("LabelOwnerName")->setEnabled(FALSE); - getChild("LabelOwnerName")->setValue(getString("public")); + getChild("LabelOwnerName")->setText(getString("public")); } ////////////////// @@ -609,38 +574,6 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } } -void LLFloaterProperties::onClickCreator() -{ - LLInventoryItem* item = findItem(); - if(!item) return; - LLAvatarActions::showProfile(item->getCreatorUUID()); -} - -// static -void LLFloaterProperties::onClickOwner() -{ - LLInventoryItem* item = findItem(); - if(!item) return; - if(item->getPermissions().isGroupOwned()) - { - LLGroupActions::show(item->getPermissions().getGroup()); - } - else - { -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) -// [/RLVa:KB] - { - LLAvatarActions::showProfile(item->getPermissions().getOwner()); - } - } -} - -void LLFloaterProperties::onClickLastOwner() -{ - if (const LLInventoryItem* item = findItem()) LLAvatarActions::showProfile(item->getPermissions().getLastOwner()); -} - // static void LLFloaterProperties::onCommitName() { diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index d2640f07d..5d90fea0c 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -74,9 +74,6 @@ public: protected: // ui callbacks - void onClickCreator(); - void onClickOwner(); - void onClickLastOwner(); void onCommitName(); void onCommitDescription(); void onCommitPermissions(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index fc4818e32..9f08b1295 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1676,12 +1676,12 @@ struct LLEstateAccessChangeInfo }; // static -void LLPanelEstateInfo::updateEstateOwnerName(const std::string& name) +void LLPanelEstateInfo::updateEstateOwnerID(const LLUUID& id) { LLPanelEstateInfo* panelp = LLFloaterRegionInfo::getPanelEstate(); if (panelp) { - panelp->setOwnerName(name); + panelp->getChild("estate_owner")->setValue(id); } } @@ -1800,7 +1800,7 @@ void LLPanelEstateInfo::refreshFromEstate() const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); getChild("estate_name")->setValue(estate_info.getName()); - LLAvatarNameCache::get(estate_info.getOwnerID(), boost::bind(&LLPanelEstateInfo::setOwnerName, this, boost::bind(&LLAvatarName::getNSName, _2, main_name_system()))); + getChild("estate_owner")->setValue(estate_info.getOwnerID()); getChild("externally_visible_check")->setValue(estate_info.getIsExternallyVisible()); getChild("voice_chat_check")->setValue(estate_info.getAllowVoiceChat()); @@ -1924,12 +1924,7 @@ void LLPanelEstateInfo::getEstateOwner() const std::string LLPanelEstateInfo::getOwnerName() const { - return getChild("estate_owner")->getValue().asString(); -} - -void LLPanelEstateInfo::setOwnerName(const std::string& name) -{ - getChild("estate_owner")->setValue(LLSD(name)); + return getChild("estate_owner")->getText(); } // static @@ -2294,12 +2289,12 @@ void LLPanelEstateCovenant::updateLastModified(const std::string& text) } // static -void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name) +void LLPanelEstateCovenant::updateEstateOwnerID(const LLUUID& id) { LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); if( panelp ) { - panelp->mEstateOwnerText->setText(name); + panelp->mEstateOwnerText->setValue(id); } } @@ -2308,11 +2303,6 @@ std::string LLPanelEstateCovenant::getOwnerName() const return mEstateOwnerText->getText(); } -void LLPanelEstateCovenant::setOwnerName(const std::string& name) -{ - mEstateOwnerText->setText(name); -} - void LLPanelEstateCovenant::setCovenantTextEditor(const std::string& text) { mEditor->setText(text, false); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 58141e930..96daf580a 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -292,7 +292,7 @@ public: void updateControls(LLViewerRegion* region); static void updateEstateName(const std::string& name); - static void updateEstateOwnerName(const std::string& name); + static void updateEstateOwnerID(const LLUUID& id); virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg); @@ -307,7 +307,6 @@ public: static bool isLindenEstate(); const std::string getOwnerName() const; - void setOwnerName(const std::string& name); protected: virtual BOOL sendUpdate(); @@ -355,14 +354,13 @@ public: static void updateCovenantText(const std::string& string, const LLUUID& asset_id); static void updateEstateName(const std::string& name); static void updateLastModified(const std::string& text); - static void updateEstateOwnerName(const std::string& name); + static void updateEstateOwnerID(const LLUUID& id); const LLUUID& getCovenantID() const { return mCovenantID; } void setCovenantID(const LLUUID& id) { mCovenantID = id; } std::string getEstateName() const; void setEstateName(const std::string& name); std::string getOwnerName() const; - void setOwnerName(const std::string& name); void setCovenantTextEditor(const std::string& text); typedef enum e_asset_status diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index cb59b6e32..54e362726 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -80,6 +80,7 @@ void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent) node->getAttributeString("initial_value", mInitialValue); setText(mInitialValue); node->getAttribute_bool("rlv_sensitive", mRLVSensitive); + node->getAttribute_bool("is_group", mIsGroup); } // static diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index a7b10e167..220db59f6 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -45,6 +45,8 @@ public: static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); void setText(const std::string& text) override final { LLTextBox::setText(text); } + void setValue(const LLSD& value) override final { LLNameUI::setValue(value); } + LLSD getValue() const override final { return LLNameUI::getValue(); } void showProfile(); BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override final; diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index a82a34dd8..86c9f89a6 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -83,16 +83,6 @@ void LLNameEditor::setText(const std::string& text) LLLineEditor::setText(text); } -void LLNameEditor::setValue( const LLSD& value ) -{ - setNameID(value.asUUID(), FALSE); -} - -LLSD LLNameEditor::getValue() const -{ - return LLSD(mNameID); -} - // virtual LLXMLNodePtr LLNameEditor::getXML(bool save_children) const { diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h index e7812927d..0a64d2b77 100644 --- a/indra/newview/llnameeditor.h +++ b/indra/newview/llnameeditor.h @@ -54,9 +54,8 @@ public: LLXMLNodePtr getXML(bool save_children = true) const override final; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - // Take/return agent UUIDs - void setValue(const LLSD& value) override final; - LLSD getValue() const override final; + void setValue(const LLSD& value) override final { LLNameUI::setValue(value); } + LLSD getValue() const override final { return LLNameUI::getValue(); } void setText(const std::string& text) override final; }; diff --git a/indra/newview/llnameui.h b/indra/newview/llnameui.h index 599a31b8f..bda80a368 100644 --- a/indra/newview/llnameui.h +++ b/indra/newview/llnameui.h @@ -52,6 +52,17 @@ struct LLNameUI : public LFIDBearer virtual void setText(const std::string& text) = 0; + // Take either UUID or a map of "id" to UUID and "group" to boolean + virtual void setValue(const LLSD& value) + { + if (value.has("id")) + setNameID(value["id"].asUUID(), value["group"].asBoolean()); + else + setNameID(value.asUUID(), mIsGroup); + } + // Return agent UUIDs + virtual LLSD getValue() const { return LLSD(mNameID); } + private: static std::set sInstances; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index a5d0b2f87..6692cdb64 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -141,7 +141,6 @@ LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name, LLPanelAvatarSecondLife::~LLPanelAvatarSecondLife() { - mCacheConnection.disconnect(); LLMuteList::instance().removeObserver(this); } @@ -149,12 +148,6 @@ void LLPanelAvatarSecondLife::refresh() { } -void LLPanelAvatarSecondLife::updatePartnerName(const LLAvatarName& name) -{ - mCacheConnection.disconnect(); - childSetTextArg("partner_edit", "[NAME]", name.getNSName()); -} - //----------------------------------------------------------------------------- // clearControls() // Empty the data out of the controls, since we have to wait for new @@ -219,8 +212,7 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType mPartnerID = pAvatarData->partner_id; if (mPartnerID.notNull()) { - mCacheConnection.disconnect(); - mCacheConnection = LLAvatarNameCache::get(mPartnerID, boost::bind(&LLPanelAvatarSecondLife::updatePartnerName, this, _2)); + getChildView("partner_edit")->setValue(mPartnerID); childSetEnabled("partner_info", TRUE); } } @@ -401,7 +393,7 @@ BOOL LLPanelAvatarSecondLife::postBuild() ctrl->setFallbackImageName("default_profile_picture.j2c"); auto show_pic = [&] { - show_picture(getChild("img")->getImageAssetID(), profile_picture_title(getChildView("dnname")->getValue())); + show_picture(getChild("img")->getImageAssetID(), profile_picture_title(getChild("dnname")->getText())); }; auto show_pic_if_not_self = [=] { if (!ctrl->canChange()) show_pic(); }; @@ -1251,25 +1243,19 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) } } -void LLPanelAvatar::onAvatarNameResponse(const LLUUID& agent_id, const LLAvatarName& av_name) -{ - mCacheConnection.disconnect(); - getChild("dnname")->setText(gSavedSettings.getBOOL("SinguCompleteNameProfiles") ? av_name.getCompleteName() : av_name.getNSName()); -} - void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id) { - if (avatar_id.isNull()) return; - - //BOOL avatar_changed = FALSE; + auto dnname = getChild("dnname"); if (avatar_id != mAvatarID) { - //avatar_changed = TRUE; if (mAvatarID.notNull()) LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this); mAvatarID = avatar_id; + dnname->setNameID(avatar_id, false); } + if (avatar_id.isNull()) return; + LLAvatarPropertiesProcessor::getInstance()->addObserver(mAvatarID, this); // Determine if we have their calling card. @@ -1294,8 +1280,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id) if (LLDropTarget* drop_target = findChild("drop_target_rect")) drop_target->setEntityID(mAvatarID); - mCacheConnection.disconnect(); - mCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLPanelAvatar::onAvatarNameResponse, this, _1, _2)); if (auto key_edit = getChildView("avatar_key")) key_edit->setValue(mAvatarID.asString()); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index 022b37641..a1faffb9e 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -119,11 +119,9 @@ public: void clearControls(); void enableControls(BOOL own_avatar); void updateOnlineText(BOOL online, BOOL have_calling_card); - void updatePartnerName(const LLAvatarName& name); private: LLUUID mPartnerID; - boost::signals2::connection mCacheConnection; }; @@ -280,8 +278,6 @@ public: void setAvatar(LLViewerObject *avatarp); - void onAvatarNameResponse(const LLUUID& agent_id, const LLAvatarName& av_name); - // Fill in the avatar ID and handle some field fill-in, as well as // button enablement. void setAvatarID(const LLUUID &avatar_id); diff --git a/indra/newview/llpanelevent.cpp b/indra/newview/llpanelevent.cpp index 66644c803..5eb6fe51d 100644 --- a/indra/newview/llpanelevent.cpp +++ b/indra/newview/llpanelevent.cpp @@ -139,9 +139,8 @@ void LLPanelEvent::processEventInfoReply(LLMessageSystem *msg, void **) msg->getU32("EventData", "EventID", event_id); // look up all panels which have this avatar - for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter) + for (auto& self : sAllPanels) { - LLPanelEvent* self = *iter; // Skip updating panels which aren't for this event if (self->mEventID != event_id) { @@ -152,6 +151,7 @@ void LLPanelEvent::processEventInfoReply(LLMessageSystem *msg, void **) self->mTBCategory->setText(self->mEventInfo.mCategoryStr); self->mTBDate->setText(self->mEventInfo.mTimeStr); self->mTBDesc->setText(self->mEventInfo.mDesc, false); + self->mTBRunBy->setValue(self->mEventInfo.mRunByID); self->mTBDuration->setText(llformat("%d:%.2d", self->mEventInfo.mDuration / 60, self->mEventInfo.mDuration % 60)); @@ -205,17 +205,6 @@ void LLPanelEvent::processEventInfoReply(LLMessageSystem *msg, void **) } } - -void LLPanelEvent::draw() -{ - std::string name; - gCacheName->getFullName(mEventInfo.mRunByID, name); - - mTBRunBy->setText(name); - - LLPanel::draw(); -} - void LLPanelEvent::resetInfo() { // Clear all of the text fields. diff --git a/indra/newview/llpanelevent.h b/indra/newview/llpanelevent.h index 90c08bde0..353b66fd1 100644 --- a/indra/newview/llpanelevent.h +++ b/indra/newview/llpanelevent.h @@ -51,7 +51,6 @@ public: /*virtual*/ ~LLPanelEvent(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); void setEventID(const U32 event_id); void sendEventInfoRequest(); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index eeccea15e..86b6054e4 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -83,7 +83,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name, mGroupNameEditor(NULL), mFounderName(NULL), mInsignia(NULL), - mGroupName(NULL), mEditCharter(NULL), mBtnJoinGroup(NULL), mListVisibleMembers(NULL), @@ -121,8 +120,7 @@ BOOL LLPanelGroupGeneral::postBuild() // General info mGroupNameEditor = getChild("group_name_editor", recurse); - mGroupName = getChild("group_name", recurse); - + mInsignia = getChild("insignia", recurse); if (mInsignia) { @@ -263,7 +261,7 @@ BOOL LLPanelGroupGeneral::postBuild() mBtnJoinGroup->setVisible(FALSE); mBtnInfo->setVisible(FALSE); - mGroupName->setVisible(FALSE); + getChildView("group_name")->setVisible(FALSE); } std::string member_count(LLTrans::getString("LoadingData")); @@ -731,10 +729,10 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if (mInsignia) mInsignia->setEnabled(can_change_ident); if (mEditCharter) mEditCharter->setEnabled(can_change_ident); - - if (mGroupName) mGroupName->setText(gdatap->mName); + + getChildView("group_name")->setValue(mGroupID); if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE); - if (mFounderName) mFounderName->setNameID(gdatap->mFounderID,FALSE); + if (mFounderName) mFounderName->setValue(gdatap->mFounderID); if (auto key_edit = getChildView("group_key")) { @@ -907,7 +905,6 @@ void LLPanelGroupGeneral::updateChanged() LLUICtrl *check_list[] = { mGroupNameEditor, - mGroupName, mFounderName, mInsignia, mEditCharter, diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index a0a1fd5fb..aa54e83b7 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -91,7 +91,6 @@ private: // Group information (include any updates in updateChanged) LLLineEditor *mGroupNameEditor; - LLTextBox *mGroupName; LLNameBox *mFounderName; LLTextureCtrl *mInsignia; LLTextEditor *mEditCharter; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index d881f1b16..cea17bbc5 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -69,10 +69,6 @@ -// [RLVa:KB] -#include "rlvhandler.h" -// [/RLVa:KB] - // base and own must have EXPORT, next owner must be UNRESTRICTED bool can_set_export(const U32& base, const U32& own, const U32& next) { @@ -117,13 +113,7 @@ BOOL LLPanelPermissions::postBuild() childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this); getChild("Object Description")->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe); - - getChild("button owner profile")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickOwner,this)); - getChild("button last owner profile")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickLastOwner,this)); - getChild("button creator profile")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickCreator,this)); - getChild("button set group")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickGroup,this)); - getChild("button open group")->setCommitCallback(boost::bind(LLPanelPermissions::onClickOpenGroup)); childSetCommitCallback("checkbox share with group",LLPanelPermissions::onCommitGroupShare,this); @@ -182,25 +172,33 @@ void LLPanelPermissions::disableAll() getChild("pathfinding_attributes_value")->setValue(LLStringUtil::null); getChildView("Creator:")->setEnabled(FALSE); - getChild("Creator Name")->setValue(LLStringUtil::null); - getChildView("Creator Name")->setEnabled(FALSE); - getChildView("button creator profile")->setEnabled(FALSE); + if (auto view = getChildView("Creator Name")) + { + view->setValue(LLUUID::null); + view->setEnabled(FALSE); + } getChildView("Owner:")->setEnabled(FALSE); - getChild("Owner Name")->setValue(LLStringUtil::null); - getChildView("Owner Name")->setEnabled(FALSE); - getChildView("button owner profile")->setEnabled(FALSE); + if (auto view = getChildView("Owner Name")) + { + view->setValue(LLUUID::null); + view->setEnabled(FALSE); + } getChildView("Last Owner:")->setEnabled(FALSE); - getChild("Last Owner Name")->setValue(LLStringUtil::null); - getChildView("Last Owner Name")->setEnabled(FALSE); - getChildView("button last owner profile")->setEnabled(FALSE); - + if (auto view = getChildView("Last Owner Name")) + { + view->setValue(LLUUID::null); + view->setEnabled(FALSE); + } + getChildView("Group:")->setEnabled(FALSE); - getChild("Group Name Proxy")->setValue(LLStringUtil::null); - getChildView("Group Name Proxy")->setEnabled(FALSE); + if (auto view = getChildView("Group Name Proxy")) + { + view->setValue(LLUUID::null); + view->setEnabled(FALSE); + } getChildView("button set group")->setEnabled(FALSE); - getChildView("button open group")->setEnabled(FALSE); LLLineEditor* ed = getChild("Object Name"); ed->setValue(LLStringUtil::null); @@ -385,18 +383,6 @@ void LLPanelPermissions::refresh() // Update creator text field getChildView("Creator:")->setEnabled(TRUE); -// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a - BOOL creators_identical = FALSE; -// [/RLVa:KB] - std::string creator_name; -// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a - creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); -// [/RLVa:KB] -// LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); - -// getChild("Creator Name")->setValue(creator_name); -// getChildView("Creator Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row // Update owner text field getChildView("Owner:")->setEnabled(TRUE); @@ -404,101 +390,29 @@ void LLPanelPermissions::refresh() // Update last owner text field getChildView("Last Owner:")->setEnabled(TRUE); - std::string owner_name; - const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); + std::string owner_app_link; + const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link); -// LL_INFOS() << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << LL_ENDL; - std::string last_owner_name; - LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); - - if (mOwnerID.isNull()) + if (auto view = getChildView("Creator Name")) { - if(LLSelectMgr::getInstance()->selectIsGroupOwned()) - { - // Group owned already displayed by selectGetOwner - } - else - { - // Display last owner if public - std::string last_owner_name; - LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); - - // It should never happen that the last owner is null and the owner - // is null, but it seems to be a bug in the simulator right now. JC - if (!mLastOwnerID.isNull() && !last_owner_name.empty()) - { - owner_name.append(", last "); - owner_name.append( last_owner_name ); - } - } + view->setValue(mCreatorID); + view->setEnabled(true); } -// getChild("Owner Name")->setValue(owner_name); -// getChildView("Owner Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row -// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a - bool fRlvEnableOwner = true; - bool fRlvEnableCreator = true; - bool fRlvEnableLastOwner = true; - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) + if (auto view = getChild("Owner Name")) { - // Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie - if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) ) - { - creator_name = RlvStrings::getAnonym(creator_name); - fRlvEnableCreator = false; - } - - // Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned - if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) ) - { - owner_name = RlvStrings::getAnonym(owner_name); - fRlvEnableOwner = false; - } - - if (RlvUtil::isNearbyAgent(mLastOwnerID)) - { - last_owner_name = RlvStrings::getAnonym(last_owner_name); - fRlvEnableLastOwner = false; - } + view->setValue(mOwnerID); + view->setEnabled(true); } - else if ((objectp->isAttachment() || objectp->isAvatar()) && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) && mOwnerID != gAgentID) + + if (auto view = getChild("Last Owner Name")) { - owner_name = RlvStrings::getAnonym(owner_name); - fRlvEnableOwner = false; - - if (mOwnerID == mCreatorID) - { - creator_name = RlvStrings::getAnonym(creator_name); - fRlvEnableCreator = false; - } - - if (mOwnerID == mLastOwnerID) - { - last_owner_name = RlvStrings::getAnonym(last_owner_name); - fRlvEnableLastOwner = false; - } + view->setValue(mLastOwnerID); + view->setEnabled(true); } -// [/RLVa:KB] - getChild("Creator Name")->setValue(creator_name); - getChildView("Creator Name")->setEnabled(TRUE); - - getChild("Owner Name")->setValue(owner_name); - getChildView("Owner Name")->setEnabled(TRUE); -// childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); -// getChildView("button last owner profile")->setEnabled(owners_identical && mLastOwnerID.notNull()); -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) - getChildView("button owner profile")->setEnabled(fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); - getChildView("button creator profile")->setEnabled(fRlvEnableCreator && creators_identical && mCreatorID.notNull()); - getChildView("button last owner profile")->setEnabled(fRlvEnableLastOwner && owners_identical && mLastOwnerID.notNull()); -// [/RLVa:KB] - - getChild("Last Owner Name")->setValue(last_owner_name); - getChildView("Last Owner Name")->setEnabled(TRUE); // update group text field getChildView("Group:")->setEnabled(TRUE); - //getChild("Group Name")->setValue(LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) @@ -520,7 +434,6 @@ void LLPanelPermissions::refresh() } getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); - getChildView("button open group")->setEnabled(group_id.notNull()); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild("Object Name"); @@ -1049,36 +962,6 @@ void LLPanelPermissions::onClickRelease(void*) LLSelectMgr::getInstance()->sendOwner(LLUUID::null, LLUUID::null); } -void LLPanelPermissions::onClickCreator() -{ - LLAvatarActions::showProfile(mCreatorID); -} - -void LLPanelPermissions::onClickOwner() -{ - if (LLSelectMgr::getInstance()->selectIsGroupOwned()) - { - LLUUID group_id; - LLSelectMgr::getInstance()->selectGetGroup(group_id); - LLGroupActions::show(group_id); - } - else - { -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - LLAvatarActions::showProfile(mOwnerID); - } -// [/RLVa:KB] -// LLAvatarActions::showProfile(mOwnerID); - } -} - -void LLPanelPermissions::onClickLastOwner() -{ - LLAvatarActions::showProfile(mLastOwnerID); -} - void LLPanelPermissions::onClickGroup() { LLUUID owner_id; @@ -1103,13 +986,6 @@ void LLPanelPermissions::onClickGroup() } } -void LLPanelPermissions::onClickOpenGroup() -{ - LLUUID group_id; - LLSelectMgr::getInstance()->selectGetGroup(group_id); - LLGroupActions::show(group_id); -} - void LLPanelPermissions::cbGroupID(LLUUID group_id) { if(mLabelGroupName) diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 58b6dbac9..87868108b 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -58,11 +58,7 @@ protected: // statics static void onClickClaim(void*); static void onClickRelease(void*); - void onClickCreator(); - void onClickOwner(); - void onClickLastOwner(); void onClickGroup(); - static void onClickOpenGroup(); void cbGroupID(LLUUID group_id); static void onClickDeedToGroup(void*); static void onClickCopyObjKey(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6c0499ffc..6ea9d1960 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -168,7 +168,6 @@ extern bool gShiftFrame; // function prototypes bool check_offer_throttle(const std::string& from_name, bool check_only); bool check_asset_previewable(const LLAssetType::EType asset_type); -void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name); static void process_money_balance_reply_extended(LLMessageSystem* msg); //inventory offer throttle globals @@ -8595,7 +8594,10 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelEstateInfo::updateEstateName(estate_name); LLFloaterBuyLand::updateEstateName(estate_name); - LLAvatarNameCache::get(estate_owner_id, boost::bind(&callbackCacheEstateOwnerName, _1, _2)); + LLPanelEstateCovenant::updateEstateOwnerID(estate_owner_id); + LLPanelLandCovenant::updateEstateOwnerID(estate_owner_id); + LLPanelEstateInfo::updateEstateOwnerID(estate_owner_id); + LLFloaterBuyLand::updateEstateOwnerID(estate_owner_id); // standard message, not from system std::string last_modified; @@ -8644,15 +8646,6 @@ void process_covenant_reply(LLMessageSystem* msg, void**) } } -void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name) -{ - const std::string name(av_name.getNSName()); - LLPanelEstateCovenant::updateEstateOwnerName(name); - LLPanelLandCovenant::updateEstateOwnerName(name); - LLPanelEstateInfo::updateEstateOwnerName(name); - LLFloaterBuyLand::updateEstateOwnerName(name); -} - void onCovenantLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, diff --git a/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/indra/newview/skins/default/xui/en-us/floater_about_land.xml index 79fdb8851..a08e799bc 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -63,32 +63,25 @@ mouse_opaque="true" name="Owner:" v_pad="0" width="92"> Owner: - Leyla Linden - -