1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

merge loadgraph to callbacks.graphval

This commit is contained in:
Phil Sutter 2009-11-24 00:24:17 +01:00
parent bd752e8506
commit 79f5726832
3 changed files with 5 additions and 6 deletions

View File

@ -464,12 +464,11 @@ void scan_loadgraph_arg(struct text_object *obj, const char *arg)
free(buf);
}
void print_loadgraph(struct text_object *obj, char *p, int p_max_size)
uint8_t loadgraphval(struct text_object *obj)
{
if (!p_max_size)
return;
(void)obj;
new_graph(obj, p, p_max_size, info.loadavg[0]);
return round_to_int(info.loadavg[0]);
}
#endif /* X11 */

View File

@ -72,7 +72,7 @@ void scan_loadavg_arg(struct text_object *, const char *);
void print_loadavg(struct text_object *, char *, int);
#ifdef X11
void scan_loadgraph_arg(struct text_object *, const char *);
void print_loadgraph(struct text_object *, char *, int);
uint8_t loadgraphval(struct text_object *);
#endif /* X11 */
uint8_t cpu_barval(struct text_object *);

View File

@ -407,7 +407,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
obj->callbacks.graphval = &cpu_barval;
END OBJ(loadgraph, &update_load_average)
scan_loadgraph_arg(obj, arg);
obj->callbacks.print = &print_loadgraph;
obj->callbacks.graphval = &loadgraphval;
#endif /* X11 */
END OBJ(diskio, &update_diskio)
parse_diskio_arg(obj, arg);