X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatmonitorfilter.cpp;fp=src%2Fqtui%2Fchatmonitorfilter.cpp;h=79cdf0a92eade6ec704f6fdd688ec2ce3a2e006d;hp=969d7a3fe8b124ac58994997ee5ac6ce58a158ef;hb=107131b98c78c3e7f4b2630f8f20453ce5400438;hpb=903cbb0d6bbeb2ed8812f53e1e812d886e6f90ae diff --git a/src/qtui/chatmonitorfilter.cpp b/src/qtui/chatmonitorfilter.cpp index 969d7a3f..79cdf0a9 100644 --- a/src/qtui/chatmonitorfilter.cpp +++ b/src/qtui/chatmonitorfilter.cpp @@ -47,6 +47,7 @@ ChatMonitorFilter::ChatMonitorFilter(MessageModel *model, QObject *parent) QString buffersSettingsId = "Buffers"; QString showBacklogSettingsId = "ShowBacklog"; QString includeReadSettingsId = "IncludeRead"; + QString alwaysOwnSettingsId = "AlwaysOwn"; _showHighlights = viewSettings.value(showHighlightsSettingsId, false).toBool(); _operationMode = viewSettings.value(operationModeSettingsId, 0).toInt(); @@ -55,12 +56,14 @@ ChatMonitorFilter::ChatMonitorFilter(MessageModel *model, QObject *parent) _bufferIds << v.value(); _showBacklog = viewSettings.value(showBacklogSettingsId, true).toBool(); _includeRead = viewSettings.value(includeReadSettingsId, true).toBool(); + _alwaysOwn = viewSettings.value(alwaysOwnSettingsId, false).toBool(); viewSettings.notify(showHighlightsSettingsId, this, SLOT(showHighlightsSettingChanged(const QVariant &))); viewSettings.notify(operationModeSettingsId, this, SLOT(operationModeSettingChanged(const QVariant &))); viewSettings.notify(buffersSettingsId, this, SLOT(buffersSettingChanged(const QVariant &))); viewSettings.notify(showBacklogSettingsId, this, SLOT(showBacklogSettingChanged(const QVariant &))); viewSettings.notify(includeReadSettingsId, this, SLOT(includeReadSettingChanged(const QVariant &))); + viewSettings.notify(alwaysOwnSettingsId, this, SLOT(alwaysOwnSettingChanged(const QVariant &))); } @@ -90,6 +93,8 @@ bool ChatMonitorFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourc // ChatMonitorSettingsPage if (_showHighlights && flags & Message::Highlight) ; // pass + else if (_alwaysOwn && flags & Message::Self) + ; // pass else if (_operationMode == ChatViewSettings::OptOut && _bufferIds.contains(bufferId)) return false; else if (_operationMode == ChatViewSettings::OptIn && !_bufferIds.contains(bufferId)) @@ -187,6 +192,9 @@ void ChatMonitorFilter::showOwnMessagesSettingChanged(const QVariant &newValue) _showOwnMessages = newValue.toBool(); } +void ChatMonitorFilter::alwaysOwnSettingChanged(const QVariant &newValue) { + _alwaysOwn = newValue.toBool(); +} void ChatMonitorFilter::showHighlightsSettingChanged(const QVariant &newValue) {