summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2024-08-04 11:56:55 +0000
committerGitHub <noreply@github.com>2024-08-04 11:56:55 +0000
commit50f9edfe199af807c7e74b676328a2f2037e7f1d (patch)
tree0379b07f52efffdfa6a42cb220110a1b5382a26c /src
parentMerge pull request #1776 from xvitaly/fmt11 (diff)
parentUse %n to make the plural forms work properly (diff)
downloadnheko-50f9edfe199af807c7e74b676328a2f2037e7f1d.tar.xz
Merge pull request #1774 from Integral-Tech/add-trayicon-tooltip
Add number of unread messages to tray icon toolTip
Diffstat (limited to 'src')
-rw-r--r--src/TrayIcon.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp

index c62fecea..44bfb6ca 100644 --- a/src/TrayIcon.cpp +++ b/src/TrayIcon.cpp
@@ -129,6 +129,13 @@ TrayIcon::setUnreadCount(int count) previousCount = count; } #endif + + QString toolTip = QLatin1String("nheko"); + if (count > 0) { + toolTip.append(tr("\n%n unread message(s)", "", count)); + } + + setToolTip(toolTip); } #include "moc_TrayIcon.cpp"