X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fchatmonitorsettingspage.cpp;h=0c3819f1264789d280ab76f94aa9d792d599548a;hp=34f8cb9454fd5ed9b088c21f384b6a2018e00f7a;hb=e50ae7a06fc4e5d3a911c361d30953410deab609;hpb=69995f44c42f1f324cdb075454d440df7626d42a;ds=sidebyside diff --git a/src/qtui/settingspages/chatmonitorsettingspage.cpp b/src/qtui/settingspages/chatmonitorsettingspage.cpp index 34f8cb94..0c3819f1 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.cpp +++ b/src/qtui/settingspages/chatmonitorsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,13 +20,14 @@ #include "chatmonitorsettingspage.h" +#include + #include "client.h" #include "networkmodel.h" #include "bufferviewconfig.h" #include "buffermodel.h" #include "bufferview.h" #include "bufferviewfilter.h" -#include "iconloader.h" #include "chatviewsettings.h" #include @@ -36,8 +37,8 @@ ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent) { ui.setupUi(this); - ui.activateBuffer->setIcon(SmallIcon("go-next")); - ui.deactivateBuffer->setIcon(SmallIcon("go-previous")); + ui.activateBuffer->setIcon(QIcon::fromTheme("go-next")); + ui.deactivateBuffer->setIcon(QIcon::fromTheme("go-previous")); // setup available buffers config (for the bufferview on the left) _configAvailable = new BufferViewConfig(-667, this); @@ -64,6 +65,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 +83,7 @@ void ChatMonitorSettingsPage::defaults() settings["Buffers"] = QVariant(); settings["Default"] = true; settings["ShowBacklog"] = true; + settings["IncludeRead"] = false; load(); widgetHasChanged(); } @@ -98,6 +101,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 +135,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 +147,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 +176,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;