mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
additional fix to GUI in NS
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7252 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6d5d3da0fa
commit
fa2c4d5001
@ -564,6 +564,23 @@ void NetworkViewer::contextMenu(QPoint p)
|
||||
|
||||
contextMnu.addAction(action_ProvideGRKey);
|
||||
|
||||
std::set<GRouterKeyId> provided_keys ;
|
||||
|
||||
for(uint32_t i=0;i<_network.n_nodes();++i)
|
||||
if(i != _current_acted_node)
|
||||
provided_keys.insert( _network.node(i).providedGRKeys().begin(), _network.node(i).providedGRKeys().end()) ;
|
||||
|
||||
if(!provided_keys.empty())
|
||||
{
|
||||
QMenu *Mnu2 = contextMnu.addMenu("Send message to Key") ;
|
||||
|
||||
for(std::set<GRouterKeyId>::const_iterator it(provided_keys.begin());it!=provided_keys.end();++it)
|
||||
{
|
||||
QAction* send_message_action = new QAction(QString::fromStdString((*it).toStdString()), Mnu2);
|
||||
connect(send_message_action, SIGNAL(triggered()), this, SLOT(actionSendToGRKey()));
|
||||
Mnu2->addAction(send_message_action);
|
||||
}
|
||||
}
|
||||
// Execute!
|
||||
|
||||
contextMnu.exec(mapToGlobal(p));
|
||||
|
@ -22,6 +22,11 @@ PeerNode::PeerNode(const RsPeerId& id,const std::list<RsPeerId>& friends)
|
||||
|
||||
ctrl->updateServicePermissions(RS_SERVICE_TYPE_TURTLE,perms) ;
|
||||
|
||||
perms.mDefaultAllowed = true ;
|
||||
perms.mServiceId = RS_SERVICE_TYPE_GROUTER ;
|
||||
|
||||
ctrl->updateServicePermissions(RS_SERVICE_TYPE_GROUTER,perms) ;
|
||||
|
||||
// Turtle business
|
||||
|
||||
_service_server->addService(_turtle = new p3turtle(ctrl,link_mgr),true) ;
|
||||
@ -74,6 +79,7 @@ void PeerNode::sendToGRKey(const GRouterKeyId& key_id)
|
||||
void PeerNode::provideGRKey(const GRouterKeyId& key_id)
|
||||
{
|
||||
_grouter_client->provideKey(key_id) ;
|
||||
_provided_keys.insert(key_id);
|
||||
}
|
||||
void PeerNode::getTrafficInfo(NodeTrafficInfo& info)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user