Merge pull request #2347 from defnax/gui-fix-v1

Added Edit Identity button to People view
This commit is contained in:
csoler 2021-02-28 21:36:50 +01:00 committed by GitHub
commit 1bfd49419d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 10 deletions

View File

@ -252,10 +252,12 @@ IdDialog::IdDialog(QWidget *parent)
connect(ui->ownOpinion_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(modifyReputation()));
connect(ui->inviteButton, SIGNAL(clicked()), this, SLOT(sendInvite()));
connect(ui->editButton, SIGNAL(clicked()), this, SLOT(editIdentity()));
connect( ui->idTreeWidget, &RSTreeWidget::itemDoubleClicked,
this, &IdDialog::chatIdentityItem );
ui->editButton->hide();
ui->avlabel_Circles->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
@ -1810,7 +1812,8 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
// ui->editIdentity->setEnabled(true);
// ui->removeIdentity->setEnabled(true);
ui->chatIdentity->setEnabled(false);
ui->inviteButton->setEnabled(false);
ui->inviteButton->hide();
ui->editButton->show();
}
else
{
@ -1820,7 +1823,8 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
// ui->editIdentity->setEnabled(false);
// ui->removeIdentity->setEnabled(false);
ui->chatIdentity->setEnabled(true);
ui->inviteButton->setEnabled(true);
ui->inviteButton->show();
ui->editButton->hide();
}
ui->autoBanIdentities_CB->setChecked(rsReputations->isNodeBanned(data.mPgpId));

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>987</width>
<width>800</width>
<height>584</height>
</rect>
</property>
@ -287,7 +287,7 @@
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<x>-155</x>
<y>0</y>
<width>634</width>
<height>523</height>
@ -609,6 +609,13 @@ border-image: url(:/images/closepressed.png)
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit Identity</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="avatarOpinionHLayout">
<property name="spacing">

View File

@ -138,6 +138,7 @@ void SecurityItem::updateItemStatic()
title = tr("Missing/Damaged certificate. Not a real Retroshare user.");
requestLabel->hide();
}
avatar->setDefaultAvatar(":icons/ssl.png");
break;
case RS_FEED_ITEM_SEC_INTERNAL_ERROR:
title = tr("Certificate caused an internal error.");
@ -186,7 +187,7 @@ void SecurityItem::updateItem()
*/
/* set peer name */
peerNameLabel->setText(tr("A unknown peer"));
//peerNameLabel->setText(tr("A unknown peer"));
nameLabel->setText(tr("Unknown") + " (" + tr("Profile ID: ") + QString::fromStdString(mGpgId.toStdString()) + ")");
idLabel->setText(QString::fromStdString(mSslId.toStdString()));
@ -205,15 +206,25 @@ void SecurityItem::updateItem()
connLeftLabel->hide();
chatButton->hide();
//quickmsgButton->hide();
requestLabel->hide();
removeFriendButton->setEnabled(false);
removeFriendButton->hide();
peerDetailsButton->setEnabled(false);
friendRequesttoolButton->show();
requestLabel->show();
if(mType == RS_FEED_ITEM_SEC_BAD_CERTIFICATE)
{
peerNameLabel->setText(tr("SSL request"));
friendRequesttoolButton->hide();
requestLabel->hide();
peerDetailsButton->hide();
}
else
{
peerNameLabel->setText(tr("An unknown peer"));
friendRequesttoolButton->show();
requestLabel->show();
peerDetailsButton->show();
}
return;
}

View File

@ -63,6 +63,7 @@
<file>icons/logo_2_connected_128.png</file>
<file>icons/outlook.png</file>
<file>icons/question.png</file>
<file>icons/ssl.png</file>
<file>icons/plugins_128.png</file>
<file>icons/png/add.png</file>
<file>icons/png/add-identity.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB