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

fix execigauge conversion to callbacks

This commit is contained in:
Phil Sutter 2009-11-30 23:49:58 +01:00
parent 685d4ca4e8
commit b2b9155514
3 changed files with 5 additions and 5 deletions

View File

@ -570,7 +570,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
#endif /* X11 */
END OBJ_ARG(execigauge, 0, "execigauge needs arguments")
scan_execi_arg(obj, arg);
obj->callbacks.print = &print_execigauge;
obj->callbacks.gaugeval = &execigaugeval;
obj->callbacks.free = &free_execi;
END OBJ_ARG(execi, 0, "execi needs arguments")
scan_execi_arg(obj, arg);

View File

@ -395,18 +395,18 @@ void print_execigraph(struct text_object *obj, char *p, int p_max_size)
}
#endif /* X11 */
void print_execigauge(struct text_object *obj, char *p, int p_max_size)
uint8_t execigaugeval(struct text_object *obj)
{
struct execi_data *ed = obj->data.opaque;
if (!ed)
return;
return 0;
if (time_to_update(ed)) {
ed->barnum = read_exec_barnum(ed->cmd) * 2.55;
ed->last_update = current_update_time;
}
new_gauge(obj, p, p_max_size, round_to_int(ed->barnum));
return round_to_int(ed->barnum);
}
uint8_t execbarval(struct text_object *obj)

View File

@ -47,7 +47,7 @@ void print_execgauge(struct text_object *, char *, int);
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);
uint8_t execigaugeval(struct text_object *);
uint8_t execbarval(struct text_object *);
void print_execibar(struct text_object *, char *, int);
void free_exec(struct text_object *);