1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

if_up: convert to callbacks.iftest

This commit is contained in:
Phil Sutter 2009-11-16 23:23:27 +01:00
parent 27c1207cd1
commit 9af79a4907
2 changed files with 1 additions and 7 deletions

View File

@ -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)); new_graph(obj, p, p_max_size, round_to_int(cur->cpu_usage[obj->data.i] * 100));
} }
#endif /* X11 */ #endif /* X11 */
#if (defined(__FreeBSD__) || defined(__linux__))
OBJ(if_up) {
if (!interface_up(obj)) {
DO_JUMP;
}
}
#endif
#ifdef X11 #ifdef X11
OBJ(font) { OBJ(font) {
new_font(p, obj->data.s); new_font(p, obj->data.s);

View File

@ -356,6 +356,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
#if (defined(__FreeBSD__) || defined(__linux__)) #if (defined(__FreeBSD__) || defined(__linux__))
END OBJ_IF_ARG(if_up, 0, "if_up needs an argument") END OBJ_IF_ARG(if_up, 0, "if_up needs an argument")
parse_if_up_arg(obj, arg); parse_if_up_arg(obj, arg);
obj->callbacks.iftest = &interface_up;
obj->callbacks.free = &free_if_up; obj->callbacks.free = &free_if_up;
#endif #endif
#if defined(__OpenBSD__) #if defined(__OpenBSD__)