mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 18:15:18 -04:00
Commit of the new UDP Connection methods and
the rewrite of the retroshare core networking stack. This check-in commits the changes to the GUI code. Changes to use the new rspeers.h interface to the retroshare core. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@316 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c7ce92aba2
commit
c4e1d73837
22 changed files with 651 additions and 486 deletions
|
@ -22,7 +22,9 @@
|
|||
|
||||
#include "rshare.h"
|
||||
#include "SharedFilesDialog.h"
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rspeers.h"
|
||||
#include "rsiface/RemoteDirModel.h"
|
||||
#include "util/RsAction.h"
|
||||
#include "msgs/ChanMsgDialog.h"
|
||||
|
@ -308,31 +310,30 @@ void SharedFilesDialog::shareddirtreeWidgetCostumPopupMenu( QPoint point )
|
|||
QMenu *recMenu = new QMenu( tr("Recommend To "), this );
|
||||
QMenu *msgMenu = new QMenu( tr("Message Friend "), &contextMnu2 );
|
||||
|
||||
std::list<std::string> peers;
|
||||
std::list<std::string>::iterator it;
|
||||
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
|
||||
std::map<RsCertId,NeighbourInfo>::const_iterator it;
|
||||
const std::map<RsCertId,NeighbourInfo> &friends =
|
||||
rsiface->getFriendMap();
|
||||
|
||||
for(it = friends.begin(); it != friends.end(); it++)
|
||||
if (!rsPeers)
|
||||
{
|
||||
/* not ready yet! */
|
||||
return;
|
||||
}
|
||||
|
||||
rsPeers->getFriendList(peers);
|
||||
|
||||
for(it = peers.begin(); it != peers.end(); it++)
|
||||
{
|
||||
std::string name = rsPeers->getPeerName(*it);
|
||||
/* parents are
|
||||
* recMenu
|
||||
* msgMenu
|
||||
*/
|
||||
std::string rsid;
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << it -> second.id;
|
||||
rsid = out.str();
|
||||
}
|
||||
|
||||
RsAction *qaf1 = new RsAction( QString::fromStdString( it->second.name ), recMenu, rsid );
|
||||
RsAction *qaf1 = new RsAction( QString::fromStdString( name ), recMenu, *it );
|
||||
connect( qaf1 , SIGNAL( triggeredId( std::string ) ), this, SLOT( recommendFilesTo( std::string ) ) );
|
||||
recMenu->addAction(qaf1);
|
||||
|
||||
RsAction *qaf2 = new RsAction( QString::fromStdString( it->second.name ), msgMenu, rsid );
|
||||
RsAction *qaf2 = new RsAction( QString::fromStdString( name ), msgMenu, *it );
|
||||
connect( qaf2 , SIGNAL( triggeredId( std::string ) ), this, SLOT( recommendFilesToMsg( std::string ) ) );
|
||||
msgMenu->addAction(qaf2);
|
||||
|
||||
|
@ -340,9 +341,6 @@ void SharedFilesDialog::shareddirtreeWidgetCostumPopupMenu( QPoint point )
|
|||
|
||||
}
|
||||
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
|
||||
|
||||
contextMnu2.addAction( openfileAct);
|
||||
contextMnu2.addMenu( recMenu);
|
||||
contextMnu2.addMenu( msgMenu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue