1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-04 13:08:31 +00:00

loadgraph: convert to callbacks.print

This commit is contained in:
Phil Sutter 2009-11-16 00:54:15 +01:00
parent ee40c63542
commit 42b71217e3
3 changed files with 4 additions and 3 deletions

View File

@ -466,6 +466,9 @@ void scan_loadgraph_arg(struct text_object *obj, const char *arg)
void print_loadgraph(struct text_object *obj, char *p, int p_max_size)
{
if (!p_max_size)
return;
new_graph(obj, p, p_max_size, info.loadavg[0]);
}
#endif /* X11 */

View File

@ -895,9 +895,6 @@ void generate_text_internal(char *p, int p_max_size,
OBJ(cpugraph) {
new_graph(obj, p, p_max_size, round_to_int(cur->cpu_usage[obj->data.i] * 100));
}
OBJ(loadgraph) {
print_loadgraph(obj, p, p_max_size);
}
#endif /* X11 */
#if defined(__linux__)
OBJ(disk_protect) {

View File

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