kwo pushed a commit to branch master.

commit be52365c1c3554bd337dd9aad9aa4adef893139e
Author: Kim Woelders <[email protected]>
Date:   Sun Jul 14 20:03:30 2013 +0200

    E-Power: Timer tweaks.
    
    Change all timeouts to 10 s.
---
 epplets/E-Power.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/epplets/E-Power.c b/epplets/E-Power.c
index b59378f..43b8d0f 100644
--- a/epplets/E-Power.c
+++ b/epplets/E-Power.c
@@ -10,8 +10,6 @@
 
 static Epplet_gadget b_close, b_suspend, b_sleep, b_help, image, label;
 
-static void         cb_timer(void *data);
-
 static void
 cb_timer_apm(void)
 {
@@ -106,7 +104,6 @@ cb_timer_apm(void)
 
        sprintf(s, "E-Power-Bat-%i.png", ((bat_val + 5) / 10) * 10);
        Epplet_change_image(image, 44, 24, s);
-       Epplet_timer(cb_timer, NULL, 30.0, "TIMER");
 
        prev_bat_val = bat_val;
      }
@@ -280,7 +277,6 @@ cb_timer_acpi(void)
    Epplet_change_label(label, current_status);
    sprintf(current_status, "E-Power-Bat-%i.png", ((bat_val + 5) / 10) * 10);
    Epplet_change_image(image, 44, 24, current_status);
-   Epplet_timer(cb_timer, NULL, 5.0, "TIMER");
 
    /* Final steps before ending the status update. */
    if (lsize)
@@ -454,7 +450,6 @@ cb_timer_sys(void)
    Epplet_change_label(label, current_status);
    sprintf(current_status, "E-Power-Bat-%i.png", ((bat_val + 5) / 10) * 10);
    Epplet_change_image(image, 44, 24, current_status);
-   Epplet_timer(cb_timer, NULL, 5.0, "TIMER");
 
    /* Final steps before ending the status update. */
    if (lsize)
@@ -472,6 +467,8 @@ cb_timer(void *data)
       cb_timer_acpi();
    else if ((stat("/sys/class/power_supply", &st) > -1) && S_ISDIR(st.st_mode))
       cb_timer_sys();
+
+   Epplet_timer(cb_timer, NULL, 10.0, "TIMER");
 }
 
 static void
@@ -524,7 +521,7 @@ main(int argc, char **argv)
    Epplet_Init("E-Power", "0.1", "Enlightenment Laptop Power Epplet",
               3, 3, argc, argv, 0);
    atexit(Epplet_cleanup);
-   Epplet_timer(cb_timer, NULL, 30.0, "TIMER");
+   Epplet_timer(cb_timer, NULL, 10.0, "TIMER");
    b_close = Epplet_create_button(NULL, NULL,
                                  2, 2, 0, 0, "CLOSE", 0, NULL, cb_close, NULL);
    b_help = Epplet_create_button(NULL, NULL,

-- 

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

Reply via email to