mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05: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
@ -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;
|
||||
|
||||
@ -285,3 +275,15 @@ void ChatMsgItem::sendMessage()
|
||||
messageframe->setVisible(false);
|
||||
sendButton->hide();
|
||||
}
|
||||
|
||||
void ChatMsgItem::on_quickmsgText_textChanged()
|
||||
{
|
||||
if (quickmsgText->toPlainText().isEmpty())
|
||||
{
|
||||
sendButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,8 @@ public:
|
||||
|
||||
private slots:
|
||||
/* default stuff */
|
||||
void gotoHome();
|
||||
void removeItem();
|
||||
void gotoHome();
|
||||
void removeItem();
|
||||
|
||||
void sendMsg();
|
||||
void openChat();
|
||||
@ -55,10 +55,12 @@ private slots:
|
||||
void togglequickmessage();
|
||||
void sendMessage();
|
||||
|
||||
private:
|
||||
void insertChat(std::string &message);
|
||||
void on_quickmsgText_textChanged();
|
||||
|
||||
FeedHolder *mParent;
|
||||
private:
|
||||
void insertChat(std::string &message);
|
||||
|
||||
FeedHolder *mParent;
|
||||
uint32_t mFeedId;
|
||||
|
||||
std::string mPeerId;
|
||||
@ -66,7 +68,5 @@ private:
|
||||
bool mIsHome;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user