Skip to content

Commit

Permalink
fixed a bug in queue where we couldn't remove filter
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Jun 20, 2014
1 parent 1fe4268 commit 4ce77a6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions huggle/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
Expand Down
5 changes: 5 additions & 0 deletions huggle/huggleparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,11 @@ QList<HuggleQueueFilter*> 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));
Expand Down
12 changes: 12 additions & 0 deletions huggle/hugglequeuefilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions huggle/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
7 changes: 7 additions & 0 deletions huggle/preferences.ui
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_29">
<property name="text">
<string>Talk pages (every space)</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
Expand Down

0 comments on commit 4ce77a6

Please sign in to comment.