1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-16 18:15:17 +00:00

Bugfix: $alignr only worked on the first line of $execp, $execpi, $lua and $lua_parse

This commit is contained in:
Nikolas Garofil 2010-05-05 22:02:28 +02:00
parent a32d9e41a4
commit 40452c9712
4 changed files with 1 additions and 10 deletions

View File

@ -788,8 +788,7 @@ void generate_text_internal(char *p, int p_max_size, struct text_object root)
#ifdef BUILD_ICONV
iconv_convert(&a, buff_in, p, p_max_size);
#endif /* BUILD_ICONV */
if (!obj->verbatim_output)
substitute_newlines(p, a - 2);
substitute_newlines(p, a - 2);
p += a;
p_max_size -= a;
(*p) = 0;

View File

@ -714,7 +714,6 @@ struct text_object *construct_text_object(char *s, const char *arg, long
obj->callbacks.free = &free_exec;
END OBJ(execp, 0)
scan_exec_arg(obj, arg);
obj->verbatim_output = 1;
obj->parse = true;
obj->thread = false;
obj->callbacks.print = &print_exec;
@ -755,7 +754,6 @@ struct text_object *construct_text_object(char *s, const char *arg, long
obj->callbacks.free = &free_execi;
END OBJ_ARG(execpi, 0, "execpi needs arguments")
scan_execi_arg(obj, arg);
obj->verbatim_output = 1;
obj->parse = true;
obj->thread = false;
obj->callbacks.print = &print_execi;
@ -1624,12 +1622,10 @@ struct text_object *construct_text_object(char *s, const char *arg, long
#ifdef BUILD_LUA
END OBJ_ARG(lua, 0, "lua needs arguments: <function name> [function parameters]")
obj->data.s = strndup(arg, text_buffer_size);
obj->verbatim_output = 1;
obj->callbacks.print = &print_lua;
obj->callbacks.free = &gen_free_opaque;
END OBJ_ARG(lua_parse, 0, "lua_parse needs arguments: <function name> [function parameters]")
obj->data.s = strndup(arg, text_buffer_size);
obj->verbatim_output = 1;
obj->callbacks.print = &print_lua_parse;
obj->callbacks.free = &gen_free_opaque;
END OBJ_ARG(lua_bar, 0, "lua_bar needs arguments: <height>,<width> <function name> [function parameters]")

View File

@ -197,7 +197,6 @@ int ifblock_stack_empty(void **opaque)
void obj_be_plain_text(struct text_object *obj, const char *text)
{
obj->data.s = strdup(text);
obj->verbatim_output = 1;
memset(&obj->callbacks, 0, sizeof(obj->callbacks));
obj->callbacks.print = &gen_print_obj_data_s;

View File

@ -85,9 +85,6 @@ struct text_object {
long l; /* some long integer */
} data;
/* if non-zero, no substitute_newlines() is applied to object's output */
char verbatim_output;
void *special_data;
long line;
struct obj_cb callbacks;