mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 13:19:07 -04:00
added two fields in settings/people to setup the thresholds to decide between neutral and remotely positive/negative reputation
This commit is contained in:
parent
da881e1f5b
commit
fb733916ef
5 changed files with 86 additions and 21 deletions
|
@ -42,7 +42,8 @@ bool PeoplePage::save(QString &/*errmsg*/)
|
|||
else
|
||||
rsReputations->setNodeAutoPositiveOpinionForContacts(false) ;
|
||||
|
||||
rsReputations->setNodeAutoBanIdentitiesLimit(ui.autoBanIdentitiesLimit_SB->value());
|
||||
rsReputations->setThresholdForRemotelyPositiveReputation(ui.thresholdForPositive_SB->value());
|
||||
rsReputations->setThresholdForRemotelyNegativeReputation(ui.thresholdForNegative_SB->value());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -51,8 +52,10 @@ bool PeoplePage::save(QString &/*errmsg*/)
|
|||
void PeoplePage::load()
|
||||
{
|
||||
bool auto_positive_contacts = rsReputations->nodeAutoPositiveOpinionForContacts() ;
|
||||
float node_auto_ban_identities_limit = rsReputations->nodeAutoBanIdentitiesLimit();
|
||||
uint32_t threshold_for_positive = rsReputations->thresholdForRemotelyPositiveReputation();
|
||||
uint32_t threshold_for_negative = rsReputations->thresholdForRemotelyNegativeReputation();
|
||||
|
||||
ui.autoPositiveOpinion_CB->setChecked(auto_positive_contacts);
|
||||
ui.autoBanIdentitiesLimit_SB->setValue(node_auto_ban_identities_limit);
|
||||
ui.thresholdForPositive_SB->setValue(threshold_for_positive);
|
||||
ui.thresholdForNegative_SB->setValue(threshold_for_negative);
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
<height>441</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="generalGroupBox">
|
||||
<property name="title">
|
||||
<string>Identities handling</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoPositiveOpinion_CB">
|
||||
<property name="toolTip">
|
||||
|
@ -31,30 +31,44 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Friend average opinion below which identities are banned:</string>
|
||||
<string>Difference in votes to make friends globally negative:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="autoBanIdentitiesLimit_SB">
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="thresholdForNegative_SB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The default value of -0.6 needs 3 to 4 friends to set a negative opinion in order for that identity to be banned at your own node. This is a pretty conservative value. If you want to more easily get rid of banned identities, set the value to e.g. -0.2</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>-0.010000000000000</double>
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="thresholdForPositive_SB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The default value of -0.6 needs 3 to 4 friends to set a negative opinion in order for that identity to be banned at your own node. This is a pretty conservative value. If you want to more easily get rid of banned identities, set the value to e.g. -0.2</p></body></html></string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>-0.600000000000000</double>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Difference in votes to make friends globally positive:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue