diff --git a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.h b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.h index fd95511b4..620d49fbe 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.h +++ b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.h @@ -63,6 +63,7 @@ public: QString textToNotify() { return _textToNotify.join("\n");} void setTextCaseSensitive(bool value); bool isTextCaseSensitive() {return _bTextCaseSensitive;} + virtual QString textInfo() const override { return tr("mention(s)"); } signals: void countChanged(ChatLobbyId id, unsigned int count); diff --git a/retroshare-gui/src/gui/common/UserNotify.cpp b/retroshare-gui/src/gui/common/UserNotify.cpp index dc95127a8..8884caea3 100644 --- a/retroshare-gui/src/gui/common/UserNotify.cpp +++ b/retroshare-gui/src/gui/common/UserNotify.cpp @@ -167,9 +167,17 @@ void UserNotify::update() if (mMainAction) { mMainAction->setIcon(getMainIcon(count > 0)); + if(count > 0) + { + if(!mButtonText2.isNull()) + mMainAction->setToolTip(QString("%1 (%2 %3)").arg(mButtonText).arg(count).arg(mButtonText2)); + else + mMainAction->setToolTip(QString("%1 (%2)").arg(mButtonText).arg(count)); - mMainAction->setText((count > 0) ? (!mButtonText2.isNull())?QString("%1 (%2)").arg(mButtonText).arg(count).arg(mButtonText2) : QString("%1 (%2 %3)").arg(mButtonText).arg(count) : mButtonText); - mMainAction->setToolTip((count > 0) ? (!mButtonText2.isNull())?QString("%1 %2").arg(count).arg(mButtonText2) : QString("%1").arg(count) : mButtonText); + mMainAction->setText(QString("%1 (%2)").arg(mButtonText).arg(count)); + } + else + mMainAction->setText(mButtonText); QFont font = mMainAction->font(); font.setBold(count > 0);