/* another sanity check */
if (nWidgets >= MAX_WIDGETS) {
- error("internal error: widget buffer full!");
+ error("internal error: widget buffer full! Tried to allocate %d widgets (max: %s)", nWidgets, MAX_WIDGETS);
return -1;
}
Widget->row = row;
Widget->col = col;
+ info(" widget '%s': Class '%s', Parent '%s', Layer %d, Row %d, Col %d",
+ name, (NULL == Class) ? "<none>" : Class->name, (NULL == Parent) ? "<root>" : Parent->name, layer, row, col);
+
if (Class->init != NULL) {
Class->init(Widget);
}
Bar->direction = DIR_SOUTH;
break;
default:
- error("widget %s has unknown direction '%s', using 'East'", Self->name, c);
+ error("widget %s has unknown direction '%s'; known directions: 'E', 'W', 'N', 'S'; using 'E(ast)'", Self->name,
+ c);
Bar->direction = DIR_EAST;
}
free(c);
case 'H':
Bar->style = STYLE_HOLLOW;
if (!(Bar->direction & (DIR_EAST | DIR_WEST))) {
- error("widget %s with style \"hollow\" not implemented", Self->name);
+ error("widget %s with style \"hollow\" not implemented for other directions than E(ast) or W(est)",
+ Self->name);
Bar->style = 0;
}
break;
+ case '0':
+ Bar->style = 0;
+ break;
default:
+ error("widget %s has unknown style '%s'; known styles: '0' or 'H'; using '0'", Self->name, c);
Bar->style = 0;
}
free(c);