aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-01-22 10:01:09 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-01-22 10:01:09 +0000
commit2b191ce8986564f905535c23fcd70f85309d3917 (patch)
tree6d3e06eb8eeaab059e2a6be467ed48d86aefe8ac
parenta9f682bb4ad259361441706eecbc86b5d5c4a936 (diff)
downloadlcd4linux-2b191ce8986564f905535c23fcd70f85309d3917.tar.gz
[lcd4linux @ 2006-01-22 10:01:09 by reinelt]
allow 'static' icons with speed=0 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@622 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r--widget_icon.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/widget_icon.c b/widget_icon.c
index bb21918..4f12aac 100644
--- a/widget_icon.c
+++ b/widget_icon.c
@@ -1,4 +1,4 @@
-/* $Id: widget_icon.c,v 1.20 2005/12/18 16:18:36 reinelt Exp $
+/* $Id: widget_icon.c,v 1.21 2006/01/22 10:01:09 reinelt Exp $
*
* icon widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_icon.c,v $
+ * Revision 1.21 2006/01/22 10:01:09 reinelt
+ * allow 'static' icons with speed=0
+ *
* Revision 1.20 2005/12/18 16:18:36 reinelt
* GPO's added again
*
@@ -187,7 +190,9 @@ void widget_icon_update(void *Self)
if (Icon->speed_tree != NULL) {
Eval(Icon->speed_tree, &result);
Icon->speed = R2N(&result);
- if (Icon->speed < 10)
+ if (Icon->speed <= 0)
+ Icon->speed = 0;
+ else if (Icon->speed < 10)
Icon->speed = 10;
DelResult(&result);
}
@@ -196,24 +201,25 @@ void widget_icon_update(void *Self)
if (Icon->visible_tree != NULL) {
Eval(Icon->visible_tree, &result);
Icon->visible = R2N(&result);
- if (Icon->visible < 1)
+ if (Icon->visible < 0)
Icon->visible = 0;
DelResult(&result);
}
-
+
/* rotate icon bitmap */
Icon->curmap++;
if (Icon->curmap >= Icon->maxmap)
Icon->curmap = 0;
}
-
+
/* finally, draw it! */
if (W->class->draw)
W->class->draw(W);
-
+
/* add a new one-shot timer */
- timer_add(widget_icon_update, Self, Icon->speed, 1);
-
+ if (Icon->speed > 0) {
+ timer_add(widget_icon_update, Self, Icon->speed, 1);
+ }
}
&follow=1'>[lcd4linux @ 2004-01-13 10:03:01 by reinelt]reinelt8-23/+458 new util 'hash' for associative arrays new plugin 'cpuinfo' 2004-01-13[lcd4linux @ 2004-01-13 08:18:07 by reinelt]reinelt12-154/+469 timer queues added liblcd4linux deactivated turing transformation to new layout 2004-01-12[lcd4linux @ 2004-01-12 03:51:01 by reinelt]reinelt5-15/+44 evaluating the 'Variables' section in the config file 2004-01-11[lcd4linux @ 2004-01-11 18:26:02 by reinelt]reinelt10-79/+158 further widget and layout processing 2004-01-11[lcd4linux @ 2004-01-11 09:26:15 by reinelt]reinelt4-19/+67 layout starts to exist... 2004-01-10[lcd4linux @ 2004-01-10 20:22:33 by reinelt]reinelt13-210/+554 added new function 'cfg_list()' (not finished yet) added layout.c (will replace processor.c someday) added widget_text.c (will be the first and most important widget) modified lcd4linux.c so that old-style configs should work, too 2004-01-10[lcd4linux @ 2004-01-10 17:45:26 by reinelt]reinelt2-5/+15 changed initialization order so cfg() gets initialized before plugins. This way a plugin's init() can use cfg_get(). Thanks to Xavier for reporting this one! 2004-01-10[lcd4linux @ 2004-01-10 17:36:56 by reinelt]reinelt4-10/+207 I2C Sensors plugin from Xavier added 2004-01-10[lcd4linux @ 2004-01-10 17:34:40 by reinelt]reinelt3-176/+138 further matrixOrbital changes widgets initialized 2004-01-10[lcd4linux @ 2004-01-10 10:20:22 by reinelt]reinelt2-14/+605 new MatrixOrbital changes 2004-01-09[lcd4linux @ 2004-01-09 17:03:06 by reinelt]reinelt10-51/+420 initiated transfer to new driver architecture new file 'drv.c' will someday replace 'display.c' new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' due to this 'soft' transfer lcd4linux should stay usable during the switch (at least I hope so) 2004-01-09[lcd4linux @ 2004-01-09 04:16:06 by reinelt]reinelt28-193/+332 added 'section' argument to cfg_get(), but NULLed it on all calls by now. 2004-01-08[lcd4linux @ 2004-01-08 06:00:28 by reinelt]reinelt1-8/+14 allowed '.' in key names allowed empty group keys (not only "group anything {", but "anything {") 2004-01-08[lcd4linux @ 2004-01-08 05:28:12 by reinelt]reinelt3-42/+198 Luk Claes added to AUTHORS cfg: group handling ('{}') added 2004-01-07[lcd4linux @ 2004-01-07 10:15:41 by reinelt]reinelt4-184/+436 small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster 2004-01-06[lcd4linux @ 2004-01-06 23:01:37 by reinelt]reinelt3-4/+7 more copyright issues 2004-01-06[lcd4linux @ 2004-01-06 22:33:13 by reinelt]reinelt14-472/+542 Copyright statements cleaned up 2004-01-06[lcd4linux @ 2004-01-06 21:14:51 by reinelt]reinelt4-14/+7 more debianizing 2004-01-06[lcd4linux @ 2004-01-06 18:22:41 by reinelt]reinelt1-3/+13 debian updates 2004-01-06[lcd4linux @ 2004-01-06 17:56:43 by reinelt]reinelt3-1000/+2045 autotools update 2004-01-06[lcd4linux @ 2004-01-06 17:37:00 by reinelt]reinelt1-0/+20 2004-01-06[lcd4linux @ 2004-01-06 17:33:45 by reinelt]reinelt6-28/+298 Evaluator: functions with variable argument lists Evaluator: plugin_sample.c and README.Plugins added 2004-01-06[lcd4linux @ 2004-01-06 15:19:12 by reinelt]reinelt2-104/+136 Evaluator rearrangements... 2004-01-05[lcd4linux @ 2004-01-05 11:57:38 by reinelt]reinelt7-8/+168 added %y tokens to make the Evaluator useable 2004-01-02[lcd4linux @ 2004-01-02 14:20:15 by reinelt]reinelt10-0/+201 debianization added 2004-01-02[lcd4linux @ 2004-01-02 14:18:54 by reinelt]reinelt2-0/+101 Changelog, TODO updated 2003-12-19[lcd4linux @ 2003-12-19 06:27:33 by reinelt]reinelt4-8/+119 added XMMS plugin from Markus Keil