summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertwitter.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-12-04 19:45:26 +0000
committerCho <cho@lindenlab.com>2013-12-04 19:45:26 +0000
commit187fb979d365ac3052f6a95e278a1f92c3117d17 (patch)
treeadfb076b7351f0ff38392cfe501b353d798b3651 /indra/newview/llfloatertwitter.cpp
parentb6d02ae9c84e185f2507323c47c0475ce43f9e7a (diff)
Add character count display to floater_twitter for ACME-1215
Diffstat (limited to 'indra/newview/llfloatertwitter.cpp')
-rw-r--r--indra/newview/llfloatertwitter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index ea17497d95..82ed066b1a 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -65,6 +65,7 @@ mResolutionComboBox(NULL),
mRefreshBtn(NULL),
mWorkingLabel(NULL),
mThumbnailPlaceholder(NULL),
+mStatusCounterLabel(NULL),
mStatusTextBox(NULL),
mLocationCheckbox(NULL),
mPhotoCheckbox(NULL),
@@ -92,6 +93,7 @@ BOOL LLTwitterPhotoPanel::postBuild()
mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
mWorkingLabel = getChild<LLUICtrl>("working_lbl");
mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder");
+ mStatusCounterLabel = getChild<LLUICtrl>("status_counter_label");
mStatusTextBox = getChild<LLUICtrl>("photo_status");
mLocationCheckbox = getChild<LLUICtrl>("add_location_cb");
mLocationCheckbox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::onAddLocationToggled, this));
@@ -340,6 +342,10 @@ void LLTwitterPhotoPanel::updateStatusTextLength(BOOL restore_old_status_text)
}
status_text_box->setText(mOldStatusText.substr(0, max_status_length));
}
+
+ // Update the status character counter
+ int characters_remaining = max_status_length - status_text_box->getText().length();
+ mStatusCounterLabel->setValue(characters_remaining);
}
}