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).
This commit is contained in:
Lars Toenning
2024-10-06 11:44:10 +02:00
parent e5916b65a9
commit 0599241929
2 changed files with 0 additions and 7 deletions

View File

@@ -131,7 +131,6 @@ private:
BlackCore::CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::CIcons::StandardIconRadio16, this, &SwiftGuiStd::onPttChanged }; BlackCore::CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::CIcons::StandardIconRadio16, this, &SwiftGuiStd::onPttChanged };
BlackCore::CActionBindings m_menuHotkeyHandlers; BlackCore::CActionBindings m_menuHotkeyHandlers;
BlackGui::CManagedStatusBar m_statusBar; BlackGui::CManagedStatusBar m_statusBar;
BlackMisc::CLogHistoryReplica m_logHistoryForStatus { this };
BlackMisc::CLogHistoryReplica m_logHistoryForLogButtons { this }; BlackMisc::CLogHistoryReplica m_logHistoryForLogButtons { this };
BlackMisc::CLogHistoryReplica m_logHistoryForOverlay { this }; BlackMisc::CLogHistoryReplica m_logHistoryForOverlay { this };
BlackMisc::CSetting<BlackMisc::Audio::TSettings> m_audioSettings { this }; BlackMisc::CSetting<BlackMisc::Audio::TSettings> m_audioSettings { this };

View File

@@ -75,13 +75,8 @@ void SwiftGuiStd::init()
sGui->initMainApplicationWidget(this); sGui->initMainApplicationWidget(this);
// log messages // log messages
m_logHistoryForStatus.setFilter(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
m_logHistoryForOverlay.setFilter(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityError)); m_logHistoryForOverlay.setFilter(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityError));
m_logHistoryForLogButtons.setFilter(CLogPattern().withSeverityAtOrAbove(SeverityWarning)); 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) { connect(&m_logHistoryForOverlay, &CLogHistoryReplica::elementAdded, this, [this](const CStatusMessage &message) {
//! \todo filter out validation messages at CLogPattern level //! \todo filter out validation messages at CLogPattern level
if (!message.getCategories().contains(CLogCategories::validation())) { ui->fr_CentralFrameInside->showOverlayMessage(message); } if (!message.getCategories().contains(CLogCategories::validation())) { ui->fr_CentralFrameInside->showOverlayMessage(message); }
@@ -96,7 +91,6 @@ void SwiftGuiStd::init()
m_statusBar.showWarningButton(); m_statusBar.showWarningButton();
} }
}); });
m_logHistoryForStatus.initialize(sApp->getDataLinkDBus());
m_logHistoryForOverlay.initialize(sApp->getDataLinkDBus()); m_logHistoryForOverlay.initialize(sApp->getDataLinkDBus());
m_logHistoryForLogButtons.initialize(sApp->getDataLinkDBus()); m_logHistoryForLogButtons.initialize(sApp->getDataLinkDBus());