aboutsummaryrefslogtreecommitdiffstats
path: root/widget_text.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-13 09:53:10 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-13 09:53:10 +0000
commit523bb7ba13a5d88588a270cf8ce2f0c0ac882708 (patch)
tree6490997635549846cf304b2cfc4fc256f55d6ca7 /widget_text.c
parent517e84e9fd1b39fdef831c6fc5c6e774bf20a12a (diff)
downloadlcd4linux-523bb7ba13a5d88588a270cf8ce2f0c0ac882708.tar.gz
[lcd4linux @ 2006-08-13 09:53:10 by reinelt]
dynamic properties added (used by 'style' of text widget) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@690 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget_text.c')
-rw-r--r--widget_text.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/widget_text.c b/widget_text.c
index a9430bf..4fd77d6 100644
--- a/widget_text.c
+++ b/widget_text.c
@@ -1,4 +1,4 @@
-/* $Id: widget_text.c,v 1.24 2006/01/23 06:17:18 reinelt Exp $
+/* $Id: widget_text.c,v 1.25 2006/08/13 09:53:10 reinelt Exp $
*
* simple text widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_text.c,v $
+ * Revision 1.25 2006/08/13 09:53:10 reinelt
+ * dynamic properties added (used by 'style' of text widget)
+ *
* Revision 1.24 2006/01/23 06:17:18 reinelt
* timer widget added
*
@@ -147,10 +150,11 @@
#include "debug.h"
#include "cfg.h"
#include "evaluator.h"
+#include "property.h"
#include "timer.h"
#include "widget.h"
#include "widget_text.h"
-
+#
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
@@ -353,6 +357,9 @@ void widget_text_update(void *Self)
free(value);
}
+ /* text style */
+ property_eval(&T->style);
+
/* something has changed and should be updated */
if (update) {
/* if there's a marquee scroller active, it has its own */
@@ -425,6 +432,8 @@ int widget_text_init(WIDGET * Self)
}
free(c);
+ property_load(section, "style", "norm", &Text->style);
+
/* update interval (msec), default 1 sec, 0 stands for never */
cfg_number(section, "update", 1000, 0, -1, &(Text->update));
/* limit update interval to min 10 msec */
@@ -461,16 +470,17 @@ int widget_text_quit(WIDGET * Self)
Text = Self->data;
if (Self->data) {
DelTree(Text->pretree);
- DelTree(Text->posttree);
- DelTree(Text->tree);
if (Text->preval)
free(Text->preval);
+ DelTree(Text->posttree);
if (Text->postval)
free(Text->postval);
+ DelTree(Text->tree);
if (Text->value)
free(Text->value);
if (Text->buffer)
free(Text->buffer);
+ property_free(&Text->style);
free(Self->data);
Self->data = NULL;
}