summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-11-13 21:38:19 +0000
committerCho <cho@lindenlab.com>2013-11-13 21:38:19 +0000
commit758f656100406015bc8b27284670088decbbfabb (patch)
tree711f4bc0df60d1aae61012b726d2bb122b0faa49
parentb267f6754efd2c77042fd4a3f6d2397eac461ce2 (diff)
made Twitter status text truncate and untruncate for ACME-1183
-rw-r--r--indra/newview/llfloatertwitter.cpp11
-rw-r--r--indra/newview/llfloatertwitter.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 6f8ad109c6..06d0fb5542 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -119,9 +119,18 @@ void LLTwitterPhotoPanel::draw()
{
int max_status_length = add_photo ? 100 : 140;
status_text_box->setMaxTextLength(max_status_length);
+ if (!add_photo)
+ {
+ if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length()))
+ {
+ status_text_box->setText(mOldStatusText);
+ }
+ mOldStatusText = "";
+ }
if (status_text_box->getText().length() > max_status_length)
{
- status_text_box->setText(status_text_box->getText().substr(0, max_status_length));
+ mOldStatusText = status_text_box->getText();
+ status_text_box->setText(mOldStatusText.substr(0, max_status_length));
}
}
diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h
index 12e1d41210..686e167b1f 100644
--- a/indra/newview/llfloatertwitter.h
+++ b/indra/newview/llfloatertwitter.h
@@ -70,6 +70,8 @@ private:
LLUICtrl * mPhotoCheckbox;
LLUICtrl * mPostButton;
LLUICtrl* mCancelButton;
+
+ std::string mOldStatusText;
};
class LLTwitterAccountPanel : public LLPanel