aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
+ }
}
Crohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9