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-driver.c | |
parent | 6b21505b40126e00636603c705b771e5c857beef (diff) | |
download | gsoc2013-evolution-7c6897ee95e4346e991185c014bcfce003809fd8.tar.gz 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-driver.c')
-rw-r--r-- | filter/filter-driver.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/filter/filter-driver.c b/filter/filter-driver.c index b51e3f0705..c2759fe9d8 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -138,6 +138,8 @@ find_optionrule(struct filter_option *option, char *name) return NULL; } +static char nooption[] = "<h1>Select option</h1><p>Select an option type from the list above.</p>"; + void html_write_options(GtkHTML *html, struct filter_option *option) { @@ -146,13 +148,17 @@ html_write_options(GtkHTML *html, struct filter_option *option) stream = gtk_html_begin(html, ""); gtk_html_write(html, stream, "<body bgcolor=white alink=blue>", strlen("<body bgcolor=white alink=blue>")); - optionrulel = option->options; - while (optionrulel) { - struct filter_optionrule *or = optionrulel->data; - - filter_description_html_write(or->rule->description, or->args, html, stream); - gtk_html_write(html, stream, "<br>", strlen("<br>")); - optionrulel = g_list_next(optionrulel); + if (option) { + optionrulel = option->options; + while (optionrulel) { + struct filter_optionrule *or = optionrulel->data; + + filter_description_html_write(or->rule->description, or->args, html, stream); + gtk_html_write(html, stream, "<br>", strlen("<br>")); + optionrulel = g_list_next(optionrulel); + } + } else { + gtk_html_write(html, stream, nooption, strlen(nooption)); } gtk_html_end(html, stream, GTK_HTML_STREAM_OK); } |