/***************************************************************************
- * Copyright (C) 2005-09 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 *
- * it under the terms of the GNU Blank Public License as published by *
+ * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
+ * (at your option) version 3. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU Blank Public License for more details. *
+ * GNU General Public License for more details. *
* *
- * You should have received a copy of the GNU Blank Public License *
+ * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "chatmonitorsettingspage.h"
#include "client.h"
+#include "icon.h"
#include "networkmodel.h"
#include "bufferviewconfig.h"
#include "buffermodel.h"
#include "bufferview.h"
#include "bufferviewfilter.h"
-#include "iconloader.h"
#include "chatviewsettings.h"
#include <QVariant>
{
ui.setupUi(this);
- ui.activateBuffer->setIcon(SmallIcon("go-next"));
- ui.deactivateBuffer->setIcon(SmallIcon("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);
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.showBacklog, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
+ connect(ui.includeRead, SIGNAL(toggled(bool)), SLOT(widgetHasChanged()));
}
settings["ShowOwnMsgs"] = false;
settings["Buffers"] = QVariant();
settings["Default"] = true;
+ settings["ShowBacklog"] = true;
+ settings["IncludeRead"] = false;
load();
widgetHasChanged();
}
ui.operationMode->setCurrentIndex(settings["OperationMode"].toInt() - 1);
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<BufferId> allBufferIds = Client::networkModel()->allBufferIds();
settings["ShowHighlights"] = chatViewSettings.value("ShowHighlights", false);
settings["ShowOwnMsgs"] = chatViewSettings.value("ShowOwnMsgs", false);
settings["Buffers"] = chatViewSettings.value("Buffers", QVariantList());
+ settings["ShowBacklog"] = chatViewSettings.value("ShowBacklog", true);
+ settings["IncludeRead"] = chatViewSettings.value("IncludeRead", true);
}
chatViewSettings.setValue("OperationMode", ui.operationMode->currentIndex() + 1);
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;
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;