aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--widget.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/widget.c b/widget.c
index 5f5f6a7..bc3fe31 100644
--- a/widget.c
+++ b/widget.c
@@ -180,6 +180,19 @@ int widget_add(const char *name, const int type, const int layer, const int row,
/* check if widget type matches */
if (Class->type != type) {
error("widget '%s': class '%s' not applicable", name, class);
+ switch (Class->type) {
+ case WIDGET_TYPE_RC:
+ error(" Widgetclass %s is placed by Row/Column", class);
+ break;
+ case WIDGET_TYPE_XY:
+ error(" Widgetclass %s is placed by X/Y", class);
+ break;
+ case WIDGET_TYPE_GPO:
+ case WIDGET_TYPE_TIMER:
+ case WIDGET_TYPE_KEYPAD:
+ default:
+ error(" Widgetclass %s has unknown type %d", class, Class->type);
+ }
free(class);
return -1;
}
@@ -200,7 +213,7 @@ int widget_add(const char *name, const int type, const int layer, const int row,
/* another sanity check */
if (nWidgets >= MAX_WIDGETS) {
- error("internal error: widget buffer full! Tried to allocate %d widgets (max: %s)", nWidgets, MAX_WIDGETS);
+ error("internal error: widget buffer full! Tried to allocate %d widgets (max: %d)", nWidgets, MAX_WIDGETS);
return -1;
}
@@ -227,8 +240,10 @@ int widget_add(const char *name, const int type, const int layer, const int row,
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);
+ info(" widget '%s': Class '%s', Parent '%s', Layer %d, %s %d, %s %d",
+ name, (NULL == Class) ? "<none>" : Class->name,
+ (NULL == Parent) ? "<root>" : Parent->name,
+ layer, (WIDGET_TYPE_XY == Class->type) ? "Y" : "Row", row, (WIDGET_TYPE_XY == Class->type) ? "X" : "Col", col);
if (Class->init != NULL) {
Class->init(Widget);
t/TODO?id=ae91355deae7f98b5786c78bee9805d1348a64a1&follow=1'>[lcd4linux @ 2001-03-09 14:30:01 by reinelt]reinelt1-0/+7 2001-03-09[lcd4linux @ 2001-03-09 14:24:49 by ltoetsch]ltoetsch3-7/+18 2001-03-09[lcd4linux @ 2001-03-09 13:08:11 by ltoetsch]ltoetsch12-86/+384 2001-03-09[lcd4linux @ 2001-03-09 12:14:24 by reinelt]reinelt4-21/+34 2001-03-08[lcd4linux @ 2001-03-08 15:25:38 by ltoetsch]ltoetsch9-93/+214 2001-03-08[lcd4linux @ 2001-03-08 09:02:04 by reinelt]reinelt4-133/+21 2001-03-08[lcd4linux @ 2001-03-08 08:39:54 by reinelt]reinelt2-4/+12 2001-03-07[lcd4linux @ 2001-03-07 18:10:21 by ltoetsch]ltoetsch10-110/+319 2001-03-05[lcd4linux @ 2001-03-05 18:20:21 by reinelt]reinelt2-13/+25 2001-03-04[lcd4linux @ 2001-03-04 15:01:12 by ltoetsch]ltoetsch1-3/+3 2001-03-02[lcd4linux @ 2001-03-02 20:18:12 by reinelt]reinelt3-36/+89