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) 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->typingLabel->setText(QString(statusMask).arg(trUtf8(statusString.toUtf8()))); // displays info for 5 secs.
if (statusString.contains("Connexion refused")){
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":images/denied16.png") );
} else {
ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") ); ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") );
}
if (statusString == "is typing...") { if (statusString == "is typing...") {
typing = true; typing = true;

View file

@ -178,13 +178,13 @@ void PopupDistantChatDialog::updateDistantChatEvent()
case RS_DISTANT_CHAT_STATUS_UNKNOWN: case RS_DISTANT_CHAT_STATUS_UNKNOWN:
break ; break ;
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED: 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); , tr("Your partner closed the conversation."), ChatWidget::MSGTYPE_SYSTEM);
break ; break ;
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN: case RS_DISTANT_CHAT_STATUS_TUNNEL_DN:
break; break;
case RS_DISTANT_CHAT_STATUS_CAN_TALK: 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); , tr("Tunnel is secured. You can talk!"), ChatWidget::MSGTYPE_SYSTEM);
getChatWidget()->unblockSending(); getChatWidget()->unblockSending();
break; break;