mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 11:05:18 +00:00
hr, stippled_hr: convert to callbacks.print
This commit is contained in:
parent
4927eb85a2
commit
eb612dfcb0
10
src/conky.c
10
src/conky.c
@ -981,11 +981,6 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
OBJ(fs_used_perc) {
|
OBJ(fs_used_perc) {
|
||||||
print_fs_perc(obj, 0, p, p_max_size);
|
print_fs_perc(obj, 0, p, p_max_size);
|
||||||
}
|
}
|
||||||
#ifdef X11
|
|
||||||
OBJ(hr) {
|
|
||||||
new_hr(obj, p, p_max_size);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef HDDTEMP
|
#ifdef HDDTEMP
|
||||||
OBJ(hddtemp) {
|
OBJ(hddtemp) {
|
||||||
short val;
|
short val;
|
||||||
@ -1462,11 +1457,6 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
OBJ(text) {
|
OBJ(text) {
|
||||||
snprintf(p, p_max_size, "%s", obj->data.s);
|
snprintf(p, p_max_size, "%s", obj->data.s);
|
||||||
}
|
}
|
||||||
#ifdef X11
|
|
||||||
OBJ(stippled_hr) {
|
|
||||||
new_stippled_hr(obj, p, p_max_size);
|
|
||||||
}
|
|
||||||
#endif /* X11 */
|
|
||||||
OBJ(swap) {
|
OBJ(swap) {
|
||||||
human_readable(cur->swap * 1024, p, 255);
|
human_readable(cur->swap * 1024, p, 255);
|
||||||
}
|
}
|
||||||
|
@ -596,6 +596,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
obj->callbacks.print = &print_fs_used;
|
obj->callbacks.print = &print_fs_used;
|
||||||
END OBJ(hr, 0)
|
END OBJ(hr, 0)
|
||||||
obj->data.l = arg ? atoi(arg) : 1;
|
obj->data.l = arg ? atoi(arg) : 1;
|
||||||
|
obj->callbacks.print = &new_hr;
|
||||||
END OBJ(nameserver, &update_dns_data)
|
END OBJ(nameserver, &update_dns_data)
|
||||||
parse_nameserver_arg(obj, arg);
|
parse_nameserver_arg(obj, arg);
|
||||||
obj->callbacks.print = &print_nameserver;
|
obj->callbacks.print = &print_nameserver;
|
||||||
@ -933,6 +934,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
END OBJ(stippled_hr, 0)
|
END OBJ(stippled_hr, 0)
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
scan_stippled_hr(obj, arg);
|
scan_stippled_hr(obj, arg);
|
||||||
|
obj->callbacks.print = &new_stippled_hr;
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
END OBJ(swap, &update_meminfo)
|
END OBJ(swap, &update_meminfo)
|
||||||
END OBJ(swapfree, &update_meminfo)
|
END OBJ(swapfree, &update_meminfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user