summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-01 17:06:18 -0800
committerJames Cook <james@lindenlab.com>2010-02-01 17:06:18 -0800
commit146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 (patch)
tree534d2389e2d701819597cd0b56130a2551b41bfb /indra/llui
parent130214c766763855b733c9b5d4e177afe0c39865 (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/llui')
-rw-r--r--indra/llui/lltextbase.cpp2
-rw-r--r--indra/llui/llurlentry.cpp11
-rw-r--r--indra/llui/llurlentry.h3
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp2
4 files changed, 8 insertions, 10 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 17aecaf32f..790240ab48 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2493,7 +2493,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
LLUIImagePtr image = mStyle->getImage();
if( image.notNull())
{
- num_pixels -= image->getWidth();
+ num_pixels = llmax(0, num_pixels - image->getWidth());
}
// search for newline and if found, truncate there
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index d04cb8c7ff..40f8c27431 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -315,12 +315,11 @@ LLUrlEntryGroup::LLUrlEntryGroup()
}
void LLUrlEntryGroup::onGroupNameReceived(const LLUUID& id,
- const std::string& first,
- const std::string& last,
- BOOL is_group)
+ const std::string& name,
+ bool is_group)
{
// received the group name from the server - tell our observers
- callObservers(id.asString(), first);
+ callObservers(id.asString(), name);
}
std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
@@ -350,9 +349,9 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
}
else
{
- gCacheName->get(group_id, TRUE,
+ gCacheName->get(group_id, true,
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
- this, _1, _2, _3, _4));
+ this, _1, _2, _3));
addObserver(group_id_string, url, cb);
return LLTrans::getString("LoadingData");
}
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 33ec9d82a9..6d875a40c7 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -168,8 +168,7 @@ public:
LLUrlEntryGroup();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
private:
- void onGroupNameReceived(const LLUUID& id, const std::string& first,
- const std::string& last, BOOL is_group);
+ void onGroupNameReceived(const LLUUID& id, const std::string& name, bool is_group);
};
///
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp
index 3731800adf..30bab1eb91 100644
--- a/indra/llui/tests/llurlentry_stub.cpp
+++ b/indra/llui/tests/llurlentry_stub.cpp
@@ -49,7 +49,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
return TRUE;
}
-boost::signals2::connection LLCacheName::get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback)
+boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, const LLCacheNameCallback& callback)
{
return boost::signals2::connection();
}