From 9d4bc677bbb1f25c386a84ca60258464646e1f11 Mon Sep 17 00:00:00 2001 From: defnax Date: Sat, 20 Feb 2021 16:14:27 +0100 Subject: [PATCH] Fixed to hide unwanted labels and buttons on a ssl request --- retroshare-gui/src/gui/feeds/SecurityItem.cpp | 23 +++++++++++++----- retroshare-gui/src/gui/icons.qrc | 1 + retroshare-gui/src/gui/icons/ssl.png | Bin 0 -> 3860 bytes 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 retroshare-gui/src/gui/icons/ssl.png diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.cpp b/retroshare-gui/src/gui/feeds/SecurityItem.cpp index b2bbc2cf3..68419ee94 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityItem.cpp @@ -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("A unknown peer")); + friendRequesttoolButton->show(); + requestLabel->show(); + peerDetailsButton->show(); + } return; } diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index c9a4f33c8..995157b69 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -63,6 +63,7 @@ icons/logo_2_connected_128.png icons/outlook.png icons/question.png + icons/ssl.png icons/plugins_128.png icons/png/add.png icons/png/add-identity.png diff --git a/retroshare-gui/src/gui/icons/ssl.png b/retroshare-gui/src/gui/icons/ssl.png new file mode 100644 index 0000000000000000000000000000000000000000..ca16866164407faa31b2465d6f8c718264a13727 GIT binary patch literal 3860 zcmbVP_cI(0u)jM;&LL{FAc$zuB|&m(E?Si2I6;Ubdhe%&L)0J_y+(+f8qo<6>#c z(@XRqYDDMx&b;>zywA*McRo9_GrRl4&TiB*9W@##I}`u_&}gW`5mz4bA0ZT1mY`tX zbLGGuDjNEbD+E9+Bd;{2tGbZ~06ARwY@SaHJ@s6yJ<;awRsb{_EoSHJ z;PKkr)k@68-6mrT#tr~n|DXX^*7wQ$ljWbtG@6BJdWkeWPyZ-D*7?|%y7M*#$byMd z6>o+14Lc~O;A@$m$ZR#GwV7zG%<%XJeo@(lH)S*>78&)gWWvYjXvDkH7egbW%l2d~ zS}~DuIBQ~>IhVZj4ASe6mNhSJD<{9WzQMl!XVWMDt?k+M)6qsRmzjEUh5y5y2tjXP zba#C_lwo(bGg-0Rv!%;|C7(4h6L5kfMNzna#9Ao0l4;XK+bYCTgBMk3Z_ydgr*v6) z>GHlsZdNddT!=SYvpw%489^jzQ>m!6kAD^d2Lm47kIgkwq2)|4MtvT<;gfi}9>-Gh zgB%wG-Lcpg97WjNZVSNHg77gx89EpyFoL!QB7cO-T_f_Zcbs+a?lFJ3;Au8s8|tqi z0<1rGk|U%PHmXu?aNj8Wtw9grQl|NVdOLD|S{`>Nf}w$88(LQGgcVK;#qML|lzesE zP6U;pDoPR~k?hmX1;4VNDY~PbgQFwRU_*gXC2j>HVN!r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