*add* changed everything to kernel timer for easier integration with new timer

*todo* adapt tooltip also to the timer syntax
*fix* memory leak



git-svn-id: http://tint2.googlecode.com/svn/trunk@266 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2009-11-15 16:55:50 +00:00
parent 429660abb6
commit 806451955b
9 changed files with 113 additions and 87 deletions

View File

@@ -31,6 +31,7 @@
#include "taskbar.h"
#include "battery.h"
#include "clock.h"
#include "timer.h"
PangoFontDescription *bat1_font_desc=0;
PangoFontDescription *bat2_font_desc=0;
@@ -47,6 +48,14 @@ char *path_energy_full=0;
char *path_current_now=0;
char *path_status=0;
void update_batterys()
{
int i;
update_battery();
for (i=0 ; i < nb_panel ; i++)
panel1[i].battery.area.resize = 1;
}
void init_battery()
{
@@ -120,6 +129,9 @@ void init_battery()
g_free(path1);
g_free(battery_dir);
if (battery_enabled)
install_timer(0, 1000000, 3, 0, update_batterys);
}