aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-driver.c
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-02-22 18:09:07 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-02-22 18:09:07 +0800
commit7c6897ee95e4346e991185c014bcfce003809fd8 (patch)
treeb34cb809263e9641c3311168c43b8977812e91be /filter/filter-driver.c
parent6b21505b40126e00636603c705b771e5c857beef (diff)
downloadgsoc2013-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-driver.c')
-rw-r--r--filter/filter-driver.c20
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);
}