diff options
author | James Cook <james@lindenlab.com> | 2010-02-01 17:06:18 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-01 17:06:18 -0800 |
commit | 146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 (patch) | |
tree | 534d2389e2d701819597cd0b56130a2551b41bfb /indra/newview/llmutelist.cpp | |
parent | 130214c766763855b733c9b5d4e177afe0c39865 (diff) |
Support returning full_name (and SLID) for LLCacheName::get() calls
Changed callback signature to full_name instead of first_name,last_name
Eliminated all calls to legacy (non-signal/non-boost-bind) lookup mechanism
Change Pay dialog names to SLURL links
Tweaked layout of Pay Resident and Pay via Object floaters to make SLURLs fit
Consolidate name first + " " + last concatenation in LLCacheName::buildFullName()
Reviewed with Kelly
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r-- | indra/newview/llmutelist.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 7ee4c64f8f..0b4c07c9ed 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -496,7 +496,7 @@ void LLMuteList::updateRemove(const LLMute& mute) gAgent.sendReliableMessage(); } -void notify_automute_callback(const LLUUID& agent_id, const std::string& first_name, const std::string& last_name, BOOL is_group, LLMuteList::EAutoReason reason) +void notify_automute_callback(const LLUUID& agent_id, const std::string& full_name, bool is_group, LLMuteList::EAutoReason reason) { std::string notif_name; switch (reason) @@ -514,8 +514,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n } LLSD args; - args["FIRST"] = first_name; - args["LAST"] = last_name; + args["NAME"] = full_name; LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args, LLSD()); if (notif_ptr) @@ -536,7 +535,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n } -BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason, const std::string& first_name, const std::string& last_name) +BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) { BOOL removed = FALSE; @@ -546,24 +545,17 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason, co removed = TRUE; remove(automute); - if (first_name.empty() && last_name.empty()) + std::string full_name; + if (gCacheName->getFullName(agent_id, full_name)) { - std::string cache_first, cache_last; - if (gCacheName->getName(agent_id, cache_first, cache_last)) - { - // name in cache, call callback directly - notify_automute_callback(agent_id, cache_first, cache_last, FALSE, reason); - } - else - { - // not in cache, lookup name from cache - gCacheName->get(agent_id, FALSE, boost::bind(¬ify_automute_callback, _1, _2, _3, _4, reason)); - } + // name in cache, call callback directly + notify_automute_callback(agent_id, full_name, false, reason); } else { - // call callback directly - notify_automute_callback(agent_id, first_name, last_name, FALSE, reason); + // not in cache, lookup name from cache + gCacheName->get(agent_id, false, + boost::bind(¬ify_automute_callback, _1, _2, _3, reason)); } } |