Fixed to show for "Connexion refused..." different icon

This commit is contained in:
defnax 2025-03-29 18:19:49 +01:00
parent ed3e495774
commit c385c13ef1
2 changed files with 8 additions and 3 deletions

View File

@ -1931,7 +1931,12 @@ void ChatWidget::updatePeersCustomStateString(const QString& peer_id, const QStr
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
{
ui->typingLabel->setText(QString(statusMask).arg(trUtf8(statusString.toUtf8()))); // displays info for 5 secs.
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") );
if (statusString.contains("Connexion refused")){
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":images/denied16.png") );
} else {
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") );
}
if (statusString == "is typing...") {
typing = true;

View File

@ -178,13 +178,13 @@ void PopupDistantChatDialog::updateDistantChatEvent()
case RS_DISTANT_CHAT_STATUS_UNKNOWN:
break ;
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED:
getChatWidget()->addChatMsg(true, tr("Tunnel status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
, tr("Your partner closed the conversation."), ChatWidget::MSGTYPE_SYSTEM);
break ;
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN:
break;
case RS_DISTANT_CHAT_STATUS_CAN_TALK:
getChatWidget()->addChatMsg(true, tr("Tunnel status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
, tr("Tunnel is secured. You can talk!"), ChatWidget::MSGTYPE_SYSTEM);
getChatWidget()->unblockSending();
break;