mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
use default invite message as placeholder text
This commit is contained in:
parent
f080eb12e7
commit
9c0af06c0b
|
@ -35,6 +35,7 @@ AddFriendForm::AddFriendForm() : dns(this)
|
||||||
toxIdLabel.setText(tr("Tox ID","Tox ID of the person you're sending a friend request to"));
|
toxIdLabel.setText(tr("Tox ID","Tox ID of the person you're sending a friend request to"));
|
||||||
messageLabel.setText(tr("Message","The message you send in friend requests"));
|
messageLabel.setText(tr("Message","The message you send in friend requests"));
|
||||||
sendButton.setText(tr("Send friend request"));
|
sendButton.setText(tr("Send friend request"));
|
||||||
|
message.setPlaceholderText(tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!"));
|
||||||
|
|
||||||
main->setLayout(&layout);
|
main->setLayout(&layout);
|
||||||
layout.addWidget(&toxIdLabel);
|
layout.addWidget(&toxIdLabel);
|
||||||
|
@ -81,7 +82,7 @@ void AddFriendForm::showWarning(const QString &message) const
|
||||||
QString AddFriendForm::getMessage() const
|
QString AddFriendForm::getMessage() const
|
||||||
{
|
{
|
||||||
const QString msg = message.toPlainText();
|
const QString msg = message.toPlainText();
|
||||||
return !msg.isEmpty() ? msg : tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!");
|
return !msg.isEmpty() ? msg : message.placeholderText();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddFriendForm::onSendTriggered()
|
void AddFriendForm::onSendTriggered()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user