mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 14:12: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
|
@ -22,6 +22,8 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QWidgetAction>
|
#include <QWidgetAction>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QFileDialog>
|
||||||
#include "common/vmessagebox.h"
|
#include "common/vmessagebox.h"
|
||||||
|
|
||||||
#include <retroshare/rsiface.h>
|
#include <retroshare/rsiface.h>
|
||||||
|
@ -52,6 +54,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
#define IMAGE_REMOVEFRIEND ":/images/removefriend16.png"
|
#define IMAGE_REMOVEFRIEND ":/images/removefriend16.png"
|
||||||
|
@ -378,10 +381,8 @@ void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
//contextMnu.addAction( profileviewAct);
|
//contextMnu.addAction( profileviewAct);
|
||||||
if (c->type() == 0) {
|
if (c->type() == 0) {
|
||||||
contextMnu.addAction( recommendfriendAct);
|
contextMnu.addAction( recommendfriendAct);
|
||||||
} else {
|
|
||||||
//this is a SSL key
|
|
||||||
contextMnu.addAction( connectfriendAct);
|
|
||||||
}
|
}
|
||||||
|
contextMnu.addAction( connectfriendAct);
|
||||||
contextMnu.addAction(pastePersonAct);
|
contextMnu.addAction(pastePersonAct);
|
||||||
contextMnu.addAction( removefriendAct);
|
contextMnu.addAction( removefriendAct);
|
||||||
//contextMnu.addAction( exportfriendAct);
|
//contextMnu.addAction( exportfriendAct);
|
||||||
|
@ -688,7 +689,6 @@ void MessengerWindow::insertPeers()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -880,8 +880,20 @@ void MessengerWindow::connectfriend()
|
||||||
|
|
||||||
if (rsPeers)
|
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(getPeersRsCertId(item));
|
||||||
|
item->setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//this is a SSL key
|
||||||
rsPeers->connectAttempt(getPeersRsCertId(c));
|
rsPeers->connectAttempt(getPeersRsCertId(c));
|
||||||
c -> setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
c->setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QFontDialog>
|
#include <QFontDialog>
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
|
#include <QFileDialog>
|
||||||
#include "common/vmessagebox.h"
|
#include "common/vmessagebox.h"
|
||||||
#include <gui/mainpagestack.h>
|
#include <gui/mainpagestack.h>
|
||||||
|
|
||||||
|
@ -421,10 +422,8 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
//contextMnu.addAction( profileviewAct);
|
//contextMnu.addAction( profileviewAct);
|
||||||
if (c->type() == 0) {
|
if (c->type() == 0) {
|
||||||
contextMnu.addAction( recommendfriendAct);
|
contextMnu.addAction( recommendfriendAct);
|
||||||
} else {
|
|
||||||
//this is a SSL key
|
|
||||||
contextMnu.addAction( connectfriendAct);
|
|
||||||
}
|
}
|
||||||
|
contextMnu.addAction( connectfriendAct);
|
||||||
contextMnu.addAction(pastePersonAct);
|
contextMnu.addAction(pastePersonAct);
|
||||||
contextMnu.addAction( removefriendAct);
|
contextMnu.addAction( removefriendAct);
|
||||||
//contextMnu.addAction( exportfriendAct);
|
//contextMnu.addAction( exportfriendAct);
|
||||||
|
@ -942,8 +941,20 @@ void PeersDialog::connectfriend()
|
||||||
|
|
||||||
if (rsPeers)
|
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));
|
rsPeers->connectAttempt(getPeerRsCertId(c));
|
||||||
c -> setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
c->setIcon(COLUMN_NAME,(QIcon(IMAGE_CONNECT2)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
#ifndef _PEERSDIALOG_H
|
#ifndef _PEERSDIALOG_H
|
||||||
#define _PEERSDIALOG_H
|
#define _PEERSDIALOG_H
|
||||||
|
|
||||||
#include <QFileDialog>
|
|
||||||
|
|
||||||
#include "chat/PopupChatDialog.h"
|
|
||||||
#include "chat/HandleRichText.h"
|
#include "chat/HandleRichText.h"
|
||||||
#include "RsAutoUpdatePage.h"
|
#include "RsAutoUpdatePage.h"
|
||||||
|
|
||||||
|
@ -49,6 +46,7 @@ class QAction;
|
||||||
class QTextEdit;
|
class QTextEdit;
|
||||||
class QTextCharFormat;
|
class QTextCharFormat;
|
||||||
class ChatDialog;
|
class ChatDialog;
|
||||||
|
class AttachFileItem;
|
||||||
|
|
||||||
class PeersDialog : public RsAutoUpdatePage
|
class PeersDialog : public RsAutoUpdatePage
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "gui/TransfersDialog.h"
|
#include "gui/TransfersDialog.h"
|
||||||
#include "gui/MessagesDialog.h"
|
#include "gui/MessagesDialog.h"
|
||||||
#include "gui/SharedFilesDialog.h"
|
#include "gui/SharedFilesDialog.h"
|
||||||
|
#include "gui/chat/PopupChatDialog.h"
|
||||||
#include "gui/MessengerWindow.h"
|
#include "gui/MessengerWindow.h"
|
||||||
#include "gui/NetworkDialog.h"
|
#include "gui/NetworkDialog.h"
|
||||||
#include "gui/StartDialog.h"
|
#include "gui/StartDialog.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue