mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-29 09:18:45 -04:00
Merge pull request #1440 from csoler/v0.6-Identity
added button (enabled by default) to automatically add IDs signed by …
This commit is contained in:
commit
bcea548d83
6 changed files with 60 additions and 10 deletions
|
@ -36,6 +36,7 @@ PeoplePage::PeoplePage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.thresholdForNegative_SB,SIGNAL(valueChanged(int)),this,SLOT(updateThresholdForRemotelyNegativeReputation()));
|
||||
connect(ui.preventReloadingBannedIdentitiesFor_SB,SIGNAL(valueChanged(int)),this,SLOT(updateRememberDeletedNodes()));
|
||||
connect(ui.deleteBannedIdentitiesAfter_SB,SIGNAL(valueChanged(int)),this,SLOT(updateDeleteBannedNodesThreshold()));
|
||||
connect(ui.autoAddFriendIdsAsContact_CB,SIGNAL(toggled(bool)),this,SLOT(updateAutoAddFriendIdsAsContact()));
|
||||
}
|
||||
|
||||
void PeoplePage::updateAutoPositiveOpinion() { rsReputations->setNodeAutoPositiveOpinionForContacts(ui.autoPositiveOpinion_CB->isChecked()) ; }
|
||||
|
@ -45,6 +46,7 @@ void PeoplePage::updateThresholdForRemotelyNegativeReputation() { rsReputations
|
|||
|
||||
void PeoplePage::updateRememberDeletedNodes() { rsReputations->setRememberDeletedNodesThreshold(ui.preventReloadingBannedIdentitiesFor_SB->value()); }
|
||||
void PeoplePage::updateDeleteBannedNodesThreshold() { rsIdentity->setDeleteBannedNodesThreshold(ui.deleteBannedIdentitiesAfter_SB->value());}
|
||||
void PeoplePage::updateAutoAddFriendIdsAsContact() { rsIdentity->setAutoAddFriendIdsAsContact(ui.autoAddFriendIdsAsContact_CB->isChecked()) ; }
|
||||
|
||||
PeoplePage::~PeoplePage()
|
||||
{
|
||||
|
@ -56,10 +58,12 @@ void PeoplePage::load()
|
|||
bool auto_positive_contacts = rsReputations->nodeAutoPositiveOpinionForContacts() ;
|
||||
uint32_t threshold_for_positive = rsReputations->thresholdForRemotelyPositiveReputation();
|
||||
uint32_t threshold_for_negative = rsReputations->thresholdForRemotelyNegativeReputation();
|
||||
bool auto_add_friend_ids_as_contact = rsIdentity->autoAddFriendIdsAsContact();
|
||||
|
||||
whileBlocking(ui.autoPositiveOpinion_CB)->setChecked(auto_positive_contacts);
|
||||
whileBlocking(ui.thresholdForPositive_SB)->setValue(threshold_for_positive);
|
||||
whileBlocking(ui.thresholdForNegative_SB)->setValue(threshold_for_negative);
|
||||
whileBlocking(ui.deleteBannedIdentitiesAfter_SB)->setValue(rsIdentity->deleteBannedNodesThreshold());
|
||||
whileBlocking(ui.autoAddFriendIdsAsContact_CB )->setChecked(auto_add_friend_ids_as_contact);
|
||||
whileBlocking(ui.autoPositiveOpinion_CB )->setChecked(auto_positive_contacts);
|
||||
whileBlocking(ui.thresholdForPositive_SB )->setValue(threshold_for_positive);
|
||||
whileBlocking(ui.thresholdForNegative_SB )->setValue(threshold_for_negative);
|
||||
whileBlocking(ui.deleteBannedIdentitiesAfter_SB )->setValue(rsIdentity->deleteBannedNodesThreshold());
|
||||
whileBlocking(ui.preventReloadingBannedIdentitiesFor_SB)->setValue(rsReputations->rememberDeletedNodesThreshold());
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ protected slots:
|
|||
|
||||
void updateRememberDeletedNodes();
|
||||
void updateDeleteBannedNodesThreshold() ;
|
||||
void updateAutoAddFriendIdsAsContact() ;
|
||||
|
||||
private:
|
||||
Ui::PeoplePage ui;
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoAddFriendIdsAsContact_CB">
|
||||
<property name="text">
|
||||
<string>Automatically add identities owned by friend nodes to my contacts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue