From c385c13ef17d869b46b2dc419ba804dbe976cd76 Mon Sep 17 00:00:00 2001 From: defnax Date: Sat, 29 Mar 2025 18:19:49 +0100 Subject: [PATCH] Fixed to show for "Connexion refused..." different icon --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 7 ++++++- retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 48fa45887..2258504e9 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -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; diff --git a/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp index 2afb5bf1b..bba3bae3f 100644 --- a/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp @@ -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;