mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 14:30:43 -04:00
The connection attempt to all ssl id's of one gpg id can be started from the context menu in PeersDialog and MessengerWindow.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3401 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a0e426a527
commit
66f3c7fee8
4 changed files with 56 additions and 34 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <QColorDialog>
|
||||
#include <QFontDialog>
|
||||
#include <QDropEvent>
|
||||
#include <QFileDialog>
|
||||
#include "common/vmessagebox.h"
|
||||
#include <gui/mainpagestack.h>
|
||||
|
||||
|
@ -421,10 +422,8 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
|||
//contextMnu.addAction( profileviewAct);
|
||||
if (c->type() == 0) {
|
||||
contextMnu.addAction( recommendfriendAct);
|
||||
} else {
|
||||
//this is a SSL key
|
||||
contextMnu.addAction( connectfriendAct);
|
||||
}
|
||||
contextMnu.addAction( connectfriendAct);
|
||||
contextMnu.addAction(pastePersonAct);
|
||||
contextMnu.addAction( removefriendAct);
|
||||
//contextMnu.addAction( exportfriendAct);
|
||||
|
@ -928,23 +927,35 @@ void PeersDialog::removefriend()
|
|||
|
||||
void PeersDialog::connectfriend()
|
||||
{
|
||||
QTreeWidgetItem *c = getCurrentPeer();
|
||||
QTreeWidgetItem *c = getCurrentPeer();
|
||||
#ifdef PEERS_DEBUG
|
||||
std::cerr << "PeersDialog::connectfriend()" << std::endl;
|
||||
std::cerr << "PeersDialog::connectfriend()" << std::endl;
|
||||
#endif
|
||||
if (!c)
|
||||
{
|
||||
if (!c)
|
||||
{
|
||||
#ifdef PEERS_DEBUG
|
||||
std::cerr << "PeersDialog::connectfriend() Noone Selected -- sorry" << std::endl;
|
||||
std::cerr << "PeersDialog::connectfriend() Noone Selected -- sorry" << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (rsPeers)
|
||||
{
|
||||
rsPeers->connectAttempt(getPeerRsCertId(c));
|
||||
c -> setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||
}
|
||||
if (rsPeers)
|
||||
{
|
||||
if (c->type() == 0) {
|
||||
int childCount = c->childCount();
|
||||
for (int childIndex = 0; childIndex < childCount; childIndex++) {
|
||||
QTreeWidgetItem *item = c->child(childIndex);
|
||||
if (item->type() == 1) {
|
||||
rsPeers->connectAttempt(getPeerRsCertId(item));
|
||||
item->setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//this is a SSL key
|
||||
rsPeers->connectAttempt(getPeerRsCertId(c));
|
||||
c->setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* GUI stuff -> don't do anything directly with Control */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue