X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fchatmonitorsettingspage.cpp;h=535c987cac0945b9416aee7bafc0500b0bda9ad7;hp=34f8cb9454fd5ed9b088c21f384b6a2018e00f7a;hb=a4cba7a7497d8b71942d5f5e81ef3c04f5c6bad5;hpb=69995f44c42f1f324cdb075454d440df7626d42a diff --git a/src/qtui/settingspages/chatmonitorsettingspage.cpp b/src/qtui/settingspages/chatmonitorsettingspage.cpp index 34f8cb94..535c987c 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.cpp +++ b/src/qtui/settingspages/chatmonitorsettingspage.cpp @@ -64,6 +64,7 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent) connect(ui.showHighlights, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); connect(ui.showOwnMessages, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); connect(ui.showBacklog, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); + connect(ui.includeRead, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); } @@ -81,6 +82,7 @@ void ChatMonitorSettingsPage::defaults() settings["Buffers"] = QVariant(); settings["Default"] = true; settings["ShowBacklog"] = true; + settings["IncludeRead"] = false; load(); widgetHasChanged(); } @@ -98,6 +100,7 @@ void ChatMonitorSettingsPage::load() ui.showHighlights->setChecked(settings["ShowHighlights"].toBool()); ui.showOwnMessages->setChecked(settings["ShowOwnMsgs"].toBool()); ui.showBacklog->setChecked(settings["ShowBacklog"].toBool()); + ui.includeRead->setChecked(settings["IncludeRead"].toBool()); // get all available buffer Ids QList allBufferIds = Client::networkModel()->allBufferIds(); @@ -131,6 +134,7 @@ void ChatMonitorSettingsPage::loadSettings() settings["ShowOwnMsgs"] = chatViewSettings.value("ShowOwnMsgs", false); settings["Buffers"] = chatViewSettings.value("Buffers", QVariantList()); settings["ShowBacklog"] = chatViewSettings.value("ShowBacklog", true); + settings["IncludeRead"] = chatViewSettings.value("IncludeRead", true); } @@ -142,6 +146,7 @@ void ChatMonitorSettingsPage::save() chatViewSettings.setValue("ShowHighlights", ui.showHighlights->isChecked()); chatViewSettings.setValue("ShowOwnMsgs", ui.showOwnMessages->isChecked()); chatViewSettings.setValue("ShowBacklog", ui.showBacklog->isChecked()); + chatViewSettings.setValue("IncludeRead", ui.includeRead->isChecked()); // save list of active buffers QVariantList saveableBufferIdList; @@ -170,6 +175,10 @@ bool ChatMonitorSettingsPage::testHasChanged() return true; if (settings["ShowOwnMsgs"].toBool() != ui.showOwnMessages->isChecked()) return true; + if (settings["ShowBacklog"].toBool() != ui.showBacklog->isChecked()) + return true; + if (settings["IncludeRead"].toBool() != ui.includeRead->isChecked()) + return true; if (_configActive->bufferList().count() != settings["Buffers"].toList().count()) return true;