mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
if_up: convert to callbacks.iftest
This commit is contained in:
parent
27c1207cd1
commit
9af79a4907
@ -896,13 +896,6 @@ void generate_text_internal(char *p, int p_max_size,
|
||||
new_graph(obj, p, p_max_size, round_to_int(cur->cpu_usage[obj->data.i] * 100));
|
||||
}
|
||||
#endif /* X11 */
|
||||
#if (defined(__FreeBSD__) || defined(__linux__))
|
||||
OBJ(if_up) {
|
||||
if (!interface_up(obj)) {
|
||||
DO_JUMP;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef X11
|
||||
OBJ(font) {
|
||||
new_font(p, obj->data.s);
|
||||
|
@ -356,6 +356,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
||||
#if (defined(__FreeBSD__) || defined(__linux__))
|
||||
END OBJ_IF_ARG(if_up, 0, "if_up needs an argument")
|
||||
parse_if_up_arg(obj, arg);
|
||||
obj->callbacks.iftest = &interface_up;
|
||||
obj->callbacks.free = &free_if_up;
|
||||
#endif
|
||||
#if defined(__OpenBSD__)
|
||||
|
Loading…
Reference in New Issue
Block a user