diff options
-rw-r--r-- | indra/llui/llurlentry.cpp | 84 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llinspectgroup.cpp | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_test_inspectors.xml | 12 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/inspect_avatar.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/inspect_group.xml | 3 |
6 files changed, 72 insertions, 48 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index e04ccfbc2f..ba21c0d993 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -280,23 +280,37 @@ void LLUrlEntryAgent::onAgentNameReceived(const LLUUID& id, std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - std::string id = getIDStringFromUrl(url); - if (gCacheName && ! id.empty()) + if (!gCacheName) { - LLUUID uuid(id); - std::string full_name; - if (gCacheName->getFullName(uuid, full_name)) - { - return full_name; - } - else - { - gCacheName->get(uuid, FALSE, boost::bind(&LLUrlEntryAgent::onAgentNameReceived, this, _1, _2, _3, _4)); - addObserver(id, url, cb); - } + // probably at the login screen, use short string for layout + return LLTrans::getString("LoadingData"); + } + + std::string agent_id_string = getIDStringFromUrl(url); + if (agent_id_string.empty()) + { + // something went wrong, just give raw url + return unescapeUrl(url); } - return LLTrans::getString("LoadingData");//unescapeUrl(url); + LLUUID agent_id(agent_id_string); + std::string full_name; + if (agent_id.isNull()) + { + return LLTrans::getString("AvatarNameNobody"); + } + else if (gCacheName->getFullName(agent_id, full_name)) + { + return full_name; + } + else + { + gCacheName->get(agent_id, FALSE, + boost::bind(&LLUrlEntryAgent::onAgentNameReceived, + this, _1, _2, _3, _4)); + addObserver(agent_id_string, url, cb); + return LLTrans::getString("LoadingData"); + } } // @@ -324,23 +338,37 @@ void LLUrlEntryGroup::onGroupNameReceived(const LLUUID& id, std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - std::string id = getIDStringFromUrl(url); - if (gCacheName && ! id.empty()) + if (!gCacheName) { - LLUUID uuid(id); - std::string group_name; - if (gCacheName->getGroupName(uuid, group_name)) - { - return group_name; - } - else - { - gCacheName->get(uuid, TRUE, boost::bind(&LLUrlEntryGroup::onGroupNameReceived, this, _1, _2, _3, _4)); - addObserver(id, url, cb); - } + // probably at login screen, give something short for layout + return LLTrans::getString("LoadingData"); } - return unescapeUrl(url); + std::string group_id_string = getIDStringFromUrl(url); + if (group_id_string.empty()) + { + // something went wrong, give raw url + return unescapeUrl(url); + } + + LLUUID group_id(group_id_string); + std::string group_name; + if (group_id.isNull()) + { + return LLTrans::getString("GroupNameNone"); + } + else if (gCacheName->getGroupName(group_id, group_name)) + { + return group_name; + } + else + { + gCacheName->get(group_id, TRUE, + boost::bind(&LLUrlEntryGroup::onGroupNameReceived, + this, _1, _2, _3, _4)); + addObserver(group_id_string, url, cb); + return LLTrans::getString("LoadingData"); + } } /// diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 081e55971d..4eb6061bea 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -44,6 +44,7 @@ #include "llinspect.h" #include "llmutelist.h" #include "llpanelblockedlist.h" +#include "llstartup.h" #include "llviewermenu.h" #include "llvoiceclient.h" @@ -277,12 +278,12 @@ void LLInspectAvatar::requestUpdate() // login screen (which is useful to work on the layout). if (mAvatarID.isNull()) { - getChild<LLUICtrl>("user_subtitle")-> - setValue("Test subtitle"); - getChild<LLUICtrl>("user_details")-> - setValue("Test details"); - getChild<LLUICtrl>("user_partner")-> - setValue("Test partner"); + if (LLStartUp::getStartupState() >= STATE_STARTED) + { + // once we're running we don't want to show the test floater + // for bogus LLUUID::null links + closeFloater(); + } return; } diff --git a/indra/newview/llinspectgroup.cpp b/indra/newview/llinspectgroup.cpp index e079e27e56..c78bcd6afe 100644 --- a/indra/newview/llinspectgroup.cpp +++ b/indra/newview/llinspectgroup.cpp @@ -37,6 +37,7 @@ #include "llgroupactions.h" #include "llgroupmgr.h" #include "llinspect.h" +#include "llstartup.h" // Linden libraries #include "llcontrol.h" // LLCachedControl @@ -200,6 +201,12 @@ void LLInspectGroup::requestUpdate() // login screen (which is useful to work on the layout). if (mGroupID.isNull()) { + if (LLStartUp::getStartupState() >= STATE_STARTED) + { + // once we're running we don't want to show the test floater + // for bogus LLUUID::null links + closeFloater(); + } return; } diff --git a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml index 126bca2074..ce20b03919 100644 --- a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml +++ b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml @@ -133,16 +133,4 @@ secondlife:///app/group/00000000-0000-0000-0000-000000000000/inspect </text> - <text - follows="left|top" - font="SansSerif" - height="20" - left="0" - max_length="65536" - name="slurl_group_about" - top_pad="4" - width="150"> - secondlife:///app/group/00000000-0000-0000-0000-000000000000/about - </text> - </floater> diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 5bf481e9cb..181c80ebc7 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -47,7 +47,6 @@ value="Grumpity ProductEngine" width="240" word_wrap="false" /> - <!-- Leave text fields blank so it doesn't flash when data arrives off the network --> <text follows="all" height="16" diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index d3f599cbbf..5b166e83b8 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -84,7 +84,8 @@ L$123 to join top="35" left_delta="110" tab_stop="false" - width="18" /> + width="18" + commit_callback.function="InspectGroup.ViewProfile" /> <button follows="bottom|left" height="23" |