diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-04-28 13:36:35 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-04-28 13:36:35 +0300 |
commit | bb87365c37047a35bf524a98d5a48cdb2d56948e (patch) | |
tree | 5b44b30944f794c2e2f78a0990cf56f81d27fa78 /indra/llui/llurlentry.cpp | |
parent | a89f3f29a0af37c7f3e78e38acb78f78e99dae78 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
Merge viewer-release, become version 3.7.29
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rwxr-xr-x | indra/llui/llurlentry.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 344791f491..c63289aa07 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -39,8 +39,6 @@ #include "lluicolortable.h" #include "message.h" -#include "uriparser/Uri.h" - #define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))" // Utility functions @@ -495,6 +493,17 @@ LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL() mIcon = "Hand"; mMenuName = "menu_url_http.xml"; + mTooltip = LLTrans::getString("TooltipHttpUrl"); +} + +/// Return the url from a string that matched the regex +std::string LLUrlEntrySecondlifeURL::getUrl(const std::string &string) const +{ + if (string.find("://") == std::string::npos) + { + return "https://" + escapeUrl(string); + } + return escapeUrl(string); } std::string LLUrlEntrySecondlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb) @@ -512,15 +521,6 @@ std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const return url; } -std::string LLUrlEntrySecondlifeURL::getUrl(const std::string &string) const -{ - if (string.find("://") == std::string::npos) - { - return "http://" + escapeUrl(string); - } - return escapeUrl(string); -} - // // LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link // @@ -1033,9 +1033,9 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data) // If parcel name is empty use Sim_name (x, y, z) for parcel label. else if (!parcel_data.sim_name.empty()) { - S32 region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS; - S32 region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS; - S32 region_z = llround(parcel_data.global_z); + S32 region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS; + S32 region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS; + S32 region_z = ll_round(parcel_data.global_z); label = llformat("%s (%d, %d, %d)", parcel_data.sim_name.c_str(), region_x, region_y, region_z); |