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

View file

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

View file

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

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB