diff --git a/src/conky.c b/src/conky.c index bd549602..551bfb7e 100644 --- a/src/conky.c +++ b/src/conky.c @@ -955,15 +955,6 @@ void generate_text_internal(char *p, int p_max_size, new_fg(p, color9); } #endif /* X11 */ - OBJ(conky_version) { - snprintf(p, p_max_size, "%s", VERSION); - } - OBJ(conky_build_date) { - snprintf(p, p_max_size, "%s", BUILD_DATE); - } - OBJ(conky_build_arch) { - snprintf(p, p_max_size, "%s", BUILD_ARCH); - } #if defined(__linux__) OBJ(disk_protect) { snprintf(p, p_max_size, "%s", diff --git a/src/core.c b/src/core.c index 98e9b0ee..5c886ad0 100644 --- a/src/core.c +++ b/src/core.c @@ -439,8 +439,14 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->data.s = scan_font(arg); #endif /* X11 */ END OBJ(conky_version, 0) + obj->type = OBJ_text; + obj->data.s = strdup(VERSION); END OBJ(conky_build_date, 0) + obj->type = OBJ_text; + obj->data.s = strdup(BUILD_DATE); END OBJ(conky_build_arch, 0) + obj->type = OBJ_text; + obj->data.s = strdup(BUILD_ARCH); END OBJ(downspeed, &update_net_stats) parse_net_stat_arg(obj, arg, free_at_crash); END OBJ(downspeedf, &update_net_stats)