#include "iconloader.h"
IgnoreListSettingsPage::IgnoreListSettingsPage(QWidget *parent)
- : SettingsPage(tr("Misc"), tr("Ignore List"), parent)
+ : SettingsPage(tr("IRC"), tr("Ignore List"), parent)
{
ui.setupUi(this);
_delegate = new IgnoreListDelegate(ui.ignoreListView);
// this could be moved to .ui file with qt4.5
_typeButtonGroup.addButton(ui.senderTypeButton, 0);
_typeButtonGroup.addButton(ui.messageTypeButton, 1);
+ _typeButtonGroup.addButton(ui.ctcpTypeButton, 2);
_strictnessButtonGroup.addButton(ui.dynamicStrictnessButton, 0);
_strictnessButtonGroup.addButton(ui.permanentStrictnessButton, 1);
_scopeButtonGroup.addButton(ui.globalScopeButton, 0);
if(item.type == IgnoreListManager::MessageIgnore)
ui.messageTypeButton->setChecked(true);
+ else if(item.type == IgnoreListManager::CtcpIgnore)
+ ui.ctcpTypeButton->setChecked(true);
else
ui.senderTypeButton->setChecked(true);
void IgnoreListEditDlg::widgetHasChanged() {
if(ui.messageTypeButton->isChecked())
_clonedIgnoreListItem.type = IgnoreListManager::MessageIgnore;
+ else if(ui.ctcpTypeButton->isChecked())
+ _clonedIgnoreListItem.type = IgnoreListManager::CtcpIgnore;
else
_clonedIgnoreListItem.type = IgnoreListManager::SenderIgnore;
else {
QStringList text = ui.scopeRuleTextEdit->toPlainText().split(";", QString::SkipEmptyParts);
QStringList::iterator it = text.begin();
- while(it != text.end())
- (*it++).trimmed();
+ while(it != text.end()) {
+ *it = it->trimmed();
+ ++it;
+ }
_clonedIgnoreListItem.scopeRule = text.join("; ");
}