summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-04-23 19:50:01 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-04-23 19:50:01 +0300
commit4f02217d9d18f6974b368a4110f76c94e12f2e8f (patch)
tree612265514c1419af7380feaeb4a5867b69c2d42b
parent5dfc5d020c0497619ae23da61a45f6671903d02c (diff)
fixed EXT-6891 Region name SLurl is absent ot teleport offer toast if long message was added
Decreased limit of teleport offer text invitaton to 178 characters(254 - max_location_url_length(76)) reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/302/ --HG-- branch : product-engine
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/lltoastalertpanel.cpp14
2 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4ca23e14a1..a6dbe00759 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10994,5 +10994,16 @@
<integer>2048</integer>
</map>
<!-- End of back compatibility settings -->
+ <key>teleport_offer_invitation_max_length</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum length of teleport offer invitation line editor. 254 - max_location_url_length(76) = 178</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>178</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 986ccdf19b..2b529a4e50 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -50,6 +50,7 @@
#include "llnotifications.h"
#include "llfunctorregistry.h"
#include "llrootview.h"
+#include "llviewercontrol.h" // for gSavedSettings
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
@@ -279,7 +280,18 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight());
mLineEditor->setRect(leditor_rect);
mLineEditor->setText(edit_text_contents);
- mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1);
+
+ // decrease limit of line editor of teleport offer dialog to avoid truncation of
+ // location URL in invitation message, see EXT-6891
+ if ("OfferTeleport" == mNotification->getName())
+ {
+ mLineEditor->setMaxTextLength(gSavedSettings.getS32(
+ "teleport_offer_invitation_max_length"));
+ }
+ else
+ {
+ mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1);
+ }
LLToastPanel::addChild(mLineEditor);