allow voting on own identities

This commit is contained in:
David Bears 2025-01-03 15:03:31 -05:00
parent 0759359e06
commit 99053597a9
No known key found for this signature in database
GPG key ID: FB975E12C69F7177

View file

@ -1783,7 +1783,6 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
if (isOwnId) if (isOwnId)
{ {
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, false);
mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, false); mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, false);
// ui->editIdentity->setEnabled(true); // ui->editIdentity->setEnabled(true);
// ui->removeIdentity->setEnabled(true); // ui->removeIdentity->setEnabled(true);
@ -1793,8 +1792,6 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
} }
else else
{ {
// No Reputation yet!
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, true);
mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, true); mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, true);
// ui->editIdentity->setEnabled(false); // ui->editIdentity->setEnabled(false);
// ui->removeIdentity->setEnabled(false); // ui->removeIdentity->setEnabled(false);
@ -2266,12 +2263,14 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
if(n_is_a_contact == 0) if(n_is_a_contact == 0)
contextMenu->addAction(QIcon(), tr("Add to Contacts"), this, SLOT(addtoContacts())); contextMenu->addAction(QIcon(), tr("Add to Contacts"), this, SLOT(addtoContacts()));
if (n_selected_items==1)
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
if(n_is_not_a_contact == 0) if(n_is_not_a_contact == 0)
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"), tr("Remove from Contacts"), this, SLOT(removefromContacts())); contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"), tr("Remove from Contacts"), this, SLOT(removefromContacts()));
}
if (n_selected_items==1)
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
contextMenu->addSeparator(); contextMenu->addSeparator();
if(n_positive_reputations == 0) // only unban when all items are banned if(n_positive_reputations == 0) // only unban when all items are banned
@ -2282,13 +2281,11 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
if(n_negative_reputations == 0) if(n_negative_reputations == 0)
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson())); contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
}
if(one_item_owned_by_you && n_selected_items==1) if(one_item_owned_by_you && n_selected_items==1)
{ {
contextMenu->addSeparator(); contextMenu->addSeparator();
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT),tr("Edit identity"),this,SLOT(editIdentity())) ; contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT),tr("Edit identity"),this,SLOT(editIdentity())) ;
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"),tr("Delete identity"),this,SLOT(removeIdentity())) ; contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"),tr("Delete identity"),this,SLOT(removeIdentity())) ;
} }
@ -2602,4 +2599,3 @@ void IdDialog::restoreExpandedCircleItems(const std::vector<bool>& expanded_root
restoreTopLevel(mExternalOtherCircleItem,1); restoreTopLevel(mExternalOtherCircleItem,1);
restoreTopLevel(mMyCircleItem,2); restoreTopLevel(mMyCircleItem,2);
} }