diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-04-07 16:00:16 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-04-07 19:09:21 +0300 |
commit | c31deaa72c60e15a0b87c41f3598ad5a084aa98f (patch) | |
tree | 06becc262c9642d7750009d88ddbd327f7dbf6a8 /src/gui/owncloudgui.cpp | |
parent | 3b6163b90901112a183a74f9ef6233d0cba2de03 (diff) |
Allow to specify a icon for the system tray (Windows only)
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r-- | src/gui/owncloudgui.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 9b6c4855d..7e2695864 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -731,16 +731,17 @@ void ownCloudGui::updateContextMenuNeeded() } } -void ownCloudGui::slotShowTrayMessage(const QString &title, const QString &msg) +void ownCloudGui::slotShowTrayMessage(const QString &title, const QString &msg, const QIcon &icon) { - _tray->showMessage(title, msg); + // SyncResult::Problem is returns the info icon + _tray->showMessage(title, msg, icon.isNull() ? Theme::instance()->syncStateIcon(SyncResult::Problem) : icon); } -void ownCloudGui::slotShowOptionalTrayMessage(const QString &title, const QString &msg) +void ownCloudGui::slotShowOptionalTrayMessage(const QString &title, const QString &msg, const QIcon &icon) { ConfigFile cfg; if (cfg.optionalDesktopNotifications()) { - slotShowTrayMessage(title, msg); + slotShowTrayMessage(title, msg, icon); } } |