Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9644 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 31, 2006, 11:09:20 AM (18 years ago)
Author:
bensch
Message:

display widgets correctly

Location:
branches/proxy/src/lib/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_stats_widget.cc

    r9642 r9644  
    4545{
    4646  this->init();
     47  if (peerInfo == NULL)
     48  {
     49    this->setName("INVALID");
     50    return;
     51  }
    4752  this->setName(peerInfo->getNodeTypeString() + "ID: " + MultiType(peerInfo->userId).getString());
    4853  this->setIP(peerInfo->ip);
     
    213218  this->pack(&this->_thisHost);
    214219
     220  this->pack(&this->_serverBox);
     221
    215222  this->pack(&this->_upstreamText);
    216223  this->pack(&this->_downstreamText);
    217224
    218 
    219   this->pack(&this->_serverBox);
    220 
    221 
    222   this->_refreshButton.setLabel("refresh");
    223   this->_refreshButton.released.connect(this, &NetworkStatsWidget::rebuild);
    224   this->pack(&this->_refreshButton);
    225225
    226226  this->rebuild();
     
    238238{
    239239  this->_proxies.push_back(new NodeWidget(node));
    240   this->pack(this->_proxies.back(), &this->_refreshButton);
     240  this->pack(this->_proxies.back());
    241241  this->_proxies.back()->show();
    242242}
     
    292292
    293293void NetworkStatsWidget::clearProxies()
    294 {
    295 }
     294{}
    296295
    297296
     
    304303  }
    305304
    306 
    307   std::list<NetworkNode*>::const_iterator it = this->_monitor->getNodeList().begin();
    308   for(; it != this->_monitor->getNodeList().end(); it++)
    309   {
     305  const NetworkNode* node = this->_monitor->getLocalNode();
     306  if (node == NULL)
     307  {
     308    printf("NO NODE\n");
     309    return;
     310  }
     311  std::list<NetworkNode*>::const_iterator it;
     312
     313  std::list<NetworkNode*> list = node->getMasterServers();
     314  for(it = list.begin(); it != list.end(); it++)
    310315    this->addNode(*it);
    311   }
    312 
    313 
     316
     317  list = node->getActiveProxyServers();
     318  for(it = list.begin(); it != list.end(); it++)
     319    this->addNode(*it);
     320
     321  list = node->getPassiveProxyServers();
     322  for(it = list.begin(); it != list.end(); it++)
     323    this->addNode(*it);
     324
     325  list = node->getClients();
     326  for(it = list.begin(); it != list.end(); it++)
     327    this->addNode(*it);
    314328
    315329}
  • branches/proxy/src/lib/network/monitor/network_stats_widget.h

    r9642 r9644  
    126126
    127127
    128     OrxGui::GLGuiPushButton _refreshButton;
    129 
    130128    static NetworkStatsWidget*    _statsWidget;
    131129
  • branches/proxy/src/lib/network/peer_info.cc

    r9642 r9644  
    6969const std::string PeerInfo::nodeNames[] =
    7070{
    71 
    7271  "master server",
    7372  "proxy server active",
Note: See TracChangeset for help on using the changeset viewer.