mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Removed peer name from "is typing..." message of the sender and add it of the receiver side.
Now the "is typing..." message can be translated. It is still not a good solution, but it works for now. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3408 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7b20984574
commit
77418bd4b6
6 changed files with 54 additions and 40 deletions
|
@ -176,13 +176,10 @@ PopupChatDialog::~PopupChatDialog()
|
|||
{
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PopupChatDialog::processSettings(bool bLoad)
|
||||
{
|
||||
|
||||
Settings->beginGroup(QString("ChatDialog"));
|
||||
|
||||
if (bLoad) {
|
||||
|
@ -365,22 +362,25 @@ void PopupChatDialog::resetStatusBar()
|
|||
|
||||
void PopupChatDialog::updateStatusTyping()
|
||||
{
|
||||
if(time(NULL) - last_status_send_time > 5) // limit 'peer is typing' packets to at most every 10 sec
|
||||
{
|
||||
if (time(NULL) - last_status_send_time > 5) // limit 'peer is typing' packets to at most every 10 sec
|
||||
{
|
||||
#ifdef ONLY_FOR_LINGUIST
|
||||
tr("is typing...");
|
||||
#endif
|
||||
|
||||
rsMsgs->sendStatusString(dialogId, rsiface->getConfig().ownName + " is typing...");
|
||||
last_status_send_time = time(NULL) ;
|
||||
}
|
||||
rsMsgs->sendStatusString(dialogId, "is typing...");
|
||||
last_status_send_time = time(NULL) ;
|
||||
}
|
||||
}
|
||||
|
||||
// Called by libretroshare through notifyQt to display the peer's status
|
||||
//
|
||||
void PopupChatDialog::updateStatusString(const QString& status_string)
|
||||
void PopupChatDialog::updateStatusString(const QString& peer_id, const QString& status_string)
|
||||
{
|
||||
//statusBar()->showMessage(status_string,5000) ; // displays info for 5 secs.
|
||||
ui.statusLabel->setText(status_string) ; // displays info for 5 secs.
|
||||
QString status = QString::fromStdString(rsPeers->getPeerName(peer_id.toStdString())) + " " + tr(status_string.toAscii());
|
||||
ui.statusLabel->setText(status) ; // displays info for 5 secs.
|
||||
|
||||
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
|
||||
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue