mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-21 20:38:50 -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
2 changed files with 25 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue