diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-04-12 14:25:22 +0300 |
---|---|---|
committer | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-04-12 14:25:22 +0300 |
commit | e9a373c7c4301faab54defb155e6d57922044a7d (patch) | |
tree | b33975c1f784d046acc52da23b4dd60b4aea7d65 /src/gui/owncloudgui.cpp | |
parent | 281ac1d85d72d7b3ec20b726f0b3abc27c044ed7 (diff) | |
parent | 328a44daaf0e8af1b2095dc18cf705726b40d2c7 (diff) |
Merge remote-tracking branch 'origin/2.8' into master
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r-- | src/gui/owncloudgui.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 3cccbeab9..56ae4896b 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -83,13 +83,6 @@ ownCloudGui::ownCloudGui(Application *parent) this, &ownCloudGui::updateContextMenuNeeded); connect(AccountManager::instance(), &AccountManager::accountRemoved, this, &ownCloudGui::updateContextMenuNeeded); - - connect(Logger::instance(), &Logger::guiLog, - this, &ownCloudGui::slotShowTrayMessage); - connect(Logger::instance(), &Logger::optionalGuiLog, - this, &ownCloudGui::slotShowOptionalTrayMessage); - connect(Logger::instance(), &Logger::guiMessage, - this, &ownCloudGui::slotShowGuiMessage); } ownCloudGui::~ownCloudGui() @@ -738,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); } } |