diff options
author | NotZed <NotZed@HelixCode.com> | 2000-02-22 18:09:07 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-02-22 18:09:07 +0800 |
commit | 7c6897ee95e4346e991185c014bcfce003809fd8 (patch) | |
tree | b34cb809263e9641c3311168c43b8977812e91be /filter/filter-format.c | |
parent | 6b21505b40126e00636603c705b771e5c857beef (diff) | |
download | gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.gz gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.bz2 gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.lz gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.xz gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.zst gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.zip |
New utility functions for working with the internal rule format.
2000-02-22 NotZed <NotZed@HelixCode.com>
* filter-xml.c (filter_clone_optionrule):
(filter_clone_optionrule_free):
(filter_optionrule_new_from_rule): New utility functions for
working with the internal rule format.
* filter-arg.[ch]: Added new callbacks for editing a single value,
and a new editor which shows all items in a list, and allows you
to edit them via the single-edit method. This needs some cleanup
for some unused/unusable virtual methods (edit_values,
write_html?).
* Makefile: Add the druid for build.
* filter-druid.c: A 'druid' widget for editing a single filter
rule.
svn path=/trunk/; revision=1901
Diffstat (limited to 'filter/filter-format.c')
-rw-r--r-- | filter/filter-format.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/filter/filter-format.c b/filter/filter-format.c index 00dcba00d3..8f0f67b16e 100644 --- a/filter/filter-format.c +++ b/filter/filter-format.c @@ -11,18 +11,20 @@ #include "filter-arg-types.h" #include "filter-xml.h" +#define d(x) + /* FIXME: remove static, this is defined in filter-xml */ static int filter_find_rule(struct filter_rule *a, char *name) { - printf("finding, is %s = %s?\n", a->name, name); + d(printf("finding, is %s = %s?\n", a->name, name)); return strcmp(a->name, name); } static int filter_find_arg(FilterArg *a, char *name) { - printf("finding, is %s = %s?\n", a->name, name); + d(printf("finding, is %s = %s?\n", a->name, name)); return strcmp(a->name, name); } @@ -67,11 +69,11 @@ arg_text(FilterArg *arg) value = arg->values; - printf("getting text from arg %s\n", arg->name); + d(printf("getting text from arg %s\n", arg->name)); if (value == NULL) return NULL; - + str = g_string_new(""); filter_arg_write_text(arg, str); out = str->str; @@ -84,14 +86,14 @@ description_decode_text(struct filter_desc *d, struct description_decode_lambda { GList *list; char *txt; - + switch (d->type) { case FILTER_XML_TEXT: case FILTER_XML_DESC: dotext: - printf("appending '%s'\n", d->data); + d(printf("appending '%s'\n", d->data)); /* printf("vartype = %s\n", detokenise(d->vartype)); */ - printf("varname = %s\n", d->varname); + d(printf("varname = %s\n", d->varname)); if (d->vartype !=-1 && d->varname && (list = g_list_find_custom(l->args, d->varname, (GCompareFunc) filter_find_arg)) && (txt = arg_text(list->data))) { @@ -112,13 +114,13 @@ filter_description_text(GList *description, GList *args) char *txt; struct description_decode_lambda l; - printf("\ndecoding ...\n"); + d(printf("\ndecoding ...\n")); l.str = g_string_new(""); l.args = args; g_list_foreach(description, (GFunc) description_decode_text, &l); - printf("string is '%s'\n", l.str->str); + d(printf("string is '%s'\n", l.str->str)); txt = l.str->str; g_string_free(l.str, FALSE); @@ -129,7 +131,7 @@ filter_description_text(GList *description, GList *args) static void html_write(GtkHTML *html, GtkHTMLStreamHandle *stream, char *s) { - printf("appending html '%s'\n", s); + d(printf("appending html '%s'\n", s)); gtk_html_write(html, stream, s, strlen(s)); } @@ -145,9 +147,9 @@ description_decode_html(struct filter_desc *d, struct description_decode_lambda case FILTER_XML_TEXT: case FILTER_XML_DESC: dotext: - printf("appending '%s'\n", d->data); + d(printf("appending '%s'\n", d->data)); /*printf("vartype = %s\n", detokenise(d->vartype));*/ - printf("varname = %s\n", d->varname); + d(printf("varname = %s\n", d->varname)); free = FALSE; if (d->vartype !=-1 && d->varname) { char *link; @@ -190,7 +192,7 @@ filter_description_html_write(GList *description, GList *args, GtkHTML *html, Gt char *txt; struct description_decode_lambda l; - printf("\ndecoding ...\n"); + d(printf("\ndecoding ...\n")); l.str = NULL; l.args = args; |