Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2005, 4:16:51 PM (18 years ago)
Author:
patrick
Message:

network: merged the trunk into the network with the command svn merge -r5824:HEAD ../trunk network, changes changed… bla bla..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/gui/gtk_gui/gui_exec.cc

    r5241 r5968  
    2727
    2828#include "resource_manager.h"
    29 #include "ini_parser.h"
     29#include "parser/ini_parser/ini_parser.h"
    3030
    3131#include <string.h>
     
    254254
    255255/**
    256  * Reads in Configuration Data.
     256 * @brief Reads in Configuration Data.
    257257 * @param widget from which Widget on should be saved.
    258258*/
     
    265265    return;
    266266
    267   iniParser.getFirstSection();
     267  iniParser.firstSection();
    268268  Widget* groupWidget = widget;
    269269  const char* groupName;
     
    272272  while (groupName = iniParser.getCurrentSection())
    273273  {
     274    printf("GROUP:::%s\n", groupName);
    274275    if((groupWidget = locateGroup(widget, groupName, 1))==NULL)
    275     {
    276       PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", groupName);
    277       groupWidget = widget;
    278       continue;
    279     }
     276      {
     277        PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", groupName);
     278        groupWidget = widget;
     279        continue;
     280      }
    280281    else
    281       PRINT(0)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
    282 
    283     iniParser.getFirstVar();
    284     while(iniParser.getCurrentName())
    285     {
    286       varInfo.variableName = iniParser.getCurrentName();
     282      PRINT(4)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
     283
     284    const char* entryName;
     285    iniParser.firstVar();
     286    while(entryName = iniParser.getCurrentName())
     287    {
     288      PRINTF(4)("ENTRY:::%s = %s\n", entryName, iniParser.getCurrentValue());
     289      varInfo.variableName = entryName;
    287290      varInfo.variableValue = iniParser.getCurrentValue();
    288291      groupWidget->walkThrough(this->readFileText, &varInfo, 0);
     
    303306{
    304307  VarInfo* info =(VarInfo*)varInfo;
     308  if (info == NULL || info->variableName == NULL)
     309    return;
     310
    305311  if(widget->title && !strcmp(widget->title, info->variableName))
    306312    {
    307313      PRINT(5)("Located Option %s.\n", widget->title);
    308314      if(widget->optionType > GUI_NOTHING)
    309         static_cast<Option*>(widget)->load(info->variableValue);
     315        if (info->variableValue != NULL)
     316          static_cast<Option*>(widget)->load(info->variableValue);
    310317    }
    311318}
     
    323330{
    324331  Widget* tmp;
     332  if (widget  == NULL || groupName == NULL)
     333    return NULL;
    325334
    326335  if(widget->optionType < GUI_NOTHING)
    327336    {
    328       if(static_cast<Packer*>(widget)->getGroupName() &&
     337      if(static_cast<Packer*>(widget)->getGroupName() != NULL &&
    329338         !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
    330         {
    331           return widget;
    332         }
     339        return widget;
    333340      else
    334341        {
    335           if((tmp = locateGroup(static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL)
     342          if((tmp = locateGroup(static_cast<Packer*>(widget)->down,
     343                                groupName, depth+1)) != NULL)
    336344            return tmp;
    337345        }
Note: See TracChangeset for help on using the changeset viewer.