From 4ce77a6c26a3e0aaac72e979e70e7619ef18c865 Mon Sep 17 00:00:00 2001 From: Petr Bena Date: Fri, 20 Jun 2014 23:37:26 +0200 Subject: [PATCH] fixed a bug in queue where we couldn't remove filter --- huggle/configuration.cpp | 1 + huggle/huggleparser.cpp | 5 +++++ huggle/hugglequeuefilter.hpp | 12 ++++++++++++ huggle/preferences.cpp | 4 ++++ huggle/preferences.ui | 7 +++++++ 5 files changed, 29 insertions(+) diff --git a/huggle/configuration.cpp b/huggle/configuration.cpp index 93ba0a92e..b739b5593 100644 --- a/huggle/configuration.cpp +++ b/huggle/configuration.cpp @@ -439,6 +439,7 @@ QString Configuration::MakeLocalUserConfig() configuration_ += " filter-me:" + Configuration::Bool2ExcludeRequire(fltr->getIgnoreSelf()) + "\n"; configuration_ += " filter-users:" + Configuration::Bool2ExcludeRequire(fltr->getIgnoreUsers()) + "\n"; configuration_ += " nsfilter-user:" + Configuration::Bool2ExcludeRequire(fltr->getIgnore_UserSpace()) + "\n"; + configuration_ += " filter-talk:" + Configuration::Bool2ExcludeRequire(fltr->getIgnoreTalk()) + "\n"; configuration_ += "\n"; } } diff --git a/huggle/huggleparser.cpp b/huggle/huggleparser.cpp index 4749d7c33..79a59915e 100644 --- a/huggle/huggleparser.cpp +++ b/huggle/huggleparser.cpp @@ -556,6 +556,11 @@ QList HuggleParser::ConfigurationParseQueueList(QString cont filter->setIgnoreFriends(F2B(val)); continue; } + if (key == "filter-talk") + { + filter->setIgnoreTalk(F2B(val)); + continue; + } if (key == "filter-ip") { filter->setIgnoreIP(F2B(val)); diff --git a/huggle/hugglequeuefilter.hpp b/huggle/hugglequeuefilter.hpp index ee4a5405e..3917b2eb3 100644 --- a/huggle/hugglequeuefilter.hpp +++ b/huggle/hugglequeuefilter.hpp @@ -71,6 +71,8 @@ namespace Huggle void setIgnoreSelf(bool value); bool IsDefault() const; bool IsChangeable() const; + void setIgnoreTalk(bool value); + bool getIgnoreTalk() const; bool getIgnoreReverts() const; void setIgnoreReverts(bool value); //! Name of this queue, must be unique @@ -188,6 +190,16 @@ namespace Huggle return this->IgnoreSelf; } + inline void HuggleQueueFilter::setIgnoreTalk(bool value) + { + this->IgnoreTalk = value; + } + + inline bool HuggleQueueFilter::getIgnoreTalk() const + { + return this->IgnoreTalk; + } + inline void HuggleQueueFilter::setIgnoreSelf(bool value) { this->IgnoreSelf = value; diff --git a/huggle/preferences.cpp b/huggle/preferences.cpp index 78f6765b7..bf3a9f3ed 100644 --- a/huggle/preferences.cpp +++ b/huggle/preferences.cpp @@ -159,6 +159,7 @@ void Huggle::Preferences::on_listWidget_itemSelectionChanged() this->ui->checkBox_8->setChecked(f->getIgnoreNP()); this->ui->checkBox_9->setChecked(f->getIgnoreWL()); this->ui->checkBox_28->setChecked(f->getIgnore_UserSpace()); + this->ui->checkBox_29->setChecked(f->getIgnoreTalk()); this->ui->checkBox_10->setChecked(f->getIgnoreFriends()); this->ui->checkBox_18->setChecked(f->getIgnoreReverts()); this->ui->checkBox_6->setChecked(f->getIgnoreSelf()); @@ -179,12 +180,14 @@ void Preferences::Disable() this->ui->pushButton_6->setEnabled(false); this->ui->checkBox_13->setEnabled(false); this->ui->lineEdit->setEnabled(false); + this->ui->checkBox_29->setEnabled(false); } void Preferences::EnableQueues() { this->ui->lineEdit->setEnabled(true); this->ui->checkBox_6->setEnabled(true); + this->ui->checkBox_29->setEnabled(true); this->ui->checkBox_7->setEnabled(true); this->ui->checkBox_8->setEnabled(true); this->ui->checkBox_9->setEnabled(true); @@ -293,6 +296,7 @@ void Huggle::Preferences::on_pushButton_6_clicked() filter->setIgnoreWL(this->ui->checkBox_9->isChecked()); filter->setIgnoreSelf(this->ui->checkBox_6->isChecked()); filter->setIgnoreReverts(this->ui->checkBox_18->isChecked()); + filter->setIgnoreTalk(this->ui->checkBox_29->isChecked()); filter->setIgnoreFriends(this->ui->checkBox_10->isChecked()); filter->setIgnore_UserSpace(this->ui->checkBox_28->isChecked()); filter->QueueName = this->ui->lineEdit->text(); diff --git a/huggle/preferences.ui b/huggle/preferences.ui index a3c2f02e5..8a5178f93 100644 --- a/huggle/preferences.ui +++ b/huggle/preferences.ui @@ -567,6 +567,13 @@ + + + + Talk pages (every space) + + +