Enlightenment CVS committal
Author : moom16
Project : e17
Module : apps/eclair
Dir : e17/apps/eclair/data/themes/default/scripts
Modified Files:
body_script.edc
Log Message:
* Fix the transition between two covers
* Handle HTTP response code
* Fix some bugs
===================================================================
RCS file:
/cvsroot/enlightenment/e17/apps/eclair/data/themes/default/scripts/body_script.edc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- body_script.edc 2 May 2005 16:06:50 -0000 1.1
+++ body_script.edc 3 May 2005 08:57:36 -0000 1.2
@@ -4,6 +4,7 @@
public cover_alpha = 0;
public previous_cover_alpha = 0;
public cover_timer = 0;
+public cover_is_set = 0;
public cover_set() {
new ca;
@@ -15,22 +16,30 @@
}
public cover_unset() {
+ new ca;
+
+ ca = get_int(cover_alpha);
+ set_int(previous_cover_alpha, ca);
+
cover_change_cb(0);
}
public cover_change_cb(set) {
new ca, pca, id;
- if ((id = get_int(cover_timer)))
+ if ((id = get_int(cover_timer)) && (set != get_int(cover_is_set)))
{
cancel_timer(id);
set_int(cover_timer, 0);
+ set_int(cover_is_set, set);
}
ca = get_int(cover_alpha);
pca = get_int(previous_cover_alpha);
- if (set == 1)
+ if (set == 0)
+ ca = 0;
+ else
{
if (ca < 255)
{
@@ -39,15 +48,6 @@
ca = 255;
}
}
- else
- {
- if (ca > 0)
- {
- ca -= COVER_ALPHA_SPEED;
- if (ca < 0)
- ca = 0;
- }
- }
if (pca > 0)
{
@@ -56,15 +56,19 @@
pca = 0;
}
- if (set == 1)
+ if (set == 0)
{
- if (ca != 255 || pca != 0)
- timer(0.05, "cover_change_cb", set);
+ if (pca != 0)
+ set_int(cover_timer, timer(0.05, "cover_change_cb", set));
+ else
+ set_int(cover_timer, 0);
}
else
{
- if (ca != 0 || pca != 0)
- timer(0.05, "cover_change_cb", set);
+ if (ca != 255 || pca != 0)
+ set_int(cover_timer, timer(0.05, "cover_change_cb", set));
+ else
+ set_int(cover_timer, 0);
}
set_int(cover_alpha, ca);
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs