diff options
author | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2008-12-31 06:39:23 +0000 |
---|---|---|
committer | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2008-12-31 06:39:23 +0000 |
commit | 21b31322fcad0761a4db4f105f94951d11873f05 (patch) | |
tree | 3e811d203e37847b8b823ddd64d12c90e27d27ba /widget_bar.c | |
parent | 10ec19da9f09bf767603b86dd44a282b4ddc78f9 (diff) | |
download | lcd4linux-21b31322fcad0761a4db4f105f94951d11873f05.tar.gz |
ported r846 from volker_dev
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@928 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget_bar.c')
-rw-r--r-- | widget_bar.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/widget_bar.c b/widget_bar.c index 372e3bf..1b69e04 100644 --- a/widget_bar.c +++ b/widget_bar.c @@ -71,26 +71,38 @@ void widget_bar_update(void *Self) /* minimum: if expression is empty, do auto-scaling */ if (property_valid(&Bar->expr_min)) { - property_eval(&Bar->expr_min); + if (0 != property_eval(&Bar->expr_min)) { + info("widget bar %s: Property min changed to %G", W->name, P2N(&Bar->expr_min)); + } min = P2N(&Bar->expr_min); } else { min = Bar->min; - if (val1 < min) + if (val1 < min) { min = val1; - if (val2 < min) + info("widget bar %s: new min value %G", W->name, min); + } + if (val2 < min) { min = val2; + info("widget bar %s: new min value %G", W->name, min); + } } /* maximum: if expression is empty, do auto-scaling */ if (property_valid(&Bar->expr_max)) { - property_eval(&Bar->expr_max); + if (0 != property_eval(&Bar->expr_max)) { + info("widget bar %s: Property max changed to %G", W->name, P2N(&Bar->expr_max)); + } max = P2N(&Bar->expr_max); } else { max = Bar->max; - if (val1 > max) + if (val1 > max) { max = val1; - if (val2 > max) + info("widget bar %s: new max value %G", W->name, max); + } + if (val2 > max) { max = val2; + info("widget bar %s: new max value %G", W->name, max); + } } /* calculate bar values */ |