aboutsummaryrefslogtreecommitdiffstats
path: root/widget_gpo.c
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2007-01-20 06:37:35 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2007-01-20 06:37:35 +0000
commitceb6fc010ee9f4fadbcbf3e3cdc481ec505cdc32 (patch)
tree8b0d4a217ccc9c6a61b4a72cfedf487433fb01e0 /widget_gpo.c
parent883d1546b2cc19b1ae1b0041cb8131baea814336 (diff)
downloadlcd4linux-ceb6fc010ee9f4fadbcbf3e3cdc481ec505cdc32.tar.gz
dynamic properties for bars; new 'property_valid()' helper
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@749 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget_gpo.c')
-rw-r--r--widget_gpo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/widget_gpo.c b/widget_gpo.c
index 74b8f61..4b92571 100644
--- a/widget_gpo.c
+++ b/widget_gpo.c
@@ -89,9 +89,14 @@ int widget_gpo_init(WIDGET * Self)
memset(GPO, 0, sizeof(WIDGET_GPO));
/* load properties */
- property_load(section, "expression", "0", &GPO->expression);
+ property_load(section, "expression", NULL, &GPO->expression);
property_load(section, "update", "1000", &GPO->update);
+ /* sanity checks */
+ if (!property_valid(&GPO->expression)) {
+ error("Warning: widget %s has no expression", section);
+ }
+
free(section);
Self->data = GPO;