X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fchatmonitorsettingspage.cpp;fp=src%2Fqtui%2Fsettingspages%2Fchatmonitorsettingspage.cpp;h=faba1bdade9f6e4f0908a7b176901d8ed3abbae3;hp=1690722bed7bb61da8d6c04545bdd0dc1ca7c570;hb=107131b98c78c3e7f4b2630f8f20453ce5400438;hpb=903cbb0d6bbeb2ed8812f53e1e812d886e6f90ae diff --git a/src/qtui/settingspages/chatmonitorsettingspage.cpp b/src/qtui/settingspages/chatmonitorsettingspage.cpp index 1690722b..faba1bda 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.cpp +++ b/src/qtui/settingspages/chatmonitorsettingspage.cpp @@ -63,6 +63,7 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent) connect(ui.operationMode, SIGNAL(currentIndexChanged(int)), SLOT(switchOperationMode(int))); connect(ui.showHighlights, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); connect(ui.showOwnMessages, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); + connect(ui.alwaysOwn, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); connect(ui.showBacklog, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); connect(ui.includeRead, SIGNAL(toggled(bool)), SLOT(widgetHasChanged())); } @@ -79,6 +80,7 @@ void ChatMonitorSettingsPage::defaults() settings["OperationMode"] = ChatViewSettings::OptOut; settings["ShowHighlights"] = false; settings["ShowOwnMsgs"] = false; + settings["AlwaysOwn"] = false; settings["Buffers"] = QVariant(); settings["Default"] = true; settings["ShowBacklog"] = true; @@ -99,6 +101,7 @@ void ChatMonitorSettingsPage::load() ui.operationMode->setCurrentIndex(settings["OperationMode"].toInt() - 1); ui.showHighlights->setChecked(settings["ShowHighlights"].toBool()); ui.showOwnMessages->setChecked(settings["ShowOwnMsgs"].toBool()); + ui.alwaysOwn->setChecked(settings["AlwaysOwn"].toBool()); ui.showBacklog->setChecked(settings["ShowBacklog"].toBool()); ui.includeRead->setChecked(settings["IncludeRead"].toBool()); @@ -132,6 +135,7 @@ void ChatMonitorSettingsPage::loadSettings() settings["ShowHighlights"] = chatViewSettings.value("ShowHighlights", false); settings["ShowOwnMsgs"] = chatViewSettings.value("ShowOwnMsgs", false); + settings["AlwaysOwn"] = chatViewSettings.value("AlwaysOwn", false); settings["Buffers"] = chatViewSettings.value("Buffers", QVariantList()); settings["ShowBacklog"] = chatViewSettings.value("ShowBacklog", true); settings["IncludeRead"] = chatViewSettings.value("IncludeRead", true); @@ -145,6 +149,7 @@ void ChatMonitorSettingsPage::save() chatViewSettings.setValue("OperationMode", ui.operationMode->currentIndex() + 1); chatViewSettings.setValue("ShowHighlights", ui.showHighlights->isChecked()); chatViewSettings.setValue("ShowOwnMsgs", ui.showOwnMessages->isChecked()); + chatViewSettings.setValue("AlwaysOwn", ui.alwaysOwn->isChecked()); chatViewSettings.setValue("ShowBacklog", ui.showBacklog->isChecked()); chatViewSettings.setValue("IncludeRead", ui.includeRead->isChecked()); @@ -175,6 +180,8 @@ bool ChatMonitorSettingsPage::testHasChanged() return true; if (settings["ShowOwnMsgs"].toBool() != ui.showOwnMessages->isChecked()) return true; + if (settings["AlwaysOwn"].toBool() != ui.alwaysOwn->isChecked()) + return true; if (settings["ShowBacklog"].toBool() != ui.showBacklog->isChecked()) return true; if (settings["IncludeRead"].toBool() != ui.includeRead->isChecked())