1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-27 00:58:36 +00:00

simplify conky_version and co. a bit

This commit is contained in:
Phil Sutter 2009-11-16 01:37:45 +01:00
parent c8bed3a28d
commit 7291184783
2 changed files with 6 additions and 9 deletions

View File

@ -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",

View File

@ -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)