]> git.webhop.me Git - lcd4linux.git/commitdiff
r828: 'additional verbose and info messages' ported from volker_dev
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 31 Dec 2008 06:24:00 +0000 (06:24 +0000)
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 31 Dec 2008 06:24:00 +0000 (06:24 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@922 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

widget.c
widget_bar.c

index eb37843d303887bd51f4f316ba8ce670a28eb657..5f5f6a7bb476b0f3ee39ea45626c057f6895f403 100644 (file)
--- a/widget.c
+++ b/widget.c
@@ -200,7 +200,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!");
+       error("internal error: widget buffer full! Tried to allocate %d widgets (max: %s)", nWidgets, MAX_WIDGETS);
        return -1;
     }
 
@@ -227,6 +227,9 @@ 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);
+
     if (Class->init != NULL) {
        Class->init(Widget);
     }
index 5000e6ca2f06b80f4054cdc20d8701ce5989288c..372e3bfa401ee7bd0eb8fc167c18ba681a3c64a3 100644 (file)
@@ -156,7 +156,8 @@ int widget_bar_init(WIDGET * Self)
        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);
@@ -167,11 +168,16 @@ int widget_bar_init(WIDGET * Self)
     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);