Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

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

    r9656 r9869  
    2020#include "peer_info.h"
    2121
     22#include "loading/resource_manager.h"
     23
    2224#include "multi_type.h"
    2325
    2426#include "shell_command.h"
    25 
    26 #include "loading/resource_manager.h"
    2727
    2828// this fcuk does not work!
     
    3030// ->setAlias("ProxyGui");
    3131
    32 
    3332HostWidget::HostWidget(const std::string& name, const IP& ip)
    3433    : GLGuiBox(OrxGui::Horizontal)
     
    5756{
    5857  if(_font == NULL)
    59     _font = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);
     58    _font = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20);
    6059
    6160  //this->_name.setFont(*_font);
     
    211210//======================================================//
    212211
     212
     213ObjectListDefinition(NetworkStatsWidget);
    213214/**
    214215 * @brief standard constructor
     
    273274NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL;
    274275
    275 #include "class_list.h"
    276 
    277276void NetworkStatsWidget::toggleGUI()
    278277{
    279   BaseObject* bo = NULL;
    280   const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR);
    281   if (ls != NULL && !ls->empty())
    282     bo = ls->front();
    283 
    284   if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL)
    285   {
    286     NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo));
     278  NetworkMonitor* monitor;
     279  if (!NetworkMonitor::objectList().empty())
     280    monitor = NetworkMonitor::objectList().front();
     281
     282  if (monitor != NULL && NetworkStatsWidget::_statsWidget == NULL)
     283  {
     284    NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(monitor);
    287285    NetworkStatsWidget::_statsWidget->showAll();
    288286  }
Note: See TracChangeset for help on using the changeset viewer.