Permalink
Browse files

block

implemented a new option so that it's possible not to deliver a message to
target user who got blocked by a user
  • Loading branch information...
benapetr committed Dec 5, 2014
1 parent 4125dea commit 1396b17b57e6691871ebb27782f2f6593918a6ce
Showing with 14 additions and 1 deletion.
  1. +1 −0 huggle/Localization/en.xml
  2. +3 −1 huggle/blockuser.cpp
  3. +10 −0 huggle/blockuser.ui
@@ -64,6 +64,7 @@
<string name="block-reason">Reason:</string>
<string name="block-duration">Duration:</string>
<string name="block-message">Talk page message:</string>
<string name="block-message-user">Send message to target user with explanation for block</string>
<string name="block-anononly">Block anonymous users only</string>
<string name="block-creation">Block account creation</string>
<string name="block-autoblock">Enable autoblocks</string>
@@ -36,6 +36,7 @@ BlockUser::BlockUser(QWidget *parent) : QDialog(parent), ui(new Ui::BlockUser)
this->ui->checkBox_3->setText(_l("block-autoblock"));
this->ui->checkBox_4->setText(_l("block-creation"));
this->ui->checkBox_2->setText(_l("block-email"));
this->ui->cbMessageTarget->setText(_l("block-message-user"));
this->ui->label_2->setText(_l("block-duration"));
this->t0 = new QTimer(this);
connect(this->t0, SIGNAL(timeout()), this, SLOT(onTick()));
@@ -188,7 +189,8 @@ void BlockUser::Block()
HUGGLE_DEBUG("block result: " + this->qUser->Result->Data, 2);
this->qUser.Delete();
this->t0->stop();
this->sendBlockNotice(nullptr);
if (this->ui->cbMessageTarget->isChecked())
this->sendBlockNotice(nullptr);
}
void BlockUser::Failed(QString reason)
@@ -46,6 +46,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbMessageTarget">
<property name="text">
<string>Send message to target user with explanation for block</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">

0 comments on commit 1396b17

Please sign in to comment.