diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index ea17497d95dcce56bf4cd8c2e0caf4eef0bc7b06..82ed066b1a84f9d9d1c55e7ac191a91305a2b43e 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); } } diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h index be3a099d5f4d8ef0225e3dfd1c67d86be6fb2c05..5305143552c123fc15e6ebbba376373dad425068 100644 --- a/indra/newview/llfloatertwitter.h +++ b/indra/newview/llfloatertwitter.h @@ -69,6 +69,7 @@ class LLTwitterPhotoPanel : public LLPanel LLUICtrl * mRefreshBtn; LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; + LLUICtrl * mStatusCounterLabel; LLUICtrl * mStatusTextBox; LLUICtrl * mLocationCheckbox; LLUICtrl * mPhotoCheckbox; diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml index 3ddec9b989ee8b8ec4c0fe5ca10e805002d1d728..14268c1bcf17b250cea7aefc021037e121a5efa4 100644 --- a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -25,6 +25,20 @@ type="string"> What's happening? </text> + <text + length="1" + follows="top|left" + font="SansSerif" + text_color="EmphasisColor" + halign="right" + height="16" + width="30" + left="227" + name="status_counter_label" + top="3" + type="string"> + 140 + </text> <text_editor follows="left|top" height="87"