mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 04:22:27 -04:00
Enable/disable the send button for quick message in the ChatMsgItem with textChanged signal of the QTextBrowser and not with updateItem.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3460 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2fa6afd36d
commit
cb1bee3318
2 changed files with 21 additions and 19 deletions
|
@ -60,7 +60,6 @@ ChatMsgItem::ChatMsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId
|
|||
connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );
|
||||
connect( sendButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );
|
||||
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
updateItemStatic();
|
||||
|
@ -129,15 +128,6 @@ void ChatMsgItem::updateItem()
|
|||
}
|
||||
}
|
||||
|
||||
/*if (quickmsgText->toPlainText().isEmpty())
|
||||
{
|
||||
sendButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendButton->setEnabled(true);
|
||||
}*/
|
||||
|
||||
/* slow Tick */
|
||||
int msec_rate = 10129;
|
||||
|
||||
|
@ -284,4 +274,16 @@ void ChatMsgItem::sendMessage()
|
|||
quickmsgText->clear();
|
||||
messageframe->setVisible(false);
|
||||
sendButton->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void ChatMsgItem::on_quickmsgText_textChanged()
|
||||
{
|
||||
if (quickmsgText->toPlainText().isEmpty())
|
||||
{
|
||||
sendButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue