aboutsummaryrefslogtreecommitdiffstats
path: root/widget_text.c
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-11-15 06:49:13 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-11-15 06:49:13 +0000
commit3f6579900c3f3c7175209d7411d4ae87deabc48b (patch)
treeac273e2b4f9f1ad94aae865207d75efdac9a54e0 /widget_text.c
parent11ebe1024fd877cc908523fef2d6240be010fadb (diff)
downloadlcd4linux-3f6579900c3f3c7175209d7411d4ae87deabc48b.tar.gz
event plugin and dbus interface by Ed Martin
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1053 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget_text.c')
-rw-r--r--widget_text.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/widget_text.c b/widget_text.c
index 1678812..f5699dc 100644
--- a/widget_text.c
+++ b/widget_text.c
@@ -45,9 +45,10 @@
#include "evaluator.h"
#include "property.h"
#include "timer.h"
+#include "event.h"
#include "widget.h"
#include "widget_text.h"
-#
+
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
@@ -346,6 +347,16 @@ int widget_text_init(WIDGET * Self)
if (Text->align == ALIGN_MARQUEE || Text->align == ALIGN_AUTOMATIC || Text->align == ALIGN_PINGPONG) {
cfg_number(section, "speed", 500, 10, -1, &(Text->speed));
}
+ //update on this event
+ char *event_name = cfg_get(section, "event", "");
+ if (*event_name != '\0') {
+ named_event_add(event_name, widget_text_update, Self);
+ if (Text->update == 1000) {
+ Text->update = 0;
+ }
+ }
+ free(event_name);
+
/* buffer */
Text->buffer = malloc(Text->width + 1);