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:
csoler 2014-04-06 20:27:50 +00:00
parent 6d5d3da0fa
commit fa2c4d5001
2 changed files with 25 additions and 2 deletions

View File

@ -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));

View File

@ -22,7 +22,12 @@ PeerNode::PeerNode(const RsPeerId& id,const std::list<RsPeerId>& friends)
ctrl->updateServicePermissions(RS_SERVICE_TYPE_TURTLE,perms) ;
// Turtle business
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) ;
_turtle_client = new MonitoredTurtleClient ;
@ -73,7 +78,8 @@ void PeerNode::sendToGRKey(const GRouterKeyId& key_id)
}
void PeerNode::provideGRKey(const GRouterKeyId& key_id)
{
_grouter_client->provideKey(key_id) ;
_grouter_client->provideKey(key_id) ;
_provided_keys.insert(key_id);
}
void PeerNode::getTrafficInfo(NodeTrafficInfo& info)
{