diff --git a/src/conky.c b/src/conky.c index f4068cd9..297ee735 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1669,9 +1669,6 @@ void generate_text_internal(char *p, int p_max_size, } snprintf(p, p_max_size, "%s", buf); } - OBJ(scroll) { - print_scroll(obj, p, p_max_size, cur); - } OBJ(combine) { print_combine(obj, p, cur); } diff --git a/src/core.c b/src/core.c index 2e5b75da..aff7bf02 100644 --- a/src/core.c +++ b/src/core.c @@ -1357,6 +1357,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->next = new_text_object_internal(); #endif /* X11 */ parse_scroll_arg(obj, arg, free_at_crash); + obj->callbacks.print = &print_scroll; obj->callbacks.free = &free_scroll; END OBJ_ARG(combine, 0, "combine needs arguments: ") parse_combine_arg(obj, arg, free_at_crash); diff --git a/src/scroll.c b/src/scroll.c index e2f74e33..388c8aa0 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -78,7 +78,7 @@ void parse_scroll_arg(struct text_object *obj, const char *arg, void *free_at_cr #endif /* X11 */ } -void print_scroll(struct text_object *obj, char *p, int p_max_size, struct information *cur) +void print_scroll(struct text_object *obj, char *p, int p_max_size) { struct scroll_data *sd = obj->data.opaque; unsigned int j, colorchanges = 0, frontcolorchanges = 0, visibcolorchanges = 0, strend; @@ -88,7 +88,7 @@ void print_scroll(struct text_object *obj, char *p, int p_max_size, struct infor if (!sd) return; - generate_text_internal(buf, max_user_text, *obj->sub, cur); + generate_text_internal(buf, max_user_text, *obj->sub, &info); for(j = 0; buf[j] != 0; j++) { switch(buf[j]) { case '\n': //place all the lines behind each other with LINESEPARATOR between them diff --git a/src/scroll.h b/src/scroll.h index 4c33eb80..baf6c3f4 100644 --- a/src/scroll.h +++ b/src/scroll.h @@ -30,7 +30,7 @@ #define _SCROLL_H void parse_scroll_arg(struct text_object *, const char *, void *); -void print_scroll(struct text_object *, char *, int, struct information *); +void print_scroll(struct text_object *, char *, int); void free_scroll(struct text_object *); #endif /* _SCROLL_H */