diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 61 |
1 files changed, 21 insertions, 40 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5e000bba6d..aa662b713e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -98,11 +98,13 @@ #include "llnotifications.h" #include "llnotify.h" #include "llpanelgrouplandmoney.h" +#include "llpanelplaces.h" #include "llrecentpeople.h" #include "llselectmgr.h" #include "llsidetray.h" #include "llstartup.h" #include "llsky.h" +#include "llslurl.h" #include "llstatenums.h" #include "llstatusbar.h" #include "llimview.h" @@ -137,7 +139,6 @@ #include "llkeythrottle.h" #include "llgroupactions.h" #include "llagentui.h" -#include "llsidetray.h" #include "llpanelblockedlist.h" #include "llpanelplaceinfo.h" @@ -168,9 +169,6 @@ extern BOOL gDebugClicks; // function prototypes void open_offer(const std::vector<LLUUID>& items, const std::string& from_name); bool check_offer_throttle(const std::string& from_name, bool check_only); -void callbackCacheEstateOwnerName(const LLUUID& id, - const std::string& first, const std::string& last, - BOOL is_group); //inventory offer throttle globals LLFrameTimer gThrottleTimer; @@ -909,14 +907,15 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID()); LLSD args; args["LANDMARK_NAME"] = item->getName(); - args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unnkown"); + args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); LLNotifications::instance().add("LandmarkCreated", args); - - // Open new landmark for editing in Places panel. - LLSD key; - key["type"] = "landmark"; - key["id"] = item->getUUID(); - LLSideTray::getInstance()->showPanel("panel_places", key); + + // Created landmark is passed to Places panel to allow its editing. + LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); + if (panel) + { + panel->setItem(item); + } } break; case LLAssetType::AT_TEXTURE: @@ -5576,10 +5575,17 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelLandCovenant::updateEstateName(estate_name); LLFloaterBuyLand::updateEstateName(estate_name); + std::string owner_name = + LLSLURL::buildCommand("agent", estate_owner_id, "inspect"); + LLPanelEstateCovenant::updateEstateOwnerName(owner_name); + LLPanelLandCovenant::updateEstateOwnerName(owner_name); + LLFloaterBuyLand::updateEstateOwnerName(owner_name); + LLPanelPlaceInfo* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceInfo>("panel_place_info"); if (panel) { panel->updateEstateName(estate_name); + panel->updateEstateOwnerName(owner_name); } // standard message, not from system @@ -5607,9 +5613,6 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelLandCovenant::updateLastModified(last_modified); LLFloaterBuyLand::updateLastModified(last_modified); - BOOL is_group = FALSE; - gCacheName->get(estate_owner_id, is_group, &callbackCacheEstateOwnerName); - // load the actual covenant asset data const BOOL high_priority = TRUE; if (covenant_id.notNull()) @@ -5639,32 +5642,10 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelEstateCovenant::updateCovenantText(covenant_text, covenant_id); LLPanelLandCovenant::updateCovenantText(covenant_text); LLFloaterBuyLand::updateCovenantText(covenant_text, covenant_id); - panel->updateCovenantText(covenant_text); - } -} - -void callbackCacheEstateOwnerName(const LLUUID& id, - const std::string& first, const std::string& last, - BOOL is_group) -{ - std::string name; - - if (id.isNull()) - { - name = LLTrans::getString("none_text"); - } - else - { - name = first + " " + last; - } - LLPanelEstateCovenant::updateEstateOwnerName(name); - LLPanelLandCovenant::updateEstateOwnerName(name); - LLFloaterBuyLand::updateEstateOwnerName(name); - - LLPanelPlaceInfo* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceInfo>("panel_place_info"); - if (panel) - { - panel->updateEstateOwnerName(name); + if (panel) + { + panel->updateCovenantText(covenant_text); + } } } |