- Timestamp:
- Dec 6, 2005, 7:01:46 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gtk_gui/gui_exec.cc
r5936 r5938 274 274 printf("GROUP:::%s\n", groupName); 275 275 if((groupWidget = locateGroup(widget, groupName, 1))==NULL) 276 {277 278 279 280 }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 } 281 281 else 282 PRINT( 0)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);282 PRINT(4)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName); 283 283 284 284 const char* entryName; … … 286 286 while(entryName = iniParser.getCurrentName()) 287 287 { 288 printf("ENTRY:::%s = %s\n", entryName, iniParser.getCurrentValue());288 PRINTF(4)("ENTRY:::%s = %s\n", entryName, iniParser.getCurrentValue()); 289 289 varInfo.variableName = entryName; 290 290 varInfo.variableValue = iniParser.getCurrentValue(); … … 306 306 { 307 307 VarInfo* info =(VarInfo*)varInfo; 308 if (info == NULL || info->variableName == NULL) 309 return; 310 308 311 if(widget->title && !strcmp(widget->title, info->variableName)) 309 312 { 310 313 PRINT(5)("Located Option %s.\n", widget->title); 311 314 if(widget->optionType > GUI_NOTHING) 312 static_cast<Option*>(widget)->load(info->variableValue); 315 if (info->variableValue != NULL) 316 static_cast<Option*>(widget)->load(info->variableValue); 313 317 } 314 318 } … … 326 330 { 327 331 Widget* tmp; 332 if (widget == NULL || groupName == NULL) 333 return NULL; 328 334 329 335 if(widget->optionType < GUI_NOTHING) 330 336 { 331 if(static_cast<Packer*>(widget)->getGroupName() &&337 if(static_cast<Packer*>(widget)->getGroupName() != NULL && 332 338 !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName())) 333 { 334 return widget; 335 } 339 return widget; 336 340 else 337 341 { 338 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) 339 344 return tmp; 340 345 } -
trunk/src/lib/util/ini_parser.cc
r5936 r5938 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 26 #if HAVE_CONFIG_H 27 #include <config.h> 28 #endif 25 29 26 30 #ifdef DEBUG … … 86 90 * @brief sets the Name of the input-file 87 91 * @param fileName The new FileName to set to the IniParser 88 * I FfileName is NULL the new Name will be set to NULL too.92 * If fileName is NULL the new Name will be set to NULL too. 89 93 */ 90 94 void IniParser::setFileName(const char* fileName) … … 92 96 if (this->fileName) 93 97 delete []this->fileName; 94 if (fileName )98 if (fileName != NULL) 95 99 { 96 100 this->fileName = new char[strlen(fileName)+1]; … … 358 362 { 359 363 (*section).entries.push_back(IniEntry()); 360 (*section).entries.back().name = new char[strlen 364 (*section).entries.back().name = new char[strlen(entryName)+1]; 361 365 strcpy((*section).entries.back().name, entryName); 362 366 (*section).entries.back().value = new char[strlen(value)+1]; … … 479 483 PRINTF(1)("no opened ini-file.\n"); 480 484 } 485 486
Note: See TracChangeset
for help on using the changeset viewer.