X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fchatmonitorsettingspage.cpp;h=faba1bdade9f6e4f0908a7b176901d8ed3abbae3;hb=8fb51dcb129db8399209e9d07b518063d1a910f1;hp=0c3819f1264789d280ab76f94aa9d792d599548a;hpb=1cb02004ee5973b89368bd84f234d4652794690d;p=quassel.git diff --git a/src/qtui/settingspages/chatmonitorsettingspage.cpp b/src/qtui/settingspages/chatmonitorsettingspage.cpp index 0c3819f1..faba1bda 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.cpp +++ b/src/qtui/settingspages/chatmonitorsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,9 +20,8 @@ #include "chatmonitorsettingspage.h" -#include - #include "client.h" +#include "icon.h" #include "networkmodel.h" #include "bufferviewconfig.h" #include "buffermodel.h" @@ -37,8 +36,8 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent) { ui.setupUi(this); - ui.activateBuffer->setIcon(QIcon::fromTheme("go-next")); - ui.deactivateBuffer->setIcon(QIcon::fromTheme("go-previous")); + ui.activateBuffer->setIcon(icon::get("go-next")); + ui.deactivateBuffer->setIcon(icon::get("go-previous")); // setup available buffers config (for the bufferview on the left) _configAvailable = new BufferViewConfig(-667, this); @@ -64,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())); } @@ -80,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; @@ -100,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()); @@ -133,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); @@ -146,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()); @@ -176,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())