From 3097892d088b8fbd8a837db58d57998e602bd7b9 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sun, 21 May 2023 15:01:50 +0200 Subject: [PATCH] App: NotificationArea adaptation to the new messages --- src/Gui/NotificationArea.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Gui/NotificationArea.cpp b/src/Gui/NotificationArea.cpp index 727e76070c..a9d387ace9 100644 --- a/src/Gui/NotificationArea.cpp +++ b/src/Gui/NotificationArea.cpp @@ -253,8 +253,10 @@ void NotificationAreaObserver::SendLog(const std::string& notifiername, const st // "\n", as this generates problems with the translation system. Then the string must be // stripped of "\n" before translation. - (void) recipient; - (void) content; + if( recipient == Base::IntendedRecipient::Developer || + content == Base::ContentType::Untranslatable) { + return; + } auto simplifiedstring = QString::fromStdString(msg) @@ -264,7 +266,7 @@ void NotificationAreaObserver::SendLog(const std::string& notifiername, const st if (simplifiedstring.isEmpty()) return; - if (level == Base::LogStyle::TranslatedNotification) { + if (content == Base::ContentType::Translated) { notificationArea->pushNotification( QString::fromStdString(notifiername), simplifiedstring, level); } @@ -369,7 +371,7 @@ public: } public: - /// deletes only notifications (messages of type Notification and TranslatedNotification) + /// deletes only notifications (messages of type Notification) void deleteNotifications() { if (tableWidget) {