mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 04:16:40 -05:00
Added Cancel Buttons for Chat and Peer feed Items, and disable the Send Buttons by default, added for PeerItem to check if TextEdit is empty or not too.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3462 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a66816ff33
commit
87d2cec44c
5 changed files with 308 additions and 257 deletions
|
|
@ -47,6 +47,7 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
|
|||
setupUi(this);
|
||||
|
||||
messageframe->setVisible(false);
|
||||
sendmsgButton->setEnabled(false);
|
||||
|
||||
/* general ones */
|
||||
connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );
|
||||
|
|
@ -57,6 +58,8 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
|
|||
connect( msgButton, SIGNAL( clicked( void ) ), this, SLOT( sendMsg ( void ) ) );
|
||||
|
||||
connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );
|
||||
connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );
|
||||
|
||||
connect( sendmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
|
@ -378,3 +381,14 @@ void PeerItem::sendMessage()
|
|||
messageframe->setVisible(false);
|
||||
}
|
||||
|
||||
void PeerItem::on_quickmsgText_textChanged()
|
||||
{
|
||||
if (quickmsgText->toPlainText().isEmpty())
|
||||
{
|
||||
sendmsgButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendmsgButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue