mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
Added to show the message length on Composer and Message Widget
This commit is contained in:
parent
cf05c86691
commit
39a89dd2a9
5 changed files with 82 additions and 1 deletions
|
@ -509,6 +509,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||
ui.msgText->resetImagesStatus(false);
|
||||
|
||||
clearTagLabels();
|
||||
checkLength();
|
||||
|
||||
ui.inviteFrame->hide();
|
||||
ui.expandFilesButton->setChecked(false);
|
||||
|
@ -690,6 +691,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||
ui.filesSize->setText(QString(misc::friendlyUnit(msgInfo.size)));
|
||||
|
||||
showTagLabels();
|
||||
checkLength();
|
||||
|
||||
currMsgFlags = msgInfo.msgflags;
|
||||
}
|
||||
|
@ -903,3 +905,15 @@ void MessageWidget::viewSource()
|
|||
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
void MessageWidget::checkLength()
|
||||
{
|
||||
QString text;
|
||||
RsHtml::optimizeHtml(ui.msgText, text);
|
||||
std::wstring msg = text.toStdWString();
|
||||
int charlength = msg.length();
|
||||
|
||||
text = tr("%1 (%2) ").arg(charlength).arg(misc::friendlyUnit(charlength));
|
||||
|
||||
ui.sizeLabel->setText(text);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue