From 9af79a49078ce62aa79cd84aa8b6ea29dbd1d8fa Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 16 Nov 2009 23:23:27 +0100 Subject: [PATCH] if_up: convert to callbacks.iftest --- src/conky.c | 7 ------- src/core.c | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/conky.c b/src/conky.c index a82a1bad..ce4aea42 100644 --- a/src/conky.c +++ b/src/conky.c @@ -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); diff --git a/src/core.c b/src/core.c index 437471bd..78cd00fe 100644 --- a/src/core.c +++ b/src/core.c @@ -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__)