E-Power: Timer tweaks.

Change all timeouts to 10 s.
This commit is contained in:
Kim Woelders 2013-07-14 20:03:30 +02:00
parent 2a2b07b2df
commit be52365c1c
1 changed files with 3 additions and 6 deletions

View File

@ -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,