From fe0b22e9f12a526207ed526e2189d5184eb6802c Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 15 Jan 2018 21:42:58 +0100 Subject: [PATCH] remove "attempt to connect" to normal nodes menu entry for hidden nodes --- retroshare-gui/src/gui/common/FriendList.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/common/FriendList.cpp b/retroshare-gui/src/gui/common/FriendList.cpp index c251a9575..726bf61ea 100644 --- a/retroshare-gui/src/gui/common/FriendList.cpp +++ b/retroshare-gui/src/gui/common/FriendList.cpp @@ -342,7 +342,8 @@ void FriendList::peerTreeWidgetCustomPopupMenu() // QMenu *lobbyMenu = NULL; - switch (type) { + switch (type) + { case TYPE_GROUP: { bool standard = c->data(COLUMN_DATA, ROLE_STANDARD).toBool(); @@ -448,11 +449,11 @@ void FriendList::peerTreeWidgetCustomPopupMenu() contextMenu->addAction(QIcon(IMAGE_EXPORTFRIEND), tr("Recommend this node to..."), this, SLOT(recommendfriend())); } - contextMenu->addAction(QIcon(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectfriend())); + if(!rsPeers->isHiddenNode(rsPeers->getOwnId()) || rsPeers->isHiddenNode( RsPeerId(getRsId(c)) )) + contextMenu->addAction(QIcon(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectfriend())); contextMenu->addAction(QIcon(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate())); - //this is a SSL key contextMenu->addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removefriend()));