1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

fix execbar merge to callbacks

This commit is contained in:
Phil Sutter 2009-11-22 22:06:04 +01:00
parent 4e63422d10
commit 685d4ca4e8
3 changed files with 4 additions and 4 deletions

View File

@ -546,7 +546,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
obj->callbacks.free = &free_exec;
END OBJ(execbar, 0)
scan_exec_arg(obj, arg);
obj->callbacks.print = &print_execbar;
obj->callbacks.barval = &execbarval;
obj->callbacks.free = &free_exec;
END OBJ(execgauge, 0)
scan_exec_arg(obj, arg);

View File

@ -409,9 +409,9 @@ void print_execigauge(struct text_object *obj, char *p, int p_max_size)
new_gauge(obj, p, p_max_size, round_to_int(ed->barnum));
}
void print_execbar(struct text_object *obj, char *p, int p_max_size)
uint8_t execbarval(struct text_object *obj)
{
new_bar(obj, p, p_max_size, read_exec_barnum(obj->data.s) * 2.55);
return round_to_int(read_exec_barnum(obj->data.s) * 2.55);
}
void print_execibar(struct text_object *obj, char *p, int p_max_size)

View File

@ -48,7 +48,7 @@ void print_execgraph(struct text_object *, char *, int);
void print_execigraph(struct text_object *, char *, int);
#endif /* X11 */
void print_execigauge(struct text_object *, char *, int);
void print_execbar(struct text_object *, char *, int);
uint8_t execbarval(struct text_object *);
void print_execibar(struct text_object *, char *, int);
void free_exec(struct text_object *);
void free_execi(struct text_object *);