From 0599241929176a35696de01e6fee447f9188fd17 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Sun, 6 Oct 2024 11:44:10 +0200 Subject: [PATCH] refactor: Remove log messages from status bar With the new warn/error button, the user already is informed if something important is logged. By only showing nearly all log messages in the status bar, messages can be missed easily. Fixes also an issue where the status bar was accessed before it was initialized (crash with assert). (Fixes #299). --- src/swiftguistandard/swiftguistd.h | 1 - src/swiftguistandard/swiftguistdinit.cpp | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/swiftguistandard/swiftguistd.h b/src/swiftguistandard/swiftguistd.h index 6d61d13bc..467022d2d 100644 --- a/src/swiftguistandard/swiftguistd.h +++ b/src/swiftguistandard/swiftguistd.h @@ -131,7 +131,6 @@ private: BlackCore::CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::CIcons::StandardIconRadio16, this, &SwiftGuiStd::onPttChanged }; BlackCore::CActionBindings m_menuHotkeyHandlers; BlackGui::CManagedStatusBar m_statusBar; - BlackMisc::CLogHistoryReplica m_logHistoryForStatus { this }; BlackMisc::CLogHistoryReplica m_logHistoryForLogButtons { this }; BlackMisc::CLogHistoryReplica m_logHistoryForOverlay { this }; BlackMisc::CSetting m_audioSettings { this }; diff --git a/src/swiftguistandard/swiftguistdinit.cpp b/src/swiftguistandard/swiftguistdinit.cpp index 2152d7ead..764579944 100644 --- a/src/swiftguistandard/swiftguistdinit.cpp +++ b/src/swiftguistandard/swiftguistdinit.cpp @@ -75,13 +75,8 @@ void SwiftGuiStd::init() sGui->initMainApplicationWidget(this); // log messages - m_logHistoryForStatus.setFilter(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo)); m_logHistoryForOverlay.setFilter(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityError)); m_logHistoryForLogButtons.setFilter(CLogPattern().withSeverityAtOrAbove(SeverityWarning)); - connect(&m_logHistoryForStatus, &CLogHistoryReplica::elementAdded, this, [this](const CStatusMessage &message) { - m_statusBar.displayStatusMessage(message); - ui->comp_MainInfoArea->displayStatusMessage(message); - }); connect(&m_logHistoryForOverlay, &CLogHistoryReplica::elementAdded, this, [this](const CStatusMessage &message) { //! \todo filter out validation messages at CLogPattern level if (!message.getCategories().contains(CLogCategories::validation())) { ui->fr_CentralFrameInside->showOverlayMessage(message); } @@ -96,7 +91,6 @@ void SwiftGuiStd::init() m_statusBar.showWarningButton(); } }); - m_logHistoryForStatus.initialize(sApp->getDataLinkDBus()); m_logHistoryForOverlay.initialize(sApp->getDataLinkDBus()); m_logHistoryForLogButtons.initialize(sApp->getDataLinkDBus());