Skip to content
Snippets Groups Projects
Commit 187fb979 authored by Cho's avatar Cho
Browse files

Add character count display to floater_twitter for ACME-1215

parent b6d02ae9
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
......@@ -69,6 +69,7 @@ class LLTwitterPhotoPanel : public LLPanel
LLUICtrl * mRefreshBtn;
LLUICtrl * mWorkingLabel;
LLUICtrl * mThumbnailPlaceholder;
LLUICtrl * mStatusCounterLabel;
LLUICtrl * mStatusTextBox;
LLUICtrl * mLocationCheckbox;
LLUICtrl * mPhotoCheckbox;
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment